• 0

Getting started FAQ


Question

A recurring question on these boards is ? how do I get started in programming? ? Whether it?s choosing a programming language, finding tutorials or choosing an IDE, this FAQ is here to provide some guidance.

The FAQ assumes you want to start making desktop applications, with the most likely purpose of preparing for a Computer Science or Software Engineering degree. If you want to program websites, stop reading this and head over to w3schools.com. If you?re aiming for a particular domain (games, robotics, research etc), read this and then if any doubt remains please ask in the forums.

1) What programming language should I start with?

Short answer: Any widely used, general-purpose programming language can be a good choice. If that can be of any help, this author?s opinion is that you can?t go wrong with C#.

Long answer: What you?re looking for is a general-purpose programming language that:

  • Will teach you elements common to most languages (statements, expressions, loops, conditionals, functions, objects, operators etc)
  • Has a relatively clean syntax, logical design, and doesn?t lose you in low-level details
  • Is popular and useful
  • Has good IDE support so you can concentrate on learning how to program and not how to fight your way around crappy tools

Let's compare 4 of the most widely recommended languages:

C:

  • smile.gif Barebones, ?close to the metal? language, goes hand-to-hand with a course on computer architecture
  • smile.gif Ancient and eternal
  • sad.gif Hard to do anything graphical or even text-based (GUIs, games): C is primarily designed as a systems programming language
  • sad.gif Lacks such basic features as a string type, a container library, support for OOP, etc.

C++:

  • smile.gif All the advantages of C plus support for objects and generics, and better standard library
  • smile.gif Essential skill for any game programming position and in a wide array of domains
  • sad.gif Complex at the outset: hard to learn, hard to master
  • sad.gif Like C, it is mainly designed as a systems programming language

C#:

  • smile.gif Logical, reasonably simple
  • smile.gif Productive for GUIs, games, databases etc.
  • sad.gif Shields you from the OS (the .NET framework act as an intermediary), a good thing in many ways except for learning how computers work
  • sad.gif Not meant for writing device drivers or other such low-level code

Python:

  • smile.gif Highly intuitive and elegant, geared towards beginners
  • smile.gif Interactive prompt lets you learn by trial-and-error much faster
  • sad.gif IDE support (debugging tools, etc) not great
  • sad.gif Shields you from the OS and computer architecture (same as C# in that regard)

Other possible choices:

  • Java (similar to C#; if you're on Windows, C# is the better choice)
  • Ruby (similar to Python, but not as popular)
  • Objective-C (popular for Mac and essential for iPhone development)
  • Visual Basic (very similar to C#, but geared towards VB6 developers and beginners; many would say its peculiar syntax and legacy baggage make it an inferior choice)
  • Functional languages like Scheme, Haskell, F#, Lisp, etc. which are interesting from a CS perspective but not that widely used.

2) What are some good tutorials on the Internet?

Classified by language:

C/C++

C#:

Python

3) What software do I need?

One good IDE (Integrated Development Environment). What is available depends on your platform:

WINDOWS:

  • For C, C++, C# and Visual Basic, look no further than the Express Editions of Visual Studio. They are free, stripped-down versions of the most widely used IDE in the industry. Check out the video tutorials there to get you started. If you are a student, you also might be eligible to a free, full version of Visual Studio through Dreamspark or MSDNAA.

The remaining tools are compatible for Linux and Mac as well:

  • For Python, get the official runtime and IDLE from http://www.python.org/download/.
  • For Java, both Eclipse and Netbeans are great choices. Be sure to check the great tutorials offered on both of these sites.
  • An alternative for C, C++, C# and VB development is MonoDevelop. Frankly, Visual Studio trumps it on Windows, but it's pretty much the only way to do serious .NET (C# and VB) development on Mac and Linux, where Visual Studio is not available.

MAC:

In addition to the cross-platform tools mentioned above:

  • For C, C++ and Objective-C, be sure to get Xcode. The recommended choice for developing iPhone applications as well.

LINUX:

In addition to the cross-platform tools mentioned in the Windows section:

  • For C and C++, the best IDE is probably Code::Blocks, but there are several alternatives.
  • Note that you don't necessarily need any particular IDE. Some people, especially Linux users (for some reason) prefer a "simpler" setup using just something like Programmer's Notepad (or even plain text editors like notepad. gedit etc) in combination with their favorite compiler (GCC, MSVC, etc).

You will still hear people recommending Dev-C++ around the net. To put it simply: don't use it.

4) Can you recommend some books?

For complete beginners:

C Primer Plus (5th Edition)

C++ Primer Plus (5th Edition)

Illustrated C# 2008

Beginning Visual Basic 2010

Learning Python: Powerful Object-Oriented Programming

How to think like a computer scientist: Java edition, C++ edition, Python edition, Ruby edition

Will add more later !

Link to comment
https://www.neowin.net/forum/topic/899286-getting-started-faq/
Share on other sites

Recommended Posts

  • 0

Generally a good post, but I disagree with a lot of what you say and would argue against pinning it. A lot of it is opinion and highly subjective.

Some points:

