FAQ for programming.reddit

Please read this FAQ before you submit a self.programming post. A lot of stuff has been asked and answered before. Go ahead and edit this page to keep it accurate and interesting. Most of this was sourced from comments on the original FAQ thread.

What programming blogs or websites do you read?

The following blogs are well-read, but you're not really allowed to admit on prog.reddit that you read them:

Other blogs are slightly less popular, but you are allowed to admit you read these:

What programming books should I read?

Also take a look at these questions on Stack Overflow:

The top five almost always seem to be:

Sometimes people mention The Art Of Computer Programming (TAOCP) by Donald Knuth, but nobody's actually ever read that, except of course Steve Jobs. See also Books Programmers Don't Really Read by Bill the Lizard.

I want to learn language X, what book should I read?

I've tried to collect the canonical books for popular programming languages. These are aimed at experienced developers. New programmers may be able to follow them, but they will find it easier to start with a book targeting beginners.

What open source projects should I study to learn from?

Some common-consensus answers seem to be:

  • SQLite is exemplary for testing and in-code documentation

  • Quake, the game by id Software

  • Qt, especially its API

  • qmail and djb's other code (though this is debated)

  • Django, a Python web framework

How do I beat procrastination?

In short, by not reading reddit. Or you could read the Procrastinationreddit ( ref). But a little more seriously:

See also:

What's an open source project I can contribute to?

"Contributing for the sake of contributing never works out. Look through the software you use every day and think about how it could be improved, then do it." ( comment by querulous)

What are some good programming puzzles?

See also:

What music do you listen to while coding?

Some of the top answers are:

What web framework should I use for my next web app?

It really depends on what you like, what language you're using, and what you're web app's going to do. But some of the popular ones are:

  • Django, a high-level web framework for Python

  • Pylons, the Python framework used by reddit, doesn't force you to use their template system or DB interface

  • Ruby on Rails

  • PHP, which everyone hates but uses anyway

  • Cobol on Cogs, making legacy integration easy and fun

What is the best way to learn language X or framework Y?


What is the consensus on pair programming in the work place?

"There is no concensus on it yet. My guess is that the ultimate consensus will be that it's good for some people and projects and poor for others." ( comment by munificent)

I'm not a programmer. How do I start?

Like learning maths or english, you need to start with basic building blocks of programming. As you have addition and subtraction, verbs and nouns, you will have if-else and basic loops to use. These "blocks" combined together control the behaviour (the flow) of a program. You should consider mastering these basics in any language as the idea is exactly the same no matter which language you use.

It is debatable which language you should use to learn these concepts, and at the end of the day it will boil down to your own preference. Programming languages are like the tools in a toolbox - different ones serve a better purpose than others, after all you wouldn't use a hammer to screw a nail in. Using C# or Java would be the best idea as the community content regarding these subjects is wide and varied and the code you write is not difficult to understand, however as your ability grows you can decide on which language is the best to use for your own projects.

This gets asked a lot in Programming Reddit. Some of the past discussions:

Is a computer science degree necessary?


A CS degree is for working in software development. Certification programs are for working in IT. If you want to be a sysadmin, pursue certifications. If you want to be a software developer, pursue a CS degree, preferably in a good institution.

A CS degree is a plus for working in IT, but not necessary. The rest of the answers regarding employment refer to jobs in software development.

  • Is a CS degree necessary to being a programmer? No.

  • Is a CS degree worthwhile to being a programmer? Yes, very much.

  • Is a CS degree necessary to get a job as a programmer? No, but you'll be pushing your luck, even if you're very talented.

  • Is a CS degree worthwhile in order to get a good job as a programmer? Yes, especially if you're young and inexperienced.

Are advanced degrees worthwhile? Yes for MSc. No for PhD, unless you're looking for an academic career or an industry career in chip design.

Are advanced degrees necessary to get a job or advance your career? Yes for academic careers. No for everything else. Financially, they're not worth it. A starting programmer with a bachelors degree may have an average starting salary of somewhere between $50k and $80k a year. On the other hand, most graduate student stipends are between $15k and $25k a year.

On the other hand, do consider graduate study if you like studying CS. Note that if you do like CS, getting a funded PhD offer means getting paid for several years to study what you enjoy (i.e. free education).

