Fixed the premove thing too, I think.
828 karma · joined February 9, 2019
Fixed the premove thing too, I think.
I didn't feel like my code became better or easier to maintain, after reading other programming advice books, including "Clean Code".
A distant second recommendation is Programming Pearls, which had some gems in it.
Nothing was named according to what it did either, I think our deploy tool was Carnival? Just codenames everywhere
Anyone that's worked with engineers can tell you that there are simply some people getting more done than others, in the same amount of time. Are there people producing bad code? Yes. But I don't think output is inversely correlated with code quality. In fact the people I've worked with that have the most output, also had some of the highest quality code. I've never experienced this mythological 10x rockstar figure that works alone creating impossible to maintain systems, and I've worked closely with dozens of engineers. He probably exists somewhere, but not with the sort of prevalence that justifies every programming productivity article ripping on his archetype.
Also this was just an analogy I know, but doctors definitely don’t hurt people for years while trying to save them, very different profession from ours, if anything doctors earlier in their career have been shown to have better results.
I think it’s easy to look at places in Europe that get drugs virtually for free, and want to be like that, but the US despite being 1/20 of the world’s population, funds something like 80% of the biomedical industry, due to our lack of price controls.
There’s so many areas of medicine where we don’t see progress because the ROI just isn’t worth it. Do we want to risk making all medicine like that?
I have tried it before though, it certainly works.
That said even if you’re working on something you love, there will be weeks where the work just isn’t fun, and that’s where this stuff comes in. I love the project I work on now, a chess improvement site, but sometimes I need to take a week to move cloud providers, or deal with App Store review, or work on marketing. Can’t always be fun even if the overall project is directionally aligned.
Haha I share in your frustration with the crickets launch, anything I post here that I actually care about people seeing, gets shuttled off to the shadow realm, then stuff like this that’s just musing tends to hit the front page.
You’re spot on about the performance reason I didn’t want to do this originally, but I did some testing and turns out move generation in the library I use is Blazing Fast and wouldn’t be a bottleneck
The thing I optimized for is that there’s very often repeated blank spaces or repeated pawns on the same rank.
Also instead of storing castling status separately, it’s stored as a separate piece on the appropriate rook.
These take advantage of the fact that there’s 6 pieces, so 3 bits to encode them leaves two options remaining. One is PawnRepeating and the other is RookCastleAvailable, in my scheme.
There’s probably improvements to be made. I’ll write a post on it when it’s finalized.
If I get millions of users I’ll swap it out, in the meantime it took like a day to implement and I haven’t looked back.