#politics #computers #business 2023q4 2023q3 2023q2 2023q1 2022q4 2022q3 2022q1 2021q1 2020q3 2020q1 2019q4 2019q3 2019q2 2019q1 2018q3 2018q2
==> Kraken Technologies writes about how they organise their very large Python monolith.
I’m a big fan of layered (or even linear) dependency structures, too. Here is a simple trick I use in my Lua codebases: The layout of my source code files usually looks like this:
01_foo/
03_foo.lua
04_bar.lua
15_whatever.lua
02_bar/
22_whatever.lua
56_something.lua
It has always bothered me that codebases don’t have a beginning and an end and that, therefore, it’s difficult for a reader to know where to start when they just want to read the codebase.
So, my approach is to impose this linear order and only allow code that comes later to depend on code that comes earlier, never the other way around. This way, you can read through the code rather easily. As you look at any piece of code, it will only depend on code you’ve already looked at, so you don’t have to constantly jump through the codebase as you read.
I’ve also found that failure to correspond to a linearisable dependency structure is a “code smell” and that, as I try to eradicate that code smell, I frequently end up with code that’s better in all kinds of ways.
#computers | Jul-19 2023
#politics #computers #business 2023q4 2023q3 2023q2 2023q1 2022q4 2022q3 2022q1 2021q1 2020q3 2020q1 2019q4 2019q3 2019q2 2019q1 2018q3 2018q2