Birnam Designs is a quality web design and development agency in Virginia

Archive for January, 2006

Instant Domain Search

Tuesday, January 31st, 2006

Interested in finding your new domain name? Unfortunately, you might find that the first several domains you try are already taken — either by legitimate businesses or by domain squatters. This means you might have to get a little creative, and perhaps spend more time than you were expecting looking up domain name possibilities.

This is where Instant Domain Search comes in. Start typing into the box, and domain names are displayed in a Google Suggest-like instant-feedback method. Playing around with your domain name search is as easy as typing a few new keys.

Programming language comparison

Friday, January 27th, 2006

As a way of extending the subject of VB.NET vs. C#, here are some other programming language comparison links.

dmh2000.com compares the first-impression differences between C++, Java, Python, and Ruby. This crosses a wide gamut and, in one fell swoop, Dave H. is essentially comparing compiled vs. interpreted languages, static vs. dynamic typing, and performance speed vs. development speed. He also shows a side-by-side breakdown of a similar program in all four languages.

A more focused look at the differences between Python and Java can be found here, and the differences between Python and Ruby can be found here.

Moving up a little in numbers, here is a side-by-side of nine different languages: Eiffel, Smalltalk, Ruby, Java, C#, C++, Python, Perl, and Visual Basic. And this paper (in PDF format) claims to an empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl.

If you want to compare the syntax of more languages than just what a side-by-side can show, this Wikipedia entry lists the code to create a “Hello World” application in hundreds of different languages! It’s a great way to see the general syntax characteristics of just about any language you can think of. (”Hello World” is the classic first program anybody writes when learning a new language.) A similar site currently comparing 193 examples of “Hello World” is found here.

If you want to see code comparisons for more interesting programs, 99 Bottles of Beer has 882 examples of code to output the classic song. (some languages have multiple examples) And this site compares more common programming algorithms among 132 different languages.

This site also compares the syntax of different languages, but organizes them by syntax rather than by language. Most of the focus seems to be on Visual Basic, C++, and Delphi, but there is a smattering of other languages as well.

Execution speed is probably high on the minds of people seriously trying to compare languages. For that, I give you The Great Win32 Language Shootout! With the wide range of tests and long list of compared languages on this site, you not only get a feel for the fastest languages, but you can also compare the placement of a particular language in various test to determine that language’s strengths and weaknesses. If looking at lots and lots of raw data isn’t your thing, this site compares benchmarks between Java 1.3.1, Java 1.4.2, C, Python 2.3.2, Python compiled with Psyco, Visual Basic, Visual C#, Visual C++, and Visual J#.

If you want to compare development speed instead of execution speed, this site attempts to give language productivity a numerical score.

And finally, What I Hate About Your Programming Language is a list of popular pet peeves of some programming languages.

update 2006-02-11:

Thanks, Isaac, for pointing out a more up-to-date language shootout! The Computer Language Shootout not only covers a wide range of languages and algorithms, but also directly compares similar languages for speed and memory usage. (linux oriented)

How to be Creative - by Hugh MacLeod

Thursday, January 26th, 2006

Hugh MacLeod from GapingVoid has a terrific blog entry with 30 tips on being creative: the long version. It humerously covers a wide gamut of ideas, from “Do the Hours” to “Ignore Everybody” to “Avoid the Watercooler Gang.” Each topic is punctuated by his hilarious — and typically very insightful — back-of-business-card drawings.

VB.NET vs C#

Wednesday, January 25th, 2006

VB.NET or C#? It’s an age-old argument. Well, not really, since .NET has only been around for four or five years. But it’s a classic debate among .NET developers. I’m not here to say which is better for you, but I’ve found some statistics that you might find interesting if you are trying to make a choice between learning one of these languages.

I looked at CodeProject, SourceForge, Freshmeat, CMSMatrix, Monster, and HotJobs. I also did my best to look at every .NET-based blog software available, in order to determine what is used more. Note the distinction: not which is better, but which has seen more use by more developers that I could find. In other words, I’m letting developers that are more experienced than I speak.

Read on for the results »

Do what you love

Tuesday, January 24th, 2006
My father told me I could be whatever I wanted when I grew up, so long as I enjoyed it. … It was like being told to use dry water.