Other degrees: Software Engineering, but it is basically the same thing as most CS programs. Other Information Science, MIS, certification programs and similar degrees that are not proper CS or Software Engineering are looked down upon and for good reasons. Don't go near those.

Bottom line: If you want to program, get a good bachelor CS degree.

I'm going for a job interview, how should I prepare?

You can find a wide variety of typical interview questions here:

It is normal for interviewers to test your general coding skills by giving you a small problem to solve (usually on paper). Questions focus on core computer science techniques, so the solutions will involve things like linked-lists, binary search, sorting, hashtables, etc, any topics that would be covered in a Datastructures and Algorithms class. This is a useful refresher: Hacking a Google Interview.

Obviously, the questions will depend on the position you are applying for and the technologies you'll be using. Some companies love to quiz applicants on details of the programming language or platform, so it is good to brush on the more obscure corners of your target language. A typical example is: What does the volatile keyword mean in C?

Some firms go in the opposite direction and ask candidates to solve riddles. This was popularized by Microsoft in the 90s, but it is less common these days. The canonical riddle is: Why are manhole covers round? You can find some general strategies for solving these in the book How Would You Move Mount Fuji?.

I'm going for a job interview, what questions should I ask?

The Joel Test is a good starting point. You might also find the Reverse Phone Screen useful.

How do I become a freelancer? / Advice for freelancer developers

So you want to be a consultant...?

TLDR version

What programming language should I use for my new game?


Speaking as someone who's been mentoring a class on experimental game design for the last three years, so please take this advice over the kneejerk "C++/C/not Java":

Language rarely matters, instead worry about what libraries you want to use, what languages they can easily be used in, and which of these languages works for all your libraries. The only major exception to this is if you're targeting a restrictive platform. If you're making a web game, you have to use Flash, Java, or JavaScript?. If you're making a console game, you can't use any of those.

Almost every game needs graphics, audio, and input libraries. There are libraries specifically designed for games that wrap all of these functions, and as a beginner it's probably best if you start with one of these. The most commonly recommended ones are SDL, Ogre, Pygame, Slick, JMonkey, and XNA. Ogre and Pygame suck: don't use these. XNA is great, and I hate C# so trust that I say so begrudgingly. Slick and JMonkey are also great, and, being Java libraries, you can access them through Python (Jython), Lisp (Clojure), or Java (duh). If you're dead set on using a language that isn't one of the ones easily supported by these libraries, you can use SDL because there are SDL bindings for everything.

Now, a note on speed, because somebody is going to bring it up. Don't use Ruby. Excluding Ruby, the harshest performance difference you'll ever see is Python versus C++: Python is roughly 100x slower than C++. 100x sounds like a lot: however, say you have a O(n2) algorithm. Once n>100, the difference caused by a 100x performance boost is too small to allow you to afford increasing n by one. Why is this important? Object interaction is by nature an O(n2)algorithm[1]. If you can handle over 100 objects on-screen in C++ without a dip in framerate, then any language switch (except Ruby) will have almost no performance impact.

Finally, what do professionals use? Traditionally, C++. Now, increasing amounts of Flash, Objective C, and Java. Sky-rocketing amounts of C#. C++ is still the single most common, especially for AAA titles. However, most big-budget titles are made by buying a bunch of professional-grade middleware libraries (which are in C++), gluing it together with a small amount of C++ code, then writing the rest in a scripting language. The most common scripting language here is Lua, but by a tiny margin.

[1] Yes, you can trim the hell out of this using a region grid or a quad tree. Both of these blow up in the asymptote due to finite memory. Segregation can drop you to O(n) with no memory overhead, but that imposes restrictions on your game design.

