To learn C+ or C# properly?

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

To learn C+ or C# properly?

Post by GeoTrail »

I know a little C+ and a little C#. I have Visual Studio 2008 Pro that I got from ACM.
So I'm wondering, which would you recommend me to learn properly? I know a little about each, I have a book on beginning C+ but it seems like more work then it's worth in my eyes.
C# looks more attractive, cleaner and easier to understand. It is in many ways pretty similar to VB.

What I've learned about C+ is mostly console coding which is easy enough. But coding for Windows on C+ seems hard and time consuming.

What would you personally recommend me to go deeper into?

I think it's kind of a shame having the Pro Studio version when I only use VB part of that powerful package.

Please post your pros and cons concerning coding in Visual Studio for both languages.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: To learn C+ or C# properly?

Post by Rook Zimbabwe »

Serioussly I have the same set of programs...

I even went out and bought the book: Teach yourself C++ in 21 days...

The entire amount I learned in 21 days would take about 16 lines in PB! And there was nothing about reading or writing to a file in the entire book!

The learning about STTRUCTURE in C++ helped me organize my programs better. I suppose that is about it.

My wife has taken a PROGRAMMIN C++ course at the community college and I looked at her textbook. It is esentially like the 21 days book that I wasted my money on.

Perhaps with better tools I would have had a better experience!

I can see where it would be useful to create a LIB or maybe a DLL to do something that PB does not yet do well! :D

Go forth my friend and get smarter!!! Nothing you learn about programming will make you a worse programmer! 8)
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Re: To learn C+ or C# properly?

Post by Joakim Christiansen »

GeoTrail wrote:What would you personally recommend me to go deeper into?
If I had the time I would learn myself C++.
Most open source projects are C++ and Linux people (if you ever want to get involved) will likely not use much C#. So I guess that by going through the hassle of learning it (yeah, I know it's a pain) that you can sit back with much more valuable knowledge. It is also supported by most microchips and whatnot. But if you mostly care about productivity in a Windows environment I guess C# is the way.
I like logic, hence I dislike humans but love computers.
User avatar
codewalker
Enthusiast
Enthusiast
Posts: 331
Joined: Mon Mar 27, 2006 2:08 pm
Location: Spain

Re: To learn C+ or C# properly?

Post by codewalker »

Windows, MAC, and Linux are coded in c++ and above that all the code that
goes around worldwide in c++. Besides that, I never saw any company asking
for a C# coder. Don´t waist your time with a language of the day . . . . . . .
Greetings
cw
There is a difference between knowing the code and writing the code.
May the code be strong in your projects.
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Re: To learn C+ or C# properly?

Post by milan1612 »

codewalker wrote:Besides that, I never saw any company asking for a C# coder.
Is this supposed to be a joke? Almost all job offerings I see either ask for a Java
or a .Net (= C#) developer. C++ jobs are rare these days...
Windows 7 & PureBasic 4.4
inc.
Enthusiast
Enthusiast
Posts: 406
Joined: Thu May 06, 2004 4:28 pm
Location: Cologne/GER

Re: To learn C+ or C# properly?

Post by inc. »

Geotrail,
choose C++ and for GUI building a "real" cross platform framework like QT. As it provides real OS-native looking widgets/elements.

c# is nice but .net is very overbloaten and in case of crossplatform compilance no right choice.

my 2cents


@codewalker
If I remember correctly, Linux is natively C programmed, same as Windows imho, OSx nowdays is Cocoa/Obj-C based.
Check out OOP support for PB here!
DoctorLove
User
User
Posts: 85
Joined: Sat Mar 06, 2010 2:55 pm

Re: To learn C+ or C# properly?

Post by DoctorLove »

C# is the way to go nowadays, many source code is lying around on the internet.

And yes, there are a lot of jobs for C#. Also consider Mono, a cross-platform based .net language.
I think the idea of C# is good, it has many influences of different programming languages.

but, its bloated of its framework and i dont like the idea of JIT (just in time) compiling.
Its a MS product, so bussines people like to go on that train.

If you want to learn it, just download visual studio express and play with.
Im sure to get the hang of it, as its really not a hard language to learn if you know the basics of programming.

Good luck!
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: To learn C+ or C# properly?

Post by Mistrel »

Buy the book "C++: The Core Language". It's literally written as an introduction to C++ for experienced C programmers. This translates extremely well to PureBasic, which is also a procedural language, but only if you can already read C and make the connections to the concepts discussed.

It skips all of the "introduction to programming" garbage in most other beginner books and teaches you only the meat of what the differences are between C and C++. It provides a lot of examples of, "here is how you would have done it in C" when teaching new concepts so you have a literally comparison to help you process the differences.

I also recommend that you do *not* use an IDE like Visual Studio until you're comfortable compiling from the command line. You will be a much, much better programmer if you learn how to do this and won't be afraid of inevitable linker errors.

My favorite text editor when I was learning C++ was Programmer's Notepad. It allowed me to setup all of my command line tools into tool hotkeys very similar to PureBasic's IDE. Nowadays I program with NotePad++ and a command line window. I automate my build process using shell scripts with Cygwin's Bash and GNU Make.

Other books I found to be my favorite references:
  • C++: The Complete Reference, Fourth Edition
  • Sam's Teach Yourself C++ in 10 Minutes
  • C++ Pocket Reference
My most frequent reference is the cppreference.com .chm compilation. It's not very good but it solves most quick questions like general STL classes and methods so you don't have to flip through a book: http://www.cppreference.com/wiki/_media ... _feb09.zip

This website is a lot better and I go here if I can't find what I need on cppreference.com. But there is no way to read it offline so it's always my second stop: http://www.cplusplus.com/reference

The best advice I can give you for learning C++ is to install Cygwin and to learn Bash and GNU Make along the way. You will be a much better programmer in the long run and you won't be "stuck" to a specific IDE just because that's what you started learning with. Once you've mastered the command line just setup a "Makefile Project" in Visual Studio and you're good to go. :)

