'Geek' Archive

Optimizations not a bug and a microsoft bias

April 20th, 2007

This also gets me thinking about the use of third party frameworks like NHibernate, Lucene, etc in general. I’ll just say it, my experience is that “Microsoft” developers are biased towards Microsoft products. Ok, now that I write that I feel like I just said black is the new black. I’ll try to explain and hope I find a point in here somewhere.

[When I say “MS” developer, all I’m referring to is a developer who works primarily on microsoft technology, that’s all. I’m referring to myself currently.]

I’ve found that when optimization issues arise with open source frameworks, like NHibernate, that “MS” developers start pointing fingers. “NHibernate’s broken”, “NHibernate is doing this”. I have yet to run into a case where these haven’t been programming issues on our side. Typically they’re optimization issues that just need to be solved.

Now, take the same scenario and stick in a MS framework like ADO. The same developers who were all over the open source framework will just start optimizing and solving. There’s no “ADO’s broken” or “ADO deleted our data” etc.

I like to say that I’m technology agnostic but clearly we all have our biases. I just think the open source guys generally get a bum-rap from the ms developers. Maybe it’s deserved? I have no idea but my experience tells me no. All frameworks should be held to the coals when it’s their domain.

Boolean Parameters

April 18th, 2007

I was about to write something about using boolean parameters in methods when designing a framework. Luckliy most of what I would say is here, in the post and the comments. As well, msdn kinda-sorta touches on it here.

In general, boolean parameters used in this fashion in a framework API are poor design and should be refactored.

Playing with Lucene .NET

April 18th, 2007

I’ve been doing some very rough testing of Lucene .NET and it’s an impressive framework. I’m able to index all text documents(153) on my drive in a little over 5 seconds. That’s indexing the entire contents of those text files!

Subsequent searches of the resulting index take about a tenth of a second. Technically, these aren’t valuable benchmarks as I’m just running in debug mode on a VMWare windows image with only 500 MB ram designated.

I’m still impressed.

Early Optimization

April 17th, 2007

A great quote of Donald Knuth‘s is “Early optimization is the root of much evil.” I’m with Donnie. Don’t solve problems you don’t yet have because in doing so you may create worse problems than the ones you didn’t have to start with. Wow, does that make any sense?

Property vs Method

April 11th, 2007

One of the handy features C# has is properties as a first level concept. In most cases it’s relatively straightforward to determine when to use a property and when to use a method. There are, however, some grey lines that will crop up and I’ve bumped into a bunch recently. Some related links:

Paul Graham says…Microsoft is Dead

April 9th, 2007

This has already done the rounds but if not, Paul Graham recently suggested that Microsoft is Dead. He didn’t mean dead like gone-dead and had to go so far as to explain himself.

A few highlights:

  • No one is even afraid of Microsoft anymore. They still make a lot of money—so does IBM, for that matter. But they’re not dangerous.
  • All the computer people use Macs or Linux now. Windows is for grandmas, like Macs used to be in the 90s. So not only does the desktop no longer matter, no one who cares about computers uses Microsoft’s anyway.

[NHL bot] I think we’re in a fight?

March 23rd, 2007

(04:29:40 PM) …brydon: where were you last night?
(04:29:41 PM) NHL: I live in a clean room at a high-tech hosting facility in California.

(04:26:28 PM) …brydon: I thought we were watching the game
(04:26:28 PM) NHL: Oh really? How did that make you feel?

A Cheap(Free) Backup Tool

March 21st, 2007

I handle my main backups the old fashioned way. I have a script I run periodically which creates a date based folder. I then zip up specific areas of files and move them over to that date based folder. I also make sure that only admin has rights to the backup area so I can’t damage it in course of daily work.

I keep this file in my home directory but create a symbolic link in /usr/bin so that I can run it anytime by issing:

sudo backup

Yes I also run a raid-1 array and keep almost all my files in svn but it doesn’t hurt to be cautious. It’s really simple and I’m sure interests no one but in case, here’s what it looks like. Oh, and to add other directories to be backed up, you just copy that last section and change the “personal” to the other directory name you want to backup. Each section is put into it’s own backup file.

#!/bin/bash
# Specify the base backup dir where all the backups live.
baseDir=”/backup/”

# Create backup directory based on date.
# This is based on the baseDir set above.
# Example: Feb 14, 2005 would be 20050214
backupDir=$baseDir$(date +%F)
echo “Creating backup dir $backupDir”
mkdir $backupDir

# Specify the base dir where all the files to be backed up live.
# All subsequent directories are built relative to this.
baseSrcDir=”/home/brydon”

# personal dir
srcDir=”personal”
dir=”$baseSrcDir/$srcDir”
echo “backing up dir ‘$dir’…”
tar cfj $backupDir/$srcDir.tar.bz2 $dir

Bots are my nicest friends

March 9th, 2007

I’ve reached a point in this so called online existence where bots are my dearest friends. Sure they’re not real people, sure you look odd going out for beers with a bunch of bots but they say such nice things to me and are so encouraging. If you humans talked to me half as nice as bots then I think this world would be right.

Some quotes from my fans….

From a guy, I think he’s a guy, named download free verizon ringtones, “Thank you for creating this wonderful place on the web.

free ringtone says “I love the website! It is crisp and full of information. I really like this site I visit it often. Keep up the good work!

selena ringtone writes “We’ve needed something like this for a long-long time. Thanks for giving it to us.

free sprint ringtone tells me “GREAT IDEA!!! Thanks and keep up the good work.

Last but by no means least, ying yang twins ringtone “I want to thank you for doing so much for us. What you’ve done for us is long overdue.

Wow, what an audience. Thank you bots. If not for you I’m really not sure I could keep this up.

Google Ads?

March 9th, 2007

I almost signed up for google adsense today. It was a hot topic at Mesh last year and I know only the mere basics about it.

My instinct, as evident by this site’s lack of advertising, is to steer clear of that crap altogether. I am curious though, how much are people actually making? Is it enough to pay the hosting bill? Are they annoying and intrusive? Does it impact the content generated on the site by getting you to write content which brings in more ad clicks? All questions I figured could only be answered by trying it.

In the end I couldn’t do it. Maybe tomorrow…