I disagree that C/C++ is a bad first langage. I personally think that C# (and Java) is a terrible first language. If you're teaching basic programming of imperative languages (functions, conditionals, loops, etc), then C# is far too complex. You get caught up in syntax, memory management ('new' is too much) and program structure instead of focusing on the basics. In this case, Python is a much better choice. If your user is a future computer science or engineer student, then C# contains too much 'sugar' and hides too much of the basics. I've seen my fellow classmates that started with C# have nothing but problems in future courses like OSs, compilers, and computer architecture. In these cases, I view C# as setting the user up for failure. Of course, all of this is my opinion based on my experience. As I said, very subjective.

IDE support is not essential. I would argue that IDEs get in the way. For one thing, they're quite complex and having your user navigate something as large and feature rich as Eclipse or Visual Studio can be daunting. If you're starting with the basics, the best 'IDE' is really notepad with a run button and 'print' should be your debugging mechanism. Anything else is too much and distracts from the basics.

On languages, your description of the various languages is also something I disagree with. For one thing, your lumping of library features with languages is a bit deceiving. The two are orthogonal. Your observation that the C language provides nothing is the whole point of C. It was designed as essentially a high-level assembly, where there's a trivial mapping from every C construct to the equivalent machine code. C++ being a complex, bloated, inconsistent language is just an opinion, and one that I for one do not share (except the complex part, but I wouldn't phrase it like that). As someone who's primary coding language is C++, I don't find it unproductive, if anything, the opposite.

I could say a bunch of other things about some of your other points, but the jist of it is that the advice given is bad for a wide class of people and that what you're written is too opinionated.

P.S. Don't say things like "same as C# except crappier" or "ugly". It sounds unprofessional, to a point that's beyond neowin's unprofessionalism (and boarders childishness/fanboyism).

  • 0

This is definitely worth a pin, and you've earned some rep too :).

A few points to add:

1) "Productivity" is relative.

Dr_Asik mentioned that C++ is highly unproductive, and to an extent I agree, but it depends highly on what you want to do. For graphical applications with buttons and images, you're best off going for a .NET language or similar since the IDE provides immensely extensive tools for GUI development. However if you're looking for low level development, then something like C#, Java or Python would be immensely unproductive since you can't (or in the case of .NET, struggle) to escape the runtime environment. C or C++ are built for the task of high speed, low level interaction. For a business programmer, or a high-level developer, high-level languages like C#, Java and Python are obviously more productive, but their vision of "productive" is different than from, say, a mainframe developer who needs to code as close to the metal as possible, and would prefer to program in C/C++ or even assembly!

2) Use the right tool for the right job.

Similar to point 1. A good developer can write in a variety of different languages, and chooses the best language for a specific job. If you're knocking together an operating system, C is usually the best way to go, if you're developing a Windows application with a graphical interface, C# or VB are the way to go. If you're looking to do something very high level without too much work, then Python's extensive collection of modules can make life very simple. The worst mistake you can make when writing code is to try and use a language in a way it wasn't supposed to be used; it makes your life needlessly hard and usually produces crappy and inefficient results. You wouldn't use a power drill to hammer a nail, and you wouldn't use Python to write an operating system.

3) Don't jump in at the deep end

A lot of beginner programmers, and I mean a LOT, will try to write a web browser or an anti-virus program for their first program, and to put it plainly: "it ain't gonna happen". Web browsers and antivirus packages take years to develop with team of highly trained developers, and trying to emulate their work in your first attempt will lead to fruitless results and endless frustration. Baby steps are what is required. Start off with a "Hello, World" application and go from there to write bigger and better programs as you get better.

4) Programming is Hard...

Writing simple applications is easy, especially with the IDE support we get today. Software development suites like Microsoft's Visual Studio can save you hours and hours by writing a lot of code for you and letting you get on with what you want to do. However, writing GOOD code is hard. Efficient programming requires extensive design, and a lot of hard work. If you've jumped straight into a big project, don't expect your code to work well; you might surprise yourself, but it takes a long time to become a true code ninja. At the time of writing, I've been writing code for 6 years through 5 years of education and a year in work, and my code is still far from the best, but its getting better!

5) ... But its immensely satisfying

I said that programming is hard in point 5, but if you get it right, its one of the greatest non-sexual satisfactions you can get. The feeling you get the first time you compile your code and run it successfully is addictive, and what keeps programmers loving their jobs. Programming is something of an emotional roller coaster, there are times when you could just throw in the towel from frustration, but the feeling of success and pride you get when you solve a problem, and especially when you do a good job of it, can't be beat.

6) Tops down or bottoms up?

The concepts used in programming can be learned in two different ways (in my opinion). The first, top-down, encourages you to start off with high level languages such as VB or C#, and to use the graphical designers and gently ease into writing code. Bottom-Up encourages you to start off at the base level using languages such as C++ (not so much C these days) and to learn the core concepts such as algorithm design and dynamic programming, and then building on this knowledge to build great software. The first approach provides you with results very quickly, although you're at risk of not understanding the underlying concepts and struggling with complex code. The other approach teaches you good programming practices, and teaches you good problem solving techniques, but puts you at risk of "burning out" since visible results come much more slowly.

The top-down approach to learning is generally taken by home-schooled programmers who just want to dive straight in since, like I said, it provides results very quickly. The bottom-up approach is usually schooled by university courses on software development, since it gives you a good education and sometimes a more transferable skill set.

