• 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
Share on other sites

Recommended Posts

  • 0

Even console programs are tough. The fact that people can ramble on for 7 pages about how to wait for user input at program termination is but a trivial example. :laugh:

We had that discussion here as well, didn't we. But then there's also this, so clearly people have problems with the simplest of concepts in all languages.

So hey, what's the .NET way of waiting for any key? Can never know too much trivia.

Link to comment
Share on other sites

  • 0

We had that discussion here as well, didn't we. But then there's also this, so clearly people have problems with the simplest of concepts in all languages.

So hey, what's the .NET way of waiting for any key? Can never know too much trivia.

What's your point? Find me a 7 pages or more thread about how to wait for any key in a .NET console program, and you'll have made a valid comparison. The problem is not that beginners don't know how to do basic things, it's that even experienced programmers can't provide a simple working solution on which they would all agree.
Link to comment
Share on other sites

  • 0
The problem is not that beginners don't know how to do basic things, it's that even experienced programmers can't provide a simple working solution on which they would all agree.
Beginners don't know how to do anything anyway. And I don't think it matters how they go about it as long as the result is what they wanted. Don't you agree?
Link to comment
Share on other sites

  • 0
Beginners don't know how to do anything anyway. And I don't think it matters how they go about it as long as the result is what they wanted. Don't you agree?
I'm not sure I understand what you mean and I don't see the connection with what you quoted. In any case I don't want to get lost in debates about which language or approach is better. I'd rather like to know if you [or anyone else] feel a particular proposition of the OP could be formulated better, if the layout is good, if you have any useful links to add, etc., and whether you think that in its current form (I've edited it heavily since I originally posted it) it is appropriate to be pinned, because the few pinned topics we currently have aren't too useful in general.
Link to comment
Share on other sites

  • 0

What's your point? Find me a 7 pages or more thread about how to wait for any key in a .NET console program, and you'll have made a valid comparison.

You're being your typical dishonest self. Nothing new under the sun. I looked, and there are threads about people wanting to know how to do it in .NET (even though the ratio of C/C++ to .NET programmers, especially for console stuff, is probably 100,000:1) . As for "7 pages or more," not all 7 pages of that thread of yours is on topic.

The problem is not that beginners don't know how to do basic things, it's that even experienced programmers can't provide a simple working solution on which they would all agree.

Bull. The answer on Windows is two lines that all experienced console programmers know, on Linux it's a few more, but all experienced Linux console programmers know. The problem is exactly that beginners don't know how to do basic things (and also that the web is full of people that just want to argue about things rather than provide an answer, if they even know it), and I see threads with people having trouble solving simple problems in .NET everywhere.

Link to comment
Share on other sites

  • 0
You're being your typical dishonest self. Nothing new under the sun.
:rofl: I post some useful beginner info and ask for improvements and content; so far you've managed to question my honesty, my reading comprehension skills and my understanding of the difference between a language and a library (seriously, wtf), as well as provide some sky-high, semantical criticism about how I lump together languages and programming environments when that's pretty clearly my intent (talk about reading comprehension). The FAQ states C++ is "Complex at the outset: hard to learn, hard to master", a statement most C++ programmers would agree with, nothing more, nothing less; rather than bickering about stuff you know we both know, be rude and waste my time, why not help make this FAQ happen?
Link to comment
Share on other sites

  • 0
Link to comment
Share on other sites

  • 0

More Linux stuff:

Official Gtk+ Tutorial

X Windows System Programming (Advanced)

Xlib Beginner's Tutorial

LinuxMafia.com's list of IDEs

Cross-Platform:

Zetcode Tutorials

Qt Product Page

Qt Documentation

(I would definitely recommend Qt for OS X GUI programming)

Game Programming:

LazyFoo's SDL Tutorials

Overall Tutorials:

Free online C/C++ tutorials

Free online C# tutorials and references

Compilers:

The Free Country compiler list

I'll post more later.

Link to comment
Share on other sites

  • 0

Added some general links and some books. Specific APIs like Win32, Qt, SDL etc. will probably get their own section eventually, although maybe they would be better in a separate FAQ if this gets too long. Also I really can't recommend Dev-C++ for the reasons this blogger mentioned in 2008, which are all the more relevant 2 years later. In fact since despite its problems it is still often recommended, I will explicitely warn against it.

Link to comment
Share on other sites

  • 0

C++:

All the advantages of C plus support for objects and generics, and better standard library

Essential skill for any game programming position and in a wide array of domains

Complex at the outset: hard to learn, hard to master

Like C, it is mainly designed as a systems programming language

I don't agree with red statements, because for system programming, is important to use C language, it belongs group of low level languages.

C is used for write OS kernel. So C++ isn't used for mainly system programming, it's used for system programming, yes but not for OS kernel.

In my opinion C++ is used on already written OS.

-----------------------

you know, i think that C# isn't powerful language yet :|

Some people thinks that C# have replaced C++, that not suited for truth.

if you want to become actual programmer you have to throw C# now.Get one of the best powerful programming language C++, Python.

-----

P.S This is my second post.

Link to comment
Share on other sites

  • 0

C++ shares the same design goals as C because it is basically a superset of it. It's C, with added features (which mesh more less well with C's limitations and compilation model).

