Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What are important topics for new programmers?
20 points by Jeremy1026 on Aug 15, 2013 | hide | past | favorite | 17 comments
What are some important topics that you feel new programmers should learn about, but are often skipped over?



Structuring and refactoring code.

Many consider algorithmic knowledge to be the holy grail of programming, but you easily spend 10x more time with basic structuring and restructuring code.

Don't confuse designing algorithms with problem solving; debugging, refactoring, even naming functions are all problems you're solving. Heck, I bet you're not even designing algorithms, you're simply implementing known algorithms (and modifying them to your needs).


I'd say that after they've gained a basic familiarity with the basic ideas ("hello world", variables, basic control structures, functions), they should really be introduced fairly early on to working with data structures (particularly linked data structures, trees, graphs, and the like) and how to manipulate them. Recursion is critical to manipulating these, and I think getting new programmers to think in that way is a good thing.

I think it's too common to have "instant gratification" tutorials where you learn some trick or some library to make a particular technology do what you want (for example, some little javascript or css snippet so that when you move your mouse over some text, it disappears). That's not real programming. Sure, a lot of work has to be put into learning little tricks and new libraries and whatnot, but real programming is thinking about data structures in an abstract way and manipulating them.

Get them to write a todo list application with the ability to sort the items in the list. The interface isn't terribly important, so try to get them to care more about the data structures.

Also, I've found that implementing Conway's game of life is useful. The map can be stored in several different ways (e.g. simple matrix of cells, two-dimensional linked list of live cells, quadtree as in hashlife) and manipulating each of those structures would give them techniques that are useful in many situations.


Some form of test driven development. Helps programmers get a better grasp of what they want to solve while creating some meaningful tests. I sadly only really got into it well after I finished school. Not a good idea to try this out while learning a new language though (makes learning both 3 times harder since your changing code so often)


Or learning how to write code you can trust without testing it.


that's not feasible in the long run.

Try that on a large or enterprise level project and watch your product fall apart. The effort you save by not testing will be wasted fixing bugs many times over.

Test driven development isn't necessarily the best/right way to test all the time but you have to have some form of testing unless you just don't care about working on the software for over a month


You know what is not feasible in the long run? Finding out what obscure corner case in which component was not properly covered, using tests only. Components interact with each other in non-trivial ways, which more often than not cannot be captured in tests. When an error is found in a sufficiently large program, the poor programmer typically ends up applying a patch where the error manifests itself, rather than actually tracking and fixing the source of error. I know this from experience.

On the other hand, if the program (or any of is constituent subunits) is designed right from the beginning keeping in mind that it is fundamentally a transformation from a precondition to a postcondition, from a logical predicate to another, then not only does locating errors become much easier, also testing becomes superfluous.

But it takes education to accept this point of view.


well... looks like you're a little full of yourself

Hope whoever gets stuck debugging whatever code you spit out agrees with you viewpoint after spending hours tracing :/


Writing clearly and precisely in English. Managing conflicts and expectations. Business and financial matters.

If you can't express yourself clearly to your peers and managers, you won't control your career. If you can't work well with people, you won't control your career. If you don't understand the business context of your work, you won't control your career.


Oh, and don't think you are the smartest person in the room. If you find you're the smartest person in the room for real, you need to get a better job.


If we are talking about the most used languages then we are talking about object oriented programming. OO is pretty hard for newcomers to wrap their head around. Hell I still have my difficulties with it, really trying to find the "right" way to solve the problem I have.

Just try to get the concept, and know that there are certain patterns you can use for correctly structuring and architecting your code. E.g. factory pattern, dependency injection, observer, etc.


Most important thing for new programmers: build projects.

Later steps:

Algorithms: Skiena's The Algorithm Design Manual http://www.algorist.com/

Learning about syntax / theory: SICP http://mitpress.mit.edu/sicp/


Software engineering. Many people go to theoretical programs (nothing wrong with that) and start their careers at places with underdeveloped software engineering practices. They then view this as unimportant, which in turn hurts them when they try to tackle larger projects.


Data structures, algorithms, problem solving, understand the machine and how an OS is working.


People skills. Programmers often suck at that. Also modesty - you don't want to fail interviews because of arrogance and you do want your coworkers to like you so you can count on then in business and private matters.


"KISS principle" for software development This might applicable not only for new programmers, but also for senior programmers..


How to ship a functioning (if rough) product, how to communicate effectively with other people (how to match your words to their background and experience), and how to value their time.

The first will make sure you can do work, the second will make sure that you can explain your work to other people, and the third ensures that you'll be paid well for your work.


Testing




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: