Ask HN: Programs that saved you 100 hours? (2022 edition)
470 pointsI'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
Comments (559) 186 threads
Earlier commentsDBeaver: use a consistent interface for practically any data store. Wanna SELECT and JOIN CSVs? It can do that too.
https://www.mail-tester.com/ - Fantastic email server settings troubleshooter.
Excel / Calc / Gnumeric: I don't even know macros, just the functions, sorting, filtering, and pivot tables enable good productivity. And sometimes fun, I chose my current video card, and optimized my Factorio gameplay with Calc.
BASH, jq, sed, grep, tr, cut, Geany, regexes: it's fantastic to be able to work with text. Log parsing and other text tasks turn into a puzzle game, where I win fast, and it's usually faster than to use anything else, especially for one-offs.
One thing that blew my mind the first time I saw it, was that when you look at geospatial data, they let you view your geometries on a map. It's so simple and so awesome!
[1] http://www.gnumeric.org/announcements/1.12/gnumeric-1.12.3.h...
Although be warned, it can also have the "side-effect" (functional programming pun!) of making you somewhat insufferable as you try to convince everyone around you that functional programming is amazing.
As a bonus, you'll be able to write insufferable comments like these in HN threads.
Also: The level of control offered by Rust comes at a steep cost compared to GC'd languages.
Continue this thread — 2 replies
I ask, because I used to feel very similar about the OO paradigm (it helped me model the world easier, made me insufferable because of my zeal, etc). But, I had the privilege of doing that with nearly 20 years of Smalltalk. A battle worn path of ObjectiveC, Swift, Java, Python, Kotlin, and JavaScript later, I feel the pain. It's like being in forestry, one day you work with a chainsaw, and the next day they give you a fan with spoons welded for the blades.
These days I'm doing some Elixir... and I love it. I don't know how welcome it is in the "functional programming and pure functions" club, but I think it's awesome.
I have a working theory that what has made these paradigms loved or hated, is less about them theirselves, and more about the execution thereof. What made and makes both Smalltalk and Elixir appealing to me is their simplicity and straightforwardness. There's a mechanism you learn to reason about the problems you're trying to solve, and then you can excel at it, instead of constantly stumbling on edge cases where "hybrid" languages try to reconcile all of the paradigms together.
YMMV
Erlang, and by extension Elixir, are very respected.
The fact that you have a strong background in Smalltalk isn't a surprise: Kay's idea of isolated objects sending methods to each other, independent of each other is OTP. Erlang, IMO, is the most beautiful combination of functional and (Kay's definition of) OOP there is.
In OO (the kind I've seen, and I've not seen Smalltalk, mostly C++), it's common for a member function to just go ahead and modify the member variables it needs to modify. This is considered "good encapsulation," but it's horrid for reading code and likewise horrid for parallelizing anything.
When you take that practice to the logical conclusion, you can end up with a member function like "void update();" (let's pretend that our class is a physics engine and this function presumably takes velocity and time step and increments position). Some early advice I got for writing maintainable code was "assume that whoever is maintaining the code after you is smart and in a hurry," and that sort of code just breaks that advice. If I see that kind of function, I need to dive into it to figure out what's going on. Whereas if I saw "state.position = update_position(state.velocity, state.dt);" I can make an educated guess about what's going on and move on.
I'm making myself a little angry here, so I'll wind down. These are the main points anyway, this sort of functional style feels like it takes something in 4D space where I have to twist my brain into a klein bottle to figure it out and puts it into 2D space where I'm like "oh, that's all there is to it then."
To your working theory, I see what you're saying, but I think I lean towards preferring poorly done functional code as opposed to well done OO code, because the functional code will be easier to test and shape into good code, whereas the OO code might get fragile over time. But let's be honest, it's not like "well done OO code" is an option we expect to have on the table :D
I was at first rushing implementing ~50 business rules (which changed weekly) on the setup of a system. Then this functional wise kid came along and we did in one week what took me 5 weeks.
Along with that, using MQTT to separate your program with Protobuf makes everything so much easier. Program crashes? Let it burn and let systemd restart it. So much easier to test too. Our code coverage is 99% if we exclude the main files that initialize everything.
Functional programming easily cost me hundreds of hours without much to show for it. Monad transformers, free monads, final tagless... this rabbit hole is very very deep.
No regrets though, would suffer through this again!
I know that with Rust the time-to-robustness is much lower than with Python for example.
Yes, because single letter variables are bad.
> But for some reason, functional programming tends to get a pass, despite it just not clicking for a large swath of team mates.
Perhaps this is a problem with the team mates rather than with functional programming? I'm too dumb for functional programming, but I freely admit it's the superior way of writing software. If we were mathematicians rather than programmers, programming would be way better!
Continue this thread — 1 reply
I haven't touched the Windows Search utility since I found it.
Agent Ransack (free for commercial use) and FileLocator Pro (paid, has near-instant indexed search) are the go to grep alternatives for Windows on my dev team. https://www.mythicsoft.com/
I also hear VS Code has ripgrep built in, but I haven’t used it extensively.
Update: Just tried it, I think I'll stick to Wox, Wox feels "snappy".
As a manager & parent with only occasional bursts of time to code (some work, mostly side/fun stuff), Copilot has turned out to be incredibly useful in smoothing over all of the small things I'm slow at because I don't do them daily. And especially since I have limited time, I just want to get the damn thing working and am quite happy to my way there as quickly as possible.
Copilot is the only real value I'm getting from the recent A.I revolution and it does save me hundreds of lines of manully typing code all day. And the best part is it's getting better and better each day.
These are not just novelty value. They're great for mocking up ideas and I've also used them for generating backgrounds for advertising, for example:
"A black stage lit from above by two spotlights, very dramatic, stylish"
You can also add keywords like "modern/rustic/nature/futuristic" and it will get tuned to your desired style immediately.
Iterate on that for 5 minutes or so and there's my perfect background for a "coming soon" flyer. Way better than I could have made in Canva. Good enough that multiple people have told me the flyers look amazing, and nobody guessed it was AI until I told them.
Continue this thread — 2 replies
Continue this thread — 2 more replies
All comments shown.
Couldn't load more comments. Check your connection and try again.