Neither approach is invalid per say, but each approach has its advantages and disadvantages, and at the end of the day, its up to you to choose how you want to learn. Everyone learns differently, and in most cases a combination of both approaches works well for most people.

7) Get a text book

A lot of people contest this, but I stand by it that text books can be invaluable for programmers, particularly language specific ones. The best ones are great for teaching you the language you program in, and at the same time can be great tools for debugging your code, as well as great ways of propping up your monitor, as has happened to one of mine.

  • 0

I have to largely go with MrA. The most important part is to learn underlying concepts.

Anyway, the main problem with your post is that it's not really about programming languages, it's about development environments (and it seems a bit Windows-centric at that.)

You say that C makes it difficult to do "something graphical," whereas C# makes it easy. What does that have to do with the language? That's a matter of libraries and IDEs. You appear to be actually be comparing C-based APIs like GDI and USER with .NET libraries like Windows Forms/Presentation Foundation and the Visual Studio GUI editor, rather than C and C#.

You then call C++ complex, which is debatable. C# 4.0 is also a very complex language. As for calling C++ bloated, I guess you might mean that you have to write more code, but then we're really back to the library issues rather than the programming language.

  • 0
You say that C makes it difficult to do "something graphical," whereas C# makes it easy. What does that have to do with the language? That's a matter of libraries and IDEs. You appear to be actually be comparing C-based APIs like GDI and USER with .NET libraries like Windows Forms/Presentation Foundation and the Visual Studio GUI editor, rather than C and C#.

That's a very good point. Its unfair to compare C/C++ without a library to C# with the WinForms or XNA libraries since C++ can be extended with something like TCL/TK or Qt for fast GUI support and plenty of different game engines. I think its also necessary to distinguish that the "Drag-n-drop" features of .NET as part of the IDE, and not of the language.

I do think that discussion of languages is a good idea though since someone learning to program has a LOT of choices in regards to programming languages, as well as a choice to make in which version of a programming language to use (C# 1.0 is vastly different from C#4.0 feature wise), and it would help to have input from those who do use the various languages to provide information about what languages are good at, as well as what they are bad at.

Perhaps its worth avoiding the bias towards C#. I know its the OP's preferred language, and it is a good language in general; however, someone looking to get into programming needs a balanced view. Lets at least get a second disadvantage to C#.

Its still worth pinning as a replacement to the "Easy Programming Language" topic in my opinion, but it needs work first. :)

  • 0

Thanks for the feedback. I agree with some and disagree with some, so I'll go through it in order:

I disagree that C/C++ is a bad first langage.

I didn't say that (in this post at least :p ). I said like most popular, general-purpose programming, it can make a good choice, although like every other it has both advantages and drawbacks.
I personally think that C# (and Java) is a terrible first language. If you're teaching basic programming of imperative languages (functions, conditionals, loops, etc), then C# is far too complex. You get caught up in syntax, memory management ('new' is too much) and program structure instead of focusing on the basics. In this case, Python is a much better choice.
At the same time, many will say early exposure to some memory concepts is vital, which is why many recommend C or C++ as first programming language. C# provides a decent middle ground: it makes the stack/heap concept explicit, but provides garbage collection. Again, syntax is complex, but it's a middle ground; sometimes it's Java-like (writing Hello World), sometimes almost Python-like (lambdas etc). But mainly I find your comment weird because I 100% agree that Python makes a FINE CHOICE; I say it explicitely and do praise it lavishly.

I get the sense that this post is interpreted as an apology of C#, because I start by saying it's my personal recommendation. It's not, really, I'm taking the most commonly recommended languages and comparing them based on a few criteria. I felt giving a "short answer" would be useful, even though it can never be much more than a personal opinion since several languages make fine choices. I think I did make it quite clear in my formulation that this was my personal opinion however, no?

