Ask HN: Programs that saved you 100 hours? (2022 edition)

470 points by zJayv ↗ HN
I've asked this previously: https://news.ycombinator.com/item?id=22849208

But a few years have past and want to see what's emerged since. Although can be new to you vs. released in 2021 or 2022 necessarily.

Things I've come across in the meantime:

* mock AWS services https://github.com/spulec/moto

* query cloud services https://github.com/turbot/steampipe

* munge CSV https://github.com/johnkerl/miller https://github.com/BurntSushi/xsv

* page json https://github.com/PaulJuliusMartinez/jless

* text to tree structure [I use this as a hack to version control my music library] https://github.com/birchb1024/frangipanni

573 comments

[ 2.4 ms ] story [ 539 ms ] thread
Not 100h yet but I've been replacing custom Linux command output parsing with https://kellyjonbrazil.github.io/jc/ (https://news.ycombinator.com/item?id=33448204) lately.
I know this is the modulair way with piping. How would ` jc command args` be as opposed to `command args | jc —-command`?
Both ways work:

    $ jc ifconfig lo0

    $ ifconfig lo0 | jc --ifconfig
That actually looks nice! (I've written at least 10,000 perl one-liners.)

Will definitely check it out.

Home Assistant [0] through bunch of automations we have around our home must’ve saved 100h in total for me and my partner so far.

[0] - https://www.home-assistant.io/

I hook tons of stuff up to HA and I love it. It's great with Sonoff switches flashed with Tasmota.
I've moved on my Sonoffs from Tasmota to ESPurna and finally to ESPhome which I find excellent.
What kind of automations have you found necessary? Any time I think about getting into it, I can only think of automations that sound silly or extra but nothing truly time-saving.
Where I live we have frequent scheduled power outages, I use that to schedule when and how far to charge my batteries
Not the user you replied to, but for me:

Open blinds in the morning, shut them at sundown.

Turn on porchlights after dark if I'm not home. Turn them off 10m after I'm home.

Turn HVAC up/down when I leave the house, revert when I get home.

Unlock doors when I arrive home. Make sure they're locked when I leave.

How does home assistant track know if you are home or not? Is it tracking your location?
You can set up zones based on your phone's GPS (there is a Home Assistant mobile application that can report data back to the server), or you could set up an automation based on whether your phone is connected to your home's wireless network. Or probably even via some Bluetooth beacon.
Turn off ac in the morning and back on before I come home. Saved me about $70 a month
I got tired of tuning the speed on air purifiers at home. Since outdoor PM levels can change up to 1000× in a single day, you have to adjust accordingly, and it takes a lot of attention to do that.

So I set up automation for that based on a few parameters: indoor and outdoor particulate matter levels (current and averaged over the last hour), noxious gas levels based on third party monitoring, wind direction and speed, and the weather forecast for the next few hours.

Probably doesn't apply to others here, though.

Easily https://vanyalabs.com/ (Access your FHIR API Data)

My own app, not even at the Alpha stage, has already saved me and my team 100s of hours of parsing JSON results in Postman.

* https://virtualenvwrapper.readthedocs.io

also alias to create jupyter kernel for activated environment:

    mkkernel() {
        if [ -n "$1" ]; then
            KERNEL_NAME=$1
        elif [ -z "$VIRTUAL_ENV" ]; then
            echo "Pass either kernel name as argument or activate virtualenv"
            return 1
        else [ -z "$1" ]
            KERNEL_NAME="$(basename $VIRTUAL_ENV)"
            echo "No kernel name provided, using name from virtualenv $KERNEL_NAME"
        fi
        pip install ipykernel
        python -m ipykernel install --user --name=$KERNEL_NAME
    }
RedwoodJS https://github.com/redwoodjs/redwood

I launched my startup from 0 to first customer in 3 months thanks to this guy. Most of my time saved was because of a solid collection of libraries, brilliantly integrated together (backend to frontend), and I didn't have to suffer analysis paralysis every time I needed something.

Very interesting project, It's interesting to see trends coming back to bundled BE/FE. What would you say are the biggest issues you have with Redwood?
My issues are kind of specific to the idiosyncrasies of my app. Its multi-tenant and two-sided (admins and applicants), so I had to kind of roll my own auth system on top of the existing one. The fact that I could do that really means that it’s flexible enough honestly.

Another issue is that it doesn’t expose a server.js file, so its hard to do stuff like integrate an APM.

I've just been researching this the last few days. There's a couple of other similar tools that I'm also checking out:

Refine.dev

Wasp-lang.dev

I'm quite early into researching these so I don't have anything much to say about them yet.

Wasp is a DSL so it's a bit different.

Wasp DSL creator here, let me know if any questions :)
Vim. I can never leave modal editing now. Been using it since 2010 and I think in vim when editing. It lets me enter a flow state so much easier. My brain maps into writing and editing.
I feel similarly.

