Live data from Hacker News

Advice to a novice programmer

blog.plover.com

51–60 of 158 posts

Re: Advice to a novice programmer

#51

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…

You're talking about this right?

> I think CS curricula should have a class that focuses specifically on these issues, on the matter of how do you actually write software?

Are you really opposed to "a class" on writing software being included in CS curricula? CS courses have plenty of writing software.

Re: Advice to a novice programmer

#52
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…

Just "visits", unless you use that name for something else. I find code that relies excessively on catch-all terms to be very tacky.

Re: Advice to a novice programmer

#53
post #49

Speaking of using sharp tools…. I really don’t get the love for VSCode. I’ve used Jetbrains for years and last week gave VSCode a really solid try. Man what a mess. Everything is a plug-in, plug-ins are inconsistent, getting basic things to work requires a tsunami of plugins. Everything feels half baked and duplicated and needing updates or abandoned ugh. Nothing feels professional because everything is a plug-in bui…

Jetbrains tooling is amazing. But can you attach to a running Docker container and develop inside it using Jetbrains? Because last I checked I couldn't and was a blocker for my team. With VSCode I can attach to both local and remote environments using Remote Development plugin by Microsoft ( https://marketplace.visualstudio.com/items?itemName=ms-vscod... ). Yes most things are plugins. But they are high quality and m…

What do you mean “develop inside it”?

Here’s a link on doing it with python

https://www.jetbrains.com/help/pycharm/using-docker-as-a-rem...

Re: Advice to a novice programmer

#54

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.

The biggest mistake I made when learning to code was trying to do it with vim. Get an IDE, I suggest JetBrains. I use vim everyday day as I work on Linux systems copying code and writing scripts and things but it should not be your primary development tool, certainly not for novices.

Jetbrains has good IDEs, but I've always disagreed with how much they abstract over "running" programs. Run configurations are great for projects where you iterate quickly, but they do not teach newcomers how to use the command line. I've seen this hurt new programmers in practice when they talk about "command line witchcraft," when really it's a very useful tool.

Re: Advice to a novice programmer

#55
To a novice: 'Make it work, then make it better!'

Wasting cycles in already not-so-sure brains is not a practical way to gain confidence.

Having a code that works, boosts the novice's confidence greatly.

Review would help the novice get better. Just be practical in dispensing the review comments - gaining proficiency needs time, trial and error.

There is a good enough advice for any level of the novice, no need to try to mold the novice into a pro in one shot.

The most critical - make sure the novice understands the task they are to solve. And also they should have freedom and a way to declare that they got stuck and need help.

Re: Advice to a novice programmer

#56

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…

If the short term goal is to finish a project by a deadline, just use vscode. Teach yourself vim and scp later.

Re: Advice to a novice programmer

#57
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.

Compared to the competition. I don’t use VI or EMacs. I compare code to Visual Studio Pro 2022 or any Jetbrains product.

It feels lightweight and snappy when opening and loading a new project, opening individual files, and searching through a repo.

I will say though that Jetbrains Idea and Rider are getting much better, but vscode is free whereas those are quite expensive. So if I can get 90% of the functionality for 100% less cost, I will do it.

Re: Advice to a novice programmer

#58
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…

These things depend heavily on context. "count" is better and less redundant than "visitCount" when it is a field or method of a "Visits" or "VisitList" class, for example, and nothing else is being counted. Or as a variable: "count" is also good enough in a small function with a few lines, that only concerns itself with a single type of item being counted. If there are multiple things being counted in the same context, by all means specify them.

I get the good intention, but in the end those guidelines get in the way of good code more than they really help. The "no methods bigger than N lines" for example (popular with some linters) cause more damage than improvements.

Re: Advice to a novice programmer

#59

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…

"At both of the last jobs I've held, it was rare that you would be in an environment where you had a full IDE."

Are you writing space robot surgery AI big data containerized event-drive sixth-generation F-99s? Just curious.

I absolutely disagree with you by the way - most people don't use vim, ever. I mean, it's a cute flex, which is what I imagine is happening here.

Re: Advice to a novice programmer

#60

Earlier quoted context omitted.

I don't think he was shitting on command line tools; he was shitting on the remote machine his child was having to use, which was slow and unreliable. > Also big disagree on the final statement of the article. CS is not a vocational major, nor should it be. There are plenty of good post-secondary schools that focus on writing code and the tools you use to do so; CS curricula should not be focused on producing program…

This. Software engineering needs to be a separate field from CS, as mechanical engineering is a separate field from physics. But maybe it's good that you were taught how to become a software engineer. My guess is that 90-95% of CS grads will actually work as software engineers. But, a question if I may: How good of a software engineering training was the CS degree? Would a real software engineering degree have done a…

> But, a question if I may: How good of a software engineering training was the CS degree? Would a real software engineering degree have done a better job?

In my opinion, it was pretty bad. We didn't get to write much code after CS 101, and we only had one group project in a class that I cannot remember - so there wasn't much opportunity to learn how to develop in a collaborative environment.

What this meant for me is that I learned on the job, and my first job was at a very small PHP/JS shop where I learned some very bad habits that I didn't know were bad habits at the time.

I think a software engineering degree would have been significantly more useful, and I don't think the CS portion of it would have had to suffer much. I think the college even offered that degree at the time; I'm not sure why I didn't switch.

Post reply on HN