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

Archive for the 'useful links' Category

find out what version of SQL Server you (or your host) is running

Tuesday, January 23rd, 2007

Have you ever wondered if the SQL Server 2005 database your host is providing might actually be an Express installation? Or maybe you’re curious if they’re running the most recent service pack?

I’ve run into several methods of finding out the version information. The easiest, and my preferred method, is using sseutil — my command-line sql utility of choice. All you have to do is use the -version argument! For instance:

If you’re interested in the version number, that’s on the first line. This lets you see if the server is up to date. Here is a full list of SQL Server 2005 version numbers, up to the December CTP of Service Pack 2. (If you need the same info on an older server, ASPFAQ has is an extensive list of SQL Server 7 and SQL Server 2000 versions)

If you’re more interested in which edition you’re running, that’s on the last line. It might read “Express Edition” or “Express Edition with Advanced Services” for the free Express edition, or “Standard Edition,” “Workgroup Edition,” or “Enterprise Edition” for the $$$ editions.

But this is only one method! What if you don’t have sseutil? You can always run this sql command:

And finally, I found an alternate method on Microsoft’s KnowledgeBase, it goes like this:

Update: new version of DebugBar

Friday, November 17th, 2006

A few weeks ago I wrote about an exciting AddOn for Internet Explorer that gave IE a lot of the developer tools we have become used to in Firefox. It’s called DebugBar, and is published by Core Services. At the time, I was able to test it out with a Virtual PC using IE6 but had stability problems in IE7 on my native Windows XP box.

The problem turned out not to be with use in IE7, but a compatibility issue with the Google Desktop addon I also have installed (it records your browsing history to be searchable with a Google Desktop search). I’m very happy to report that Core Services was eager to get this fixed, and they have already released a 4.01 version that solves the issue!

After having worked with the AddOn some more, my opinion has only strengthed, and not just in regards to the new stability. DebugBar has become a very useful addition to my toolbox. It’s free for personal use, and professionals have a 30-day trial period before having to decide on the ~$75 pricetag. If you find yourself banging your head over IE development, this could be what you’re looking for and well worth the cost.

Plus, if you’re looking for a good IE tool for working with Javascript, the same developers have also released an early version of Companion.JS, a new tool for debugging Javascript. It might be an early version, but it’s already looking good.

PowerShell 1.0 (final) released!

Tuesday, November 14th, 2006

My new favorite tool has finally been fully released for Windows XP SP2 and Windows 2003 SP1! The Powershell blog gives the details. If you’re at all a fan of command line scripting, you’ll love PowerShell.

If you’re new to PowerShell, my first recommendation is the ArsTechnica guide to Microsoft Command Shell (one of the codenames, along with Monad and MSH, that was used to describe PowerShell before it’s wider release). Other good resources are the Channel9 Wiki Windows PowerShell QuickStart, the PowerShell blog itself, and the PowerShell for Fun blog.

Joomla changes templating system

Friday, October 27th, 2006

Don’t snuggle up too closely with the current Joomla 1.5 beta, a new templating system is coming down the pipe (currently in the nightly builds) that replaces the patTemplate system that had been in development. Amy Stephen brings us the news. I trust the Joomla developers, so I’m sure this will only lead to a more flexible, more extensible system.

So now here I am, developing a site based on a version of Joomla that will now have a radically different templating system from the launch version. Am I worried? Not a bit. I am developing with fully semantic code, so the bit that involves the template is purely structure, not design. All I need to do is move my CSS file, and the transition will be very easy.

I just never thought I’d be reaping the benefits of semantic code so quickly!

inline search for IE7

Monday, October 23rd, 2006

For those of you that have already taken the plunge and installed IE 7.0 (before we’re all dunked), one Firefox (and Opera) feature that you might wish had been copied but wasn’t is the inline search. In Firefox, hitting Ctrl-F doesn’t open the standard Find dialog box — or any dialog box at all, for that matter. Instead it opens a small pane in the bottom of the window. The main benefit is that it allows complete interactivity with the contents of the window, even with the Find pane open. If you’ve ever used it, you love it. But IE7 still has the same-old Find dialog.

