How can I become a "true" programmer?

Obviously I will need to learn multiple programming languages in order to even have a change at a proper programming job, but I've heard in many sources that today's programmers aren't really programmers even though they know many programming languages.

I know for a fact that learning to stop voodoo coding is the best advice that someone can give, but the thing is.. i have a hard time trying to stop voodoo coding.. I try my best to think out the program in my mind but since i always make mistakes, its hard to resist voodoo coding.

So what advice can you give me so that I can start thinking like a real programmer?
Last edited on
You have to balance idealism and practicality. Try to do what you think is the most ideal solution and only make sacrifices for practicality. Being practical doesn't mean being lazy. Being ideal doesn't mean being complicated.

Always have a reference open while you're coding. I haven't memorized the standard library and I don't think anyone else can either. You only need to know what tools are available and how to look up the documentation for them.

Most importantly, if you're not sure what something does, look it up or ask about it. Saying "I'll figure it out later" is not only lazy, it will lead to superstitious coding.
Last edited on
Forget all this overanalysis; if you want to be a programmer then program. You want to be someone who writes software, so write some software.

Forget about making things perfect; start by actually making them. You get better at programming the more you do it, so after a few years spent programming instead of thinking about programming, reading about programming, talking about programming and doing whatever else isn't programming, you'll get better at making things.

Besides, magic is pretty important in programming. In any non-trivial project you will see things marked explicitly as being magical. The human mind has its limits, and the least we can do when we stumble upon a magical solution to something is to point it out so that others can bask in the glory of our discovery.
chrisname has a good point - if you never write any code, all the books in the world can't make you a good programmer.
> How can I become a "true" programmer?

You won't become a "true" painter just by daubing canvasses with pots after pots of paint, ad nasuem.

Merely writing more and more and even more code won't get you anywhere. You do need to write programs, but do not fall into the trap of writing the 'same' program, using the same old familiar techniques and constructs, over and over again. In particular, avoid what Stroustrup calls "unprincipled hacking" with libraries that don't teach you how to be a good programmer - SDL, SMFL, whatever.

While you are learning, take your time; think hard and deep; write fifty lines of code from which you learn something, rather than a thousand lines of regurgitated spaghetti.

Try to locate a local expert; the importance of mentoring can't be overstated.

What is mentoring?

It’s the most important tool in learning a new technology.

Object-oriented and generic thinking is caught, not just taught. Get cozy with someone who really knows what they’re talking about, and try to get inside their head and watch them solve problems. Listen. Learn by emulating.
https://isocpp.org/wiki/faq/how-to-learn-cpp
https://www.cs.utah.edu/~elb/folklore/mel.html

When you can best Mel... you are a true programmer.
@JLBorges

Can you elaborate when you say SDL or SFML, don't teach you how to be a good programmer. Just curious.
closed account (Gvp9LyTq)
possibly relevant:
http://cacm.acm.org/magazines/2010/1/55760-what-should-we-teach-new-software-developers-why/fulltext
I don't agree with a lot of what is said in this article.

The practice of computer science is inherently applied and interdisciplinary, so every CS professional should have the equivalent to a minor in some other field (for example, physics, medical engineering, history, accountancy, French literature).

...

My suggestion is that the first degree qualifying to practice as a computers scientist should be a master's—and a master's designed as a whole—not as a bachelor's degree with an appended final year or two. People who plan to do research will as usual aim for a Ph.D.


http://cacm.acm.org/magazines/2010/1/55760-what-should-we-teach-new-software-developers-why/fulltext

'French Literature', ? Sounds like a huge waste of time to me.

The fact that the applications of computer science are so vast, and constantly evolving is IMO, a strong reason not to give a person an education which is just job training for the general brick in the wall programming job. Industry must face the fact that colleges are not free job training for them.

Because computer science is often an applied science, doesn't mean that a person should necessarily concern themselves with having a second degree in some arbitrary thing like he argues, let alone something like "literature or history". The programmers involvement at less than PHD level, to an applied domain, even something specific like biology, is most likely not going to require much prior education in the area. They are still just the programmer. The actual biologists are the ones who do the biology. And as a programmer you are better off being able to switch jobs between different sectors of industry. There is no good reason you should double major in another subject unless you intend to get a PHD and be a specialist or researcher IMO.

I would argue that the problem is the students more than anything else. Computer science attracts a lot of people who are in it for the money, or some other reason besides a love of programming or abstract thinking. Not that it's really a problem, because what industry really needs most is a bunch of people to do easy menial jobs you could hardly call real programming.

If they want to make better generations of software developers, they should start earlier in relevant education, and cut out a bunch of the general education requirements.

Last edited on
> Can you elaborate when you say SDL or SFML, don't teach you how to be a good programmer.

Don't teach me to be a good C++ programmer.
Actually teaches me things that, with good fortune, I'll manage to unlearn before permanent damage has set in.

Does this look like good C++; or even passable C++? (from the front page):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Load a sprite to display
sf::Texture texture;
if (!texture.loadFromFile("cute_image.jpg"))
    return EXIT_FAILURE;

sf::Sprite sprite(texture);

// Create a graphical text to display
sf::Font font;
if (!font.loadFromFile("arial.ttf"))
    return EXIT_FAILURE;

sf::Text text("Hello SFML", font, 50);
// Load a music to play
sf::Music music;
if (!music.openFromFile("nice_music.ogg"))
    return EXIT_FAILURE;


For most classes, this horrible library just has: Default constructor, Copy constructor, Destructor.

The abominable two phase construction is not an option; it is enforced. "First create your unusable object (you don't have a choice), but then do not, please, for heaven's sake, do not, forget to initialise it before you actually start using it. And, by the way, if you forget to check for errors in initialisation (we do use real dandy error codes all around the place, you know), or anyone down the chain of callers forgets to pass the error diligently back to the caller, it is your tough luck."

I've only had a cursory look at it; it seems to be a library that epitomises the most odious aspects of Google C++.
Last edited on
I have to agree with JLBorges about the abundance of default and copy constructors - I don't like it at all.
I agree too, but IIRC in version 1.6 most classes had proper constructors rather than this two-step construction thing. The lack of exceptions is annoying too. I want to know why it failed, either so I can do something about it or at least inform the user - SFML gives you no way to retrieve the error message, it just prints it to stderr.
Topic archived. No new replies allowed.