Live data from Hacker News

Ask HN: Which tools have made you a much better programmer?

news.ycombinator.com

311–320 of 519 posts

Re: Ask HN: Which tools have made you a much better programmer?

#311

Earlier quoted context omitted.

Re: i3wm I installed it a couple years ago, went whole hog, down the rabbit hole, but realized a couple of things. 1. I rarely ever use anything more than a simple L/R split. 2. When I do use something more complex, it's almost always in the terminal, in which case why not use tmux? These days I'm back to using gnome because ubuntu switched to it over unity (which had a weird multitouch bug that drove me crazy). What…

I moved to awesomewm a few years back and I absolutely love it. I can open half a dozen terminals at once and they'll all automatically be ordered in a way that's immediately useful to me, where all the terminals are visible and (largely, depending on the automatic layout set) equally sized. And if I want another layout, I just press one combination to cycle through all the layouts I've configured. tmux doesn't give…

Sorry to hijack your comment, but do you know of resources I can read to write my own custom layouts using awesomewm? I have a 21:9 monitor, and would like to write a layout where I can have a game running in 1080p + some windows on the side. Currently I do this just fine with floating windows, but surely there must be a way to use the tiling system.

Re: Ask HN: Which tools have made you a much better programmer?

#312

An actual debugger. I started as a PHP/WP dev and spent many hours running results through echo or var_dump. IMO the debugger is the absolute first thing you need to learn about the platform you're writing for. Without it, you're taking shots in the dark and you truly don't know how your code is executing. It seriously pains me to see people not using one. I have a friend who is taking an online PHP backend class. Th…

I'm really confused by this. Don't debuggers come embedded into any IDE worth using?

How could someone start programming this century without access to one?

Re: Ask HN: Which tools have made you a much better programmer?

#313
* AWK - I read "The Awk Programming Language"[0] cover to cover. It's a very well written text, and it not all that long. The examples are very impressive. In terms of bang-for-the-buck of learning tools, AWK has definitely given me the most mileage. I probably use it at least a dozen times a day just for little things. However, you can wield it to write some very powerful scripts in very short amounts of time.