My journey has been: VS Code, to Codium, to Atom, to Sublime, to now Vim where I feel the most productive.

I get moving to more minimal lightweight software but why go from VSC to Atom?
Wanted to avoid Microsoft's telemetry and felt like I was being spied on.
I try to stress this more than anything when talking about the merits of vim/emacs/etc. It's not about speed, it's about how effortless and 2nd nature editing text becomes.

Which is really counterintuitive when you look at how complicated the programs are. But I felt that it became better/easier than regular text editing after only 3 weeks of fulltime use. The uninterrupted flow of keyboard use, and reduced mouse navigation, feels great.

You only need to learn a very small subset of features to be very effective with it. Some people just stick to that forever. But you can also slowly add to it.

I'm a long-time vim user, and haven't really used anything else over the past 15-20 years. I use a nice color scheme, barely any plugins and a moderate but static vimrc. I feel like this is my happy place, it let's me write with the setup I'm used to, in any terminal, on any machine, and on any codebase (JS, Python, Go, HTML, C, etc).

Every now and then I see the magic of modern text-editors (VSCode et al), especially with code completion /intellisense and file trees. For me, I rarely feel like I need to be able to complete function parameters in my code to be more productive. Code-writing takes up such a small amount of the creative process that I'm perfectly fine looking up seldom-used functions in a web-browser. I wonder if anyone has ever attempted the jump from longtime-vim-user to these and can share their stories about why or why not.

Have you tried something like JetBrains tooling with IdeaVim, or one of the Vim plugins for VSCode? Might help with the transition.
My co-founder/ collaborator has. He is a 100% vim person, to the extent that he has Firefox configured to let him do things with vim key bindings (I believe using imperator).

He's switched over to VScode with vim key bindings and has been happy as a clam. He's heavily using Python with pylance plus copilot for the python side of what we do (which is most things).

I'm an emacs user who has made a similar switch (but with a horribly weird mix of native and emacs keybindings). Oh, and the VScode sync extension for me. I use and love the rust-analyzer extension.

I've been using vim since perhaps 2004.

Switched to IntelliJ in 2018 when writing Scala. IdeaVim is fine, it even lets me switch to normal mode with jk/kj [0]. What more could I want?

I've been using IntelliJ for Scala, Elm, and Python, and still use (neo)vim for editing other languages and random files. I'm prepared to jump ship to vim+LSP on short notice.

[0]: https://github.com/tasuki/dotrc/blob/master/.ideavimrc#L5

