Versatility/Practicality of C#?  
Author Message
flypp3r





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Hey all, new to posting but ive been reading here for a few weeks.

Anyway, on with my question (which probably has been asked in some way already)- How versatile is VC# compared to VC++ All I generally see are simple (*duck/cover* ) desktop applications. I've read that its possible to do game dev (including DX and OpenGL), but I have yet to find any engines done in C#. I have just looked at API's/engines/SDK's for games, but I have not gotten actually into manipulating/programming in them yet.

I've done some basic reading on C# and I sort of want to get into it, but I plan on in a few years down the line working for Lockheed (or a defense contractor of some sort) or EA-Tiburon. I've been programming since I was probably around 10, and I'm 21 now with my 2-year in CompSci and working to my 4 year. For those "upper level" companies, would it be foolish to bother with C# and just stick to Java/C++, or is C# used by major software companies yet I recognize that many of the small/mid businesses are using C# now because the simplicity of developing .Net applications suited for their businesses, but it seems very "Visual Basicy"...as in, great for those situations, but not useful when to comes to actual commercial software.

I mean, I plan on learning the syntax of C# at the very least, but my feel is if I can do the "****" c++ programming that doesn't really spoon feed you as much as Java and C# do, then transisting to C# won't be a prob if ever need be.

One final question- what can C# do that C++ can NOT do (Sort of as a, "this is why you SHOULD focus on C# instead of C++)

Go easy on me



Visual C#20  
 
 
ahmedilyas





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

learn C#. All major companies use it now, even Microsoft themselves for various projects. Its been out since 2000 and 6 years on, stronger than ever before and its what has created many .NET jobs in the industry. its a standard industry language when developing in the .NET Framework and easier to learn than C++ for example. C# is managed unlike C++ I guess and is causes less headaches. The only thing is you wont be able to do low level stuff in C# like you can in C++, since C# is a higher language and the OS locks itself away from preventing anyone from "breaking and entering" the system but even C++ is restricted I guess when developing in Windows than from say, a bootable disk.

Learn C#, you wont be disappointed but if you like, learn C++ on the way too. there is no harm in learning both or either one of them. Alot of companies have transferred their websites to ASP.NET - on the .NET platform. It just shows the power and how much impact we/Microsoft have made on the .NET platform. the entire (95%) of Microsoft's website, and msn, is ASP.NET based. Alot of other companies around the globe use ASP.NET/C# (or even VB.NET). Take a look on some career job sites and you will see C#/ASP.NET/SQL Server developers that are highly wanted.



 
 
Mark Benningfield





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Hello All.

flypp3r:

Alright, more philosophy!! Well, when you say "versatile", what do you mean, exactly I mean, assuming the same processor architecture, there's really nothing you can do in one language that you can't do in another. It's just a question of how hard you want to work at it.

If you mean by "versatile" that the compiler has an extensive keyword list and so has a lot of utility at the compiler level, or that the runtime libraries are extensive and fairly comprehensive, and therefore save you a lot of time re-inventing the wheel, then I would say that they are both pretty versatile.

The main difference between C# and C++ is that with C#, you code against the .NET framework and write managed code, for the most part. You can write unmanaged/unsafe code, but it is discouraged. With VC++, you can either code against .NET, or you can code against the Win32 API. So, you can either wind up with a compiled managed assembly, or a compiled binary native executable.

And yes, you're correct when you suppose that transitioning from C++ to C# is easy. So, if you master C++ first, then moving on to C# is a piece of cake.

Now, as to why you SHOULD focus on C# instead of C++, the question is what are you trying to accomplish If you want to write low overhead, performance-critical system code, then you had better go with C++ compiled to native binary. See, that's the thing about native C++ code. You're right next to the machine, and the latest optimizing C++ native compiler pushes some serious horsepower. The down side to that is that being right next to the machine frequently results in getting parts of your anatomy caught in the works and mashed to pieces.

On the flip side to that, C# may "spoon feed" you, as you put it, but it also prevents a TON of work and re-work trying to get code to behave that is someone's idea of "elegant" or "sublime". Because, in reality, that sort of code is usually cryptic or un-intelligible. And yeah, development houses are moving to C# in droves because of the time and effort saved in development, which is money in their pocket. Who can blame 'em. To keep the machinery analogy, C# puts up guard rails around the **** parts of the machine. Now, you can take the guard rails down on occasion, but you have to do it on purpose.

As to the things you can do in C# that you can't do in C++, well, as I said, anything you can do in one language, you can do in another if you want to put in the work. Bit of a waste of time, though. I think the better distinction is what you don't have to do in C# that you have to do in C++, like manage memory allocation, constantly insure the the integrity and scope of memory address pointers and data buffers, make sure that function calls don't corrupt the stack, that sort of thing.

One other thing comes to mind, now that I think about it. Don't the DoD and its contractors use Ada I know at one time that that was pretty much all they used. Haven't heard recently, though. You might want to look into that as well.

HTH.



 
 
ahmedilyas





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Mark is on a very good outburst today - you see, we had another topic but with VB.NET vs C# earlier on ;-) lol. gotta love Mark...does a good setup and hammering job :-)

 
 
flypp3r





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

thanks for the clarification. greatly helped!

anyway, i believe the contractors use variety of languages depending on their program. some of the applications i use in the military seem like they were done in VB1.0 and never updated, some felt like Java, while some felt like they were done in something other than the C-based language... i work with computers in the Army btw :)

ive read lockheed job profiles before and they ask of pretty much high proficiency in at least one language, and able to at least read a few others (if i recall) ...but i have heard that Ada is used alot in the DoD

oh yah- how does C# fair with the **** industry


 
 