If your user is a future computer science or engineer student, then C# contains too much 'sugar' and hides too much of the basics. I've seen my fellow classmates that started with C# have nothing but problems in future courses like OSs, compilers, and computer architecture. In these cases, I view C# as setting the user up for failure. Of course, all of this is my opinion based on my experience. As I said, very subjective.
I made that clear when I said C and C++ go hand-to-hand with a course on computer architecture, and that a drawback of C# is that it shields you from the OS.
IDE support is not essential. I would argue that IDEs get in the way. For one thing, they're quite complex and having your user navigate something as large and feature rich as Eclipse or Visual Studio can be daunting. If you're starting with the basics, the best 'IDE' is really notepad with a run button and 'print' should be your debugging mechanism. Anything else is too much and distracts from the basics.
The reason Visual Basic got so popular is not because it was a great language (it wasn't) but because the IDE let you do stuff quickly. With a good IDE, a beginner can quickly make a functional GUI-based application, and the debugger can be a vital learning tool as you get to see your program running line-by-line, inspecting the value of variables simply by hovering your cursor over them; it's very intuitive and I didn't see beginners struggling with that (I did see beginners struggling to find out what was going on when the only tool they had was print). It's also much simpler to set up, and there are tons of tutorials including quality videos on the net to help you out with the basics of the IDE. Finally I find it pointless to learn how to setup a "barebones" development environment when that's used neither in academic or professional contexts. Majestic makes a similar point:
Its unfair to compare C/C++ without a library to C# with the WinForms or XNA libraries since C++ can be extended with something like TCL/TK or Qt for fast GUI support and plenty of different game engines. I think its also necessary to distinguish that the "Drag-n-drop" features of .NET as part of the IDE, and not of the language.
It hardly matters from a beginners point of view. He wants to learn how to make applications, not how to learn the language-specific features of a certain language. To make applications, you need to learn a language, sure, but preferably one that has good IDE and libraries to help you get the job done.

And sure you can add librairies to C++, but the point is that you have to do it yourself, and with no understanding of programming concepts it's a tough call you'll be able to do that. I view the out-of-the-box integration as an important asset for a beginner.

Besides if you want discuss semantics, a language can hardly be considered separately from it's standard libraries/platform. What is Java without the Java librairies and Java platform? What is C++ without the STL and standard library? A language, sure, but one you can't do much with. hdood also makes a similar point:

Anyway, the main problem with your post is that it's not really about programming languages, it's about development environments (and it seems a bit Windows-centric at that.)
It's about both, and both matter from a beginner's perspective. A good, popular IDE will help him get started faster, get rewarding results faster, see his program in action, find appropriate tutorials on the net more easily. I do explain this reasoning in my post.
On languages, your description of the various languages is also something I disagree with. For one thing, your lumping of library features with languages is a bit deceiving. The two are orthogonal. Your observation that the C language provides nothing is the whole point of C.
I do make it a positive point that it is barebones. However I also point out that the lack of libraries make it hard to get any results done, which can be discouraging. I think this is a nuanced, correct point of view.
C++ being a complex, bloated, inconsistent language is just an opinion, and one that I for one do not share (except the complex part, but I wouldn't phrase it like that). As someone who's primary coding language is C++, I don't find it unproductive, if anything, the opposite.
C and C++ are among the few languages that a beginner can't use to make any sort of graphical application, because it involves a lot of code, installing and linking to external libraries, etc. Even making text-based applications is hard because processing user input is touchy, writing/reading text files is touchy, etc. Of course you learn your way around that stuff eventually, but in the meantime, in Python or C# you'd be done already and would be learning some other programming concepts. Hence it is unproductive, at least for beginners (and even for advanced programmers, but that is another discussion).

It is bloated because of the duplication of features between C and C++, including both language and library features. Also because it forces you to learn how header files work, concepts of very little use such as private/protected/virtual inheritance, difference between a reference and a pointer (as if pointers weren't hard enough) friends, various meanings of "static", and I could go on. All of these simply don't exist in most languages, so it's something to be aware of. Hence I point it as a drawback, which is correct. I am not advising against C++: I am saying it is a recommended choice, but be aware of that, it's not going to be a walk in the park.

P.S. Don't say things like "same as C# except crappier" or "ugly". It sounds unprofessional, to a point that's beyond neowin's unprofessionalism (and boarders childishness/fanboyism).
Agreed. I was getting a bit tired at the end, but that needs much better phrasing.
You then call C++ complex, which is debatable. C# 4.0 is also a very complex language.
C# is very complex, but it allows you to do a lot without having to deal with much of that complexity, unlike C++. It's easy to learn, hard to master. C++ on the other hand is both hard to learn and hard to master. How many posts do we get here asking why some text input code using cin doesn't work? We don't get that for any other language. Even the most simple tasks are hard to do right in C++. Again, that's something to be aware of.

In general again I think this post is interpreted like an apology of C# and encourages not to try other languages. This wasn't its purpose so I will try to reformulate it as to make my intent more clear.

  • 0
[snip]

I've carefully read your post and I although it's interesting and I agree with it, I decided not to add it to the FAQ for the following reasons:

- it's right below the OP, formulated in your own words, so if the reader is interested in more discussion he will see it immediately

- it's too high-level for the purpose of the FAQ, which is just to point the beginner towards a language, an IDE and some tutorials.

I agree that books are useful, if you have recommendations in particular (preferably with links) I could add a section for that.

Also I'd just like to point that at least two operating systems were written in C#: Singularity and Cosmos. ;)

  • 0

It's about both, and both matter from a beginner's perspective. A good, popular IDE will help him get started faster, get rewarding results faster, see his program in action, find appropriate tutorials on the net more easily. I do explain this reasoning in my post.

Your posts are mostly about environments. There's nothing wrong with that, it's just that you phrase it so that it seems like the pros and cons are somehow inherent to the programming languages, which is not true.

A GUI framework is not part of the C# language, it's part of a library, just like in C/C++. You could easily have Windows Presentation Foundation in native C++ (or even C), and it wouldn't be noticeably more difficult.

What you're really saying is that a C++ environment made up of Windows and Visual Studio is harder to develop for out of the box, because it doesn't come bundled with libraries like that. I think this distinction is important, and I'm not just trying to be pedantic.

The rest is mostly ranting.

  • 0

So after "Productive for GUIs" you want me to add "(not because of the language itself, but the libraries and IDE integration that comes with Visual Studio Express which is what recommend installing)" ? I don't even expect someone reading this post to understand the difference between a language and the librairies it comes bundled with.

Besides the distinction is almost meaningless in some regards. In C#, int is defined as System.In32; C# is simply undefined without the BCL. And no you can't use WPF in C even if you wanted to.

  • 0

So

How you want to write things is up to you.

And no you can't use WPF in C even if you wanted to.

Yes, you could. There's nothing magical about it. The fact that no one has bothered to write it has nothing to do with the language. I'm a little surprised that you don't understand this.

  • 0
Yes, you could. There's nothing magical about it. The fact that no one has bothered to write it has nothing to do with the language. I'm a little surprised that you don't understand this.
You cannot call WPF APIs from a true unmanaged program. You might be able to write some kind of wrapper and then use that, but the fact that no one has bothered to write one leads to believe that it's probably impractical and mainly pointless. And what's the relevance to a "getting started" FAQ anyway? As I said I don't expect someone reading this to understand the difference between a language and a library. C# lets you easily create GUI applications because WPF and Winform are well integrated with it in the Visual C# IDE; for beginners I can simply say "C# lets you easily create GUI application" and leave the rest for future discovery. It's not misleading. It's incomplete, but my point is to be helpful, not complete. Someone starting with C isn't going to make GUIs anytime soon; they need to understand just that, nothing more for now.
  • 0
Someone starting with C isn't going to make GUIs anytime soon; they need to understand just that' date=' nothing more for now.[/quote']

I spent 2 weeks learning almost everything to do with C. After that. it took me a couple days to get my first fully-authored GUI program done using the Windows API. Sure, I followed a tutorial the first couple of days, but who doesn't? It's not that hard. All it takes is an intelligent person with the right mindset. If you give up too quickly, you'll never get anywhere. That's true in almost any case, programming or not.

It took me 3-4 months to learn C GUI programming in Windows AND Linux(Gtk+/SDL).

It's not that difficult. Sure, C# simplifies it, but ALL .NET applications are SLOW.

I wrote the exact same program with both C, C# and VB and it was no contest.

(2.6 GHz Intel Pentium 4,2GB RAM,7200rpm HDD)

C load time: 0.46 secs.

C# load time: 2.35 secs.

VB load time : 2.46 secs.

Fact: Everything you can do in C# or VB you can do in C.

The Windows API is very simple once you get to know it.

It seems as if you're trying to draw attention to yourself, starting a thread with a title that you might find pinned to the top. I'm just saying, that's what it looks like.

  • 0

You cannot call WPF APIs from a true unmanaged program.

Uhm, I said that you could easily have Windows Presentation Foundation in native C++ (or even C). As in that you could implement the same thing in C++ because it has nothing to do with the programming language, not that you could call the .NET version. Reading comprehension. There's nothing inherent about the language that makes it impossible to have modern APIs.

And what's the relevance to a "getting started" FAQ anyway?

It wasn't supposed to be a huge deal, just to point out that your post appeared to be trying to highlight pros and cons of programming languages, when that's not really what it does. What you're doing is giving your opinion of what out of the box experience one can expect when using Visual Studio under Windows, rather than discussing programming in general. Nothing wrong with that in itself, and it's certainly what a lot of people want.

C# lets you easily create GUI applications because WPF and Winform are well integrated with it in the Visual C# IDE;

Then you're saying that Visual Studio lets you do it, not C#. WPF isn't part of C# (and isn't even available on anything other than Windows.) The ability to automatically generate GUI code is not part of C# either, it's part of an editor/IDE. The actual WPF/Forms APIs are not really that simple if you had to write the code yourself, and I suspect the same is true for whatever .NET GUI APIs are available on other platforms.

Hell man, you could probably become comfortable with the good old Windows GUI/graphics APIs faster than it takes to figure out Expression Blend.

Someone starting with C isn't going to make GUIs anytime soon; they need to understand just that, nothing more for now.

Debatable. No, you're not going to just instantly load it up and start dragging and dropping controls to make your own "browser" without actually understanding what you're doing and then go post on a forum asking how to compare a variable to some value, but then that is taking "learn as you go" too far and is not a good strategy. Is the goal to actually learn, or just patch something together as fast as possible? Once you've got the basics of the language down, it's not that difficult to get something graphical up and running in C or C++ on most platforms. In that sense your post seems a little clumsy and gives off a kind of biased vibe.

  • 0

Once you've got the basics of the language down, it's not that difficult to get something graphical up and running in C or C++ on most platforms. In that sense your post seems a little clumsy and gives off a kind of biased vibe.

Exactly.

No, you're not going to just instantly load it up and start dragging and dropping controls to make your own "browser"

But you could use something like ResEdit to design a dialog box.

  • 0
...

I made that clear when I said C and C++ go hand-to-hand with a course on computer architecture, and that a drawback of C# is that it shields you from the OS.

...

You keep saying that, as if it were a bad thing. Certainly for learning programming, and quite a few applications, there is no advantage to have to deal with things on an OS (or OS-specific) level. A higher-level language may be preferable. I think I disagree strongly to categorizing that as an absolute "negative".

Other than that, I think this is shaping out to be a good thread. (Y)

  • 0

I agree with Dr. Asik. C/C++ is absolutely the worst language to start off with.

1. When you are learning to program, you shouldn't have to worry about the intricacies of pointers/references/etc. Most people that have no knowledge in programming get really frustrated with this.

2. Lets face it, C/C++ are old and a lot of newer techniques and concepts either aren't supported or a huge cludge (classes, lots of stuff in the STL).

3. Anything beyond a console program is difficult. For reference, it takes about 100 lines of code for a basic window. Yes, there are a libraries and such out there, but the Win32 API is not the most elegant code.

4. Lots of things are difficult to do in C/C++ that are fairly easy in higher level languages. GUI, networking, graphics, sound, parsing, threads, etc are fairly difficult without outside libraries.

5. Programming should be fun. If the language is restricting you from what you want to do because of difficulty, most people will quickly become put off.

Why spend hours learning complex API's, memory management, etc when you could spend a fraction of the time to do the same thing while learning to program and have fun doing it?

I do OS programming for a job. This involves C and an extreme amount of memory management and pointers. I wouldn't want any noob to have to mess with that stuff. It's a nightmare sometimes.

  • 0

I agree with Dr. Asik. C/C++ is absolutely the worst language to start off with.

For anyone under 15, maybe. C is probably the best language out there for beginners because it teaches you more about how programs run.

3. Anything beyond a console program is difficult. For reference, it takes about 100 lines of code for a basic window. Yes, there are a libraries and such out there, but the Win32 API is not the most elegant code.

res.rc

100 DIALOG 100,80,25,25
STYLE WS_POPUP|WS_VISIBLE
CAPTION "Proof"
FONT "MS Sans Serif"
BEGIN
PUSHBUTTON "How's This?",IDOK,0,0,50,14
END

main.c

#include <windows.h>
BOOL CALLBACK DlgProg ( HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)
{
DialogBox(GetModuleHandle(NULL),MAKEINTRESOURCE(100),NULL,DlgProc);
return 0;
}

BOOL CALLBACK DlgProg ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg){
case WM_INITDIALOG:
return 0;
case WM_COMMAND:
switch(wParam){
case IDOK:
EndDialog(hwnd,0);
break;
}break;

default:
return FALSE;
}
}

