Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Is C# a good next choice, and where are good resources for learning it?
10 points by antihero on March 21, 2014 | hide | past | favorite | 15 comments
I've gone from PHP to Python (mostly Django/Flask) and a little bit of Go and JavaScript.

Seeing people using typed languages that are orders of magnitude faster and have wonderful features like interfaces makes me jealous.

However, I'm a Linux guy. I loath Windows, however, whereas with for instance Python I could find many different excellent tutorials and resources on learning up-to-date and best-practice coding skills, I find myself stumped with C#.

Firstly, I just can't quite connect with the writing style of MSDN. Secondly, if I'm using Mono and MonoDevelop over the whole Windows/Visual Studio shebang, I feel like a second class citizen and have to constantly look up weird workarounds in order to progress with even the simplest of tasks. I'm sure it's faster on CLR in production, but surely I should be able to at least develop from a Linux box?

C# looks like it's heading for awesome places and I want to get in on it, so where exactly should I start, and how feasible is it to do this purely running Linux?




C# has a huge presence in enterprise software and .NET software engineers in my area are in high demand. I found C# to be a fun and rewarding language to develop in, although this was in a Windows shop with Visual Studio. At the time, I found the UI capabilities of Mono to be limited, but it has come a long way. With a Python background, I would check out IronPython, too. Being able to load .NET DLL's and introspect/call from Python is pretty cool.


C# has a huge presence in cross-platform gamedev and mobile as well: Unity3d, MonoGame, Xamarin.


Also, thanks to xamarin, c# now is often used in those mobile-shop that want to keep a single codebase and publish for all the main mobile platforms (wp, android, ios)

Less context switch and faster develop than having 3 different codebases and different teams for each one.


This is true, although you still need a fairly comprehensive knowledge of the libraries behind the three environments. The best developers on these teams will most often (not always) be the ones that have also worked on native Android and iOS applications.


C# the language is not bad and it is interesting to see how things change/evolve over the various .NET versions.

There are a couple of parts to learning C# (or any language really) - the semantics of the language, the equivalent of the "standard library" and the ecosystem around it.

Where, say, Javascript or Python have a number of different parties contributing libraries and a very diverse open source ecosystem; C# has much less of one - a lot of the modules are Microsoft add ons (not all, just a lot).

The "standard library" for C# really is quite rich. If you desire to branch off into other CLR or .NET based languages (say F# or IronPython), knowledge of those libraries will span the additional languages.


C# is a good language to learn even if you end up using something else. It's basically a sweet-spot of most modern languages: supports OOP and functional paradigms, supports both static and dynamic typing.

If you want to learn it quickly and willing to spend thirty bucks, you can pay for a month of this stuff: http://www.pluralsight.com/training/Courses

MSDN is a reference documentation rather than a learning guide. Just google for some C# book recommendations instead.


Bart de Smet's book "C# 5 unleashed" is a good place to start. It's an excellent resource and takes you from beginning concepts far into advanced ones. It's really all I'd recommend without any more information about what specifically you want to do with C#.


for linux you can use mono it's a c# implementation for cross platform

IMO no c# isn't a good move next. They bungled garbage collection and it leaks memory like a siv. Even in a simple case it leaks like a VB program would. They bungled silverlight and it's dead now after like 5 years of developers using it and millions of dollars worth of apps built on it.

If you want to work on best-practice you should stick with go or java or clojure.


Java bungled generics. Go forgot generics. And closure suffers from jvm's lack of TCO. I'm sure c# has issues but please these languages are much worse.


agreed i dont work in java, but if he wants to learn these are all probably good starting places.

also C# is fine if you want a C# job. I probably should have said that. My view is it will not be around for the longest time. MS just released typescript (ms varient of nodejs), and most mission critical stuff is done in other languages.

Two examples why I don't write more C#:

Orginally the startmenu/taskbar was going to be written in C#, they scrapped it and went back to C++ b/c performance was so bad. (And I'm assuming plagued with memory leaks).

If you try to play the C# Hearts thats included on Windows7, on a 2ghz machine with onboard video (no d3d acceleration) - its so slow it's completely unplayable. Apparently even the MS-engineers could not make a simple card game work on a non hardware accelerated system.


Guys, please ignore his comment:

1) "typescript (ms varient of nodejs)" - no, it is not. "Project Helios" is Microsoft's Node.js. Typescript is just a way of adding static typing to JavaScript.

2) Unity makes an extensive use of C#, are you saying that e.g. recent Angry Birds franchise games are slow? Are these games slow: https://unity3d.com/showcase/profiles? Are XNA/MonoGame games slow as well?


yes. in my personal experience a C# engine is slower than a good (*) c++ engine.

sorry i got the name wrong on the js part, it was a while back.


C# will be around 'forever'. It's robust, well-supported, well-documented, and with Mono / Xamarin works across many platforms (including iOS and Android). I haven't experienced inherent memory leaks as you have described (10+ years of heavy use). Performance limitations are more tied to IO (disk, network etc) than the language.

That said, this isn't an either/or question. One can learn more than a single language at a time. A decent programmer, IMO, has knowledge of several languages, and there is no disadvantage at all in making one of those C#.


As you don't seem to be a fan of Microsoft, something to perhaps keep in mind: Rumors this week of Microsoft trying to acquire Ximian.


C# is a good choice even if you are on linux. Look into mono framework.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: