Readit News logoReadit News
Dan42 commented on It's 2026, Just Use Postgres   tigerdata.com/blog/its-20... · Posted by u/turtles3
Fairburn · a month ago
Dan42 · a month ago
That article was clearly written by AI, based on data from 20 years ago.
Dan42 commented on T-Ruby is Ruby with syntax for types   type-ruby.github.io/... · Posted by u/thunderbong
jrochkind1 · 3 months ago
Wait, what happens if you want keyword arguments?
Dan42 · 3 months ago
Yeah, it doesn't work with keyword arguments. In the playground I tried a simple keyword with default value, and it converted to the wrong thing, as if "someone" was a valid type.

    def greet(name: "someone"): String
      "Hello, #{name}!"
    end

Dan42 commented on Ruby Blocks   tech.stonecharioteer.com/... · Posted by u/stonecharioteer
Dan42 · 5 months ago
This is really cute and heartwarming.

Back in the day, a lot of people including me reported feeling more comfortable in Ruby after one week than all their other languages with years of experience, as if Ruby just fits your mind like a glove naturally.

I'm glad new people are still having that "Ruby moment"

Dan42 commented on The illegible nature of software development talent   surfingcomplexity.blog/20... · Posted by u/hackthemack
bironran · 5 months ago
Heh. That's me. The "no presence" part. About the 10x part, ask my colleagues. I want to believe I'm doing some good work but who knows.

But the no presence... I've got a kid, a house, a mortgage. I've been in software since I was a teenager. Am I still fascinated by it? Sure. Will I still spend hours and hours of free time? Nop. It long since stopped being a hobby. Right now I like reading and listening to audio books, when I have a break from house chores and child rearing. I like to cook and experiment in the kitchen. The endorphin feedback cycle is so much faster (hours) than large scale software (weeks to years). I like to watch interesting shows on TV. Write. Coding-wise, I'm invisible outside the company I work at.

Not strictly a 9-5, but with a kid I do try to have quality family time, so I condense as much as possible to my working day, leaving time to be with my loved ones. If there's something important I'll participate. If there's a pagerduty alarm I'll jump. But otherwise, I'll deal with it tomorrow. I've long since learned to identify real emergencies from artificial urgency "because there's a milestone deadline!". Sure there is. Like the old saying goes "I love deadlines. I love the wooshing sound they make when they go by". Is it a customer commitment? No? Then I'll work on it Monday morning, right now I'm out.

I value people like that. Being a hero is a young-people game. You can't be a hero for years and years and not burn out. I've seen that happen. Working every weekend? Then something is wrong with the estimation. Or the design. Or whoever is in charge of priorities.

God helps me when I look for a job again. I guess I'll have to rely on references and hope to hell I'll pass the filtering software to actually get someone to look at my application. So far I've been lucky. Last time I actually sent CVs was at the beginning of my career, as a new grad, 20 years ago. Ever since then I was picked out, carried over, invited in by people who knew me. Really, really hoping that'll keep being the case.

Dan42 · 5 months ago
Wow. You are me.
Dan42 commented on The Theatre of Pull Requests and Code Review   meks.quest/blogs/the-thea... · Posted by u/todsacerdoti
Dan42 · 6 months ago
I see posts like this one pop up from time to time. I love it. Based on my 30y of exp that's also the workflow I converged on. It seems to me like every experienced and skilled developer is converging on this. jujutsu is entirely built to accommodate this workflow.

There are no silver bullets or magical solutions, but this is as close to one as I've ever seen. A true "best practice" distilled from the accumulated experience of our field, not from someone with something to sell.

Dan42 commented on Quicksort explained IKEA-style   idea-instructions.com/qui... · Posted by u/foehrenwald
Dan42 · 6 months ago
I'm pretty sure the swapping is a fundamental part of the quicksort algorithm, not a mere implementation detail. That's the reason quicksort is an in-place algorithm.
Dan42 · 6 months ago
Actually you're right, it is an implementation detail. The original isn’t mistaken, it’s just showing the lo-to-hi partitioning pass rather than the from-both-ends version I had in mind when I implemented quicksort before.

shame, shame, I should have double-checked before posting.

Dan42 commented on Quicksort explained IKEA-style   idea-instructions.com/qui... · Posted by u/foehrenwald
HarHarVeryFunny · 6 months ago
Isn't that more of an implementation detail?

I'd guess if you care more about speed than memory it might be faster to just move elements into new array - sequence through old array appending to start/end of new array according to pivot comparison. You'd be moving every element vs leaving some in place with a swap approach, but the simplicity of the code & branch prediction might win out.

Dan42 · 6 months ago
I'm pretty sure the swapping is a fundamental part of the quicksort algorithm, not a mere implementation detail. That's the reason quicksort is an in-place algorithm.
Dan42 commented on Quicksort explained IKEA-style   idea-instructions.com/qui... · Posted by u/foehrenwald
Dan42 · 6 months ago
This is cool, but missing a LOT of details between steps 4 and 5, which is the meat of the quicksort. Actually, the first and last elements of step 4 would be swapped, which means the order depicted in step 5 is incorrect.
Dan42 commented on Look Out for Bugs   matklad.github.io/2025/09... · Posted by u/todsacerdoti
Dan42 · 6 months ago
This article really resonated with me. I've been trying to teach this way of thinking to juniors, but with mixed results. They tend to just whack at their code until it stops crashing, while I can often spot logic errors in a minute of reading. I don't think it's that hard, just a different mindset.

There's a well-known quote: "Make the program so simple, there are obviously no errors. Or make it so complicated, there are no obvious errors." A large application may not be considered "simple" but we can minimize errors by making it a sequence of small bug-free commits, each one so simple that there are obviously no errors. I first learned this as "micro-commits", but others call it "stacked diffs" or similar.

I think that's a really crucial part of this "read the code carefully" idea: it works best if the code is made readable first. Small readable diffs. Small self-contained subsystems. Because obviously a million-line pile of spaghetti does not lend itself to "read carefully".

Type systems certainly help, but there is no silver bullet. In this context, I think of type systems a bit like AI: they can improve productivity, but they should not be used as a crutch to avoid reading, reasoning, and building a mental model of the code.

Dan42 commented on How RubyGems.org protects OSS infrastructure   blog.rubygems.org/2025/08... · Posted by u/hahahacorn
Dan42 · 7 months ago
Reading this, I couldn't help but think these guys really know where their towel is. The opposite of enshittification?

u/Dan42

KarmaCake day148August 19, 2008View Original