Yes, of course we should. Now, what were we talking about again? Ah, that's right, a legacy application somewhere in the bowels of our enterprise. It's old, it's confusing, it's built from clay and straw and other such dated materials. It's just an embarrassment to have around and is difficult to support. So yes, of course we should re-write it.
Whoa, hold on there cowboy. I said we should re-write it, not you or I should re-write it. There's a lot involved in "we." Just directly porting that old ASP code to shiny new C# code isn't going to solve anything. The problem isn't that it's written in ASP. The problem is that it's written poorly in ASP. That difference is what's going to get you in the re-write. Just changing the language isn't going to solve anything, there's no value in it. The application needs to be re-written, not transliterated.
Consider an analogy. Let's say some random guitarist writes a song. And let's also say that song is terrible. The guitarist might not be so bad, and maybe there was some real inspiration behind the song and he really wanted to express it. But he failed. The song is just awful. The music and the lyrics don't come together to tell a story so much as they get in each other's way and prevent each other from telling their parts of the story. It's hard to follow, it doesn't get the message across. It's just a bad song.
Would that song sound any better on a piano? Probably not. Sure, a skilled pianist could add a little talent to the playing of the song. Each note would individually sound better, more alive and easier on the ears. But is that really your measure of what makes music "good"? That it's slightly less offensive to your ears? The song still doesn't convey its story. It's still difficult to follow and understand. It still, well, sucks. All you've done is expend a sizable amount of effort for the purpose of, what, exactly? You haven't fixed the code, you've transliterated it. You've created the C# version of engrish. Ya, that's going to be much easier to support.
The problem is in the design of the application. We don't know what it does, the business user doesn't know how it does it. But maybe if we work as a team, we can mutually educate one another a little bit and pool our expertise to actually come up with a solution to a business problem.
Having the developers take it upon themselves to just re-write applications is a very, very bad idea. Why? Because you're asking the person who knows the least about the requirements (doesn't know the story the song is trying to tell) to develop an application that meets those requirements, and the business user doesn't even know this is taking place. Nobody knows that the entire application needs to be regression-tested. Does the business user have time for something like that? They didn't ask for it. Does anybody else know how to test it or validate that anything in it works?
Yes, I agree that poorly-written legacy software which is difficult to support should be re-written. Absolutely. But not secretly. We need a product owner. We need collaboration. We need to come together to define the correct solution to the business need at hand. Otherwise we're just turning one difficult-to-support application into another difficult-to-support application.
To put it another way... If somebody successfully polished a turd, would you now be willing to touch it?
Friday, July 30, 2010
Thursday, July 29, 2010
Code Dojo
Our first Code Dojo meeting is scheduled! The idea is simple enough, and has been done before, of course. Our version is just in its infancy and we're seeing if we can gain some traction here. But we're hoping to turn this into a regular meeting of developers where we come together and team-code a project into reality. We're doing this so that we can learn new things together by just sitting down and doing them.
The first meeting, which is Saturday August 7th at my house, will be mostly for the purpose of brainstorming. We have some basic ideas of how we'd like to start, and we've at least settled on an initial goal of developing something in Ruby for the sake of learning Ruby. That "something" is still open to much debate and will likely evolve over time. We don't want it to be too much at first, because we want to learn the basics. But at the same time we don't want it to just be (as Sean put it) "Rails 101" where we just follow some tutorial and be done with it, not learning much of anything. So we need to find a good balance.
If you're interested in the dojo, let us know!
The first meeting, which is Saturday August 7th at my house, will be mostly for the purpose of brainstorming. We have some basic ideas of how we'd like to start, and we've at least settled on an initial goal of developing something in Ruby for the sake of learning Ruby. That "something" is still open to much debate and will likely evolve over time. We don't want it to be too much at first, because we want to learn the basics. But at the same time we don't want it to just be (as Sean put it) "Rails 101" where we just follow some tutorial and be done with it, not learning much of anything. So we need to find a good balance.
If you're interested in the dojo, let us know!
Friday, July 16, 2010
Left versus Right
I have recently read and heard discussion of the two sides of the brain. The left side is more factual, concrete, and good are more of the engineering tasks. The right side is more bigger picture, capable of discovering odd patterns, and is better at creative tasks. To produce new valuable and applicable ideas you generally have to switch between the two back and forth. Digging up connections between bits of knowledge from the left and finding new connections to consider with the right. Verifying with the left and digging up more and the cycle continues.
Software development certainly combines both sides of the brain, but sometimes I read or see how people are trying to make software development into software engineering.
An example of what I'm getting at that is applicable to what's happening in our field currently is that all our knowledge of object-oriented software design and practice is not directly transferable to working in a functional oriented way. Also our knowledge of relational databases won't transfer over very well to document databases. I suppose being able to apply the knowledge of a particular technology is a more engineering task but knowing when and where to use a particular technology and how to combine it with others is probably a more creative task.
This is just partly my own theory I was just thinking about. You guys have any feedback or opinion on the subject?
Why (not How) Agile Works
Sean shared this with us over email this morning and I'd like to post it here for posterity. I'm part-way through the presentation right now and it's pretty good. I highly recommend that we share this with as many managers as possible.
http://universite-du-si.com/fr/conferences/6/sessions/909
http://universite-du-si.com/fr/conferences/6/sessions/909
Friday, July 9, 2010
Try And Catch Me
There was a fun question posted to StackOverflow today basically asking if the "finally" block in a try/catch will always execute. The responses varied from a definite "yes" to a definite "no" with lots of discussions and mutual corrections made by the crowd. So I thought it would be fun to enumerate here the things which can cause a "finally" block to not be executed in a .NET application. This may not be an exhaustive list, so please add/correct as you see fit...
It's just good to keep in mind that a "finally" block is not the end of the discussion when talking about reliable code.
- StackOverFlowException - The process has run out of necessary resources, it simply can't execute any more code. Even if the next line of code is to pass control to the "finally" block, it can't get there.
- OutOfMemoryException - See above.
- ExecutingEngineException - It's rare, I've never seen this one. Basically, the .NET runtime b0rked, the application can't continue.
- Environment.FailFast() - Kills the application with extreme prejudice, not allowing it to finish what it was doing.
- Process/Thread is killed by an external process/thread - The application isn't asked nicely to terminate, it's shot in the head by the OS. Note that a ThreadAbortException will attempt to execute a "finally" block before aborting. But there are more sinister ways to kill an enemy process.
- Infinite loop within the try block - The application will run indefinitely until #5 above happens.
- Power failure.
It's just good to keep in mind that a "finally" block is not the end of the discussion when talking about reliable code.
Subscribe to:
Posts (Atom)