Live data from Hacker News

Ask HN: What overlooked class of tools should a self-taught programmer look into

news.ycombinator.com

171–180 of 416 posts

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#171

* Parser generator tools like ANTLR https://www.antlr.org/ , or even lex and yacc, useful for parsing languages/config files and probably generating a better/more robust parser than you'd cobble together by hand * Dynamic programming https://en.wikipedia.org/wiki/ -- great for relatively-quickly (in computation time) coming up with good-enough solutions to some hard (like NP hard) recursive problem that would take fo…

That's weird. DP, though better than naive brute force, is still very slow since it looks only for an exact, optimal solution.

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#172
post #96
post #93

Honestly I still find a lot of engineers don't know git properly. Like they know enough to commit and push but that's about it. It really helps to understand everything git has to offer.

The three most important basic git operations to know (in my opinion) git checkout -b git log git rebase -i

`git add -p` changed the way I think about commits

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#173

Makefiles. I always dismissed them as a C compiler thing. Something that could never be useful for Python programming. But nowadays every project I create has a Makefile to bind together all task involved on that project. From bootstrapping the dev environment, running checks/test, starting a devserver, building releases and container images. Makefiles are just such a nice place to put scripts for these common tasks…

Any good resources for learning about make files that you can recommend?

The GNU Make manual is excellent.

For learning advanced techniques: "The GNU Make Book" by John Graham-Cumming.

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#174
post #112

A new version of "The Pragmatic Programmer" recently came out. [EDIT: not available yet, only preorder at amazon, beta version available at pragprog.com.] That book is all about tools and methods that a self-taught programmer should look into: https://www.amazon.com/Pragmatic-Programmer-journey-mastery-...

For me, that Amazon page is listing it as a pre-order, without any release date. And all the other versions (Kindle, Paperback) are the 1st edition instead of the 2nd. Very frustrating, as I considered the first edition to be essential and upon reading your comment, instantly went to purchase the 2nd edition. Edited to add: Found a date, Amazon is listing it as October 21, 2019.

Sorry, I thought I'd read a review of it already, so just didn't look closely to see it wasn't available yet.

It looks like you can get a DRM-free beta version of the ebook on their website, with free upgrades to published version once it's finalized: https://pragprog.com/book/tpp20/the-pragmatic-programmer-20t...

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#175

Makefiles. I always dismissed them as a C compiler thing. Something that could never be useful for Python programming. But nowadays every project I create has a Makefile to bind together all task involved on that project. From bootstrapping the dev environment, running checks/test, starting a devserver, building releases and container images. Makefiles are just such a nice place to put scripts for these common tasks…

Any good resources for learning about make files that you can recommend?

I don't really know a good all in manual, most thing about Make I learned over years of using it from different sources. And I still sometimes discover new features (and new ones are still added in recent release, but I tend to avoid them to keep Makefiles compatible on older systems).

But the Make manual is pretty comprehensive as a guide and reference: https://www.gnu.org/software/make/manual/make.html

Also (as with most things) knowing what name some concept has makes it easy to search for references. For example the terminology of rules (target, prerequisite, recipe): https://www.gnu.org/software/make/manual/make.html#Rule-Synt...

Things I tend to google often because I forget and some are used more often than others are: automatic variables, implicit rules, conditionals and functions.

One trick that really helps making Make complete is making your own pseudo state files and understanding the dependency system. One of the best features of Make is its dependency resolving. You generally write rules because you want a target (a file or directory) to be created, based on prerequisites (dependencies) according to a recipe (shell scripts). Make figures out that if the prerequisites didn't change, it doesn't need to run the recipe again and it will reuse the target. Greatly saving on build time.

Because Make relies on file timestamps to do its dependency resolving magic if you don't have a file there is not much Make can do. So what you can do instead is create a pseudo target output yourself. For example: https://github.com/aequitas/macos-menubar-wireguard/blob/mas... Here a linter check is run which creates no output. So instead a hidden file .check is created as target. Whenever the sources change the target is invalidated and Make will run this recipe again updating the timestamp of .check. Also note the prerequisites behind the pipe (order-only prerequisites). These don't count toward the timestamp checking, but only need to be there. Ideal for environment dependencies, like in this case the presence of the swiftlint executable.

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#176
post #155

Earlier quoted context omitted.

This 1000x. I put of just getting by with shell script for some years and when I finally decided to get deeper into it, it's magical. A good series of piped commands with tools available basically everywhere can solve problems you had no idea could be so simple to solve.

have any good resources for this?

Perhaps these are a good start:

awk: - GNU Awk User Guide - https://www.gnu.org/software/gawk/manual/gawk.html#Getting-S...

- Grymoire guide - http://www.grymoire.com/Unix/Awk.html

sed: - Grymoire guide - https://www.grymoire.com/Unix/Sed.html - Official docs - http://sed.sourceforge.net/#docs

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#177
post #155

Earlier quoted context omitted.

This 1000x. I put of just getting by with shell script for some years and when I finally decided to get deeper into it, it's magical. A good series of piped commands with tools available basically everywhere can solve problems you had no idea could be so simple to solve.

have any good resources for this?

  man bash  
  man awk  
  man sed  
  man grep
You can also do most of this stuff with Perl one liners if that suits your fancy.

sed + awk - https://www.amazon.com/sed-awk-Dale-Dougherty/dp/1565922255

awk - https://ia802309.us.archive.org/25/items/pdfy-MgN0H1joIoDVoI...

general *nix text processing - https://www.tldp.org/LDP/abs/html/textproc.html

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#178
post #112

A new version of "The Pragmatic Programmer" recently came out. [EDIT: not available yet, only preorder at amazon, beta version available at pragprog.com.] That book is all about tools and methods that a self-taught programmer should look into: https://www.amazon.com/Pragmatic-Programmer-journey-mastery-...

For me, that Amazon page is listing it as a pre-order, without any release date. And all the other versions (Kindle, Paperback) are the 1st edition instead of the 2nd. Very frustrating, as I considered the first edition to be essential and upon reading your comment, instantly went to purchase the 2nd edition. Edited to add: Found a date, Amazon is listing it as October 21, 2019.

[deleted]

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#179
post #96

Earlier quoted context omitted.

The three most important basic git operations to know (in my opinion) git checkout -b git log git rebase -i

`git add -p` changed the way I think about commits

I love that one too! It's great for creating commits that address one specific thing.

Re: Ask HN: What overlooked class of tools should a self-taught programmer look into

#180
SQL Stored procedures and triggers. It's some of the most useful stuff you may not have considered if you're just a hobbyist. It's not for every project but if you do need a proper database for some reason, there's often great ways to use stored procs or database triggers that greatly simplifies your system.
Post reply on HN