* 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…
Ask HN: What overlooked class of tools should a self-taught programmer look into
171–180 of 416 posts
Re: Ask HN: What overlooked class of tools should a self-taught programmer look into
#172Honestly 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
Re: Ask HN: What overlooked class of tools should a self-taught programmer look into
#173Makefiles. 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?
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
#174A 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.
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
#175Makefiles. 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?
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
#176Earlier 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?
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
#177Earlier 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
#178A 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.