3 ms·
I sometimes see legacy systems as old cities: - The classic old town (the older parts of the system that tend to use older coding practices and technologies, b
by lliamander 9y ago
I sometimes see legacy systems as old cities:
- The classic old town (the older parts of the system that tend to use older coding practices and technologies, but have most of the bugs stamped out and more or less "just work")
- The slums (the parts that tend to be bug prone, but are impossible to fix. I.e. no one wants to touch that code)
- The apartments/row houses (parts of the code that involve lots of the same types of objects/classes/modules that follow a similar pattern)
- The art district (the place where someone tried some odd/experimental libraries or code patterns)
- The residential district with windy roads and lots of courts and loops (places in the code where there are lots of objects calling each other with really deep stack traces; easy to get confused where you are when debugging)
Legacy systems are bound to have inconsistencies, but as you become more familiar with a system you begin to notice localized instances of consistency. These localized instances of consistency become the "districts" in our mental map of the system.
To my mind, if you're working on mostly new code (within a large existing system) unless it is already a highly consistent code base I would just use whatever conventions make the most sense to the developers working on it.
- dredmorbius 9y agoI really, really like this. I've long seen microprocessors and/or circuit boards as graphically (and functionally) similar to cities.
- titanomachy 9y agoI love this. I think I might add some tour-guide comments to our codebase.
- caf 9y ago"You probably shouldn't leave any private methods parked near here."
- Groxx 9y ago"private methods are routinely broken into and used for nefarious purposes" that'd describe quite a lot of code I've seen.
- caf 9y ago"Over there is our haunted module - it's been empty for years, and the callbacks aren't even wired up anymore, but people swear they've seen breakpoints triggering in the upstairs windows during late night solo debugging sessions"
- lainga 9y agoAh, I see: Le Corbusier just wanted to rewrite it in Rust.
- cwilkes 9y agoLast year’s failed rewrite attempt that caused half the team to quit can be that part of town swallowed by a sink hole.
- rdsubhas 9y agoAnd then there is the highly guarded government/beaurocratic district (deployment scripts, workflows, jobs, configs which are as much part of the system as the code)