|
Well done, keep up the good work
|
|
|
|
|
Excellent!
1) Get yourself the DVD boxes of any complete Star Trek series you can get your hands on.
2) Start coding something that's a lot of fun and highly experimental.
3) Always have a small video window open where you can see your Star Trek episodes. They are not too distracting because you know them all, but they allow you to get away from work to get a more critical look at what you are doing. You would not believe how many bugs have disappeared after I said something like "Sir, there's a multi-legged creature crawling on your shoulder."[^]
The user can't update the up: we update it for them (Choice in the CP poll)
|
|
|
|
|
Hi all,
Coming from Visual C++.
I'll have a little bit of time in a while and I'd love learning C#...
Which book would you recommend me?
Thank you!
|
|
|
|
|
|
I agree Troelsen's book is very good BUT as a former instructor NOTHING beats a textbook with structured lessons.
Deitel and Deitel are arguably the best textbook publishers and "C# A Programmer's Introduction" is what I would recommend to get started from scratch. Expensive but worth it if you are disciplined enough to do every excercise as if you were in school else a waste of money that will end up on the shelf next to Troelsen's "C# and the .NET Platform."
Clinton Gallagher
|
|
|
|
|
I would second Troelsen. I had a class that used Troelsen's book in 2005 when VS2005 and .Net 2.0 was in vogue. He does a good job of explaining the subject. Be sure to read the first few chapters, then go to where you can start programming windows programs, either forms or WPF. (Forms is easier.) There are other books out there, but they are more for reference than taking you step by step.
|
|
|
|
|
If you really want to get to the core of C#, I would recommend this book[^].
This space for rent
|
|
|
|
|
|
++
Vince
Remember the dead, fight for the living
|
|
|
|
|
Can't recommend that book enough.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
|
C# from 0, when you know C++?
You really know more than you need to know in one sense.
Think of C++, but a lot of the differentiation is removed. C++ made simple.
For example, you don't separate namespaces by '::', but simply with a '.'
No difference between ref for value and pointer ('.' vs. '->') as everything is an object and it's always a pointer so, as a short-cut, it's always '.'.
The IJW nearly seamless slipping between managed and unmanaged is not so seamless (should you ever need to do it).
If you use C++.NET, then your most of the way there. Really, nearly everything's the same.
Now there's more to it than that, but MS was targeting the VB.NET users when the built this so they dumbed it down simplified it. VB.NET lived on, anyway.
Others might, or rather, are likely to disagree with the above.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I'd disagree to an extent: they ripped C++ to bits when they first created C# and got rid of a lot of the "dangerous" stuff - memory leak causes and so on - to create a simpler language that was faster to develop with than native C++ as a result.
Since then, they have been layering on more complexity - some of it useful and justified, some of it badly abused. It's perhaps getting to the point where C# needs to be ripped apart and the same exercise done again (.NET Core would have been a good opportunity to do this)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I was just drawing gross picture => JM said she was starting from '0'; with a C++ background that's really not the case. And if she uses C++.NET, even less so the case.
My real complaints about C# were twofold:
1) MS help seemed to emphasize C# at the expense of C++. Perhaps this has changed?
2) It hides from the user the subtle differences, such as between a namespace vs. class hierarchy. One could argue - so what? As as minimalist, however, I like to know what's what.
Fortunately, I've not had a project where any performance difference was a concern.
Would you, in your partial disagreement, agree that the syntax, at the basic level, is such that it's almost automatic that one knows C# if one know C++ (new layers of convolution notwithstanding)?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: Would you, in your partial disagreement, agree that the syntax, at the basic level, is such that it's almost automatic that one knows C# if one know C++ (new layers of convolution notwithstanding)?
That's a difficult one, because moving from C++ to C# isn't necessarily as easy as you think it will be just by looking at the syntax.
I came up the COBOL -> FORTRAN -> Pascal -> Assembler => C -> C++ -> C# route, and it's the superficial similarities that throw you off: you expect to need pointers and they aren't there. Same for globals, and references, and all the little nuances that you get used to in C++. So you end up trying to use C# as a "retarded brother" to C++ instead of a separate language in it's own right that shares some syntax with C++. You are actually better off forgetting C++ completely when you learn C# I think.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
At least there's nothing you're forced to use. You can keep coding using a .NET 2.0 style even though you're developing against the latest library, and the latest language features are at your disposal--which you can choose to ignore. The way it's once been described to me is that it's all "syntactic sugar".
Or am I misinterpreting what you mean?
|
|
|
|
|
Yes you can - but not everyone else will, so you get a lot of lazy coders using var all the time for example and to hell with the poor sod who has to maintain it in six months time!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Of all the useless things that have been added to the language over the years, var isn't one of them. I've long been opposed to var myself, but these days, when I see I've used var in some of my older code, it generally means the exact type didn't matter to me back then, and it still shouldn't matter to me today.
Some will abuse it for sure. But it's got its use.
|
|
|
|
|
It has it's uses - you can;t do Linq without it - but when you get lazy f'wits using it on every variable definition it's a PITA for maintenance:
var i = 666; Is just lazy.
var p = ComplicatedFunctionInAnotherClass(long, list, of, parameters); Is lazy, stupid, and uncaring of maintenance or the poor sod who will have to do it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: t has it's uses - you can;t do Linq without it
Linq is itself too often used/abused when often it's really not necessary at all, it's backward syntax order is a PITA for those of us that work in multiple languages and later need to unravel some newbies 'I can do it all in one line' compound statements. I'd not loose a second sleep if it were removed entirely.
signature upgrading ... please wait.
|
|
|
|
|
I completely agree on the syntax - that's why I use the methods instead - but Linq does have some advantages over the "loads of loops" approach!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Agreed! Linq makes things easier to write, easier to maintain, easier to understand, and just makes code 'prettier'. I cannot stand ugly code!
|
|
|
|
|
Does linq make the code more readable to the next programmer who picks up your code? If the linq covers a simple loop with some decisions inside which will be easier for the next person who maintains the code? Writing code for an organization with multiple programmers and engineers, not only must your code perform what is intended without breaking, but must be as quickly understandable by the next person who pick up the code. Because, you can be sure that your code will change as the customer needs change.
|
|
|
|
|
I agree with using a var for what clearly should be an int. Or should it be a long? Or a 64-bit unsigned int?
As for your 'p' example--it all depends on what you do with it next. If you just need to hang on to it so you can eventually return it from the current function, or to pass it as a param to another function, then under those circumstances I'd say the exact type shouldn't matter to a reader.
|
|
|
|
|
The first example is OK. I as a maintaining programmer know that i will be an int of some sort. The second example, what is p? Do I have to look at the function or intellisense to figure it out? Do I need to look at the context of how p is used later? No to all of these. The professional engineer's job is to not only make the product work as expected but to also make it easier for the next engineer to pick up the work and take it to the next step. (It's in the IEEE code of ethics.) It would seem that is the difference between a programmer/code jockey and an engineer.
|
|
|
|