Unless you go to IEForge.com and install their Inline Search Add-On! As far as I can tell, it has identical functionality to the Firefox incarnation, so I’m happy.

Now if only someone will write an Add-On for IE to open View Source in IE window (not the default text editor), also with Inline Search.

Photoshop Fountain of Youth

Thursday, October 19th, 2006

Here is an excellent article on using photoshop to radically change a photo of an elderly lady to a young and beautiful woman. It covers the use of a wide variety of tools, and has stunning results. This is the kind of photoshop tutorial I really like to point people to, where the results are so amazing as to really excite people towards the possibilities, but are laid out in a good way as to actually be repeatable.

9 javascript tips

Tuesday, October 17th, 2006

A few more great examples for using javascript to its fullest: 9 Javascript Tips You May Not Know

Are you more of a javascript beginner? I always recommend W3Schools, they’ve got a good reference for javascript. If you need to look up something quickly, GotAPI is a language reference tool built with Ajax that acts as a front-end to the W3Schools library.

While you’re at it, don’t forget to look and see what’s new in Javascript 1.7, which will be included in Firefox 2.0. (update: Firefox 2.0 final release is available!) Don’t get too excited, though, because other browsers aren’t quite there yet. Opera’s specs page says, “Opera supports the entire ECMA-262 2ed and 3ed standards, with no exceptions. They are more or less aligned with JavaScript 1.3/1.5 Core.” I’m having trouble nailing down IE7’s support.

Windows Powershell

Wednesday, October 11th, 2006

I’ve been experimenting with Windows Powershell (formerly known as Monad or MSH) recently. It’s currently in version 1.0, Release Candidate 2 (RC2), so it’s pretty much ready. Download it here to give it a try. I’ve struggled with a few aspects of it, but it’s very powerful and I’ve already started customizing it to help out with my day-to-day work.

If you’re like me, you’ve heard of how great the Linux/Unix shells (like Bash) are, but are pretty much just familiar with the old DOS command prompt. This will blow your socks off. There was just a *pop* and a realization that, ohhhh, so this is what a Shell is.

There’s a great introduction to Powershell (then MSH) at ArsTechnica that I highly recommend. But just to give you a tease, here is a one-line bit of code that will tell you how many pages Google has indexed for a specific site (I’ve used ArsTechnica again, you can see the reference in the url bit):