One of my favorite online authors, Paul Graham, has a new essay titled How To Do What You Love. He starts off by looking into the paradoxical combination of work and enjoyment. As children, he says, we learn that work is something we have to do, and play is something we want to do. School is something we have to do, and is basically a diluted version of work. Our parents tell us — directly or by implication — that we should enjoy school while we can, because work is much worse.

Graham points out that what our parents should be telling us at this point, is that we need to work our way through the things that we don’t enjoy in order to be able to do the things that we do enjoy. Maybe then we would start to see work as an opportunity or as a path, instead of as a dead end. This is advice I plan on heeding well while my kids are growing up.

Continue reading about 'How to Do What You Love'

tip: reset auto_increment number in MySQL databases

Tuesday, January 24th, 2006

Have you ever deleted rows in your MySQL database and created gaps between your highest auto_increment field and the next auto_increment value? Here’s an example, say “user_id” is an auto_incremented field:

user_id first_name
1 John
2 Sarah
3 Malcolm
4 Steven
5 Elisabeth

After entering Elisabeth as the fifth row, the next auto_increment number is 6. The problem shows up if you delete Elisabeth — the next auto_increment number is still 6! Even if you delete all of them, the next auto_increment number is still 6! How frustrating!

Fortunately, you can reset the auto_increment number easily with a simple SQL statement:

ALTER TABLE tablename AUTO_INCREMENT = 1

Your auto_increment number will be reset to the highest auto_increment data value + 1.

CustomMore v0.2 Wordpress plugin: customizing ‘more’ links

Monday, January 23rd, 2006

(Currently, available only for users with Visual Rich Editor turned off)

v0.2

WordPress makes it easy to divide content into an introduction section and an extended content section by simply clicking on the “more” button. The introduction section is displayed in the main blog page, while the extended content is added to that section on the permalink page. This is great for those of us who have a tendency for writing lengthy posts. (ahem)

The only problem is that every post with extended content gets the same link, saying “Read the rest of this entry »” or (more…), depending on which version of Wordpress you’re using. Wouldn’t it be nice if you can customize what that says?

Now you can! CustomMore is a small plugin that asks for the text you want to use to link to the extended content. In the composition page of the WP admin, it looks like the same old “more” button (note: only available if the Visual Rich Editor is turned off), but when you click it, a box will pop up asking for the link text. It will appear in your document in modified form of the WordPress default more tag.

To install, just unzip the file into your wp-content/plugins/ directory. (You will be uploading the entire bd_custommore directory as a sub-directory of the plugins directory).

Download CustomMore v0.2 here.

link: Google search commands

Saturday, January 21st, 2006

You probably knew that including quotation marks around a group of words in a Google search tells Google to look for the entire phrase. Or that putting a negative sign in front of a word means you want to find documents that don’t have that term.

You might also have known that using “site:” before a domain will restrict the search to pages in that domain. Or that “related:” before a url will show results related to that page. And you might know that putting “define:” before a word will give you the definition of that word.

But I’m willing to bet there are plenty of tips in this reference that you had no idea about! This page gives you goodies like “filetype:” and “inurl:” and “bphonebook:” and tons more search commands that you will surely find useful.

free photoshop brush resources

Thursday, January 19th, 2006

Photoshop Tutorials Blog has created a terrific list of free Photoshop Brush sites. The compiler of this list deserves a lot of credit and has done a terrific job with a ton of links — but, as the editor warns, make sure and read the terms of service for each site, because some sites won’t allow these brushes to be used in commercial applications. If you know of any links that aren’t included, make sure and post a comment on the pstutorialsblog.com page, so there will continue to be a single resource we can all use.

CSS list indent consistency between IE and Firefox

Thursday, January 19th, 2006

I finally found a resource that describes the differences between list rendering in IE and Firefox. If you’ve worked much with CSS you’ve probably found the same frustrations, where your lists are not rendered with the same indent between browsers, especially if you have reset the margins and padding at some point.

The secret, it turns out, is that IE renders the indent based on ul’s margin-left, while the rest of the browser world uses the padding-left style of the ul tag. Set them both to the same value, et viola!

See a more detailed description here.

Photoshop CS2 bug - saving Hard Mix blend mode

Wednesday, January 18th, 2006

Well that didn’t take long. I found an easily-replicable bone-fide bug in Photoshop 9 (aka ‘CS2′). Here are the steps:
(more…)

Tags: ,

Feedburner, Wordpress 2.0, and mod_rewrite - Oh My!

