3 ms·
Here's a anecdote of how a typical webapp goes to shit with the best intentions from everyone. "building it right from the start" sounds great. I've never work
by gnarbarian 11y ago
Here's a anecdote of how a typical webapp goes to shit with the best intentions from everyone.
"building it right from the start" sounds great. I've never worked on a project where people did not honestly try to do it this way. Lets say that for once you have a clear set of unambiguous requirements (a rarity) when starting in. I like to start with the database first. I'll design a nice normalized database and start building the website from there. If the requirements are fleshed out enough you'll already have a map of what pages ought to do what.
Once you get to the point where you can have a customer try out a few pages you get some "feedback" which is actually a change in the requirements. You can't hit them with a change request for every little thing at first so you comply. Maybe it's just a small change turning a one to many into a many to many relation for example, or moving a few fields from one table to another. Soon you have 30 or so similar "small tweaks" even if you hit them with a change request every time, they don't all come in at once giving you a good opportunity to re-evaluate the schema/application as a whole, it's always viewed as a singular "small" change so re-factoring the whole thing isn't really an option. The more changes that come through the more your elegant implementation becomes a series of hacks.
Soon they may start complaining asking why their "small" changes are taking so long to fix. This adds further budget pressure.
The problem is, it's not very clear to people down in the weeds when implementing the small changes if it's a hack or not. I think this is something that takes experience. So even when you have cleanup be a blocking requirement, taken one at a time it might seem fine and no large refactor is obvious until it becomes too large of a task to lump in a typical change request.
This is an especially easy trap to fall into for people who have been toiling away at the current design. They will have a blind spot/affinity for keeping as much of their implementation as possible and resist an overhaul.
If you have an iron will and a steely ice cold 1000 yard stare from 10 years of war in enterprise app development it's easier for us to kill code because we don't get attached to it as easily.
Be careful not to fall into the dark side though, (the flip side of those 10 years can instil a cold iron heart who stares right through the hacks and stops trying to argue with the client about doing things properly. In this scenario you just do as you are told and stop caring about the overall state of well-being of the codebase.)
The real art to web dev consulting is being able to build a flexible enough design to withstand these sorts of changes and still remain elegant and well thought out. It also takes the experience to know the difference between a hack and a proper change and the will power to do the right thing. It's really hard to do and it a good "gut" feeling for how a particular thing will actually be used, what a customer really means when they say something etc. I'm not sure that it's something that can be taught. It leads right back to your brain dump wish.
Cheers
- i336_ 11y ago> The real art to web dev consulting is being able to build a flexible enough design to withstand these sorts of changes and still remain elegant and well thought out. This is where it gets tough. I happen to have http://www.colorforth.com/POL.htm http://www.colorforth.com/POL.htm [1] open, a portion of which illustrates the other side of this fence (emphasis mine): > Do not put code in your program that * might * be used. Do not leave hooks on which you can hang extensions. The things you might want to do are infinite; that means that each one has 0 probability of realization. If you need an extension later, you can code it later - and probably do a better job than if you did it now. And if someone else adds the extension, will they notice the hooks you left? Will you document that aspect of your program? Obviously all of this must be taken in moderation, of course. But it hints at the problem I'm trying to describe: the design needs to be flexible, but scoped to the problem space you're working within. Bamboo is flexible, and usefully so; try and generalize that flexibility to the fullest extent and you'll end up with goo which will expand to fill the problem space entirely and then subsequently accomplish nothing. So, it's about figuring out where flexibility will be most critical (eg, for a part of the architecture that will necessarily be "locked in" with a lot of other components or mental models depending on it) and where you should be able to get away with rigidity, either because it'll be easy to redesign (few dependencies / easy to conceptualize and subsequently retool) or because even Revision #31781 won't need you to change that bit. ...I think I just found myself at the brain-dump problem too. Haha I'm also curious... I've known about the "kill code" thing for a while. I haven't really gotten into coding especially seriously as yet (lots of analysis, but nil implementation), and it's hard to contemplate the idea of doing this, even for situations where I know I definitely need to, like iterating on properly implementing something I've never explored before. How does one acquire the "iron will" mindset you talked about? (I ask this as I've recently discovered my lack of get-up-and-go is due to a wonky/underpowered thyroid (giving me chronically low motivation); now that I know what's wrong I'm working on fixing it, but I suspect the anxiety that's developed over time will not go away without some mental effort as well. You could say I'm a bit of a worst-case scenario when it comes to juggling multi-domain mental task sequences generally speaking.) [1]: Search http://www.colorforth.com/blog.htm http://www.colorforth.com/blog.htm for "Problem-Oriented" to find the hyperlink to the mentioned URL. There are many interesting links to other places on this page, which I don't think are mentioned anywhere else on the site. (Translation: there's no sitemap, category system, or menu; you have to dig.)