C# Book Recommendations?
Stevecrox asks: "I'm in my final year of university and have a working knowledge of C/C++, Visual Basic, VHDL and a variety of Assembler languages, however chatting to a friend on his placement year I've been told that C# is what employers are really looking for. What book would you recommend to someone looking to learn C# with my experience?"
Professional c# 2005 and the .net 2.0 platform by apress is excellent. Read it from cover to cover (about 1000 pages but very high quality book). It will cover the basics of C#. Also it exposes you to database access with c#, and covers both data readers and datasets from .net library. It also covers winforms and gdi+ programming. It gives you a taste of asp.net 2.0 also. If you buy 1 book, buy this one. I bought it and just lucked out. I spoke with several other people and this is the one book everyone seems to recommend.
Next up i'd look into beginning asp.net 2.0 with c# by wrox press if you are interested in web development. It is an example driven book. You read a little, then it walks you through doing something. It also has assignments at the end of the chapter to make sure you are getting it.
Continue with pro asp.net 2.0 with c# 2005 by apress. It will give you a deeper look into more advanced topics of asp.net.
I got this book around when C# was first introduced. I started from the same languages you name, and I've quite possibly never read a better book about a programming language (and API of course).
5 4
http://www.apress.com/book/bookDisplay.html?bID=4
(Actually, A programmer's introduction to PHP is also very good.)
Reading a book wouuldn't help in your case either. My suggestion? Every computer science student at one point or another has had the desire to build a game. Go download Visual C# Express and XNA Game Studio Express for free and learn C# while scratching that itch at the same time. While the XNA bits won't necessarily be directly applicable to getting a job outside of game development, you can use the full .NET framework for Windows games (XNA on Xbox 360 uses a more limited version of the Compact .NET Framework). Could there be a more fun way to learn C# than by building a game?
You suggest books are a waste of time, and to just dive in and start hacking. This attitude is a major reason why there is so much bad code out there. As I point out in reply to another post that recommends a book on Lisp to someone wanting to learn C#, if you don't know the common idioms of the actual language you are using then you will produce terrible code. A good book wont just teach you the nuts and bolts of a language such as the raw syntax, it will also encourage good practices - what I think James Coplien or Tom Cargill described as teaching "programming in the large".
I personally don't like computer games that much (expect perhaps for Civilization-like things), and I always found programming games, when I tried, unbelievably boring. However, YMMV.
-- Patent no.123456: A way to personalize
SICP isn't about learning Lisp or Scheme. It's about learning how to program.
That said, how many times have I used Lisp for commercial development? None. How often have I applied its idioms? I do so on a daily basis.
I disagree. To learn a language you have to know what its strengths and weaknesses are, which approaches work well, which don't. You could get that knowledge from just playing around, but it'd be a lot quicker if you read a book that tells you. Especially if you know another language, a list of the crucial differences is very much required. If not you end up writing things in the style of one language that really should be expressed differently.
Example: C programmer in Matlab. Task: Take two vectors of same length, for every i smaller than length, multiply the ith element of the first with the ith element of the second vector.
Results:
Just playing around, as you suggest:
function y = multiply_vectors(a, b)
y = zeros(size(a));
for i = 1:length(a)
y(i) = a(i)*b(i);
end
end
Doing it the proper (Matlab) way:
y = a.*b;
It's a simple and therefore unlikely example, granted, but there are many such differences between programming languages. Just playing around doesn't easily allow to find them because, technically, the code works. It just doesn't work efficiently. That said, once you know how to deal with the language, by all means, screw around. A lot.
Everybody wants to build a games. Nobody ever does. Building a game takes a lot of time, and really isn't much more interesting than programming any other application. Plus it takes a lot of time before you get something useful. Plus, there's a lot of other skills required. You probably have to do the art, textures, character models (3D or sprites), level design, and the list goes on. Making an application that fits some need you have would probably make a lot better use of your time.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
I can't agree more. I'd also recommend his free .NET Book Zero, which is specifically aimed at C/C++ programmers, and did I mention it's free?
You save only 59 seconds over 8 miles by going 75 instead of 65. Do you really have to pass that guy? Do the Math!
I've read a few of the "in a Nutshell" books, and the C# one is by FAR the worst. Most of the others are anywhere from good to great (the Java one is outstanding IMO), but the C# one just falls really REALLY flat. The examples are bad, and he often jumps in "assuming" that you know how things are supposed to work. But most glaringly, it doesn't even cover the most common operations. Like take a guess how to bring in an entire text file at once? Guess what: you basically need to go into the API and figure it out yourself, because none of the string or file I/O examples touch on it at all. Now true, I haven't seen it since first edition, but I wouldn't trust it at all. I'm just glad I didn't lay money out for it, but rather got it from a library.
The authors of the "nutshell" books are not all the same, hence the vast differences in quality. Buyer beware!