Wednesday, January 18th, 2006

Wordpress 2.0 was released a couple of weeks ago with much huzzah, and once again the Wordpress team has managed to make their software even simpler and even more powerful to install and use than ever before. I don’t know how they pull it off. It took me, literally, about 25 minutes to learn that 2.0 was released, download the new version, read about the installation, update my old Wordpress installation, and reinstall all of the plugins I was using with 1.5 — all without a single hiccup. I was ecstatic!

A few days after the upgrade, I noticed a problem with my Feedburner statistics. They weren’t coming in anymore. I looked a little closer and realized that a very fundamental change had occurred in the way that Wordpress read URLs.

(more…)

HTML tip: Firefox and Embedded Video

Monday, January 16th, 2006

Note: this post has been imported and re-editing from a personal blog. Time-sensitive material may no longer be relevant.

If you want to embed video into a webpage, one of the parameters you can use is “autostart.” The autostart parameter options are true and false.

Problem: Firefox does not read ‘false’ correctly. It will autostart the video with settings of both ‘true’ and ‘false.’

Solution: use ‘0′ (zero) instead. In most programming languages, ‘true’ and ‘false’ are really just pseudonyms for ‘1′ and ‘0′. Or to be more precise, false is zero and true is non-zero. Firefox does not seem to be converting the text “false” into the programming concept ‘false’ and instead reads it as non-zero, therefore true, because the text isn’t blank.

Overheating processors lead to problems

Sunday, January 15th, 2006

Note: this post has been imported and re-editing from a personal blog. Time-sensitive material may no longer be relevant.

I have been experiencing lots of weird computer crashes. Eventually I decided to check on the temperature at which my cpu was running. Thanks to Motherboard Monitor, I found out that my CPU was running at a toasty 75°C! Whoa!

I pulled out my case and checked my CPU cooler (heatsink/fan combo). The fan was spinning — but the heatsink was completely clogged with dust! (and, if the spider carcasses I found in my case were any indication, spiderwebs too — how embarrassing!) I blew it out, blew out a few other key areas around the fans, and restarted.

Thanks to about 1/4 can of compressed air, my CPU is running about 26°C cooler, at a much saner 49°C, and even occassionally dipping down a little lower. And the crashes are gone!

Firefox opening with weird window position and size: SOLVED

Saturday, January 14th, 2006

Note: this post has been imported and re-editing from a personal blog. Time-sensitive material may no longer be relevant.

Have you ever had a problem with Firefox where the window size/position doesn’t seem to be saved like with most applications? Every time you open Firefox is appears in the same unusual position at an unusual size. It’s annoying. And here’s what to do:

Locate the “localstore.rdf” file in your Firefox profile, and delete it. Don’t worry, Firefox will make a new, fresh one when it restarts.

Of course, the corruption of localstore.rdf might be an indicator of a larger disk corruption, in which case this fix might not keep you happy for very long — but it’s worth trying.

If you’re having trouble locating your Firefox profile (and you’re on a Windows machine), look in C:\Documents and Settings\[your user login name]\Application Data\Mozilla\Firefox\Profiles\default.xyz Replace “C:\” with your systems root drive, and insert your login name in the indicated spot. Your profile might be in “\Mozilla\Profiles\” instead of “\Mozilla\Firefox\Profiles” depending on what version of Firefox you’re running. And the “default.xyz” will almost certainly be different on your system (the extension is random, from what I can tell), but it’s normally the only folder in “Profiles.”

Essential Software: Keeping track of the contents of all of your data CD and DVDs

Friday, January 13th, 2006

Note: this post has been imported and re-editing from a personal blog. Time-sensitive material may no longer be relevant.

Since my preferred backup method is to archive all of my content to DVD, I have found myself with a very large collection of very full DVDs. To be honest, the problem started a long time ago, when I found that when I needed a particular file I had to go through each disc. It started out as a routine task. Then, as my backup CD collection grew, it became an annoying chore. Then, as the collection grew again and they were now full DVDs instead of full CDs, it became a bone fide problem.

What I really needed was an application that would save the directory structure — all the file names, dates, locations, etc. — of all of my discs. Something that I could search through even when the disc wasn’t in the drive. And I needed something that let me determine which copy is the most recent of any particular file. If you need similar software, read on — I found a couple of good ones!

(more…)