News for hackers. Stuff that matters.
Re:Ask HN: What are important topics for new programmers? by lawn on Thursday August 15, 2013 @04:06PM (#6220243)
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).

Re:Ask HN: What are important topics for new programmers? by pcmonk on Thursday August 15, 2013 @03:27PM (#6220009)
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.

Re:Ask HN: What are important topics for new programmers? by andrew_gardener on Thursday August 15, 2013 @03:32PM (#6220044)
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)
Re:Ask HN: What are important topics for new programmers? by catnaroek on Sunday August 18, 2013 @02:41PM (#6233658)
Or learning how to write code you can trust without testing it.
Re:Ask HN: What are important topics for new programmers? by andrew_gardener on Tuesday August 20, 2013 @10:49AM (#6244015)
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

Re:Ask HN: What are important topics for new programmers? by catnaroek on Tuesday August 20, 2013 @06:16PM (#6246961)
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.

Re:Ask HN: What are important topics for new programmers? by andrew_gardener on Thursday August 22, 2013 @01:56PM (#6258765)
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 :/

Re:Ask HN: What are important topics for new programmers? by beat on Thursday August 15, 2013 @05:37PM (#6220766)
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.

Re:Ask HN: What are important topics for new programmers? by beat on Thursday August 15, 2013 @05:38PM (#6220772)
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.
Re:Ask HN: What are important topics for new programmers? by Ellos on Thursday August 15, 2013 @03:06PM (#6219909)
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.

Re:Ask HN: What are important topics for new programmers? by arecommender on Thursday August 15, 2013 @05:39PM (#6220774)
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/

Re:Ask HN: What are important topics for new programmers? by mathattack on Thursday August 15, 2013 @03:19PM (#6219973)
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.
Re:Ask HN: What are important topics for new programmers? by voxelgrid on Thursday August 15, 2013 @03:17PM (#6219964)
Data structures, algorithms, problem solving, understand the machine and how an OS is working.
Re:Ask HN: What are important topics for new programmers? by zytek on Thursday August 15, 2013 @07:04PM (#6221153)
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.
Re:Ask HN: What are important topics for new programmers? by senthil1216 on Saturday August 17, 2013 @08:00PM (#6230894)
"KISS principle" for software development This might applicable not only for new programmers, but also for senior programmers..
Re:Ask HN: What are important topics for new programmers? by angersock on Thursday August 15, 2013 @03:24PM (#6219993)
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.

Re:Ask HN: What are important topics for new programmers? by wehadfun on Thursday August 15, 2013 @03:11PM (#6219930)
Testing