While C# doesn't "replace" C++, it is widely used and often seen as a requirement for job listings. Where I work, most of the tools are developed in C#.

Link to comment
Share on other sites

  • 0

I don't agree with red statements, because for system programming, is important to use C language, it belongs group of low level languages.

C is used for write OS kernel. So C++ isn't used for mainly system programming, it's used for system programming, yes but not for OS kernel.

In my opinion C++ is used on already written OS.

-----------------------

you know, i think that C# isn't powerful language yet :|

Some people thinks that C# have replaced C++, that not suited for truth.

if you want to become actual programmer you have to throw C# now.Get one of the best powerful programming language C++, Python.

-----

P.S This is my second post.

I disagree with your disagreement about his last statement, C is very commonly used for micro controller programming, which i think is what he meant, as well as Operating system Basics building blocks.

Link to comment
Share on other sites

  • 0

I don't agree with red statements, because for system programming, is important to use C language, it belongs group of low level languages.

C is used for write OS kernel. So C++ isn't used for mainly system programming, it's used for system programming, yes but not for OS kernel.

In my opinion C++ is used on already written OS.

-----------------------

you know, i think that C# isn't powerful language yet :|

Some people thinks that C# have replaced C++, that not suited for truth.

if you want to become actual programmer you have to throw C# now.Get one of the best powerful programming language C++, Python.

-----

P.S This is my second post.

Link to comment
Share on other sites

  • 0

Just added the "How to think like a computer scientist" books. As far as free CS material goes, this is golden. Someone really needs to write a C# version of the book though.

Link to comment
Share on other sites

  • 0

Hi,

I used to make some simple apps for my internal use, with Delphi 2007 - long time ago, obviously :)

It would seem that Delphi is now dead (i know I can still run it and compiled programs still work, but...)

Is there anything more recent, up-to-date that would be easy for a ex-Delphi user to jump on?

Link to comment
Share on other sites

  • 0

Some people say that C# is a good language to learn after Delphi, I can't offer my insight on that, seeing as though I know neither. Java's always a nice language to know it'q quite ubiquitous in the corporate world. If you program for enjoyment, you should take a look at Python or Ruby; they are two very nice languages to use (and easy to pick up as well).

Link to comment
Share on other sites

  • 0

I started off by using mIRC scripting; it's a very easy language to learn and teaches the basics, but it also has some things that may confuse people when they try to transition to another language; for example, everything in mIRC is a string. You don't need to enclose strings in quotes either.

alias test {
  var %x = abc, %y = 1
  echo -a $calc(%y * 10)
}

This creates an alias/function called 'test' which declares two variables (%x: abc and %y: 1) then outputs the value of %y times by 10.

It has functions, variables, loops, sockets, events, etc etc. I found it quite easy to transition from mIRC to C++. Obviously C++ is more complex, but syntactically it's not worlds apart.

I still use it today because it's an incredibly quick and easy language to write code for, so if I need to simplify a task at work I can whip up a script in minutes. I wrote a script in twenty minutes that takes names from a list and adds them to an Outlook calendar for each day in a month. It's to signify who is on call each night at work. Turned a job that usually takes about 20-30 minutes into a two minute one :D

Link to comment
Share on other sites

  • 0

Hey guys, very cool thread, I have had my head out of programming for many years now but I would like to dab my feet back in the water and play around with Metro based apps.  Which language would I be best directing my energies to learning and running with?

Link to comment
Share on other sites

  • 0

Hey guys, very cool thread, I have had my head out of programming for many years now but I would like to dab my feet back in the water and play around with Metro based apps.  Which language would I be best directing my energies to learning and running with?

 

