5 ms·
>The quality of the average codebase written in 10 layer-abstraction-heavy This meme needs to die. I've seen "10 layer abstraction heavy" code base only once
by tester756 3y ago
>The quality of the average codebase written in 10 layer-abstraction-heavy
This meme needs to die. I've seen "10 layer abstraction heavy" code base only once
The code was simulating hardware/firmware behaviour when the real impl. was not available, and when the real impl. was delivered, then it was called instead.
So that was quite reasonable why they went with this like that.
Normal apps are mostly MVC-like where controller receives HTTP request (like 5 LoC?),
moves it to some handler which performs business logic / calls db and the returned stuff is either HTML or JSON.
That's your average web app.
- philosopher1234 3y agoThe ten layer abstraction continues to exist in Java land. I see it every day at work.
- trallnag 3y agoYou get a few layers for free by using Spring alone
- 38 3y ago> This meme needs to die. I've seen "10 layer abstraction heavy" code base only once I dont think so. I like Go code because its usually pretty "flat" unless you find someone from a Java or C# background. C# code is similar to Java in that nearly everyone writes it with an IDE, so you end up with nested folders like 8 levels deep. it makes reading the code stupidly hard, unless you download and load into an IDE or something like GitHub with essentially a web IDE. so anyone used to just a normal editor like Vim or similar is basically out of luck.
- tester756 3y agoWhile I agree that almost everyone uses IDEs when doing C# then I'm not sure about this folder thing. I've been shocked many times when seeing Java repos that they have like 5 empty folders nested just to have 3 java files. I don't see that in C# world. >it makes reading the code stupidly hard, unless you download and load into an IDE or something like GitHub with essentially a web IDE. so anyone used to just a normal editor like Vim or similar is basically out of luck. What does "normal editor" even mean? Shouldn't "normal" be dictated by market share? so VS Code, Notepad++ according to SO Survey 22
- jen20 3y ago> that they have like 5 empty folders nested just to have 3 java files. I don't see that in C# world. This is because Java ties the package path to the filesystem, and C# does not tie namespaces to file paths. Typically in C# codebases you'll see the layers implemented as separate DLL projects.
- JenrHywy 3y agoThat's not my experience, and I've been writing C# since .NET 1.1. Obviously though it depends on the scale of the app. If you have 1m+ LoC, you really need to have some sort of structure, regardless of the language.
- IceSentry 3y agoWell I guess you've just been very lucky. I've seen a codebase where half the features were implemented by inheriting the controller class and adding some behaviour and then that wqs wrapped in another layer adding more behavior. It had about 5-6 layers of that. I guess it's not 10 layers, but it was still extremely shitty code that was very not fun to deal with.