Earlier quoted context omitted.
There's a tension between "everyone writes some of it" and individuals having autonomy to focus and make decisions. If everybody has autonomy in a shared codebase, you end up with a heterogeneous spaghetti of unrelated design decisions and styles overlapping everywhere. To solve this, you normally end up with a hierarchy of authority, where most people have to have their work vetted by seniors. In this process, peopl…
> If everybody has autonomy in a shared codebase, you end up with a heterogeneous spaghetti of unrelated design decisions and styles overlapping everywhere. "everyone writes it" in the long term can still allow specific people to write/fix/augment/refactor/etc specific parts in the short to medium term. i think it's a good goal to never have a part of the code that less than two or three people can maintain, but pref…
TerrariaClone – An incomprehensible hellscape of spaghetti code
281–289 of 289 posts
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#282Earlier quoted context omitted.
There's a tension between "everyone writes some of it" and individuals having autonomy to focus and make decisions. If everybody has autonomy in a shared codebase, you end up with a heterogeneous spaghetti of unrelated design decisions and styles overlapping everywhere. To solve this, you normally end up with a hierarchy of authority, where most people have to have their work vetted by seniors. In this process, peopl…
If everybody has autonomy in a shared codebase, you end up with a heterogeneous spaghetti of unrelated design decisions and styles overlapping everywhere. Being free to do things your own way often means choosing not to do something if it's going to negatively impact other people. Once you realise that you need to think about the way your decisions impact other people you quickly realise that compromising on your cho…
The microservice approach has its own problems but hints toward a direction where teams are small and autonomous, with ground-up freedom on the architecture of their little service and free from draconian oversight. I'm not an advocate of microservices, but it's an approach that hints at something different.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#283Earlier quoted context omitted.
There's a tension between "everyone writes some of it" and individuals having autonomy to focus and make decisions. If everybody has autonomy in a shared codebase, you end up with a heterogeneous spaghetti of unrelated design decisions and styles overlapping everywhere. To solve this, you normally end up with a hierarchy of authority, where most people have to have their work vetted by seniors. In this process, peopl…
Strict hierarchies suck because if you're a leaf in the hierarchy, it's very difficult to collaborate or work with other leafs that are not in your same sub-branch. A flat fully connected hierarchy is better for small groups, but it doesn't scale well as the number of lines of communications is proportional to the square of the number of people.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#284Earlier quoted context omitted.
Holy shit. Be sure to read the issue. It turns out it's not really a joke - someone in the know points out that Terraria's code is basically the same quality, if not worse...
You used to be able to decompile Terraria into perfectly readable code, since its c# and they didnt use an obfuscator. The code base was atrocious, but it is impressive that they got something working, and pretty fun, together as quickly as they did. These days there are a fair amount of production Unity games out that you can extract full sources for.. Can make for a fun read sometimes.
The concept of GameObjects, Components and MonoBehaviours and best practices for how they should be composed isn't exactly obvious. Eg when adding two components of the same type to a GameObject it's hard to know which one of them is which (eg two colliders: one for triggers and one for physics) so instead you add two sub-Gameobjects each with that component attached and use gameobject.GetParent() to modify the parent. Is that best practice or not, i don't know, i just did it and it works but it certainly feels strange.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#285Earlier quoted context omitted.
> On their own, % and / are way slower than +, -, *, >. And the branch instruction is free??
More or less, assuming you can predict it. But there's a penalty for misprediction. So it boils down to whether using % frequently (either as a native instruction or as a sequence of instructions) is more or less expensive than predicting a branch frequently, given a certain misprediction rate.
Yeah, no, that's not free.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#286Earlier quoted context omitted.
More or less, assuming you can predict it. But there's a penalty for misprediction. So it boils down to whether using % frequently (either as a native instruction or as a sequence of instructions) is more or less expensive than predicting a branch frequently, given a certain misprediction rate.
> More or less, assuming you can predict it. But there's a penalty for misprediction. Yeah, no, that's not free.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#287Earlier quoted context omitted.
Strict hierarchies suck because if you're a leaf in the hierarchy, it's very difficult to collaborate or work with other leafs that are not in your same sub-branch. A flat fully connected hierarchy is better for small groups, but it doesn't scale well as the number of lines of communications is proportional to the square of the number of people.
no it's not, broadcasting is linear, alas its not strictly parallel.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#288Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#289Earlier quoted context omitted.
no it's not, broadcasting is linear, alas its not strictly parallel.
Each person can broadcast at any time. So at any time, it's possible to have N^2 messages being sent around the company.
Quite literally, I think, it could be modeled as a vector space in linear algebra. Each signal is in frequency space, which can be found from the fourier transform integrating the temporal space over different bandwidth channels per sender. You get N² only if the message size is proportional to N, if you will.
a Fourier transform of channel