32 lines. BOOYAH!

Or, just:

#include <windows.h>
int main(int argc, char argv[]){
MessagBox(0,"4 lines","of code",0);
return 0;}

Now that is a basic window. :D

5. Programming should be fun. If the language is restricting you from what you want to do because of difficulty, most people will quickly become put off.

No pain, no gain.
  • 0

For anyone under 15, maybe. C is probably the best language out there for beginners because it teaches you more about how programs run.

I disagree. There's more to programming than memory management. Memory management just gets in the way of learning concepts.

#include <windows.h>
BOOL CALLBACK DlgProg ( HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)
{
DialogBox(GetModuleHandle(NULL),MAKEINTRESOURCE(100),NULL,DlgProc);
return 0;
}

BOOL CALLBACK DlgProg ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg){
case WM_INITDIALOG:
return 0;
case WM_COMMAND:
switch(wParam){
case IDOK:
EndDialog(hwnd,0);
break;
}break;

default:
return FALSE;
}
}

32 lines. BOOYAH!

I said a window. As in a program window. As in not a message box. That is also really bad code. No error handling?

No pain, no gain.

If you want to be a masochist and spend more time debugging and working with complex API's than anything else, well more power to you. The rest of us can be productive. :)

  • 0

I disagree. There's more to programming than memory management. Memory management just gets in the way of learning concepts.