It depends on your prior experience. Since Microsoft is heavily pushing C++ and C# for Modern app development, you should probably use whichever you are most familiar with. If you are not very experienced with either, C# is probably the easier language to start learning.

 

If you are looking for a C# book recommendation, Asik recommended a good one recently.

Link to comment
Share on other sites

  • 0

While I'm evangelising C, I thought I'd disabuse those reading this thread of some misconceptions.

 

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

C:

  • sad.gif Hard to do anything graphical or even text-based (GUIs, games)
Doing anything graphical in C is only as hard as the GUI toolkit / library you use. As it probably is in most languages. For instance, creating a GUI in GTK isn't hard at all, nor is creating a terminal graphical interface using ncurses. Both are easy and powerful libraries which enable the programmer to create rich graphical user interfaces quickly.

 

C is primarily designed as a systems programming language

That's also incorrect. C is a general purpose high level programming language. It can be used for anything, from writing an accounts package with a rich graphical interface, embedded software on PLC controllers, Systems development, or writing an Android mobile app. It's completely flexible.

 

  • sad.gif Lacks such basic features as a string type, a container library, support for OOP, etc.
When someone says a programming language lacks basic features, what they're really saying is it doesn't have built-in things which exist in their own preferred language. Those things however, are often available in third party libraries as I mention below.

It's not necessary to have string types, a container library, or OOP support in order to write software. Some in fact might view these *features* as unnecessary bloat which hinders performance and complicates the language.

And if someone wants a string type, there's nothing stopping them creating one. Just the same way as you might create any other data structure, be it a linked list, associative map, or tree. They're all containers.

Or if someone prefers something ready to go, there are plenty of modules written that can plug right in that will accomplish the same task. GLib for example implements most of those supposedly *missing features* including basic OOP.

So if you hear the argument that C is too barebones and doesn't have the features that other languages have, first consider that there are many libraries that support such features. GLib, GTK, NCurses, Sqlite, Devil, SDL, etc. There are hundreds of C libraries out there to plug in to.

I hope that dispels a few myths and misnomers about a very practical, general purpose, efficient, and powerful programming language called C :D

Link to comment
Share on other sites

  • 0

While I'm evangelising C, I thought I'd disabuse those reading this thread of some misconceptions.

 

Doing anything graphical in C is only as hard as the GUI toolkit / library you use. As it probably is in most languages. For instance, creating a GUI in GTK isn't hard at all, nor is creating a terminal graphical interface using ncurses. Both are easy and powerful libraries which enable the programmer to create rich graphical user interfaces quickly.

 

That's also incorrect. C is a general purpose high level programming language. It can be used for anything, from writing an accounts package with a rich graphical interface, embedded software on PLC controllers, Systems development, or writing an Android mobile app. It's completely flexible.

 

You are just making semantic arguments. "General purposeness" is unrelated to the notion that C was designed for systems programming and refers only to the notion that the language can be used to solve problems outside of a specific domain (contrasting with domain specific languages which were designed to solve problems only in a specific domain). For example, VHDL is a a hardware descriptor language that's only application is in designing electronics. HTML is a markup language that's only application is in describing web pages.

 

 

When someone says a programming language lacks basic features, what they're really saying is it doesn't have built-in things which exist in their own preferred language. Those things however, are often available in third party libraries as I mention below.

 

The fact that you can link with existing libraries and tool-kits that provide additional functionality does not change the nature of the language. It doesn't mean that the language itself suddenly provides automatic memory management features and a built in expressive library providing higher-level functionality. Your argument is basically if you search for and bolt on all of this additional software that someone else wrote, C is potentially easier to work with than it would be otherwise. In the same vein, I can make the same argument for x86 assembly because I can link to and use the same 3rd party software that C can use.

 

 

It's not necessary to have string types, a container library, or OOP support in order to write software. Some in fact might view these *features* as unnecessary bloat which hinders performance and complicates the language.

And if someone wants a string type, there's nothing stopping them creating one. Just the same way as you might create any other data structure, be it a linked list, associative map, or tree. They're all containers.

So what if it is not necessary? it's easier and a safer and higher-level than working directly with character arrays. How does your argument at all address the nature of C not being high level. You are just telling people to implement or search for 3rd party implementations of all of the missing functionality themselves.

 

What do you mean it is more difficult to write an word processor in C than it is in Java? I found word_proc.go() online and I just called that directly. Done! Easy as pie!

  • Like 2
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.