$q = “site%3Aarstechnica%2Ecom”; $m = ([regex] “<[^>]*>”).replace(((new-object Net.WebClient).DownloadString( “http://www.google.com/search?q=”+$q)), “”) -match “Results\s+(\d+)(\s+-\s+(\d+))\s+of\s+about\s+([\d,.]+)”; $matches[4]

 
That’s really sweet.

Recommended Tools: update

Monday, September 11th, 2006

I’ve been expanding my toolset lately, looking for better ways to increase my efficiency. I first wrote about some of my tool preferences during my Better Web Development series, but with some more tips I wanted to come back to this.

Here are some quick links and reports of some terrific FREE software:

Tags:

Fixing Extensions after Firefox upgrade

Wednesday, February 8th, 2006

One of my favorite features of Firefox v1.5 is that when you are prompted to upgrade, you are given the option to see what extensions will break due to the upgrade! What a fantastic feature — yet one that has caused me to delay my 1.5.0.1 upgrade. (security fixes) One extension in particular — the Googlebar extension, an even better Google toolbar than Google’s own extension — would not work after the update. Unfortunately, that is probably the most actively used extension I have! Fortunately, there is a solution. (also, Googlebar has since released an updated version that fixed the problem in the first place, but that still leaves me with a few extensions that won’t work after the upgrade)

Evilsoft.org has a good rundown of how to edit a Firefox configuration file in order to restore extensions caused by minor updates.

Notes:
1) don’t try this with major updates, like a 1.5 -> 2.0 updates, and

2) pay attention to the author’s note about using a text editor, not a word processor, to edit the configuration file. I recommend either Edit Pad Pro (not free) or Notepad (free) for pure text editing.

Quirks Mode or Standards Mode?

Thursday, February 2nd, 2006

No, I’m not talking about Quirksmode.org, the fantastic resource on browser compatibility. (Although if you don’t know about that site already, do yourself a favor and go ahead and bookmark it. Go on.) I’m talking directly about the quirks mode in browsers. More specifically — and you can skip to the end if this is all you’re interested in — I’m talking about how to determine if a browser is running in standards mode or quirks mode.

Both Internet Explorer and Firefox (and assumedly other modern browsers) have two different rendering modes, standards and quirks.

But first, what is rendering? It is the process of interpreting the markup of a web page and determining how to draw the page. As difficult as that sounds, believe me, it’s probably even more difficult than you realize. It’s not just HTML. It’s also javascript, XHTML, CSS, DHTML, DOM, VML, embedded plugins, SVG, Canvas, XML, XSLT, MathML, SGML, etc. And even within these types of markup there are different version numbers. HTML 1, HTML 2, HTML 3, HTML 4, XHTML 1.0, XHTML 1.1, CSS 1, CSS 2, CSS 3, etc. And then, within those levels of markup, are even more levels. Transitional XHTML 1.0, Strict XHTML 1.0, etc.

Obviously, trying to interpret all of these is no easy task, even if you could rely on every developer in the world to be a markup expert. Of course they’re not, so you also have to account for errors. How do you handle markup mistakes as gracefully as possible so that the resulting webpage isn’t rendered in an incoherent mess of text and images?

Enter Standards Mode (aka Standards Compliance Mode) and Quirks Mode. Just from their names, you can probably guess which one is used to render pages with flaws and which one is used to render pages that observe all markup rules. For me, Standards Mode is a goal. If I have created a webpage that is rendered with standards mode on both browsers, then I’m in good shape. (when I say ‘both browsers’ I am of course referring to Internet Explorer and Firefox) If my page falls into quirks mode, I need to figure out what’s wrong. It’s more than just observing good markup rules — it is also more reliable to have a page that is rendered in Standards Mode. When I say reliable, I mean that it is easier to get Internet Explorer and Firefox (and other standards-observing browsers) to render your page in the same way. This saves enormous headaches, because otherwise you have to sometimes create multiple style definitions, or even multiple pages, in order to get things to look right for all browsers.

Now that we know which is better, here’s the question: how do you tell if the browser is rending in standards mode or quirks mode?

In Firefox, it’s simple. Right click on the page, select View Page Info, and look for the “Render Mode:” detail. Tada! If you’re a serious web developer, though, you should also ensure that you have the Web Developer extension for Firefox. If you have this extension, then there is always a nice friendly icon in the corner of your screen that will show you the render mode. For instance, at this moment, I can look up and see that there is a blue circle with a checkmark in it, so I know that this Wordpress admin page is running in standards mode. When I roll over the icon, a tip pops up and confirms this. Or I can click on the icon to jump to the View Page Info dialog which will tell me the same information. If this blue circle is greyed out, then I know I’m viewing a page that is relying on quirks mode.

In Internet Explorer, it’s not so straight-forward. To the best of my knowledge, there is no built-in functionality that will show what render mode the browser is using. It’s not in the page info. Instead, I defer you to the Render Mode Bookmarklet. It’s easy to use: follow the link I gave you and you will find a page that contains a link at the very bottom. Clicking this link runs javascript code that will determine the render mode of the page and give it to you via alert box.

All you have to do is save this link as a bookmark, and you have a bookmarklet that will do the same thing to whatever page you happen to be visiting! Enjoy, and good luck always finding your pages in standards mode!

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.

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'

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.