I tried to teach myself C++ for years and this is the process that finally did it for me. I also took classes at my local college which helped tremendously. There's nothing more invaluable than making friends with a professor who is an expert in C++ who you can drill with questions.

I hope this helps.
Last edited by Mistrel on Sun Mar 07, 2010 2:08 pm, edited 1 time in total.
User avatar
codewalker
Enthusiast
Enthusiast
Posts: 331
Joined: Mon Mar 27, 2006 2:08 pm
Location: Spain

Re: To learn C+ or C# properly?

Post by codewalker »

:
@milan1612
I´m scanning daily the jobs asked on http://jobsearch.monsterboard.nl/
and mostly I see php, asp, xml, mysql, java, and linux/unix maintenance.
Maybe I start something for myself with purebasic or something on the
web as the web is a fast growing economy.
cw
There is a difference between knowing the code and writing the code.
May the code be strong in your projects.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: To learn C+ or C# properly?

Post by Mistrel »

C# is the way to go nowadays, many source code is lying around on the internet.
Learn C++. It's closer to the metal, is more portable, and has more open source libraries available to it (inclusive of C libraries) than any other language.

You will be a better programmer if you master C++ first. And once you do C# will be a cakewalk. Learning C# first and then trying to learn C++ will only frustrate you.
Windows, MAC, and Linux are coded in c++
Windows is C++ (with C interfaces and now a mess of .NET stuff mixed into it), Mac is Objective-C, and Linux is C.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: To learn C+ or C# properly?

Post by GeoTrail »

Many good points there.
But I do see a lot of jobs that needs C# coders.
I do want to learn C++ properly but it's really hard to learn and become good at. It takes a lot of time, I think.
And it would be great to be able to develop for all operating systems and platforms like C++ supports.

Rook, I too have a C++ book, a Chris Riley book I think it was. And all I learned from it was simple console stuff that I really could have figured out for myself.
I guess those kinds of books aren't the best for people that already code in other languages.

I am leaning towards C# because it's easier and quicker to learn, but leaning towards C++ for it's power and versatility.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: To learn C+ or C# properly?

Post by GeoTrail »

Mistrel wrote:Buy the book "C++: The Core Language". It's literally written as an introduction to C++ for experienced C programmers. This translates extremely well to PureBasic, which is also a procedural language, but only if you can already read C and make the connections to the concepts discussed.
I think your post needs a separate answer :)

I have used Borlands C++ compiler which is a command line compiler several years ago. Probably in the Win98 days. So I do have SOME experience with that, but that is a long time ago. Then I actually used EDIT from DOS hehehe.

That books seems like the thing I need.
I'm gonna search Amazon and see if I can find it. Maybe I'll get that and Beginning Microsoft Visual C# 2008 from Wrox so I can go through them both and compare and see which I feel I learn more from.

I tried a couple of years ago to write a Windows program in C++ using only notepad and what a bitch. Pardon my French. I could have written av OS in PureBasic in the time it took me to write a simple Windows program with some buttons, labels and text boxes. :lol:
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
DoctorLove
User
User
Posts: 85
Joined: Sat Mar 06, 2010 2:55 pm

Re: To learn C+ or C# properly?

Post by DoctorLove »

Why not learning delphi? Easy to learn, and same in speed of C++.

Also there are a lot of jobs outside for delphi.
i earn money with delphi applications (creating medical software), as they are quick, easy to master and a fun language.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: To learn C+ or C# properly?

Post by GeoTrail »

Delphi is one of the languages I know least about. I know more ASM then Delphi, and that isn't much hehehe.
I do have an older version of Delphi Studio or something. I got it from a customer a few years ago but I haven't even installed and tried it yet.
I've heard Delphi is supposed to be great for database applications.
Do you have any links to any good newbie tutorials and examples?
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
DoctorLove
User
User
Posts: 85
Joined: Sat Mar 06, 2010 2:55 pm

Re: To learn C+ or C# properly?

Post by DoctorLove »

Thats a very good place to start.

http://www.delphibasics.co.uk/

Theres also a freeware variant of delphi, Lazarus which can cross-compile.
Its good for database, but also for games or other rich applications.
Ms game "Age of empires" was built on delphi. The most anti-virus scanners are built with delphi.
So you cant go wrong with it.

Do know, that C++ has a long road to master despite his shorter syntax then delphi.

Good luck :)
Post Reply