News for hackers. Stuff that matters.
Re:Building a Cloud Database from Scratch: Why We Moved from... by pdimitar on Friday February 10, 2023 @08:58AM (#34739644)
Be a bit more charitable. :)

Brain-dumping is simply a way to iterate and figure out what works and what doesn't, quickly. After I do it I take the requisite time to emulate exhaustive pattern matching, and add tests that cover the functionality well.

My problem with Rust, and I love the language a lot, is exactly this: I want to quickly find what would work. After that I'm very happy to take the proper time to go things rigorously.

Re:Building a Cloud Database from Scratch: Why We Moved from... by serverholic on Friday February 10, 2023 @09:39AM (#34740194)
Yes and then someone comes along and makes a change that breaks something seemingly unrelated and it’s less likely to be caught because there is no type system.

And please don’t say tests solve that because they don’t. They help but they don’t solve it.

Re:Building a Cloud Database from Scratch: Why We Moved from... by pdimitar on Friday February 10, 2023 @09:56AM (#34740438)
You won't catch me arguing with that. I work both with dynamic and static languages and usually I'll pick the static ones.

Dynamic languages are very valuable when you can afford to iterate and gradually find out the golden path. For the better or the worse, many businesses are of that type.

That being said, I just ended an Elixir contract and absolutely want to code Go or Rust for money again.

Re:Building a Cloud Database from Scratch: Why We Moved from... by tele_ski on Friday February 10, 2023 @10:03AM (#34740518)
I do appreciate that you write tests. I find it's like pulling teeth with most devs to get them to write anything but the most basic of tests.

I tend to think more than write code, so usually my first go is reasonably close to what I need. But there are always edge cases you just never think about. I'd rather have a strong debugger than a repl imo

Re:Building a Cloud Database from Scratch: Why We Moved from... by pdimitar on Friday February 10, 2023 @10:58AM (#34741378)
> I find it's like pulling teeth with most devs to get them to write anything but the most basic of tests

You are unfortunately very correct (at least in my 21 years of experience as well). I too feel annoyance when I know that I made a piece of code work well but (a) every now and then I am truly wrong and (b) various pieces of the system in the code interact in sometimes unexpected ways, unveiling inputs to your code that you haven't foreseen.

So even though it often takes a heavy and annoyed sigh out of me, I still roll up my sleeves and add the tests because I've shot myself in the foot too many times, and ignoring past experience is just being a stupido.

As for debugger/REPL, they are not orthogonal; you can have both. I'd more contrast debugger with tests themselves -- both are ways to go step by step through a process that you know is faulty somewhere.

REPL to me is just a way to more quickly sketch a v1.0 of a piece of code, nothing else.

Re:Building a Cloud Database from Scratch: Why We Moved from... by lenkite on Friday February 10, 2023 @02:11PM (#34744246)
Rust needs an interpreter mode for fast-turnaround of brain dump
Re:Building a Cloud Database from Scratch: Why We Moved from... by pdimitar on Friday February 10, 2023 @02:17PM (#34744322)
Yep, I definitely wouldn't refuse one.