I think the biggest problem I have is that when I get together with Java and Python programmers at a party, I always have to justify why I brought two tall, blonde models with me when none of them can ever get a date. Then one of them always asks me to move my Ferrari because it's blocking their Toyota Corolla. Sometimes they bully me for being so successful so I have to wipe my tears away with $100 bills. I don't think people understand how hard it is to have a language that's so in demand that you can always find good paying work. So I guess I don't like how sometimes I feel like an outcast because I have so little to complain about.
Oh... and units of measure . C# has a time unit of measure, but you always have to roll your own mass, temperature, length and currency units of measure. A language like Frink already makes it pretty easy to do this. I don't understand why a business oriented language like C# doesn't have units of measure already baked in.
Double dash is just convention for console programs to pass "full name" parameters. And one dash for shortened versions.
You can use package https://www.nuget.org/packages/System.CommandLine where you just have to describe your parameters, all parsing work is done by library. There is link to github with documentation on the right side.
​
If you want to implement it manually, your code must check for --random, not just random. Args array is split by whitespaces, not by dashes or anything else.
I've been using Jetbrains Rider quite a bit recently, and it's been pretty damn awesome. It's free for students and educators, and is also free if you're only using it on open-source projects. There's a few other options too that could be worth checking. It runs on Windows, MacOS and Linux.
Not much to say (beyond the obvious "why are you using Norton"), but a friendly tip on this:
> In the meantime, the database file now is locked since the program failed on access. reboot or find the process id to release the lock.
LockHunter is your friend. Adds a shell command to figure out what process is locking any file and optionally kill it or delete the file.
Here's the best book on the subject. I've been coding for 20+ years, and I have yet to come across a better written programming book:
Don't take my word for it. Read the reviews.
Hi all,
I am the developer who started the ImageSharp library and it's really good to see a vigorous dialogue surrounding our decision, a little negative for my tastes, but hey, them's the breaks.
I made a mistake when I published the original blog post and omitted some vitally important text (closed the tab by accident when composing, thought it was saved) regarding the license changes. I've updated the post but I'll comment here also.
The commercial license model we are considering has two paths.
A subscription license, per developer, per year with unlimited usage. This would be renewable for a maximum of 3 years before you automatically receive a perpetual license for unlimited developers and usage.
A one time payment to receive an perpetual license for unlimited developers and usage.
We will offer free commercial licenses for not-for-profit organizations and cheap licenses for indie developers.
As I said in the post, we're gonna be cheap, almost painfully so, in order to hopefully not drive away users. We're talking less than most people would spend on coffee per year.
We didn't make this decision lightly. In a perfect world we would get corporate sponsorship and continue with the license we have but that simply does not seem to be on the radar.
Over the last few years we have been gratefully accepting donations from a generous few totalling up to $3,515.61. I'm sure you would agree that this isn't enough for us to continue to dedicate the time and resources to continue to maintain the library; graphics libraries are a very difficult subject to tackle and require a lot of intensive study to develop and maintain.
If you want to change this situation, please help there. https://opencollective.com/imagesharp
Cheers
James
​
C# works absolutely fine under Linux. Mono is feature equivalent to .NET, and is present in practically every major distribution. You won't need to relearn anything, it's just code and go. All of the namespaces and bundled libraries are exactly the same on Linux. The only things you won't be able to do are Windows-specific APIs such as DirectShow, the registry, and P/Invoke with native Windows libraries (but P/Invoke with native Linux libraries works fine!). NuGet works without a hitch.
MonoDevelop is the primary IDE for Linux, and it's superficially similar to Visual Studio. However, there's a new kid on the block called Rider (https://www.jetbrains.com/rider/) made by JetBrains, which I use on a daily basis. It's still in EAP, but I think it's great - certainly better than MonoDevelop, that's for sure! It even has a Unity plugin, if you want to fiddle with that.
What you will not be able to use is any of the Microsoft UI toolkits, such as Windows.Forms (well, forms is partially supported, but it looks like arse) or WPF (no support at all). However, you can always use GTK, which is easy to use and works on Windows and Mac too.
I don't own a single Windows or Mac computer, and C# is my primary language. I'm completely satisfied with C# on Linux.
If you want to have a look at some code which has been written with Linux in mind, but also with support for Windows and Mac, check out one of my projects: https://github.com/Nihlus/Launchpad - it uses GTK, no Windows-only APIs and is tested across all three platforms.
It's written in Java, but for the most part, it's very transferable to C#. When I was a junior dev transitioning to intermediate, it was pretty worth my while. It's a relatively easy read and doesn't require you to be writing code or sitting at a computer (at least it didn't for me).
Feel free though while reading it to critically question some ideas as to how applicable they are in the C#.NET ecosystem, current best practices, and your day-to-day work. (For example, IIRC, he argues that you shouldn't prefix interfaces with the capital I
. I still do that though and I find it worthwhile.)
I can also throw in a recommendation for https://www.amazon.co.uk/Adaptive-Code-via-patterns-principles/dp/0735683204/ref=sr_1_2?keywords=C%23+SOLID&qid=1564580206&s=gateway&sr=8-2 - I have a copy and it's a good read
It's a wrapper, as you've said. But it's actually the adapter design pattern, from what I can tell.
Design patterns are very useful for describing your intent, and so that other people know what the hell you're writing haha.
If you’re using Xamarin.TestCloudAgent, make sure to remove it from the release build.
It uses private APIs to allow automated UITesting.
#if DEBUG Xamarin.Calabash.Start(); #endif
Visual Studio Community is free. Mostly.
​
https://visualstudio.microsoft.com/vs/support/community-edition-expired-buy-license/
For those interested here are the supported languages:
Syntax coloring, bracket matching:
Syntax coloring, bracket matching Plus IntelliSense, linting, outline
Syntax coloring, bracket matching Plus IntelliSense, linting, outline plus Refactoring, find all references
No, a lot was added but a lot or what was added to the language and framework completely obsoleted older features.
2010 isn’t « too » bad as that’s .net 4 so you won’t get bad habbits on pre linq, or worse, pre generics programming.
However the new trend is .net core and the language moved fast the last few years. If you want to do windows application programming you can start with this book, if you want to do web programming toss it away, that changed way too much
TLDR: if you want to develop for the web, go buy a recent book on asp.net mvc core 2.0 or higher (make sure it’says core, mvc 2 is ancient, version numbers are mvc 1 2 3 4 etc then replaced by mvc core 1 when .net core came out). If you don’t care about website development, you « can » start with this book even if lt’s old
Also if looking for recommandation on books i can only suggest this book https://www.amazon.com/Pro-NET-Core-Andrew-Troelsen/dp/1484230175/ref=mp_s_a_1_4?keywords=Andrew+Troelsen&qid=1561003839&s=books&sr=1-4
It will cover C#, the recent version of .net and .net core. And start you both in windows and web development
Uncle Bob, 'Clean Architecture' is the book you want. Examples are in Java but you shouldn't have any problems understanding
This book is a must-read, imo.
Clean Architecture: A Craftsman's Guide to Software Structure and Design (Robert C. Martin Series) https://www.amazon.com/dp/0134494164/ref=cm_sw_r_cp_apa_i_FyzqDbV9KJ25Y
Welcome!
As far as downloads, all you need is visual studio. The community edition is free and has all the features, the only difference with the paid versions is licensing. https://visualstudio.microsoft.com/vs/community/
C# is a great choice. It has a wonderful array of free packages on nuget, a great community here on reddit, and lots of knowledge available on the interwebs. Anything you need an answer for is only a Google away.
Best of luck!
PDF extraction is actually a really tough problem still. My last company worked with a number of the tools you've probably seen, but we found actually the best extractor was, by far, TIKA, which is a Java service. If you can, I'd recommend just putting it in a tiny Java microservice and calling it with PDFs you want the extraction from. Alternatively you can execute a Java application directly in your C# code, or you could use this NuGet package directly: https://www.nuget.org/packages/TikaOnDotNet/
Note, that last one works, and we used it at my last job, but it's built on IKVM, which is a jvm implementation inside of the CLR, and the project is dead and not getting migrated to dotnet core.
Instead of putting Microsoft.Extensions.Logging in your library, it'd be better to just include the interfaces.
They've made this package for this: https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions/
Pick up C# Player’s Guide
This book is helping me so much as a beginner. I have a hard time learning from videos and learn better from books so it’s important to figure out your learning style but if you don’t mind giving books a go, that’s the one.
The problem with video tutorials (especially YouTube ones) is that most instructors don’t know how to teach. Coding, especially, is pretty complicated to teach and takes a special skill that not many have to teach it properly
I find them to be very valuable. I can lay in bed and read through the more theory or ideology based materials (Like game design patterns, Clean Code, The Pragmatic Programmer....Etc) I can't do this with a PDF.
There is a difference in learning and concentration when holding a physical book vs reading on a phone or a tablet, at least for me.
> Recent apps like Windows Terminal aren’t .NET, which can be justified from a performance point of view but is also a slap in the face.
Wrong example. At this stage, the fact that most of the project is C++ has more to do with legacy.
On one hand, Windows terminal is based on the original conhost which of course was made in C++ (since C# didn't exist at the time). On the other hand, all samples (but one) are written in C#: https://github.com/Microsoft/Terminal/tree/master/samples
I like books for learning, I would recommend a few not just about C#, but software engineering as a whole.
That's actually available as a package for .NET 4.0, because the feature is a combination of compiler and library support - nothing special in the runtime: https://www.nuget.org/packages/Microsoft.Bcl.Async/
What's your view on political stuff like this? https://edabit.com/challenge/HXsSRtx83xj7K94dW
I don't really take a stance on US politics since I don't live there, but it feels kinda malplaced to have such questions (regardless of what political motive) on a programming site. Makes it feel a bit unprofessional imo.
CLR via C# for a better understanding of the runtime you're working with.
C# in Depth for a deep dive into the language and it's features and their details of implementation.
I'd consider those two to be the primary intermediate texts.
You have it right. For what you've posted, they both should behave the same. You'll have to provide more context (likely more code) and the platform/APIs you're using.
EDIT: Ideally, you'll be able to provide us a Minimal, Complete, and Verifiable example.
Span<T>
itself is on NuGet https://www.nuget.org/packages/System.Memory/4.4.0-preview2-25405-01
Framework apis taking Span and Memory aren't even released in Core yet ( they are still being worked on)
There's an old post at stackoverflow, which covers a lot of these:
https://stackoverflow.com/questions/9033/hidden-features-of-c
Keywords
Attributes
Syntax
and a lot more ...
This is the best json library I've found for C#: http://www.newtonsoft.com/json
Read through it, it's actually super simple to use but also offers a ton of power if you need it. And it can also be installed from nuget so you don't need to download and reference it manually.
It sounds like you're wanting to create a restful endpoint to handle communication with your database. Using something like ASP.NET Web API would be the simplest route and there's plenty of documentation out there to get you going.
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
Git is hard. It's easy to want to compare it to another VCS and to mentally map concepts. But don't, because they won't map.
How long have you been at it? It took me a few weeks before I was really comfortable. Now I've been using it for 6 years and it's as second-nature as tying my shoe.
What client are you using? While it does increase the learning curve, I highly recommend getting super comfortable with the CLI before using any GUI. As most GUIs are just wrappers around Git commands, it's important to understand those commands.
Have you read this book? If not, I highly recommend it as it dives deep into the core concepts of Git. It was while reading this book that I got my first "ah ha!" moment.
Don't give up!
Read this (Clean Code), a whole book written to answer that one question.
If you like that then there are lots of others, just read anything by Robert Martin, Martin Fowler, Prag Prog, etc.
You would use them to get and set values for private properties in your class. Is a way of encapsulating object properties so they can't be changed from outside the object scope. Think of the bank account example. Would you want to be able to change the balance from everywhere in your code? If you have more bank accounts instantiated you might change the balance of them all.
https://www.freecodecamp.org/news/java-getters-and-setters/
Is the same in every language. In c# you can declare them as property{get; set;} I think...
The Microsoft.Extensions.* libraries are somewhat independent form the framework versions. Although they are released in parallel and the version numbers are mostly the same, you can reference them from older framework versions. If you look at the nuget package https://www.nuget.org/packages/Microsoft.Extensions.Logging/ in the dependencies section, you can see which .net versions are supported - .net core 3.1 for example will use the .net standard 2.1 version
Hey guys,
Some of us devs here at sporting solutions recently needed to find the difference between 2 C# objects. Rather than write it by hand for each type of object we wanted to diff, we wanted a library which could perform a diff between any 2 objects. We couldn't find an existing library for this, so decided to create our own - ObjectDiffer.
It's available on nuget as ObjectDiffer
Hopefully this will help some of you guys out if you're struggling with the same problem we were. The library is very early in development, so any pull requests would be very welcome :).
> That's not quite what it says, though. It's also unclear what that mean. Does UWP "make sense" for Terminal and Calculator?
Calculator and Terminal are pure UWP applications. Terminal uses runFullTrust
capability which allows it to run non-UWP applications.
It makes perfect sense to make utility applications as UWP.
Pro C# 7 covers a lot of useful non language stuff that will help you get a bit of insight into the MS ecosystem, but it's almost 1500 pages and some of the sections I read dragged it out a bit. I swear they could cut it down to under a thousand without losing anything of value.
Not on your list: C# in depth 4th edition is a joy to read and covers the language as it evolved which you'll find quite useful as it puts into context a lot of design decisions. I've bought each version since the 1st and still enjoy it.
The other one I have no information about.
I'll chuck in Microsoft Developer Essentials which isn't a book, but microsoft's all in one developer resource. You'll get the software, training (3 months of pluralsight (probably, it changes from 0-3-6-3-n) and the MVA) and other stuff for free.
Depends.
Personal Dev? 1-10
Professional Dev? 1,000 -> 10,000
Remember - If you're a professional and are using "+" to add two numbers together - You're doing it wrong.
There's a package for that - There's a package for everything.
Ok. I am going to recommend a slightly different path for you.
First, read through this tutorial: http://www.asp.net/mvc/tutorials/mvc-music-store
Then consider doing your project as an MVC web app with Entity Framework. I think you might find it a lot easier, and you'll end up with an application that isn't tied to the desktop.
I use Visual Studio Code for some light editing or small front end changes.
For larger project work, I tend to use Rider which I find a bit closer to the full VS experience on Mac.
FYI not affiliated in any way. Just passing on a recommendation I haven't seen mentioned here.
Optimization and code hygiene are mostly orthogonal and largely unrelated. Clean code may not be optimized, and highly optimized code is often actually a little gross.
Does your version of Visual Studio offer Code Analysis tools? If it does, that can give you some idea of what parts of your solution may be too complex
Code Complete, by Steve McConnell, would probably also be worth a read.
This is not simply a joke. JavaScript: The Good Parts is supposed to be mainly about how to avoid the pitfalls of JavaScript and how to fill in the missing things. In C# the solution is often directly using the language construct.
That's a very lengthy explanation, but I think the answer is a lot simpler, actually.
Basically, when Microsoft initially designed the JIT compiler, they made sure it was capable of generating machine code fast, but not necessarily ensure that said machine code runs efficiently. When they had to make a 64-bit version of the JIT, they decided to make the generated machine code run more efficiently, with the trade-off that the JIT takes a little longer to generate that code.
This (and the reasoning behind it) is explained in this video @ 48:34.
/u/issafram /u/pyronautical /u/xNeshty
First, you should all be familiar with the classicist and mockist styles. You can't make an argument for one style without being aware of the other.
So first are two links to get you started. Fowler (Martin) wrote about it a long time ago and then updated it more recently. It's still the most recommended link to get your head around the differences.
The second link is a slideshare which provides a nice summary of both (with a few caveats). I like it because it makes the argument that you should know both styles and be adaptable. However, people still tend to gravitate to one side or the other as it reflects their coding style.
Mockists and Classicists both use Mocks, just in different ways. Classicists use them at service boundaries and will test large units of code to assert a behaviour works correctly. Mockists test tiny units of code and mock extensively so only that unit is tested. As mentioned, the slideshare makes assumptions about design direction that aren't necessarily correct (Inside out vs outside in) except for specific styles of classicist and mockist testing.
I'm happy to discuss it with you, because I think it's really important, but do read the two links I provide above first so you at least recognise the terms. It's not that surprising that you're not familiar with them. TDD is often taught in Mockist terms. I think this actually has more to do with the examples they use, which are naturally short to keep the tutorial simple, rather than being a direct endorsement of the approach.
Microsoft has some good docs, you can start with this to get a feel for it. https://docs.microsoft.com/en-us/aspnet/core/tutorials/web-api-vsc
We host all our of services in docker on Linux, so when the time comes for you to try that, here is a beginners guide https://dev.to/schwamster/docker-tutorial-with-for-aspnet-core
Hopefully this gets you started. If you have more questions I can try to answer as well.
What are your reservations for Visual Studio Express in comparison to Notepad++? If it's reservations about using closed source software, you can also consider MonoDevelop which is open source.
EDIT: I also wouldn't consider Notepad++ an "IDE" by any stretch.
I might be wrong, but I thought this was just rebranding? Express stopped in 2012, after that Community took over. There was some period of time when both were out but had different licensing terms. But now, if you go to https://visualstudio.microsoft.com/vs/express/ it just says express is now community.
So it's just whether you want an old free version, or a new free version of visual studio. At least, that is how I read it.
I would just get VS 2017 Community unless you have a reason not to.
Learn how to test and debug your code. Like inside and out.
Also investigate DRY and SOLID. I really like Clean Code by Bob Martin as a book. Spend some time learning functional design as a counter to OO. (favor compositions over inheritance).
Learn relational databases inside and out. Never rely on having a dba to do that for you.
One part of coding is "getting things done", but doing them well will get you farther. People don't complain about missing features nearly as much as they complain about bugs.
Instead of Uncle Bob, please read Code Complete by Steve McConnell. YMMW, but unlike Robert Martin's books, that is based on an actual research and not anecdotal stories or "this sounds cool".
Of course, Uncle Bob is much easier to read... but Code Complete is a whole lot more useful than "since my variable names started to be like Pink Floyd, NO ONE should listen to music when coding" (paraphrasing here) or “The proper use of comments is to compensate for our failure to express yourself in code. Note that I used the word failure. I meant it. Comments are always failures.” (actual quote!).
P.S./edit: I am sure that this comment not following the I-love-Uncle-Bob bandwagon will get a whole lot of downvotes, but I will guarantee that at some point of your career you will take over someone's code and go "oh... this is just really hard to understand", and then realize that the previous coder was following Uncle Bob's advice to a T. But, of course, since majority of developers don't read a single programming book after graduation, even Uncle Bob is better than nothing.
One of the best ways to learn is by studying other people's code. Using book references like the one you have on C# is a great start. Make sure you ask questions to yourself and really study the code. Questions to keep in mind: why is this line before that line? What would happen if these two lines were swapped? How could I make this easier to read? Do all of these lines make sense when grouped together in a function? How can I break this down into a simpler class/object?
Those are the kinds of questions professional developers ask themselves on a daily basis. If you start asking yourself those kinds of questions early, you'll become a very competent programmer.
I highly recommend new programmers to read Code Complete: http://www.amazon.com/dp/0735619670/ref=cm_sw_r_tw_awdm_ZlAbvb1GP04MC
The fact that you've submitted this question indicates that you're on the right track. You just need practice.
Pure functions are good for many reasons, independently of the programming language:
- Their behavior is predictable
- They are easy to test (and refactor)
- They are easy to compose with other functions
- They are easy to execute in parallel
Take a look here to learn a bit more.
Of course, trying to apply a strict functional mindset to a non-functional language may have... side effects. :-) Read this to understand what I mean.
I agree, I've had this problem too.
There are two good solutions, though:
I think if you are just starting out then a console app is a good idea. Its the easiest thing to get going and you wont have to worry about any UI stuff.
​
I'd recommend sticking with the excel file for now. What you're describing should really be stored in a database of some kind but again, if you're just starting out a spreadsheet should be fine.
The only issue with the spreadsheet is the "normal" way to edit and read them uses COM interop which is really annoying to use. If your spreadsheet is a .xlsx file or can be converted to one, you can use a library called EPPlus to make editing and reading much easier.
​
At my last job i spent ALOT of time working with excel spreadsheets in C# so feel free to ask me any questions you might have I'd love to help
With C#, you will probably be using more of the .NET Framework (which is a good thing) compared to when you were programming in C. You can also use the NuGet package manager to easily incorporate third party libraries into your program.
As far as it goes for a TrayIcon i would go with NotifyIcon As it uses WPF and can be transformed to look just as great as anything else, but then again the minimal Ram usage would raise.(WPF)
for a Timer you could use the System.Diagnostics.DispatcherTimer class and its Tick Event. Or you could run a infinite self calling Task Method
At this point, you should probably look into a logging library. Most of them allow you to customize the formatting of your logs without changing the code itself, and you can even add different formats (including colors) for different log levels or depending on which class or method the log came from.
The one I use is NLog, but you can probably find others by searching online.
http://www.codeproject.com/Articles/274461/Very-fast-screen-capture-using-DirectX-in-Csharp
If you're going to try and cap the screen, you can't use GDI, it's too slow. DirectX should do the trick, and should even work if there's a full screen game playing.
LINQPad works great for this too. It does more than just LINQ to SQL. It's a great little scripting tool for building out console and test apps without going into a full solution in visual studio.
Use Asp.net only as backend API. Frontend nowadays is mostly Angular/React/Vue. https://docs.microsoft.com/pl-pl/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
https://reactjs.org/docs/hello-world.html
You can start with simple json API and then consume it from react.
One screenshot is with VS Code, the other one is with Visual Studio. Brackeys use the latter (download it from there: https://visualstudio.microsoft.com/downloads/).
Both also ship with several themes that can have different colors than the ones you use.
This may be a silly question and I'm just missing something, but is there a way to get IntelliSense for C# code without a project.json or *.sln file, as mentioned here?
I was hoping I could use Code to replace Notepad++ when I just wanted to work on a quick C# file without the hassle of creating a project in full Visual Studio, but it seems that IntelliSense only functions when I'm opening some sort of project? I'm hopeful I'm just missing something and IntelliSense can just function on its own like it seems to do with JavaScript.
Hi, I would like to present my first complete project. This is an Android game on the Unity 2D engine. The scripting language is C #. I would like to know your opinion on my project and feedback is also welcome.
Up To Space
The task is to fly a space rocket, avoid obstacles and destroy aliens! You can expand your hangar with new space rockets, multiply your points by researching, discover new planets and expand their level, and more!
Of course, if the post is taken as spam or someone is offended, I will delete it immediately.
Game is here: https://play.google.com/store/apps/details?id=com.VladimirDubecky.UpToSpace
Thank you
Have a nice day
You can easily roll your own:
public interface ICloneable { object Clone(); }
Not sure about Xamarin PCL, but the reason ICloneable is generally frowned upon is it doesn't have a generic interface - if I implement ICloneable on object A, there's nothing stopping me returning a totally unrelated object B
There's a topic here on stack overflow that discusses good cloning techniques
EDIT:
If you want a generic ICloneable you could do something like:
public interface ICloneable<T> // where T : ICloneable<T> (where only if this needed to be used as a type rather than just a contract) { T Clone(); //Thanks /u/Veranova for bug fix }
public class MyTypeEnforcedClone : ICloneable<MyTypeEnforcedClone> { public MyTypeEnforcedClone Clone() { //Clone } }
EDIT Fixed generic interface, thanks /u/Veranova
SECOND EDIT The more I think about it, as this is an interface, not an abstract, unless you are using this interface to implicitly type the object, the where T : ICloneable<T> is not necessary. Thanks again to /u/Veranova for querying this.
To be a bit of a jerk about it, since others have answered:
This code does the same thing that Entity Framework does, but in a less efficient and less safe manner.
Take a look at Entity Framework to see how it works, and check out this NuGet package to let you incorporate EF with SQLite.
Once it is in place then this code becomes something like
databaseContext.MyEntityCollection.FirstOrDefault( x => x.id == idToFind );
From Rust FAQ (paraphrased):
> Q: How can I implement a graph or other data structure that contains cycles?
> A: Use garbage collection in the form of reference counting.
You should totally check Bob Tabor's learning videos, that guy is simply awesome. I'm currently learning C# from scratch using his videos and I'm finally getting the feeling that I got it!
*edit: Here's the link to the series.
Uno Platform is a very similar framework, based on UWP however, not WPF, and targets android/ios too. They are going with the completly free route, and maybe enterprised paid support eventually. It is also open source.
You'll need to change the screen's Working Area. This looks promising: http://stackoverflow.com/questions/6267206/how-can-i-resize-the-desktop-work-area-using-the-spi-setworkarea-flag
The most elegant solution for this would be to use an AppBar though. You dock it top, bottom, left or right and Windows will know what to do. http://www.codeproject.com/KB/shell/csdoesshell3.aspx?fid=14729&select=1796941#xx1796941xx
> How viable is C# as a machine learning tool? Should I continue learning it?
Yes, you can do it. u/theannomc1 pointed out a link to ML.net which is nascent but has great potential.
But the fact of the matter is that python is so deeply entrenched in the ML space that nothing else can compete with the sheer volume and quality of open source ML offerings. If you're serious about learning ML beyond academic exercises and such, you should consider investing in learning python too. (It's really not that hard after the initial learning curve hump.)
Btw, Visual Studio 2017 has great support for python (+intellisense and all of that you're used to) and AI/ML tooling: VS Tools for AI
Jet Brains Rider is what you need! It is in my opinion the best C# IDE for everything. It's so much better than Visual Studio. Give it a try!
Yes, that is what Applets are (were) all about, a plugin to run Java inside a browser.
I wonder why you are going down this path, Applets are dead, and they are even scheduled to be removed in a future Java release.
There is MonoDevelop.
It's quite good for standard C# development, but in my time using it, I can't think of any functionality it posessed that Visual Studio didn't. I used it just because it was Open Source and functioned for my purposes. If your development needs rely really heavily on Microsoft stack/technologies, you won't find anything with better integration than Visual Studio.
That said, if you really want customizability, you can actually get a lot of IDE functionality using OmniSharp in conjunction with a text editor like Vim, Emacs or Sublime Text.
OmniSharp does intellisense, static code analysis, standard refactoring ops like renaming, type information lookup, jump to derived types, and so on. I've used it and had good experiences.
Yes, to extend on this (excuse the pun), this post, although in Java, may be an interesting article to read, it helped me.
A derived class is a base class, however a base class may not be a derived class. Back to the old cats and dogs examples, a cat is an animal, but an animal may be a cat or a dog.
>First, you must understand, that by casting you are not actually changing the object itself, you are just labeling it differently. For example, if you create a Cat and upcast it to Animal, then the object doesn't stop from being a Cat. It's still a Cat, but it's just treated as any other Animal and it's Cat properties are hidden until it's downcasted to a Cat again.
This is known as upcasting and downcasting. Hope this was a little help.
Currently busy building a mood tracking mobile app. Backend is done in C# with .NET Core, frontend is done using Ionic. You can find the app here.
Would appreciate any feedback if you decide to download it.
I would recommend a few things:
1) Check out the book "Code Complete - 2ed Edition" by Steve McConnell. I have been in this business a long time and i use this book religiously.
NOTE: This is not to downplay the quality of Clean Code. I liked both the books.
2) Check out books on quality design and code in other languages. For instance, i really liked the book eloquent ruby - though it's aimed at ruby programmers, i just feel that many patterns and suggestions apply across languages but your mileage may vary.
3) Religiously spend some time checking out various code repositories in places like Github. For instance, one very good source of quality C# code is the source for dotnet core. check out the library source and use that as a template.
4) Seriously consider TDD, and though you may not strictly adhere to it, always write tests - both unit and functional/integration - as these are the hallmarks of a professional coder.
5) Turn your compiler warnings to the max and lint your code. There are also many static software analysis tool which offers suggestions on improving your codebase.
6) Try to get your code reviewed as often as possible by people who's coding skills you admire.
7) Participate in open source projects. You get a chance to hang out with your peers in the industry and get active help from them towards improving your coding skills.
Get a subscription to pluralsight, great resource for learning this stuff. I'm in the same boat as you and I've been trying to devour everything I can on these subjects. Don't get overwhelmed either, there is a lot of info out there and much of it is opinionated. Just pick some popular stuff and try it out, the process is more important than learning that particular tool.
Also check out The Art of Unit Testing by Roy Osherove (sp?). Lastly, Code Complete 2, and Clean Code are great books on design and code management.
Also Pragmatic Programmer is another good book.
Complexity isn't the only attribute of your code. What about readability? Testability? How easy is it to modify?
It is possible to write code that is easy to refractor to a design pattern in the future. Do you practice Coding by Intention? Has your team read Clean Code?
Try to avoid black and white arguments. Things are rarely that simple and taking one extreme tends to drive some people to the other. Embrace the ambiguity. It is what makes our profession interesting.
I always remember Steve McConnell's advice in Code Complete: whenever you have a balanced pair of parens/braces/whatever, write the open and close at once, then go fill in the middle.
Modern IDEs like VS make that less and less useful, but it's muscle memory at this point.
I googled the exact title of your post and the first hit answered the question:
Summary: if you use that library you need to have Excel installed.
SQLite is great for many things, but even putting aside some peculiar problems with it[1] or its configuration geared to favor data consistency over anything else[2], you might not need all the features of a relational database and LiteDB is undeniably easier to use. SQLite is great, but LiteDB might be better for some specific use case.
[1] for instance: UWP App SQLite Access database in Documents Library
[2] INSERT is really slow - I can only do few dozen INSERTs per second
Git actually has a command just for this! The git-bisect
. You just find a commit or tag where it works, then it starts doing a binary search, checking out commits in between. Check out the part "Binary Search" in the handbook: https://git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git
I'm not familiar with HackerRank, so please ignore if I got the wrong site, but it seems they already have a section for C#: https://www.hackerrank.com/skills-directory/c_sharp_basic
Don't do it, it just leads to so many problems if people aren't paying attention.
See Apple: http://www.cnet.com/news/apple-finally-fixes-gotofail-os-x-security-hole/
Also, you can really shoot yourself in the foot in languages like C. https://www.securecoding.cert.org/confluence/display/seccode/PRE10-C.+Wrap+multistatement+macros+in+a+do-while+loop
Just get used to adding the braces.
If you really really want to use an excel workbook as a data store for your application, then I highly recommend using EPPlus
If you just need some file format to store your data, which could be written from Excel and read by your application, I suggest CSV. You could easily read the file into memory and split it into rows/fields. I would say this by far the easiest and quickest way to get going, and even learning some basic stuff like file IO and arrays.
(That could then in the future be easily abstracted so it can be swapped out to use some other store or format if needed.)
The package they were talking about is this: https://www.nuget.org/packages/Microsoft.Windows.Compatibility
But it only provides non-UI APIs.
But... if you used Visual Studio 2019 to create a .NET Core 3 WinForms app, you shouldn't have it be missing. What does your project file look like? My test project looks like this:
test.cproj:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>netcoreapp3.0</TargetFramework> <UseWindowsForms>true</UseWindowsForms> </PropertyGroup>
</Project>
Form1.cs:
using System.Windows.Forms;
namespace WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); new OpenFileDialog().ShowDialog(); }
} }
> And Span<T> is just too sweet to miss right now.
Can't you just reference System.Memory? Right now, today, when targeting full framework..
> I'm currently targeting dotnet standard 2.0, so will I need to wait for Span<T> support in a new standard, or can I do this now?
You can add a dependency on the <code>System.Memory</code> package to use it now.
Edit: anyone downstream of your library will also have to indirectly depend on that package, so make sure you're comfortable with that.
From the unity editor drag and drop player object to the attached SaveSystem
script(component),
And please try to ask questions in a nice way. When you need help you should also think about others from who you are expecting help. So please use screenshots instead your phone next time, you can use windows built in snipping tools or something like LightShot. And some description would be nice to express your problem.
SQL Server doesn't have to be expensive in the way you might have encountered in larger deployments (i.e. anything that someone would consider Oracle for). If your needs fit under the SQL Server Express limits, it's essentially as good as any version of SQL Server for the subset of features that it supports.
If your project grows beyond that scale, one option is to host in Azure and pay for SQL Server as a service. The standard tier pricing is really not bad at all: http://azure.microsoft.com/en-us/pricing/details/sql-database/
You can use Newtonsoft.JSON. It's a free NuGet library that deserializes JSON into a C# object, called JSON.NET that you can then work with and manipulate in your code. Here's a link to their site: (http://www.newtonsoft.com/json). Also, here's some sample code that may assist you in understanding and learning how it all works: http://www.newtonsoft.com/json/help/html/Samples.htm. Hope that helps!
I use regex a lot while I'm programming.
I use them in code if I'm parsing data.
I use EditPad Pro as a text editor, not an IDE just a scratch area and a place to use regex. I also use RegexBuddy as a GREP tool. Both of these programs cost money, and there are free alternatives to both, but it's just what I like. Not paid by the folks at Just Great Software, just like their stuff.
Perhaps take a peek at using the built in XmlSerializer
. Basically, create simple plain old data objects representing your question, answers, correct answer, and explanation, then put them together in a List<T>
, then feed them in/out of the XmlSerializer
. It will help enforce type safety and make a relatively readable/editable XML file for you.
Here's an overview/tutorial: http://www.codeproject.com/Articles/483055/XML-Serialization-and-Deserialization-Part (EDIT: Part 2 here: http://www.codeproject.com/Articles/487571/XML-Serialization-and-Deserialization-Part-2)
If you are looking to make a formless tray application, this tutorial gives you a good idea of where to start. It was a good reference for when I was picking up C# again around 2012. Some of that may be outdated/deprecated though.
http://www.asp.net/get-started/websites
my suggestion would just be to dive into the deep end and start looking at asp.net mvc. it'll take you a bit longer to figure things out, but i don't think i've worked on an asp.net site that wasn't mvc in the past 5 years or so.
No. Storing passwords in plain text is bad, and creator should feel bad.
Take a look at http://www.asp.net/identity if you need authentication in your project. There is almost never a case where you would need to roll your own authentication.
You could have a look at ml.net https://www.microsoft.com/net/learn/apps/machine-learning-and-ai
It's the machine learning module, and could come in really handy as it's also in the list of what the cool kids are learning now.
If you're looking for something like IRB for C#, then check out LINQPad
The free version doesn't have intellisense, but it's still a great tool and very useful for quickly prototyping things.
Also, do you really think most C# developers aren't used to lambdas these days? Most people I've worked with over the last few years have really embraced the more functional aspects of C# and lambdas are incredibly prevalent.
This is a painfully vague answer. How does one 'configure it the way you want'? I don't see much documentation on the vscode site, save for their reference to the Yeoman generator, but that seems to be for creating entirely new TextMate language files. I have contributed to some large SublimeText3 plugins and even changing one color for one nested variable in those .tmLanguage files is ridiculously complicated, thus I'd rather not go on mucking about in a tmLanguage file that has already been worked on.
This is VSCode's C# language support out of the box (with the C# extension installed). I haven't changed any configurations for Colors / Syntax Highlighting, Themes, or anything close to it. I also installed a couple JS Linters, but nothing that would affect a C# file. That being said, how do I 'have the colors configured'? I haven't configured anything.