But it gives the programmer a better understanding of the machine. Which is important.

I said a window. As in a program window. As in not a message box. That is also really bad code. No error handling?

A dialog is a program window.

Bad code? I just whipped up an example.

If you want to be a masochist and spend more time debugging and working with complex API's than anything else, well more power to you. The rest of us can be productive. :)

I'm not a masochist. A masochist is someone who obtains pleasure from receiving punishment.

I meant: "One must be willing to endure some inconvenience or discomfort in order to achieve worthwhile goals."

So there. Stay on topic.

  • 0

But it gives the programmer a better understanding of the machine. Which is important.

A dialog is a program window.

Bad code? I just whipped up an example.

I'm not a masochist. A masochist is someone who obtains pleasure from receiving punishment.

I meant: "One must be willing to endure some inconvenience or discomfort in order to achieve worthwhile goals."

So there. Stay on topic.

Lol, man. The only thing I keep seeing you do on the Programming board with the whole C/C++ vs Others debate is twist people's words and shy away from things that put you in the wrong.

  • 0

Lol, man. The only thing I keep seeing you do on the Programming board with the whole C/C++ vs Others debate is twist people's words and shy away from things that put you in the wrong.

What exactly puts me in the wrong?

Programmers can do whatever they like. If he/she chooses to program in a simplified language because they don't want to have to work at it, that's his/her decision.

  • 0

You keep saying that, as if it were a bad thing. Certainly for learning programming, and quite a few applications, there is no advantage to have to deal with things on an OS (or OS-specific) level. A higher-level language may be preferable. I think I disagree strongly to categorizing that as an absolute "negative".

I made it quite clear in the original post:
Shields you from the OS (the .NET framework act as an intermediary), a good thing in many ways except for learning how computers work