Mark Benningfield





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Hello All.

flypp3r:

As far as the game development side of it, C# is starting to come around, but depending on the game design, it may not be the best choice. With many modern games, you have to get back down close to the machine, because the amount of number-crunching is staggering by human terms. Even with modern video cards that can take the 3D processing load off of the CPU, you still have to be able to fill and consume that video pipeline, and that rascal is getting really wide and fast.

Like I say, you could do it in C#, but you'd have to practically write your own graphics library in order to stay out of the managed end of it. Realistically, that's too much trouble. I've talked to some folks who are of the opinion that Python is an up-and-coming game develpment language, but I haven't looked into it much.

But, MS has come out with Game Studio, which uses C# and relies heavily on the managed DirectX library, so there is definite progress. Again, it all comes down to what you want to do. Another good reason to at least become familiar with several languages/compilers: that way you have a better idea about which one makes what you want to do easier without the downside being too large.

HTH.



 
 
Mark Benningfield





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Hello All.

ahmedilyas:

No, it's not an outburst. I'm simply disseminating my vociferous prognostications.

Seriously, though, I'm not trying to hammer anybody. It's just sometimes I get the idea that a lot of folks think that if only the language didn't suck, or if only the IDE wasn't so crappy, or if only (insert gripe here), then their code would be astonishing works of art.

So, whenever I get a whiff of someone looking for the "perfect" solution, I'm quick to point out that there is no such animal. I guess I'm a dinosaur. The first serious programs that I did were on Hollerith punch cards in Fortran IV for the IBM System 360. Well, they were serious to the instructor, anyhow. But as you can imagine, having to redo a whole box of punchcards because of a major logic flaw (and subsequent re-write) is not something you want to have to do more than once.

Anyhow, that's where I got convinced of the idea that quality comes from between your ears, not the keyboard or the compiler. I mean, I use C# because it suits my style, but that doesn't mean that I think it's a "better" language than VB or C++. I like it better, but that's purely subjective. I like the .NET framework better than the Win32 API, because it doesn't argue with me near as much. But, then again, I'm one of those who has always said that MS should secure their OS. (It would tickle me to death if they made the entire OS state read-only.) But, just because I loathe and despise Win32, that doesn't make it bad.

The way I see it, if the author makes the mental commitment to quality, then the language, compiler version, IDE, runtime, or anything else really doesn't matter that much. If there is a good reason to prefer one to another, then use it. If not, then don't.

Well, anyways, that's all five of my two cents.



 
 
flypp3r





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

i went ahead and bought the book, "Programming C#" from O'Reilly. It was a hard decision between that one and the Microsoft one, Programming Microsoft Visual C# 2005: The Language. I ultimately went with the Oreilly one because it had the inclusion of an introductory to ASP.Net.

HOWEVER, I will return it and get the MS one should anyone feel that the it is an overall better book. It was definately alot thicker, but I really didn't see much in the index it had more than the Oreilly one besides much more on debugging which (correct me if I'm wrong) is part of the added features that retail version of VC# have over express edition (which is all I have at the moment), so the additional debugging info would be a waste for me at the time.

Theyre both about $40-$50, so price isnt the deciding factor, and both seemed to dive right into the syntax and great for someone like myself who knows other c-based languages but just wants to know the different syntax.


 
 
Mark Benningfield





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Hello All.

flypp3r:

Oh man, get ready. First, I got C# Express Edition. Then I got 1 book. Then I got 3 more books. Then I got 2 more books. Then I got Visual Studio Standard Edition. Then I got 4 more books. Then I got 1 more book. Then I got 5 more books (sale). So far, I have about 2.5 times as much money in books as I have in the IDE. To date, my wish list at Bookpool.com is worth about a grand.

Of course, it helps that I'm a bibliophile, but you've got to realize, no one book has everything. Or even anywhere close to everything. I keep waiting for MS Press to release a version 2.0 of the multi-volume .NET reference library, like the one for 1.1 .

Besides, the one thing in the world of bits and bytes you can definitely, always count on is that things will change. You might as well resign yourself to the necessity of reading at least a couple of books every year.

Check out the link. Sweet prices. Good service.

HTH.



 
 
flypp3r





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Wow! Where I hate book purchasing time at the beginning of semesters, you probably welcome it! lol

But good point on not one book being the right one, however I didn't even think theres even that many C#/.Net books out. I mean, do you even have the useless, "teach yourself C# in 5 minutes" books lol

Thanks for the link, however. I'll check it out in a couple minutes


 
 
Mark Benningfield





PostPosted: Visual C# General, Versatility/Practicality of C#? Top

Hello All.

flypp3r:

Yeah, I love bookstores. The thing that always galled me about campus bookstores was they had the nerve to charge 3 times what a book was worth, just because. Like school isn't expensive enough already. What a racket.

And, no, I don't have any of the "Teach Yourself" books, or the "...for Dummies" books, either. But it's not just C# that you have to consider, though. Since I switched to coding with Visual Studio, I've got books on C#, Visual Studio itself, Windows Forms, XML, and the .NET Framework. And like I said, the list of books still to get is pretty long. There's a new book on C# Algorithms and Data Structures due out in January; there are two on my list about UI design and implementation; a few more covering the .NET Framework in more detail on some of the namespaces; and so on, and so on, and so on.

My recommendation for your next book on C# would be "The Complete C# 2.0 Reference", by Herb Schildt. I've been reading his books since I started coding against Win32, and he's real good about not assuming that you know what a concept is all about the first time he uses it in one of his books.

Also, if you haven't read it yet, I highly recommend that you get "Code Complete, 2nd Edition", by Steve McConnell. Excellent book on software design.

HTH.