* Make - I use Make for almost every project I write, even if the rules are just .PHONY shortcuts. Make solves a huge set of problems relating to the order in which things need to be run/built very well. There are arguable better tools, but Make is widely deployed, widely used, widely understood, and solve the problem well enough for a lot of small to medium projects (and some large ones too!). I got asked about it enough that I wrote an introductory guide for it[1] (disclaimer: self promotion of my own site, but I don't have any ads or make any money). If you feel like Make has a lot of legacy crust built up over the years, you should read[2].

* Graphviz[3] - a huge number of ad-hoc data structures that you will build for your projects can be hard to visualize, Graphviz makes it easier. One tactic I've found useful is to loop over nested structs using their memory address as the identifier in Graphviz, struct fields as text annotations, and nested struct pointers as outgoing links. This might sound fancy, but you can probably write an export_to_graphviz() function for your project in under 50 lines of C. Because the syntax is simple, it's very easy to generate Graphviz from pretty much any language out there.

* Xpath - if you've ever wanted to do even simple web scraping or XML parsing, do yourself the favor of learning Xpath. It's a very powerful way of querying XML-like documents. I learned it by writing bots in Selenium for an internship, but nowadays I mostly do very simple web scraping for personal projects. To that end, I wrote a little tool[4] to grab the contents of a page, run a query, and print the results out on the console.

* Not a tool per se, but pick some kind of "personal knowledge management" type of solution and use it religiously. I like Joplin[5], but there are a million out there (Evernote, OneNote, ZimWiki, TiddlyWiki, VimWiki, Emacs Org-Mode, and many, many more). Being able to refer to earlier notes is invaluable for long-running projects.

* Also not very specific - learn the scripting language for your platform. In UNIX-land that's sh (or Bash), and in Windows that's PowerShell. Bash and PowerShell both have benefits and drawbacks, and you probably shouldn't write "real programs" in either. But knowing how to script whatever platform you're using buys you a lot.

* One more, also non-specific one - learn an interpreted language. Nowadays people like Python, but Perl, TCL, Lua, JS, and others could all be valid choices. These are great for prototyping ideas that you will later port to the language you really use (if it isn't on that list already), or for writing little tools or utilities for yourself to use. Which one you choose will depend on what library ecosystem is most relevant to your work.

0 - https://www.amazon.com/AWK-Programming-Language-Alfred-Aho/d...

1 - http://cdaniels.net/2017-07-15-guide-to-make.html

2 - https://tech.davis-hansson.com/p/make/

3 - https://graphviz.org/

4 - https://git.sr.ht/~charles/charles-util/tree/master/bin/quer...

5 - https://joplinapp.org/

Re: Ask HN: Which tools have made you a much better programmer?

#314
post #282

Earlier quoted context omitted.

Hmmm, I'm not seeing the discount pricing you speak of.

I guess it's only for PHPStorm and ending it about 14 hours from now https://www.jetbrains.com/lp/php-25/

Oh darn, I already have WebStorm and PHPStorm. Cheers.

Re: Ask HN: Which tools have made you a much better programmer?

#316

Earlier quoted context omitted.

I agree wholeheartedly. Especially when most of the work I do is on a remote server anyway, so I'm already in tmux. I still use i3wm on older laptops just for the battery life gains, but 95% of what I do is Firefox + Terminal emulator, and alt-tab is just as fast. My main workstation is just gnome and it's fine. (Sidenote: is there any sort of linux libvte-based terminal emulator that has tmux integration a-la iTerm2…

Re. Sidenote: It doesn't look like there are many terminal emulators with tmux built in¹, but you can bind a keyboard shortcut to `xterm -e tmux attach'. (rxvt[-unicode] and st also support the -e flag, to run a given command instead of the default shell). 1: https://unix.stackexchange.com/questions/189805/what-termina...

That would work if I was running tmux locally, but what about when I’m running tmux on a remote server?

Re: Ask HN: Which tools have made you a much better programmer?

#317
post #94

Earlier quoted context omitted.

My life was also improved with some additional aliases in my git config: [alias] dfif = diff idff = diff grpe = grep

I'm always puzzled how often the wheel gets re-invented ... https://git-scm.com/docs/git-config#Documentation/git-config...

This is only for git commands though? `diff` and `grep` are their own thing.

Re: Ask HN: Which tools have made you a much better programmer?

#318

Earlier quoted context omitted.

I upvoted the parent and want to emphasize vim key bindings. This is not necessarily vim the editor, it's your editor of choice in vim mode. Learning to use vim is like learning to touch type: it's initially a pain, but it's hard to ever go back once you've mastered the basics. If you haven't learned to touch type (it happens, I didn't learn until I was 22), then first learn that, then learn vim. FYI: Remap your caps…

I recently had a revelation: When typing longer shell commands it can be time-consuming to go back and make changes, turns out you can use Vim style cursor movements within the Fish: https://stackoverflow.com/questions/28444740/how-to-use-vi-m...

you can do that in bash too, and any cli that uses readline library

Re: Ask HN: Which tools have made you a much better programmer?

#319

TabNine: https://www.tabnine.com/blog/deep (the code are GIFs which I had to click to play) This thing is fucking magic. It's ML autocomplete, with help from 'traditional' autocomplete methods that use static analysis. Instead of just completing one token at a time like traditional completers, it can do entire sentences or multiple lines of code in one go, and is freakishly accurate. And since it parses language it h…

Similarly, Kite [0] for Python and JavaScript. I actually prefer Kite to TabNine, but ymmv.

[0] https://kite.com/

Re: Ask HN: Which tools have made you a much better programmer?

#320
post #289

Earlier quoted context omitted.

Some people say learning Latin makes you a better writer, smarter, etc. even if you're unlikely to directly use it. Dubious claims but it feels like FP can be like that.

The thing about learning Latin (not that I am great at it), at least for an English native speaker, and the epiphany English language speakers have, is the realization that language can have structure and can be discover-able, if I know a root word then I can almost be sure that I know the meaning of con, re, dom etc. There is just no equivalent to that in English other than the Latin origin words we borrowed, becaus…

Isn't beaucoup French?
Post reply on HN