Ask HN: What are your favorite developer-efficiency tips?
566 pointsI recently started integrating tmux and vim into my workflows. Obviously, it was a huge efficiency booster. What are some other tools (custom built or off-the-shelf), hotkeys, workflows that were game-changing for you as a dev? I'm interested in hearing about anything and everything (stuff from ctrl+l to clear the terminal to little-known git commands to larger-scale strategies like CI/CD)
Comments (522) 158 threads
Earlier commentsI keep really basic markdown notes in a git repo, roughly one file per day with an ISO date name, but some things I give a separate file name (still with the iso date, but with some descriptive words) for things that might be good to re-access or are part of a series of similar notes (like a TIL file or a recurring meeting with the same person).
Really the most important thing to do is just start taking notes. You can reorganize later if you need to.
Searching is pretty much just grep.
More detail here https://blog.steve.fi/keeping_a_simple_markdown_work_log__vi...
If I need to, I also use Monodraw to produce ASCII character graphs and add them to the comment to explain concepts.
It helps to cement the solution in your brain and it's a system of record on how it was accomplished in case you forget.
I do this only for personal projects though. I don't think co-workers would appreciate an essay with exhibits at the top of a file, lol.
Why? I don't really have an experience of being a co-worker, but I have always appreciated such essays in free software.
I wrote a bit about Zettelkästen (and the practices I follow), in case others find it useful: https://github.com/alefore/weblog/blob/master/zettelkasten.m...
So the linkages for the visualizations are derived from the notes themselves?
Yeah, that entire article is generated from the set of notes. There's one note for each subsection (down to the finest level of granularity) and it just extracts the article directly based on the links. I described this in a set of notes that end up here: https://github.com/alefore/weblog/blob/master/zettelkasten.m...
The images (e.g., distribution of back links per file, semilattice view, etc.) are also just generated programmatically from the repository of notes.
The code that extract it is here: https://github.com/alefore/edge/blob/master/rc/editor_comman... (function zke, which receives the output path, the path to the initial note, and a string listing space separated paths of notes to ignore).
Here's another example of an article generated from my notes (this is way longer and is very incomplete, and probably contains a bunch of mistakes, but you may find it interesting as an example): https://github.com/alefore/weblog/blob/master/software-corre...
https://github.com/lloeki/dotfiles/blob/master/shell/notes
Since note file names are time stamped, they’re sorted and I don’t have to care about dupe names. It defaults to creating as .md but renaming the file afterwards doesn’t matter.It’s so dead simple that I use it all the time instead of fantasising about the perfect note system.
Continue this thread — 2 more replies
The investment you have to make to really grok static typing is quite large. It took about 2 years for me to be really comfortable in TS. But you'll have to claw it out of my cold dead hands now.
Before switching to web dev, I used to work in Java, C#, C++, etc. But I've been away from static typing for about a decade now. I completely forgot how beneficial it is.
Computers are rigid. The more rigid the lang you talk to them, the less you get bitten.
Untyped python, bash, javascript, just not worth it imho.
If you're unhappy with how loose python and js are, you might find happiness with Perl.
To enable the checking:
use strict;
use diagnostics;
I also used to love js / php because because I thought types make the code unnecessarily verbose. After some pet projects with a strongly typed lang (c#) I realized the peace of mind that using types gives. But I still maintain my opinion that types make the code too verbose.
But then I saw the "light" that is F# and I'm here to preach:
F# has types BUT you don't need to type them (most of the time) because it has type inference. F# can be used in the .net ecosystem and most of the time it can replace C#. F# can be compiled to js (although the interop is a bit messy). F# is a better typed javascript than typescript. F# is predominantly functional but you can also write code in the non-functional(ha!) style of your choice. F# discourages you from coding mutable spaghetti F# has decent tooling: VSCode + Ionide + dotnet + paket F# has pipes |>
The bad parts:
F# is not a hard-core functional language like Haskell, but for me this is a positive F# is a functional language which requires a change about how you think about a program. F# doesn't have a huge community F# doesn't give you a lot of job prospects F# doesn't have a lot of 3rd party libraries (but you can use c# libraries in .net or js libraries with fable. You can also mostly port libraries from other functional languages) F# requires you to think about the order of your declaration. Cyclic dependencies are harder to accomplish although this might be a good thing.
Continue this thread — 2 replies
[1] https://pypi.org/project/mypy/
Blue ocean python I pretty much start with hints and interface definitions, the logic follows. Helps me through writing the logic when I have autocompletion of methods.
Continue this thread — 5 more replies
* Converting seconds-from-epoch to a human readable date
* Select an id and pull info about it
At first, I tried to perform these mechanical tasks with some crazy shortcuts. But remembering shortcuts for every little flow is heavy.
Eventually, I've built a programmable tooltip on Mac OS X for these mechanical tasks.
I'd love for you to try it!
https://github.com/tanin47/tip
Continue this thread — 8 replies
I've been working on my own (https://github.com/alefore/edge) as a side project and using it exclusively for about six years. I don't expect it to be very usable by other people (it's very customized for my workflows, I suppose; e.g., it's mostly useful for writing C++ and Markdown files) but, because I know it inside out (and I've invested in making it easy to customize through its extension language), it's very easy for me to adjust it to behave exactly the way I want it, which allows me to lower the friction for any operations I care about (and it abides very exactly to my principles/expectations for how an editor should behave; e.g. never block the main thread/UI while executing some operation such as opening a file). Because I don't have to use but a small set of computers directly (mostly my laptop and my workstation), this works well enough.
I don't know if overall it'll save me more time than it has taken me to implement it, but I do believe it allows me to move significantly faster than if I still used Vim or Emacs (or than most of my team mates), especially because it allows me to operate at a higher semantic level than otherwise, eliminating distractions from lower level details.
... and, I guess, it has been a lot of fun to implement it (and I've probably learned a bunch). I think it has played a role for me similar to that videogames have played for some of my friends (e.g., this weekend's challenge may be to generate visualizations for the logs I keep for every interaction I have with each file I've edited; implementing stuff like that feels similar to how in the past I felt about making progress in some videogames).
Continue this thread — 13 replies
All comments shown.
Couldn't load more comments. Check your connection and try again.