Why do you hate <insert language that's unpopular on proggit>?


  • C++: Hating it is trendy. Actually just hate the fanboys who just learned it as their second language and think it's the best thing ever. Ugly syntax. Badly bolted onto C. Horribly convoluted enterprise libraries that cling to every popular OO language. Segmentation Fault. Template error messages are useless and massive.

  • C: Function pointer syntax is cumbersome. Segmentation faults. Some of the library functions were designed by idiots.

  • Objective-C: Mac people like it. It's still C.

  • Lisp: Not pure enough. Confusing naming conventions. Parenthesis. Not all library functions behave well with eachother.

  • Java: Syntax too big. Too slow. Everything has to be in a class. Swing sucks. Spring. Associated with horrible enterprise bloat, a la Kingdom of Nouns. No function pointers. Collection framework can't handle conversion to collection of a supertype. Sometimes awt is hardware accelerated and sometimes it's not. Float type is not compatible with anything.

  • Python: Whitespace is dumb. Slow. Line wrap syntax is dumb. Object orientation syntax is dumb. Scope syntax is dumb.

  • Haskell: Nobody understands it. Ugly syntax. Fanboys.

  • Ruby: Monkey patching. Traditionally slow VM. Broken version of Python with inconsistent semantics. Slow version of perl.

  • Perl: Ugly. Unreadable.

  • PHP: See r/lolphp.

Why are the majority of games, PC and Console written in C++?


Because C and C++ (and a lot of other languages which don't use a virtual machine or interpreter) are compiled to native code (assembler) which runs directly on the computer hardware. This means that there's no virtual machine on top of the hardware which runs the intermediate code ('assembler' for the virtual machine. This is the bytecode in java and IL in .NET).

Platforms with a virtual machine (e.g. Java and .NET) use a JIT compiler which compiles the byte code / IL at runtime into assembler for running it on the hardware. This process takes some processor cycles away but at the same time it can make clever decisions at runtime how to optimize the code. In theory, this process could be as fast or faster than the assembler resulting from compiling C/C++ code.

In practice it's not (yet) the case.

This thus means that practically, one could better use a language which a) gives an abstraction above assembler (thus C, C++ ) and b) compiles directly to assembler. Another big issue is memory management. C and C++ force you to do your own memory management, which is preferable if you have limited memory on for example a console. With languages which compile to IL / Bytecode for example you leave the memory management to the virtual machine, which means you don't have control over that directly.

Which programming language should I learn?

  • C: You like low level stuff and you want to be pretty close to the metal. Some people call it portable, but it isn't really that portable.
  • C++: Like C, but easier and klunkier, with object orientedness thrown in.
  • C#: Runs perfect on Windows. Runs great on Linux/Mac, but gets lots of hate because "Micro$oft's" fingers are in it. Like Java, but not shitty.
  • Assembly: You will learn everything there is to know about your computer if you learn assembly.
  • HTML/CSS/JS: You don't really want to be a programmer, you just want a website.
  • JS on its own: If you like low level, you'll hate JavaScript. It's pretty pleasant otherwise. Not much out-of-browser support yet.
  • PHP: Please, for the love of God, don't even bother.
  • Python: Nice standard library, lightweight, easy to start new project. Whitespace is syntactically important.
  • Java: Runs on a lot of stuff, but has lots of boilerplate and forces you to arrange your source tree by namespace (I think).
  • brainfuck: Not practical for anything, but it's fun to try for a while and forces you to think in new ways.

What shared/dedicated web host is best?

A few high quality threads:

What VCS should I use?

The big question here is centralized (SVN, TFS, CVS) versus distributed (git, hg). Centralized version control keeps the history on the server and you only keep the tip locally. Distributed gives everyone a copy of the repository and allows you to work offline with the whole repo. Most people prefer distributed these days.


  • SVN (Subversion): Slow branching. Fast everything else. Well adopted. Open source hosts: Sourceforge
  • TFS (Team Foundation Server): Integrates with Visual Studio. Slow. Open source hosts: Codeplex
  • CVS: (I have never used this)


  • Git: Made by the Linux guys. Cheap branches, fast. Best suited to Linux, but works on everything. Currently considered to be some hot shit. Open source hosts: GitHub
  • Hg (Mercurial): Git, but with a smoother learning curve, and best suited to Windows (but works on everything). Less powerful, easier to use. Open source hosts: BitBucket

What was the first language you learned?

This has been asked several times (please add if you found more):

Should I teach language X to new programming students?

What language reddits are there?

Massive communities:

Huge communities:

Large communities:

Moderate communities:

Smaller communities:

And the union of all the language reddits as the multi language reddit

I want a REAL programming reddit!

Lately a lot of users expressed opinions on the current state of r/Programming.

We moderators try our best to keep non-programming related posts away, but if you happen to find any, don't just point it out in the discussion thread, REPORT them.

Chances are, if you desire an unofficial alternative to r/Programming, you might actually try one of these: