| Name | Leeland |
|---|---|
| Email Address | Reveal this emailaddress |
| Website URL | http://www.nodsw.com/wiki/show/User/Leeland/ |
| Avatar | ![]() |
| Posts | 75 |
-
- 2009-06-22 12:00:37
- Recovering Lost Data From Page Firefox Cache
- Board >> Side Notes
- Big company, large IT department, huge wiki server used by all. Do they have a recent backup? If you count 6 months old as recent then sure. Of course for a project started since the last back up that put 100% of the documentation into the corporate wiki when the server breaks and they have to go back to the back-ups this sucks.
Now of course being a tech-head I have ultra paranoid cleanup settings on my cache, browse history and other things. But, managers and office types often don't care nearly as much.
Enter the very cool Firefox feature about:cache now that is a handy little magic URL. And thankfully some people just don't bother with making sure their cache is cleaned out on exit.
-
- 2009-05-19 16:02:49
- Long Pause
- Board >> Side Notes
- Wow, cannot believe so much time has passed. So what happened? Why a child of course. My son hit a coming to awareness level where he wasn't just a feed -> sleep -> poop machine but started talking, playing and of course the running.
This of course is the point where most parents disappear from everyone's lives for a year or two.
Now my desk is buried in piles of papers, my books have a nice layer of dust, and the house needs a year's worth of maintenance. Oh and I am trying to remember where I left off with this place. I see nothing has changed.
-
- 2009-01-27 09:59:05
- Copyright and the Internet
- Board >> Side Notes
- This is a compilation of a 4-part series of articles on the status of digital rights management from the Digital Rights Management Watch site (which has transitioned into a new format now and can be found at http://copyrightandtechnology.com/. I think it’s a very good overview on some recent technical, commercial and legal shifts in the digital content domain, so worth a read.
-
- 2008-12-29 09:22:37
- Pulling Myself Up By My Boot Straps
- Board >> Side Notes
- What a funny story. (warning spoiler ahead) I mucked it up but good.
Ever totally destroy your boot record on an XP box? How about blowing up both your MBR and GRUB on a dual boot system. Where here I sit. Although I have a current and complete backup of all my data, it has been some time since I took an image of the disk with the software installed just as I like it. Lets face it, the box was turned to happiness, everything was installed and cleaned up and it was a perfect time to take a backup image of the laptop that could. In fact I was thinking about doing that over the holiday break.
Instead I looked at the box and got to wondering why I only had 1GB of disk space left on the laptop I explicitly bought cause it had a much larger disk then the other version of the same that had a docking station potential. That is when I discovered that I had started a dual boot experiment with the thing just before i left my previous job (which was in process of moving to an all SUSE desktop and server style).
So what happened? Well it went like this: Hmm... haven't booted to suse in over 2 years. still boots, hmm... what was the passwords... hmm.... hey nothing here at all... don't need this 2 year old SUSE partition at all ... boot back to Windows XP, open up the disk manager, delete the SUSE partition, reallocate it as a windows partition, format it, fix the driver letter assignments. Cool! Now I have a nice 80GB of "data" space / backup storage. Lets organize a bit. Move this over here, move that over there, rearrange this stuff. Wow this is nice. Whoops its 1 AM time for bed. Shutdown. ... next day ... boot ... What do you mean you don't have a bootable device? Crap ... grub was on the second partition? OK fine no problem C: was bootable before I went dual boot. So where did I stuff that XP install DVD? Ah yes Windows XP Install Disk, boot to CD, wait for it, repair console, login to C:, run fixmbr on C:, done. Solid! That should fix it. ... reboot ... What do you mean you don't have a bootable device? Crap ... Lets see, XP Install Disk, boot to CD, repair console, login to C:, run fixboot on C:, done. Solid! That should fix it. ... reboot ... what do you mean you don't have a bootable device? Crap!! Hmm... I have Partition Magic somewhere and I think it can do something about this ... ah heck, where did I put it? ... More to come.
-
- 2008-10-06 22:32:17
- Try Looking at Your Own Legacy Code
- Board >> Side Notes
- 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:
- 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. - McCabe's Cyclomatic Complexity
-
- 2008-10-06 11:59:52
- Where should exceptions go?
- Board >> Conference Center >> Technical Tidbits
- Lets talk about exceptions for a moment. At the office a discussion came up that essentially was about if we should group our exception objects together into a single module/subsystem wide package or have them called out in the packages next to the code they were used by.
Personally I think packages specific to exceptions are bad ideas because it detaches them from the business objects they are supposed to be supporting. An exception should represent the possible result of a direct action on a domain object. I think they should be subsystem/object specific.
Lets play with a simple banking example where you have accounts, credit activity, debit activity, etc. So we have Account objects, Credit objects, and some others (you get the idea).
Now some common terminology:- Invalid - provided value is not valid;
- Illegal - provided value is valid, but used out of context; and
- Duplicate - provided value is already used by another entity in the system.
Now we can ask some simple questions that will drive the design of the exceptions:
Account objects:
What could go wrong when defining account types?- com.ourbank.account.types.DuplicateAccountTypeException
- com.ourbank.account.types.AccountTypeDataValidationException
What could go wrong when creating an account?- com.ourbank.account.DuplicateAccountIdException
- com.ourbank.account.DuplicateConsumerIdException
- com.ourbank.account.InvalidAccountTypeException
- com.ourbank.account.InvalidAccountStateException
- com.ourbank.account.IllegalAccountStateException
- com.ourbank.account.AccountDataValidationException
What could go wrong when updating an account? (notice some of these are duplicated from above - but that's ok)- com.ourbank.account.InvalidAccountException
- com.ourbank.account.IllegalAccountStateException
- com.ourbank.account.AccountDataValidationException
What could go wrong when creating credits? Most problems with creating credits are actually problems with accounts.- com.ourbank.account.InvalidAccountException
- com.ourbank.account.IllegalAccountStateException
- com.ourbank.account.InvalidAccountTypeException
- com.ourbank.ledger.IllegalCreditAmountException
What could go wrong with consuming credits (debits)?- com.ourbank.account.IllegalAccountStateException
- com.ourbank.ledger.AvaliableBalanceExceededException
- com.ourbank.ledger.AvailableBalanceReservedException
- com.ourbank.ledger.IllegalDebitAmountException
Are there commonalities to the 'types' of exceptions we use? For now, looking at a high-level, we're allowing both regular and unchecked exceptions:- com.ourbank.AbstractPaymentsException
- com.ourbank.AbstractUncheckedPaymentsException
By now I hope you are seeing the patterns...
This now makes it easier to determine if an exception is really applicable on a specific object and even may cause you to second-guess your design (which is always a good thing). When you put them all together in a single package then you start looking at them as engineering artifacts and not as domain artifacts. This leads to more cross-dependencies and possible "spaghetti" outcomes.
Whether you put them in a "model" package really doesn't matter but they really are part of the domain and follow the same support requirements so they should be treated the same as any other domain object. - Invalid - provided value is not valid;
-
- 2008-10-03 16:09:14
- Register to Vote, or look up your buddies
- Board >> Side Notes
- 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.
-
- 2008-09-23 15:41:45
- Talk Like A Pirate Day!
- Board >> Conference Center >> A Little Humor
- It be Talk Like A Pirate Day! Shake yer leg and look smartly then! http://www.talklikeapirate.com/howto.html
According to http://www.piratequiz.com/ my pirate name is: Mad William Cash. It described me as: "Every pirate is a little bit crazy. You, though, are more than just a little bit. You're musical, and you've got a certain style if not flair. You'll do just fine. Arr!"
Tad late me maties for Sept 19th talk like a pirate day. But Ahoy! I twas on vacation sailin' t' Bahamas, checkin' t' waters for me mates!
Arr!
-
- 2008-09-12 08:54:46
- Gordon Freeman (and Cigarette Smoking Man) Spotted in CERN Tessst Chamber
- Board >> Conference Center >> A Little Humor
-
- 2008-09-08 12:06:08
- An intellectual rap song
- Board >> Conference Center >> A Little Humor
- Who'd have thought that rap could be educational?
This is great!
http://www.youtube.com/watch?v=j50ZssEojtM


