Live data from Hacker News

Advice to a novice programmer

blog.plover.com

11–20 of 158 posts

Re: Advice to a novice programmer

#11
> Debugging is methodical. Always have clear in your mind what question you are trying to answer, and what your plan is for investigating that question.

This is really excellent advice. I often try and debug in terms of the whole system. Explicitly having a hypothesis and then trying to verify or invalidate it with experimentation is a much better framing.

Re: Advice to a novice programmer

#12

Earlier quoted context omitted.

we use nano ! because its keybinds are faster for us : 3 and the legend means we can't forget !

> and the legend means we can't forget I am not sure what "the legend" is supposed to mean, but at least nano has the keyboard shortcuts displayed at the bottom so you can't forget those. Edit: Ahh yes, the other kind of legend. I was expecting some lore from the old days. I'm going to try some more coffee, but I suspect it won't help. Probably unsafe to drink it laughing at myself anyway.

That is "the legend". It's a reference to maps which have (in the printed form) a legend displaying symbols and what they mean. Nano has that same concept in the form of displaying which keyboard shortcuts correspond to which behavior.

Re: Advice to a novice programmer

#13
post #8

I have a whole blog, with 100s of posts, about what I feel should be taught to new devs but is not. https://letterstoanewdeveloper.com/

Ironically, it's not realistic to ask a newbie to read hundreds of posts or to know which ones to look at. Are there 2-3 you'd recommend starting with?

Re: Advice to a novice programmer

#14

This is great advice, although personally I will continue using vim over vscode. If vscode is a sharp kitchen knife then vim is a katana sword. Novice programmers should probably not start with vim.

I've been using terminal based modal editors for years, but I always recommend VS code for newbies. It has close to no learning required to start using it, and will take you pretty far.

Re: Advice to a novice programmer

#15

This is great advice, although personally I will continue using vim over vscode. If vscode is a sharp kitchen knife then vim is a katana sword. Novice programmers should probably not start with vim.

Vim is a katana sword alright, one with two blades and no hilt.

Re: Advice to a novice programmer

#16

This is great advice, although personally I will continue using vim over vscode. If vscode is a sharp kitchen knife then vim is a katana sword. Novice programmers should probably not start with vim.

Vim is a katana sword alright, one with two blades and no hilt.

You must pinch it with your thumb and index fingers. Even so, many have become deadly text slayers this way.

Re: Advice to a novice programmer

#18
> After you fix something significant, or add significant new functionality, make a checkpoint copy of the entire source code

Aside from suggesting using git and committing frequently, this is one reason I use Jetbrains IDEs - local history. They make it really easy to go back and see local changes over time.

Re: Advice to a novice programmer

#19

This is great advice, although personally I will continue using vim over vscode. If vscode is a sharp kitchen knife then vim is a katana sword. Novice programmers should probably not start with vim.

Vim is a katana sword alright, one with two blades and no hilt.

If you use it regularly you stop cutting yourself accidentally and generally become as effective as you would be with vscode, but every once in a while you effortless slice through a dozen enemy ninjas all at once and it's those moments that keep you coming back.

Re: Advice to a novice programmer

#20
Regarding variable names strongly consider keeping the first variable name which comes to your head. It is simple, straightforward.

I often see overly elaborate variable names where I know the author took their time to come up with it ending up with an abstract variable name which makes far less sense.

Another tip for novice programmers: don't do leet code or watch random videos which talk about loops and variable naming. Instead watch or read about people building things. Imo we tend to prescribe these things too late in people's journeys. It would make far more sense for someone to watch a tsoding video on building something with Haskell rather than watch beginner Haskell tutorials.

Post reply on HN