Archive for October, 2008
Try Looking at Your Own Legacy Code
2008-10-06 22:32:17
Just had a reason to open up my code archives. Not a big deal, just checkout the older stuff from the Subversion archives and add some new Eclipse projects.
Lions, tigers and bears oh my. What the heck are all those warnings!?
LOL one of the things I started doing a few years back was to start worrying about TDD and code complexity. Somewhere in the last couple of years I added the metrics plugin for Eclipse (http://eclipse-metrics.sourceforge.net/). Which is very nice since it supports complexity checking using a number of different metrics:
Sometimes you really should let the past remain the past. I had such fond memories of all these cool and wonderful applications and utilities I wrote years ago at the beginnings of Java. Yet here I was looking at them using the latest Eclipse with all the TDD and metrics warning thumbscrews in place (to keep me honestly doing what I preach) having to view my own legacy code.
This will make far me less critical of other legacy code I have to clean up from now on. Yes, my legacy applications still compiled, they still worked. But code coverage is zero, cyclomatic complexity is up in the 50s for most of my methods (in the hundreds for the control points) and oh my do I really have methods over 200 lines long! This is a very humbling experience.
If you'll excuse me I need to sweep the dirt off the floor, dust the corners and polish the brass in my own legacy code.
Lions, tigers and bears oh my. What the heck are all those warnings!?
LOL one of the things I started doing a few years back was to start worrying about TDD and code complexity. Somewhere in the last couple of years I added the metrics plugin for Eclipse (http://eclipse-metrics.sourceforge.net/). Which is very nice since it supports complexity checking using a number of different metrics:
- McCabe's Cyclomatic Complexity
- Efferent Couplings
- Lack of Cohesion in Methods
- Lines Of Code in Method
- Number Of Fields
- Number Of Levels
- Number Of Locals In Scope
- Number Of Parameters
- Number Of Statements
- Weighted Methods Per Class
Sometimes you really should let the past remain the past. I had such fond memories of all these cool and wonderful applications and utilities I wrote years ago at the beginnings of Java. Yet here I was looking at them using the latest Eclipse with all the TDD and metrics warning thumbscrews in place (to keep me honestly doing what I preach) having to view my own legacy code.
This will make far me less critical of other legacy code I have to clean up from now on. Yes, my legacy applications still compiled, they still worked. But code coverage is zero, cyclomatic complexity is up in the 50s for most of my methods (in the hundreds for the control points) and oh my do I really have methods over 200 lines long! This is a very humbling experience.
If you'll excuse me I need to sweep the dirt off the floor, dust the corners and polish the brass in my own legacy code.
Posted by Leeland
0 CommentsRegister to Vote, or look up your buddies
2008-10-03 16:09:14
This might be a public service announcement. After all it is a heated U.S. presidential election and you really should participate. With elections coming up it is a good idea to double check your voter registration.
But, funny thing happened on the way to the Washington State Voter Registration page. I discovered all I need to see if anyone I know is registered to vote AND what elections they have actually voted in is their first name, last name and birth date. Check, check and oh oh a few of my friends haven't bothered to vote in a long time. Funny how hard they argued over the last election. Even funnier is one was so adamant about getting out and voting.
Yes, yes, I know that voter registrations are public records. I also know anyone can request a complete list of registered voters from each state. Some states even have monthly subscriptions that you can get on CDs.
As one of my coworkers so aptly put it "it would be even more disturbing if you could also see who they voted for in each of those elections."
If you are legally able to vote. Please register to vote, pay attention, read those voter pamphlets, ask lots of questions, write your congress critters about anything that you find hopeful or disturbing and VOTE.
But, funny thing happened on the way to the Washington State Voter Registration page. I discovered all I need to see if anyone I know is registered to vote AND what elections they have actually voted in is their first name, last name and birth date. Check, check and oh oh a few of my friends haven't bothered to vote in a long time. Funny how hard they argued over the last election. Even funnier is one was so adamant about getting out and voting.
Yes, yes, I know that voter registrations are public records. I also know anyone can request a complete list of registered voters from each state. Some states even have monthly subscriptions that you can get on CDs.
As one of my coworkers so aptly put it "it would be even more disturbing if you could also see who they voted for in each of those elections."
If you are legally able to vote. Please register to vote, pay attention, read those voter pamphlets, ask lots of questions, write your congress critters about anything that you find hopeful or disturbing and VOTE.
Posted by Leeland
0 CommentsPage 1
Archive
- July, 2010 1 posts.
- June, 2009 1 posts.
- May, 2009 1 posts.
- January, 2009 1 posts.
- December, 2008 1 posts.
- October, 2008 2 posts.
- August, 2008 5 posts.
- July, 2008 3 posts.
- June, 2008 9 posts.
- May, 2008 1 posts.
- November, 2007 1 posts.
- October, 2005 1 posts.

