18 years, 4 months ago
[ Software Development ]
The religious argument of exceptions versus return codes comes up more often than I honestly thought it would. Maybe I’ve been isolated in my exception based cave all this time?
I’ve travelled a path that started out return code based by virtue of being in the early Microsoft web days. I then came out of the return code forest onto the exception path. I personally prefer the exception path, unfortunately it seems that people in the return code forest like to climb the trees and chuck rotten apples at us clean living exception path people trying to mind our own business.
My personal take? This is one of the few topics I don’t see eye to eye with Joel on. Apparently I’m not alone on this.
I also agree with Raymond that exception based code is more difficult to write well. So is raising three children instead of one but that doesn’t mean it’s to be avoided.
Is it simpler to write return based code? Yes. Does it sometimes require more design, more thought to write good exception based code? Yes. Does that convince me to revert to return based code? No. Is this writing style of asking myself questions lame? Clearly.
The whole ‘using exceptions for business processing’ argument always comes up as part of this. My rule, which is relatively standard, is the 70/30 rule. Exceptions should be returned from a method no more than 30% of the calls to it. More than 30% means it is no longer considered an exceptional situation and the code should be tagged for refactoring.
It’s actually kinda simple, only throw exceptions in exceptional situations, it’s built right into the name. Sometimes you won’t know what that is until you get an application into production which is where the 70/30 rule comes in. Do your best, profile, refactor as needed.
If you follow the 70/30 rule then it means that the whole performance bogey man doesn’t exist. The point of exception based code is that everyday typical processing doesn’t encounter the overhead of throwing exceptions and therefore doesn’t suffer from any performance hit. If you’re throwing exceptions from a method for 50% of the calls to it those cases can’t really be considered exceptional cases can they? Ie, you’ve written poor exception based code. That’s fine, fix it, don’t give up on the entire concept.
1 Comment »
18 years, 4 months ago
[ Office Gossip ]
I was talking to a younger colleague recently and he mentioned the Feeling Business post. He’s a recent graduate working at his first job, getting married this summer, just bought their first house. He mentioned that he didn’t think he could handle the part where you don’t get paid until the client pays. He doesn’t have that type of ‘wiggle room’ in his budget.
It’s always interesting to hear first hand what people take away from the things you write. He rightfully noticed fear as I was focusing on that, possibly too much. The real history, however, is that our client’s have a basically perfect track record when it comes to paying. We have some late payments, usually nothing more than thirty days, but that’s expected. Ultimately our client’s have a stellar track record when it comes to compensating us for what we do for them.
I have a house, student loans, more debt than I care to think about, and two young children. I think I have a decent argument for having little to no wiggle room. If I don’t get paid there’s at least four people directly impacted.
Bottom line, working in a model like ours provides the opportunity to get an on the job MBA. It may hurt some days but it’s better than paying gazillions to sit in a room and talk about running businesses, in my opinion.
No Comments »
18 years, 4 months ago
[ Geek ]
While I’m not running around to get it setup, this is a great idea. It’s a simple concept and leverages the fact that when we’re on our own networks at home, we rarely require it’s full resources. When we’re out in the world, generally we can see someone’s network and they’ve probably got bandwidth available. So why not share your network with people willing to share theirs?
1 Comment »
18 years, 5 months ago
[ General ]
I’m often accused of being a skeptic or a pessimist when it comes to technology. I like to clarify by saying that I’m technology agnostic. I don’t care if it’s google, microsoft, microogle, or goosoft. It’s technology, which I rarely have an emotional connection to. I like to think I subscribe to the following:
“Most claims of originality are testimony to ignorance and most claims of magic are testimony to hubris”
It does, of course, conflict slightly with the Gregory Benford quote Rob has at the top of his site. Curious to chat with him about it.
1 Comment »
18 years, 5 months ago
[ General ]
I’ve been a part of my fair share of painful interpersonal issues within teams. It’s easy to view those situations as failures, hoping to avoid them in the future. A lot of times my advice is the opposite, embrace it. Seek out healthy conflict instead of unhealthy consensus.
I know a lot and one thing I know is that I don’t know everything. I’ve always attempted to surround myself with people who know they don’t know everything, who are genuinely curious. Jeffrey Pfeffer, in his recent book, takes this as far as suggesting that leaders avoid at all costs people who think they know everything. Ultimately, the issue is that people who think they know everything won’t be aware of any facts that conflict with their view of the world. They inevitibly end up in a lonely artificial dark cave.
“When two people always agree, one of them is unnecessary”
No Comments »
18 years, 5 months ago
[ Geek ]
Intellisense for your MSSQL Query Analyzer, brought to you by red-gate. And you thought I didn’t like intellisense….
No Comments »
18 years, 5 months ago
[ Geek ]
I’m not much for reviewing or recommending web applications. There are loads of sites out there for that. I don’t mind, however, mentioning apps that I’ve used for a while and continue to use regularly. Specifically, two I use every week come to mind.
I’ve recently been dabbling with a return to the gym after over a decade hiatus. I can’t stand gyms but I was able to find the closest thing to a non-gym you’ll ever find in a gym. I get bored almost instantly in a gym so I need variety but can’t justify spending cash on a personal trainer.
Enter
HyperStrike. Once you’re setup in hyperstrike, you can jump in and print out your workout for the day and you’re done. It’s a low cost, free at this point, alternative to a personal trainer. I never have to think about what I’m going to do in the gym and it’s different everytime. The other major feature is that they’ve used motion video capture to make little movies of every exercise. It’s the fastest way I’ve seen to learn a new exercise properly besides a personal trainer. Books are fine but unless their flip books, this is much better.
The other app is a correspondence game app called Its Your Turn. I’ve technically been a member there since 2002, however, I only recently returned to active use. It’s a simple concept. Start a game with someone. Make your move, then go back to whatever you were doing. You’ll get an email when it’s your turn to move.
This is one of the few web apps that’s been around since pre bubble, is still going, and has hardly changed over those years. It’s a simple, ugly site that works. The haven’t messed anything up by implementing ajax, johnnie 2.0, tagging, or any other flavour of the week. I was using their free service all these years up until about a month ago when I signed up for their paid account. I admire any web app that has the patience to wait over 4 years to land my sale.
1 Comment »
18 years, 5 months ago
[ Software Development ]
I recently made a few somewhat uninformed statements regarding Ruby On Rails. As always, Joel has a take on it. Had I read this before I could have just said “what that guy said”.
“Ruby is a beautiful language and I’m sure you can have a lot of fun developing apps it in, and in fact if you want to do something non-mission-critical, I’m sure you’ll have a lot of fun, but for Serious Business Stuff you really must recognize that there just isn’t a lot of experience in the world building big mission critical web systems in Ruby on Rails, and I’m really not sure that you won’t hit scaling problems, or problems interfacing with some old legacy thingamabob, or problems finding programmers who can understand the code, or whatnot. So while Ruby on Rails is the fun answer and yes I’ve heard of 37 Signals and they’re making lovely Ruby on Rails apps, and making lots of money, but that’s not a safe choice for at least another year or six. I for one am scared of Ruby because (1) it displays a stunning antipathy towards Unicode and (2) it’s known to be slow, so if you become The Next MySpace, you’ll be buying 5 times as many boxes as the .NET guy down the hall. Those things might eventually get fixed but for now, you can risk Ruby on your two-person dormroom startup or your senior project, not for enterprisy stuff where Someone is Going to Get Fired.”
No Comments »
18 years, 5 months ago
[ Geek ]
Um, I’m not sure what to say….Depending on your view of vi, this is either the most usable or unusable search engine on the net.
“Using the commands of vi to search the web.
Edit your search results like a vi document.”
No Comments »
18 years, 5 months ago
[ Software Development ]
Speaking of processes, there’s also a Capability Im-maturity Model. The levels:
0: Negligent
-1: Obstructive
-2: Contemptuous
-3: Undermining
Hmmm…..CMM, CIMM, can you tell them apart?
No Comments »