Dio wrote:No, they want more of that stuff [...] so they're big on developer education, particularly in universities.
And this is the logical contradiction.
On the one hand, if someone shows interest, they're immediately put off the concept: "use someone else's code", "you'll fail, so give up", "it's way too hard for anyone to understand" and that general sense of "pay no attention to the man behind the curtain".
But, on the other hand, they want more of this stuff and they're big on developer education, as there's not enough of it about and it's needed.
I think that folks don't connect these two things in their minds, and don't realise that maybe they're actually creating the shortage. Because, if anyone tries, then "no! Don't do that!". Umm, okay, then. If you say so. But then "why can we not find anyone with the expertise?" later on. Well, exactly because you told them never ever to try. And they believed you.
tufty wrote:But if you haven't specifically designed your allocator to not shit over cache coherency, you're almost certainly killing performance on all your memory accesses. And then there's thread safety. and, and, and... We're not on the 8 or 16 bit processors any more, Dorothy.
Here's the problem.
You speak too eloquently on the matter.
So I know you've had a go at it. Only someone with experience jumps immediately to the pain points like that.
Thus, you advise that which, at some point, you defied.
This is fine. There is no hypocrisy there, as you've simply learnt your lessons. But it changes the weight by which your words should be interpreted.
I still refer to the point that, unless someone defies the advice, then we'd have no-one actually writing all that "someone else's code" that we all depend on.
Yes, use Unreal Engine. But Epic implicitly must defy the advice to have created Unreal in the first place.
And that was a hint I was giving with my earlier examples. Notch defied advice... and is now a billionaire, having written the best-selling game of all time (which is very much based on being a voxel engine, that "someone else's code" wouldn't actually do well back in 2010). Carmack defies the advice... and is a billionaire, who created genre-defining titles that, really, we're all just copying Carmack, even now. Epic defies the advice... and makes a nice little income from their cut of sales. Valve defied the advice... and they're living it large on Steam money.
Of course, this does not mean that defying the advice inherently means you'll succeed and be living it large.
But there's a simple wisdom I hold: "When you copy other people, the very best you can do is match them". You have to stop copying people and doing risky shit that no-one's quite sure will even work, if you want to exceed what everyone else is doing.
Anyway, does it need to be the very best, most perfect, totally optimised memory allocator ever conceived?
No, it doesn't. It just needs to be good enough. With a view to making it better.
Do you think that the first iteration of memory management in, say, the Unreal Engine was 100% perfect?
No, it wasn't. But it worked and it was good enough. And then they made it better with each iteration.
This is a thing. I've worked with a small film company - nominally to do the audio, but I ended up on camera and doing some of the editing too - and films are NOT filmed in chronological sequence. My mother is a writer, and books are never done on the first draft - it's a back-and-forth between author and editor that hones it. I do - or have experience of - many different arts and crafts, and the rule is that NOTHING is ever perfect on the first go.
We only generally ever see the end result, so you can be tricked into thinking it emerged from the Ether in perfect form, just like that, on the first attempt. But, if it's any good, then it absolutely never did that.
I think it's a Knuth-ism: "all good code is written at least twice". Bill Gates, for sure, had a "rule of three" that nothing's any good until the third iteration - because I'm sure that Valve's refusal to do threes boils down to ex-Microsoft employee Gabe Newell's refusal to agree with Bill over that.
Bill's formulation was along the lines of: "the first time, you're learning what the fuck you're doing, so it'll suck. The second time, you now know how to do it, so it'll work. The third time, you're going beyond 'it works' to 'it works exceedingly well' and you're optimising things. Ergo, things ain't really any good, contends Bill, until "third time's the charm".
This is not the first time I've written these things. Won't be the last. Every time I fuck up, the next version dodges that problem from the off, because I simply know what's coming.
Man, by the 69th iteration, you'll be seriously impressed and wondering how the hell did I get so good at this shit? No other reason than I kept fucking doing it.
"We choose the Moon. Not because it's easy, but because it's hard."
"Words ought to be a little wild - for they are assaults of thought on the unthinking."
- John Maynard Keynes