Live data from Hacker News

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

news.ycombinator.com

251–260 of 519 posts

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

#251
post #154

Earlier quoted context omitted.

Here's mine: alias g="git" __git_complete g _git # enable git autocompletion (braches, etc.) alias gc="git commit -am" alias gp="git push" __git_complete gp _git_checkout # checkout is more useful than _git_push because it autocompletes the branch alias ga="git add -A" alias gd="git diff" alias gb="git branch" alias gx="git checkout" __git_complete gx _git_checkout alias gs="git status" alias gl="git log"

Good collection! I have many of these, plus a slightly longer one for quick fixups that happen all too often: alias gcane="git commit --amend --no-edit"

probably you will like

  function fixup() {
    git commit --fixup=$1
  }
  function refixup() {
    git rebase -i --autosquash --autostash $1^1
  }

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

#252

Earlier quoted context omitted.

An excellent list. Regarding functional programming, I recommend starting with a gentle approach that doesn't require picking up a new language: 1. Stop creating counters/loops and become facile with map, reduce, and the like. This will shift your thinking away from blocks and toward functions. 2. Take the time to really understand what side effects are, and start avoiding them everywhere they are not necessary. Keep…

> I recommend starting with a gentle approach that doesn't require picking up a new language Disagree. This is likely to 'dilute' the lessons of functional programming, as it were. If you learn to program in idiomatic Clojure/OCaml/Haskell/Scheme, you can be relatively sure you really have picked up the principles of functional programming. If you merely attempt to apply new principles in an environment you're alread…

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.

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

#253
post #22

- GNU/Linux + i3wm; complete control over my programming environment. - bash + GNU coreutils; seriously, take the time to be able to write helpful bash scripts which can run basically anywhere. - git; use it even when you're not pushing to a remote. Add helpful aliases for everyday commands. Build a good mental model of commits and branches to help you through tough merges. ( my ~/.gitconfig: https://gist.github.com/…

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 me that kind of flexibility. It doesn't feel anywhere as fluid or seamless to switch between half a dozen (or more) terminals.

It means I can have an overview of a bunch of different things and keep terminals context-specific (1 terminal for htop, 1 for docker, 1 for whatever remote test environment, 1 for project A, 1 for project B, 1 for some other remote host I need for some reason, etc.) If I want to do a new task unrelated to anything I'm doing before, I don't need to break the context of an existing terminal, I just press Alt+Enter, it's automatically slotted into a place where it's completely visible and usable and I can do that task quickly. When I'm done, I can close it, again, without disturbing the context of all the other terminals. It's just incredibly freeing to have that and I feel it frees a lot of cognitive load by being able to go back to a terminal for a certain task and immediately see exactly where I was and what I did last.

Also, much like the other comments, I use task-specific virtual desktops all the time. First desktop is for all the terminals. Second is for browser/communication. Third is for project A. Fourth is documentation related to projA. Fifth is projB. Sixth can be more documentation. I often have 10 virtual desktops for different things. I don't want to imagine what it'd look like if I had it all on one desktop.

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

#254
- Erlang/Elixir: taught me functional programming, pattern matching, recursion, supervision, how to achieve fault tolerance

- Docker: taught me about server management and immutable infrastructure; paved the way for a lot of concepts (containers are surprisingly foreign for a lot of people)

Other than that: learning about different databases in general and learning how they solved the problems they had and why they solved them that way; the same problems come up over and over and it's important to be able to recognize good ideas from bad ones as well as when to recognize solved problems from novel ones

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

#255
The static analyzer. There are so many subtle things that aren't caught by the compiler and don't cause any problems in your testing but will definitely come up once 10M users are running your app. The static analyzer can catch some of them before you even run! It's great.

The various sanitizers - Address Sanitizer, Thread Sanitizer, Undefined Behavior Sanitizer. These all also find things before you ship. They require (re)building and running but it's worth it.

Beyond that, any sort of instrumentation that can show you in real time information about your running application. You can see memory growing, even if it's not leaking. You can see performance tanking and know the exact function that's causing it before you quit.

Beyond that, for me using a framework that was well written made understanding architecture much easier. I had used MFC and CodeWarrior PowerPlant for a few years. They got the job done and were easy enough to use, but I didn't really learn anything from them. But when I moved to using Cocoa, it was so elegant and the separation of concerns was so good that it clicked and really taught me a lot about better architecture.

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

#256

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…

So much this. And command-line debuggers are usually awful. Just being able to set a breakpoint in the actual text file you're editing without using a different tool, and stop when a condition happens can speed up your workflow so much.

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

#257
Not strictly a better programmer but a more efficient one.

- FZF (Fuzzy Finder) really speeds thing up in bash when searching your history.

- Vim (as others have mentioned). With the plugin vim-fugitive (a git related vim plugin). I love Gblame in vim-fugitive, as being able to look at the history of lines of code and stepping back in time can at times be very useful.

- Creating various aliases. For example in git I have little aliases which just make me faster. "st" = "status", "rbi" = "rebase --interactive", "ci' = "commit", etc...

- Using The Silver Searcher (ag) or Ripgrep (rg) instead of grep. Much faster than using grep.

- Using 'fd' instead of find. Like above it is a lot faster.

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

#258

Earlier quoted context omitted.

> I recommend starting with a gentle approach that doesn't require picking up a new language Disagree. This is likely to 'dilute' the lessons of functional programming, as it were. If you learn to program in idiomatic Clojure/OCaml/Haskell/Scheme, you can be relatively sure you really have picked up the principles of functional programming. If you merely attempt to apply new principles in an environment you're alread…

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.

Sure. When learning Latin, well, you learn to read and write Latin. You absorb the language's principles by learning the language, not by trying to highlight them in a language you already know. That can only give a much shallower appreciation.
Post reply on HN