There. A NUANCED point of view. It could be in the positives or the negatives, it's not clear-cut, I chose one because I'm trying to keep things simple. If I didn't, many people would inevitably point out that you'd better learn with C/C++ because they teach you how to interface with the OS (which is why C and C++ are usually taught for CS degrees). And they would be right, except that C/C++ also have their drawbacks which must be accounted for.

In short I'm not rooting for any particular language in the post; I'm not rooting for high-level vs low-level languages; I'm comparing all approaches in as a few words and examples as possible and give beginners an idea of what to look for and what to expect before their attention span runs out. It's not an introduction to programming and it doesn't try to be that.

It would be more useful if instead of discussing semantics and the speed of .NET programs, you [people on this thread in general] provided suggestions for reference material such as how to get started on Mac (I got nothing on that) or books.

Uhm, I said that you could easily have Windows Presentation Foundation in native C++ (or even C). As in that you could implement the same thing in C++ because it has nothing to do with the programming language, not that you could call the .NET version. Reading comprehension. There's nothing inherent about the language that makes it impossible to have modern APIs.
But... I am in no way implying that it is impossible to implement modern GUIs that are callable from C++. I'm just saying you are going to have a much easier time, as a beginner, making GUIs by going with C# than with C or C++, considering the whole package, language + libraries + IDE. I make it clear when I list what you should be looking for when choosing a programming language. If someone actually gets misled into thinking WPF can't be implemented in C++, which I sincerely doubt can ever happen, the forum is there for that.

:whistle:

dramonai: For anyone under 15, maybe. C is probably the best language out there for beginners because it teaches you more about how programs run.

Xilo: I disagree. There's more to programming than memory management. Memory management just gets in the way of learning concepts.

Please notice that although the post do lean towards Python/C# more than C/C++, it compares both approaches according to their respective advantages and drawbacks and doesn't clearly take a side on the issue. C/C++ are better for teaching Computer Science, C#/Python are better for getting stuff done and having fun doing it. I am aware of this, so please keep this on topic. I am looking for suggestions to improve the OP so that this section can have a helpful "Getting started" FAQ.
Then you're saying that Visual Studio lets you do it, not C#. WPF isn't part of C# (and isn't even available on anything other than Windows.)
But Visual Studio won't let you do it in C++. And from the purpose of a non-programmer I see no purpose in trying to explain the difference between Visual C#, C# and .NET, since in 99% of cases if they take this path they will download Visual C# express and start using the three in combination. Again, if I have to be more precise, this drags on the post and makes it less useful. I link to MSDN which has excellent explanations on what is C#, what is Visual Studio etc., if the reader is interested.

