196 points · by amartinsn · 10y ago · 84 comments
At best, it's "reverse engineer it, tell me what it does, and then I'll tell you what feature I'd like changed."
We're often not experts in the domain we're working on, but by asking questions about a user's workflow on a more holistic level, we probably have more insight into what workflow would be the most productive from a systems standpoint.
Of course, this is a back-and-forth. Sometimes users aren't sure of what they want. And sometimes we're not sure of what is the "best" system for what the users want.
Instead of asking the user where the button should be, ask them when they press the button.
It's no panacea, but it helps because it tries to prevent the business people dictating tech specifics, which the developers take too literally.
For example, a business person says "when I press the submit button the results must be stored in MySQL". What they really mean is that whatever they entered into a form must be accessible later, but the developers now believe they must use MySQL and have submit buttons.
By focusing on the "When I complete the form with data x, when I look at the form again later, then I see data x" you've moved the conversation to the business requirements and away from the perceived technical requirements.
> For example, a business person says "when I press the submit button the results must be stored in MySQL". What they really mean is that whatever they entered into a form must be accessible later, but the developers now believe they must use MySQL and have submit buttons.
So in other words business people are plain old lying about the requirements.
is a particularly awesome idea for specifying behavior. really want to try it out for a project sometime: the idea is to write the spec in these domain-specific "gherkin" files.
i find it comparatively difficult to get get buy-in on collaborating on anything machine-readable, however, unless it's from people who are comfortable with general-purpose programming languages, anyway.
nonetheless, in an industry where it's fairly standard for designers to build in domain-specific languages, i don't think it's an unreasonable skill for product managers to consider acquiring.
any user experience stories from cucumber, etc. on rewrites or otherwise?
(not hating on modern PHP, just its reputation and 'outsourceability')
In general they are completely unable to describe the job and problems they solve for the company, only how they use the software day to day, with out significant coaching and reframing.
This does out some burden on documenting what you did after the fact, but it beats the method of locking yourself into something that's wrong to begin with.
The developers who can get enough domain knowledge to intuitively understand what's needed add enormous value. They can credibly suggest better ways to operate. I refer to it as the second 10X in productivity gains.
Or your "product owner" doesn't really know the product and happens to be in a minimal-overlap timezone, and walking to the other side of the local office to ask Real-Users for feedback eventually generates a subtle reprimand about going through proper channels...
Yeah, not planning to stick around.
One of the red flags I started to notice was where the client liaison had only been working there for a couple of weeks or months.
What I think I was getting at then, and certainly believe now, is that some people grow with the code, learn from many of their mistakes, and do the long quiet job of expunging their worst errors as they go. Their code is the best proof that they could accomplish a rewrite, because it already is a rewrite. They just didn't need to stop the world to do it, or at least not all at once. Perhaps a month here and a couple weeks there.
For the rest of the time it has been like the Ship of Theseus. All of the parts are new, and yet it is the same ship.
Meanwhile the rewrite guys are continuing with their mess and hoping they get a do-over, putting off things hoping for Some Day. And on that magical day, all of the bad habits of the entire team (management included) will correct themselves overnight.
Bad habits are too hard to break. The best of us know that you don't abstain from bad habits, you crowd them out with new, better ones. But that takes time, practice and determination.
If you want to condense it down to nothing new under the sun, that's fair, and I would offer that I wanted to believe the rewrite folks were onto something, but at the end of the day, breaking down the problems and using relentless refactoring seems to be the only thing that works, without changing the definition of success to achieve victory.
And then to top it off; if you did rewrite the system you not only need to reverse engineer N years of code, but also N years of bug fixes and random miscellaneous snippets that made it into the system and that no one who still works at the company understands the purpose of any longer.
There's some truth to this I think. Big bang rewrites are best avoided where possible and there's plenty of ways you can incrementalize refactoring that don't occur to most people.
Since their main requirement was having a REST API for new clients, and apparently the old implementation worked fine, they could have implemented a EJB -> HTTP layer on top, and have new features talk straight to the DB. Eventually, they replicate all the features talking straight to the DB (w/ the added benefit they can test against the codepath going thru the old system). Finally, death by phagocytosis.
It sounded like an HTTP wrapper is all they actually needed. Or in fact any well specified wire protocol with lots of implementations. It could have been protocol buffers over raw sockets also.
A great pattern is to enforce consistency in your database. Rather than e.g. adhoc code in an ORM.
And this is my diary work.
PD: I have a friend that lives on a worse situation, where they have an application based on Java 1.5 applets, with bad or not existent documentation, and nobody knows how works internally.
>The strangler pattern is a software architecture pattern where a legacy system or feature is strangled with new code.
>Make something new that obsoletes a small percentage of something old. Put them live together. Rinse and repeat.
Strangler Applications http://paulhammant.com/2013/07/14/legacy-application-strangu...
BTW, every time I read Martin Fowler quoted in a post as full rewrite justification for the "faith jump", I get scared.
I don't know why the poster didn't implemented the new API, using it for the new features, and eventually, rewrite old API commands (one by one, not all at once) calling the new API, so in the end, new API would remain, and old API would be just some wrapped calls to the new API.
And if he's selling an idea you've already abandoned, he can leave you flat for sure. His strength is in introductions, not reconciliations,
i mean, i'm not the biggest Java fan, but it's alright, and there are some pretty good RESTful frameworks
https://www.playframework.com/
while the strangler application (always a fowler link, always, in these types of articles) makes a ton of sense for making sanity out of incoming requests, i wonder if some effort could have been &/or was saved behind the transport layer by reusing (possibly with refactor) the existing Java implementation?
whether doing so would make sense would be really situation dependent, of course, and an "outside" perspective from a quick article isn't going to have enough information to say anything conclusive. the (lazy) feel is that reuse is better than duplication of effort.
------------
aaaaanyway, super-good article. this is of of the kinds of things that's important to think about as a workaday web dev.
How would that work without also migrating the database and while keeping the databases of the old and new implementations in perfect sync?
Anyway sounds like their approach was quite reasonable, just a bad title for the blog entry.
If someone yell, be sure to put your own contact proeminently everywhere. So that your management do not know. And just roll it back
The simplest reason may be attachment to the feature--the feature is of no use but the person who's invented it is scared by the possibility of removing it.