Any advice for someone who wants to switch to vim for Go development but struggling to find a good workflow? Using vscode it's so easy to rely on the auto complete, click a function name to go to it's definition, etc. I haven't found a good guide on getting that sort of basic workflow going which is unfortunate because I would love to stop using my mouse so much.
Just a reminder that you _can_ leave modal editing with :q (sorry couldn’t resist)
What is the shell if not just another editing mode?
Lots of support for vi editing. Things like bash (set -o vi) and other CLI/TUI have bindings. Check out the browser plugin vimmium too.
Since 2010? Welcome new vi user. :-)
My point in saying this was, just to clarify: vi is an ancient technology that still feels cutting edge. I can't imagine editing without modal, it enables some fantastic workflows, which I wish I had in other contexts as well.
The Mosh SSH client for intermittent connectivity ( https://mosh.org/ ) has definitely saved me at least 100 hours. Too bad that it's only available for Windows as a Chrome extension, and Chrome will discontinue support for it starting in the new year. Really not looking forward to having to search for an alternative...
I guess you can install it in WSL?
I've switched from Mosh to Eternal Terminal (https://eternalterminal.dev) because of its excellent native scrolling support.
To add on to that, I use iTerm2 with tmux control mode which combines a native UI frontend with a tmux backend on a remote server, meaning I can spawn new native tabs, windows, or panes and they're all tracked by the remote so I can reconnect to all of them at once if I disconnect.

I keep one laptop at home and one laptop at work and can seamlessly switch between the two without having to manage my active sessions at all. If I open a new tab at work and go home for the day it'll be there on my laptop at home.

Eternal Terminal pitches itself as entirely superior to Mosh, but also describes itself as using TCP (Mosh uses UDP). I'm curious how that can actually cover the use cases Mosh provides?

Mosh using UDP means that as a connectionless protocol, your end points can move (eg: from WiFi to LTE, or vice-versa), and beyond a small hiccup, your connections remain alive and well.

ET adds a layer between application and TCP sockets that persists connections. https://eternalterminal.dev/howitworks has more.

If you are mostly on unreliable and high-latency connections, mosh will likely feel better, but with no native scrollback.

> Too bad that it's only available for Windows as a Chrome extension

Looks like it's available under msys2 on windows: https://packages.msys2.org/base/mosh

As an aside: msys2 mingw64 and friends are > 100 hours saved if you are a linux-soul in a windows environment. I don't think msys gets the attention it deserves.

And if you work in locked down corporate windows environments, asking for Git for Windows ("for local version control only") is a sneaky way to get the basic Unix utils installed. It's a lot easier to ask for VSCode + Git than some open source tools that will be viewed with suspicion by the local support team.
how is it different from autossh? never used mosh yet
I was using mosh+tmux earlier this year, but ended up switching to wezterm which has a native MacOS and Linux versions, and gives native interface to the terminal. And I can reconnect to my session if I suspend my mac or go somewhere else.
The pure power of ripgrep + emacs to speed up refactoring _probably_ offsets the lots of game time i've spend diddling with my editor.

at least that's what i tell myself.

I have a bash function that mashes sed and rg together and it's dreamy.

"hey, change all these to that, and don't make it complicated"

Still Karabiner and it's probably 1000 hours yearly at this point.

https://wiki.nikiv.dev/macOS/apps/karabiner

On order of 100 hours, this year I'd say it's Sublime Merge, VSCode, Height (to manage projects) and Telegram.

Karabiner and Keyboard Maestro have saved me a lot of time as well. Being able to remap consistent shortcuts for every application is really nice.

https://www.keyboardmaestro.com/main/

Alfred is another good one for Mac. Being able to add your own custom commands & workflows is useful.

https://www.alfredapp.com/

Hammerspoon too, which is great for scripting all different parts of Mac OS. I use it mainly for custom window layouts.

https://www.hammerspoon.org/

Along these lines, Raycast¹ is excellent. It's got lots built-in capabilities and available extensions² that I've used to replace several miscellaneous utilities.

¹ https://www.raycast.com/ ² https://www.raycast.com/store

Raycast is on track to replace Alfred for me. The simplicity of scripting with it is so nice compared to relative complexity of Alfred workflows.
For MS Windows users, the equivalent is AutoHotkey (https://www.autohotkey.com/).

It is incredibly powerful and versatile but the scripting language takes some time to adapt (I am still never sure when to use braces and when not). But the effort is really, really worth it.

Of all the software I can think of quickly, the one I think may have saved the most time in my life is Google Maps.
How come it saves 100 hours for you?

In the old days we had paper maps and I checked routes before I left: not doing that anymore has cost me time rather than saved me time. Many a time Google maps has sent me to the wrong place. Once to the middle of a mustard field in France which was a destination it changed to mid-route to a house called La Mutardier. 5 hours wrong lost there.

Less than useless on a motorbike due to its UI, actually quite dangerous.

I would say it has cost me many hours and saved me from carrying a map.

Evermore useless adverts, and now hiding places that it doesn't get a kick back from.

Oh and it's cost me money in fines from taking me the wrong way down streets I was not allowed to drive on. With no way to feed that info back into the system. When its wrong it stays wrong for years sometimes where I live, and we have street map, it ought to be half decent and at least safe for drivers.

>Many a time Google maps has sent me to the wrong place.

Have used it for years and have never seen this happen. Neither has send me the wrong way in a lane.

Google maps is a map, you can map out the routes yourself just like with old maps, but it is way faster to do so than with paper maps.
Searching the map for your target given only incomplete information is much faster. It also scopes the map to your screen size, paper does not do this, you save time finding the right resolution.

It sounds like the real problem you are experiencing is that you stopped checking your route. If you treat it like a paper map on crack then it’s a great tool. And, to be fair, it does sound like you run into more frustrating ‘wtf!’ problems than others.

Credentials: I used a paper map as a pizza boy.

How are paper maps working for you these days? I'm interested in your experience replacing GMaps.
> Oh and it's cost me money in fines from taking me the wrong way down streets I was not allowed to drive on.

It is your responsibility to drive legally. Even if Google Maps is suggesting a route that's illegal, you made the action to drive the wrong way.

I find that a combination is the most useful: planning the route beforehand, maybe with an online map / routing service, and then use the turn-by-turn for convenience. I don't use Google Maps myself, I go with MAPS.ME / Organic Maps these days, maybe OsmAnd+.
Turn-by-turn navigation in a completely foreign place can be invaluable, and save much frustration. I personally use Organic Maps (MAPS.ME), and I'm fortunate that it never led me astray or on horrible roads etc.
My family and I were on a “star safari” last night, and our guides gave us a Google Maps location for a parking lot on a volcano. Google struggled, as did Here. Organic Maps? No problem! So thank you; you’ve set me up with my new offline map!
I'm happy for you! OSM derived projects served me well in the past, I hope it will you too.
I use and enjoy Google Maps, but some of the features are baffling, like insisting on switching you to a "faster" route even after dismissing the proposal several times.

This almost got me into trouble a couple of months ago when I was driving from Odessa to Chisinau. One route goes through Transnistria which is currently controlled by the russian military.

I'm not sure if Google is aware that there is a war on currently, but I don't fancy getting shot just because California product manager guy believes he knows best.

they have a feature to ignore Highways .. maybe high time they had a feature "Avoid WAR !!"
Personally i think gmaps actively tries to get your attention and interact with the app. Which is extremely dangerous and in my country can result in a big fine if you even touch the phone.
This is the single software that made me maximize my travels. Removing the fear of getting lost is life changing.
Not exactly a program but Postgraphile saved me a ton of time to write an API. All things considered probably way more than 100 hours.
Flying Logic

Aeon Timeline

ObservableHQ - particularly the discovery that I can use most of it locally and privately for free. I've tried with quarto so far, but I think there are other ways too.

What I want is a way to instantly switch between dag and tree data structures: graph for visual editing, tree for easy data entry. So something that would analyze/cluster intelligently to minimize links when converting to tree, for when children have multiple parents.

Out of interest how do you run most of Observable locally?
I followed the instructions at Quarto.org, integrated with VS Code. So they are text documents stored locally. I didn't realize observable-cli was open source.

I find it can't do nested logic the way observablehq.com can though. For instance, I like having inputs embedded in paragraphs of text, which requires having logic mixed in with a markdown cell. There are certain things that I can do on the web that don't work locally.

There's also https://observablehq.com/@asg017/introducing-dataflow, which I haven't tried yet.

(comment deleted)
JetBrains software.
Specifically CLion's excellent code browsing features. It's the only thing between me and insanity when I have to "quickly" patch a binary with source code spread out over 1000+ files.
Especially local history - being able to go back in time before any commits were made saves you rewriting code or having to remember what something was doing before.

Otherwise the number of times I "show usages" or refactor shortcuts (rename, extract method / variable) throughout the day...

All of it out of the box as well, it's great value for money.

XDebug in PHPStorm. Can't live without it!
Sioyek: https://sioyek.info

It's a PDF viewer that automatically finds and previews references in documents, even when the PDF doesn't have links. Makes reading some math books a very enjoyable experience instead of a chore.

mpv, mpvacious [1], and anki

I've been learning spanish, and since hitting the intermediate stage outside of talking I mainly watch spanish shows or dubbed shows (Star trek TNG). I can create flash cards of difficult to understand phrases, or new words in seconds.

I usually still edit them slightly depending on my purpose for the flashcard, but having > 2000 cards right now, I can't imagine what doing this by hand, or manual review would have cost me.

[1] https://github.com/Ajatt-Tools/mpvacious

My biggest problem with anki is that the isn't a nice way to make cards. There's a vscode plug-in that lets you do markdown but it's too limited and clunky last time I used it.
org-mode has some spaced repetitions tools (e.g., org-drill). I personally don't recommend SR by flashcards too much. It's better to do it more naturally. For example, read books regularly to learn a language; common words will repeat themselves enough times that they'll effectively be a form of SR.
Seeing a lot of “fiddly” software being listed here. Stuff that lets you configure and tune a workflow endlessly. It’s ironic that this is the sort of thing most of us will think of, since it doesn’t really account for time saved so much as time spent fiddling…

Keeping an eye out for software that you barely use, as this is the kind with the most potential to truly save me time.

From that perspective, using Ctrl+R and Ctrl+S for reverse-i-search in a shell saves me so much time from writing commands especially big Kubernetes ones.
Cmd/Ctrl-F in general is probably the biggest invisible time-saver if you can count UX patterns.
The 'history' command is helpful the 1% of the time Ctrl-R and Ctrl-S fail you.
Bash alias. And my large bash_alias file
Try fzf for history management, it's a life changer.
Add fzf to get fuzzy search for your history. I reuse long complicated commands all the time by pressing Ctrl+R and then typing the first letters of a few words I remember using.

https://github.com/junegunn/fzf

It's also useful to remove duplicate commands and store infinite history. Add this to ~/.bashrc:

  export HISTFILESIZE=
  export HISTSIZE=
  export HISTCONTROL=ignoredups
Changing HISTFILE by context has been a huge win, keeping commands from generic system administration or different projects from getting in the way as I search back through my history to do a thing again.
You can also add a comment for searchability, as in:

    > big hairy command with --lots --of arguments  # foobar
Then you can search for 'foobar' via fzf or whatnot.
Give hstr a try: https://github.com/dvorka/hstr

It's saved me countless hours over the years as it's just so much better than regular CTRL-R. I also find it to work better than fzf.

ActivityWatch. Records your activity in the background (how much time spent in which programs and the time period). It can record browser tab titles and vs code open files, sometimes it can be invaluable to go back and check out what i did at a specific point in time.
Reminds me of a co-worker who would spend between 3-5 hours a day messing with their vim config. I know we cannot actually write code for 8 hours a day, heck a 3-4 hour session can feel too long. But spending 15+ hours a week endlessly fiddling with their tools was hilarious to watch on some level. I remember at team lunches how they would go on and on about this new plugin they found that is going to save them so much time now. Oh the irony if they only stepped back for a moment...
Yeah I know I’d fall in this trap if I let myself customize my tools so use everything with default config. No custom keyboard layouts, no shell aliases, nothing. It has the advantage of portability as well.
Sorry mate but that is just wrong. I get payback of a hundred to one on most of my fiddly bits.

A single command that does the ten things needed correctly every time instead of looking up each thing, typing it wrong four times and doing it again is a godsend. Lots of time saved. More accurate and reliable as well.

+1 to moto.

Does anyone know of a similar library for GCP? Searched and not been able to find anything and I miss it dearly

PHP Propel 2.0

It’s a small ORM with nice features and it saved me a ton of time. Just generate the classes from the database. Very fast to iterate from.

https://propelorm.org/

Probably showing my age here, but their database:reverse feature just blew my mind.

The problem with most ORMs is that language object models are way more expressive than SQL (due to having multiple subclasses of the same superclass / interface, or even multiple inheritance, and none of those mapping to SQL foreign keys).

Targeting the less expressive data model should automatically avoid most ORM footguns. I wonder how it works in practice.

It just works :D

I work with it every day and the the documentation is not the best, but for 95% of pure php projects it’s the Right answer. There maybe other right answers, but propel is definitely one of them.

If you iterate the database as you go, simply create the classes and there you go. I m amazed how good it works.

I m a single developer, so your results may vary, but for small to medium projects it works fine. And most of all projects are small to medium.