The same goes for Python. Python is not an interactive shell, but 99% chances are you are going to download CPython from python.org and start messing around with the IDLE, and this is a superior learning experience compared to using a build-and-run IDE. Python makes a great learning tool precisly because of that, even though the IDLE is not a language feature. Most argumentations in favor of Python point that out, if you care to look around. (http://www.stanford.edu/~pgbovine/python-teaching.htm) Are they misleading? No. Same goes for C# and its related GUI design features.

I spent 2 weeks learning almost everything to do with C. After that. it took me a couple days to get my first fully-authored GUI program done using the Windows API.
I spent a day creating my first VB program, and it was a WinForms Tic-Tac-Toe which you could play against, with three levels of difficulty. You can't really argue that GUIs isn't a strong point of C# and VB, especially compared to C.

Besides I'm not saying C makes it impossible, I'm saying it makes it hard, in the context of a comparison with C# and Python.

Fact: Everything you can do in C# or VB you can do in C.
Sure. Hence I'm recommending C as an excellent first choice. Just because I list some drawbacks doesn't mean it's not a recommendation. I listed drawbacks for all languages.
ALL .NET applications are SLOW.
If startup time is your one and only concern, why not use NGEN? Besides this kind of blanket statement leads me to think you have no idea what you are talking about. .NET applications can be faster than the fastest code C++ compilers can generate in some cases due to run-time optimizations by the JIT. Besides, .NET makes it easier to write fast code. :rolleyes:
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • A few years ago walmart had the 512 models on clearance for $35. I bought 3 of them. I should have purchased more.
    • I'm fine with a little reasonable promotion of Edge, but the degree which they do it right now I consider extremely unreasonable. 
    • Microsoft AI boss no longer believes that AI will replace human workers by David Uzondu Mustafa Suleyman, the head of Microsoft AI, recently took back his statements concerning white-collar jobs that he gave to the Financial Times in an interview made back in February, where he claimed that AI would replace office workers within 12 to 18 months. On Monday's episode of The Verge's Decoder, Suleyman recast the technology as more like a helpmate than a tool designed to take over your job. He explained that smaller office duties will "increasingly become digitized, automated" as people generate more digital materials. During the discussion, Suleyman emphasized a "very important distinction" between "tasks" and "jobs" to clarify his previous claims. He argued that his earlier comments only referred to individual actions that people perform at their desks. Suleyman used to work for DeepMind, the research lab he co-founded in 2010 alongside Demis Hassabis and Shane Legg, before he left in 2022 to establish Inflection AI and build an empathetic digital assistant. Microsoft hired him in March 2024 to lead its newly formed "Microsoft AI" division, placing him in charge of consumer products like Copilot, Bing, and Edge. His February comments also detailed plans for Microsoft to achieve self-sufficiency with a $140 billion infrastructure budget to train frontier models, predicting that creating a customized AI will soon feel like creating a podcast or a new blog: The 41-year-old is not the only AI executive who's softened his "AI will replace you" stance. OpenAI's CEO, Sam Altman, last month used X to push back against employment panic by arguing that his startup builds tools to assist humans rather than build replacements. He had previously garnered backlash by suggesting that many modern office roles that AI might replace did not qualify as "real work" in the first place, at least when you compare desk jobs to physical, historical labor like farming.
    • Adobe Acrobat Reader DC 2026.001.21662 by Razvan Serea Adobe Acrobat Reader DC software is the free, trusted standard for viewing, printing, signing, and annotating PDFs. Its the only PDF viewer that can open and interact with all types of PDF content – including forms and multimedia. It’s connected to Adobe Document Cloud – so you can work with PDFs on computers and mobile devices. Adobe Document Cloud is a revolutionary, modern and efficient way to get work done with documents in the office, at home or on-the-go. At the heart of Document Cloud is the all-new Adobe Acrobat DC, which will take e-signatures mainstream by delivering free e-signing with every individual subscription. Document Cloud includes a set of integrated services that use a consistent online profile and personal document hub. With Adobe Document Cloud, people will be able to create, review, approve, sign and track documents whether on a desktop or mobile device. Businesses will be able to take advantage of Document Cloud for enterprise which provides enterprise-class document services that integrate into systems of record such as CRM, HCM, CLM, and CMS, adding speed, efficiency and transparency to getting business done with documents. Adobe Acrobat Reader DC new feature highlights: Work with PDFs from anywhere with the new, free Acrobat DC mobile app for Android or iOS. Select functionality is also available on Windows Phone. Use the new Fill & Sign tool in your desktop software to complete PDF forms fast with smart autofill. Download the free Adobe Fill & Sign mobile app to add the same option to your iPad or Android tablet device. Save money on ink and toner when printing from your Windows PC. Store and access files in Adobe Document Cloud with 5GB of free storage. Get instant access to recent files across desktop, web, and mobile devices with Mobile Link. Sync your Fill & Sign autofill collection across desktop, web, and iPad devices. Adobe PDF Pack premium features includes: Convert documents and images to PDF files. Use your mobile device camera to take a picture of a paper document or form and convert it to PDF. Turn PDFs into editable Microsoft Word, Excel, PowerPoint, or RTF files. Combine multiple files into a single PDF (web only). Get signatures from others with a complete e-signature service. Send, track, and confirm delivery of documents electronically instead of using fax or overnight services (tracking not available on mobile). Store and access files online with 20GB of storage. Download: Adobe Acrobat Reader DC 64-bit | 719.0 MB (Freeware) Link: Adobe Acrobat Reader DC Home Page | Release Notes | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Meta will now use data from outside businesses to personalize AI responses by David Uzondu In an update that's rolling out globally (except in a handful of countries), Meta will use your data from outside businesses to personalize your AI responses and your primary feeds. Meta already utilizes your shopping activity to target ads, but the company now plans to expand this tracking to personalize other "parts of your experience" like feed algorithms and AI assistant chats. The company is replacing the two settings ("Your activity off Meta technologies" and "Activity from other businesses") that currently let you disconnect off-platform activity with a single, renamed setting called Activity from other businesses. If you don't want Meta to manipulate your feed and AI responses using your outside history, you can just turn the Activity from other businesses setting off in your account settings. This toggle resides within your Accounts Center, applying your choice to every connected profile. Turning this off will not stop companies from sending your data to Meta. The company will still collect your web interactions, but it only uses them to train products, while still accessing external accounts you connect. When The Verge spoke to Meta spokesperson Emil Vazquez, the representative said that this update will exclude several locations at launch, including the European region, the UK, Brazil, Thailand, South Africa, Turkey, South Korea, Ecuador, Nigeria, and Kenya. The new update comes at a time when the social media giant is recovering from a major PR disaster involving generative AI. Last week, there was a huge security issue on Instagram where attackers figured out a way to trick Meta AI into handing over account ownership (even if the victim had 2FA enabled). Some of the affected accounts include the dormant Obama White House profile, cosmetics brand Sephora, the Chief Master Sergeant of the Space Force, and security researcher Jane Manchun Wong. Internally, the company also had to scale back plans on its Model Capability Initiative (MCI), an employee-monitoring program designed to train corporate AI models by recording worker keystrokes and screen activity, after employees raised privacy concerns and complained about severe battery life drain.
  • Recent Achievements

    • One Year In
      Primer1st earned a badge
      One Year In
    • Experienced
      JayZJay went up a rank
      Experienced
    • Reacting Well
      Sir_Timbit earned a badge
      Reacting Well
    • Week One Done
      rubentuben8 earned a badge
      Week One Done
    • Week One Done
      ARaclen earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      512
    2. 2
      PsYcHoKiLLa
      229
    3. 3
      Edouard
      134
    4. 4
      ATLien_0
      87
    5. 5
      Steven P.
      80
  • Tell a friend

    Love Neowin? Tell a friend!