Live data from Hacker News

Advice to a novice programmer

blog.plover.com

151–158 of 158 posts

Re: Advice to a novice programmer

#151
post #144

Earlier quoted context omitted.

Agreed, good points. I guess I still wonder whether these are needed for an introductory assignment. A vim/ssh workflow seems more future-proof than any particular IDE. As an instructor maybe it would make sense to do the first assignment with low-level tools, then introduce VSCode/etc and briefly demo these things, to make the added convenience even more visceral to the novice.

> would make sense to do the first assignment with low-level tool Sure, but if the goal is to teach programming, I think vim massively confuses a beginner. vim is hard for beginners, famously so. Something like VSCode, used as a remote text editor, is trivial and familiar to anyone who has used at MS Word. I agree it should be introduced, but there's definitely some cargo cult around vim and "the old ways".

Idk, if we're working on a remote machine already, it's not the student's first day. The bar to basic editing with vim is pretty low. Mode switch with i and esc, :x to save/exit, navigate where your fingers already are, slash to find. That all fits on a sticky note if it isn't already memorized in the first 30 seconds. They've likely played video games their whole lives, I struggle to see how mapping buttons to behaviors is a foreign or difficult concept.

As you say we're teaching programming. The ability to pick up an unfamiliar tool and get to know it on the fly is critical and the only way to develop it is practice.

That said, maybe there is no right answer here. I imagine the instructor's broader approach will make the difference, not which editor they make the class use for assignment three :)

Re: Advice to a novice programmer

#152

Earlier quoted context omitted.

It depends on what you're doing. This article is more about programming than other kinds of computery work. In the industry I work in (openstack devops/gitops, running a large fleet of ubuntu machines), using Vim isn't a flex, it's just taken for granted that you can and will use Vim at least some of the time. It's weird when I read threads like this and people treat using Vim as some kind of weird flex. It feels lik…

You're not selling it to me. For simple admin tasks, Micro is totally fine. For actual programming where I really want the full power of an advanced editor, VSCode has all the properties you listed except arguably lightweight, though even there VSCode itself is pretty lightweight; it's just the heavy LSP servers that bog things down. I obviously don't see Vim as a flex. Maybe a misguided flex.

I wasn't trying to "sell" you on it. You seemed confused. My intention was to inform, not to persuade.

Use what you want, I don't care.

Re: Advice to a novice programmer

#153
> When you start the next project, start it in VScode

And use Edge and Teams. This surely will awake the programmer in you. But, for god's sake, don't touch the bugs. They are dirty. /s

Re: Advice to a novice programmer

#154
post #50

Earlier quoted context omitted.

As a 2+ year user of Vs Code for daily dev work - yes, this is accurate. Code is a lot like Linux: lightweight, fast, and a royal pain to set up. But once it is set up with a cocktail of plugins it is rock solid. It is also much faster than any other IDE I have used. However I am a weird user - I don’t usually use buttons on the ide. I just pop open a terminal for things like git commands, build commands, test comman…

It still astounds me that people actually use "lightweight" and "fast" to describe vscode these days. How times change.

[dead]

Re: Advice to a novice programmer

#155

Earlier quoted context omitted.

Just to stay with the analogy: For something to "pay dividends", you need to have some starting capital first. =) It's much slower to gather the capital when you're starting with zero and you spend weeks just fighting the tools. It's a lot more effective to gather some capital with easier tools (IDE + press F5 to run) and then move in to the low level stuff.

This is a great take. Just like learning anything else, getting context and foundational software engineering knowledge helps accelerate further learning. I would never counsel a beginning programmer to learn vim first, but after 6 months or so when they have their bearings, it can help text editing speed immensely. Is that the biggest problem a new dev has? It depends, but probably not. Their time is probably better…

"Text editing speed" is my per peeve in this field.

If your productivity is mostly limited by your typing speed you're either deluded or the greatest 1000x coder in the world.

I spend most of my time thinking and slowly prototyping the issue. It's not like I have the code 100% ready and my mind and just need to type it out as fast as possible and it'll Just Work after that.

And if it's speed of generating code you want, you can use templates in IDEs for it instead of going ":as12#:asd" in vim. Or use Copilot or a similar system to generate the rough outline and finish it up yourself.

Re: Advice to a novice programmer

#156

I really have to disagree with the disparagement of vim/scp at the beginning. It's a bit slower to start if you begin with command-line tools, but the dividends payed out by learning the standard command-line utilities are huge. Learning the command-line utilities means you have the tool-set to build your own tool-set; since it's a lot easier to using CLI tools as building blocks for larger tools. At both of the last…

As someone who is a die-hard vim user, I agree with the article.

The amount of time over the last nearly 40 years of using vi, which I've spent messing around with vim configs and plugins, trying to get a smarter editor, has been amazing.

Over the last year I've switched to LunarVim, which is a pre-packaged vim setup with all the plugins and configs, and an LSP and TreeSitter, and it's been amazing. All the "IDE-like" setups I had done in the past either were half-baked or ended up breaking in obtuse ways fairly quickly.

LunarVim is giving me great code suggestions from the LSP and really is a game changer from my various older vim setups. I catch so many errors I would have run into at runtime now that I'm getting python type annotation messages right in my editor.

Re: Advice to a novice programmer

#157
post #37

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 na…

> Regarding variable names strongly consider keeping the first variable name which comes to your head. It is simple, straightforward. Strongly disagree with this. Variable naming is so important if you want to write code others can understand. The first name I come up with tends to be overly verbose/specific or too general. Variables named "count" are a good example of a name that's too general requiring a developer…

I have gone back and forth on this many times in my career, but the word which comes to your head in the second or third attempt is usually the max depth you should search for. Chances are when you think of this again, the same word will come to your head making it easy to grep.

Re: Advice to a novice programmer

#158

Earlier quoted context omitted.

Here, this will help: https://gist.github.com/nifl/1178878 (Emacs user happily using Evil mode since 2011 or so)

Not really. I already know that Vim can be used as a difficult-to-remember editing language. My point is that in practice the number of situations where that is better than normal editing with multiple cursors is so few that it doesn't get close to the threshold of being worth committing to memory. That gist is rather long and rambling so I only skimmed it, but it seems to list commands you can do in Vim rather than…

That's a clear case of the Blub paradox, man... Multiple cursors can be useful, but the Vim editing model goes way beyond that. If you're not interested, that's cool, but it's really your loss.
Post reply on HN