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

April 11, 2010

The Benefits of Working from Home

03:49 pm, David Woods

I’ve been thinking a lot lately about exactly why working from home is so important to me, and the benefits to myself and to my clients. The reasons I do it, and my own benefits, may not be the same as someone else’s. But I think these are general enough to reflect a majority of situations, not just for those in freelance or contract positions, but also for those telecommuting on a salaried position.

I believe that nearly all benefits are mutual to both sides, at least indirectly. An employer may not care one way or another if, for instance, having a private bathroom is important to me. But if it makes me more comfortable, then it makes me a better and more productive worker, and that is a measurable benefit for the employer.

I do want to point out that I don’t have a complete perspective on this - for instance, I’ve never been in the employer role in a telecommute arrangement. But I do speak from experience; I have been freelancing since 1998. But I should also point out that I’m an introvert and this is written from my perspective; many of these benefits might be outweighed by the sheer energy that extroverts enjoy when in the company of others.

continue »

April 2, 2007

Dreamweaver 8.0.2 update in Vista 64bit

10:29 am, David Woods

I don’t have a Vista horror story, everything has worked remarkably smoothly. That’s not to say there haven’t been any glitches, just that my overall experience has been very positive.

One minor problem that I’ve had is with Dreamweaver — the 8.0.2 update didn’t install. It turns out this problem is only with 64bit version of Vista, and is actually a problem with the InstallShield wrapper around the update file. Fortunately the fix is simple enough — even though it is fairly difficult to locate!

Adobe outlines the problem here, and provides the update file without the wrapper.

That’s not the end of the story, though. Unless you run the file with administrator privilege, you will get an error as soon as you run it. It’s a little difficult to run it with administrator privileges, though, because it’s an .msp file and “Run as Administrator” doesn’t appear in its right-click menu or properties dialog. To get around this, you need to open a PowerShell or command shell with administrator privileges, and then run the file from there.

February 25, 2007

Testing Dreamweaver templates

12:03 am, David Woods

I don’t know why I didn’t think of this before.

Dreamweaver templates use the .dwt extension, which means that if you try viewing them through a browser you just see it as text, or it will try to download the file. This means that developing Dreamweaver projects means either creating the original file as a .html file and converting that to a dwt down the road, or creating an .html file that uses the template, and keep updating it. Both options are just a little more work than I think should be required.

I’m running apache, but the principle is the same (albeit slightly different steps) in IIS. I’m also running this on my local computer so I have quick access to httpd.conf, which is apache’s configuration file. On a shared server, I believe this would also work by adding it to a .htaccess file.

It’s easy, just add this line to your apache config file — httpd.conf

AddType text/html .dwt

And that’s it! Restart apache and reload the page. Apache will now describe the file as a text/html file in the header, and your browser will render it as such.

January 23, 2007

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

01:04 pm, David Woods

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:

January 17, 2007

working across multiple computers

09:58 am, David Woods

One of the most brilliant applications I’ve used recently is called Synergy. Are you familiar with VNC, PC Anywhere, or Windows/Apple Remote Desktop? Synergy is basically a smart, scaled down version of these programs, and is meant for situations when you have the actual, physical computers right there on your desk.

Unlike VNC, etc., Synergy does not transfer any of the graphics between systems, only the mouse, keyboard, and clipboard. In this sense, it’s also like using a KVM switch to allow control of multiple computers from the same keyboard/mouse. But instead of buying an expensive switch (I couldn’t find any suitable for my needs under $75), all you do is drag the mouse off of one of the edges of your primary computer, and it pops up on another one, complete with keyboard control! So if you have a mac screen to the left of your PC screen, you can set up the left edge of the PC/right edge of the mac is the hot edge. Then you can drag the mouse between screens, just like it was one big desktop. Amazing.

Since we just added a new mac to our computer setup as a browser testbed, this has been an enormous benefit. No juggling multiple keyboards and mice!

Oh, and it’s 100% free. Incredible!

December 15, 2006

Setting up Full Text Search with SQL Express 2005 and Management Studio Express

01:57 pm, David Woods

Here’s one for the .NET/MSSQL/SQL Express crowd.

Management Studio Express is a nice interface for managing SQL Express databases. While I prefer Visual Studio for working with the data and stored procedures, MSE is essential for the more high level maintenance like database creation and attaching, managing users, and setting up Full Text Search indexes.

First, a brief primer on FTS. It’s a brilliant tool that will take a lot of the effort out of writing search queries. It allows for much more than just boolean searches. It can also search for inflectional variations. For instance, if you searched for “apply” it will also return results for “applying,” “applies,” and “applied.” It can also return search score information to help you rank results — to which you can also apply custom weighting. The first thing to know, though, is that it doesn’t come with the default SQL Express 2005 installation! You need to install SQL Express 2005 with Advanced Services in order to have access to FTS at all.

Once you’ve got it installed in order to get it working you need to:

  1. enable FTS on the database you want to use
  2. create a folder to store the FTS index (optional: it will use the default folder if you don’t specify a location, but if you do specify a location the folder has to already exist)
  3. create a fulltext catalog with a unique ID, optionally set to the path created in the previous step
  4. add the catalog to each table in the database that will utilize it
  5. specify the columns in the tables that will use the FTS data
  6. specify the language of each column (optional, but if you don’t set this inflectional won’t work)

The first two steps are easy. In MSE, just right click on the database you want to add FTS to and open the Properties dialog. Open the Files page, and check the box next to “Use full-text indexing.” Save that and you’re ready to go. If you’re going to specify the location for the index, create the folder using whatever tool you fancy.

The first problem you’re going to run into, though is actually creating the FTS catalog in the first place. This is something that you can’t do in MSE. At least, I’ve never been able to find out how! Fortunately there’s a handy command line tool called SSEUtil (from Microsoft). It’s a bit more user friendly than the standard sqlcmd utility, which you could also use.

When starting sseutil from the command line, give it the “-c” (console) and “-m” (main) arguments. That gives you a command line into the same databases you see listed in MSE. Don’t omit the “-m” or you are actually starting sseutil as a secondary process and you will probably not have access the database you’re trying to edit. Don’t ask me why, I have no idea what the mechanics are here. All I know is that it usually takes me four hours of banging my head on the desk before I remember that little “-m” and then suddenly everything works. If you can access your database with Windows Security, that’s all you need.

sseutil -c -m

Once in sseutil, you just run two very simple commands. Don’t forget you have to say “go” to commit each command before processing. (I’m sure you could run them both and say “go” once, but it’s nice to get confirmation at each point.)


This selects the database you are managing, so replace “db_name” with the right name. To list the databases available use the sp_databases command. (Don’t forget the “go.”) Once you have confirmation “Command completed successfully” you just need to run the sp_fulltext_catalog stored procedure. This is where you give the catalog a unique ID and the optional path. You also need to tell it that you’re wanting to create a catalog (the same sp is used for deleting or re-indexing a catalog).


Again this is using sample names so replace “dbname_fulltext” and “c:\fts\dbname” with whatever works for you.

After you get confirmation on this, you’re finished with the command line. Close sseutil and get back to MSE. Open the drop down list for the database you’re managing, and open Tables. Find the table you want to add FTS to, right click and select Modify. This will open the column editing page.

In order for FTS to work, the table has to have a unique primary key. If the table doesn’t have one yet, create one. Now right click on the key icon in the margin next to the primary key, and select “Full-text Index”. The first step is to add this table to the FTS catalog you just created. This is as easy as clicking on the “Add” button (which isn’t available if you haven’t successfully created a catalog on this database!), which will add the table using the default name of FullText_for_tablename.

Now you will see the properties box on the right fill up. The only properties that you need to worry about right now is the very top one, under General. Click on that, and you’ll notice an […] button appear on the far right of that field. Click this button to add the columns of the table to the index.

This interface is very easy, just select from the available columns in the dropdown box on the first cell. The datatype will automatically be added. The “Typed by Column” box can be ignored, but I recommend selecting the language from the Language cell. This will allow you to do inflectional searches — without knowing the language SQL can’t apply the inflectional variations.

And that’s it! Add each column that you want, and do this for every table that you want. The index itself will be created and updated automatically.

For further reference, here is Microsoft’s page detailing Full-Text Search concepts. I recommend starting with Simple Term searches, and then looking into the inflectional searches. The primary SQL commands (technically, two ‘predicates’ and two ‘functions’) that are used in FTS queries are CONTAINS, FREETEXT, CONTAINSTABLE, and FREETEXTTABLE. Good luck!

November 17, 2006

Update: new version of DebugBar

04:26 pm, David Woods

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.

Google on the road to web standards?

12:26 pm, David Woods

Yes, their search results still use tables and font tags. BUT I noticed today that Google’s results have switched from being listed with <p> tags to using <div> tags! It’s definitely progress.

If you’re interested, I noticed this when one of my Greasemonkey scripts stopped working. My script will number the Google results, which I use to test SEO rankings. If you have Greasemonkey, and you’re interested, you can install Number Google Results here. It’s already updated to work with Google’s new format.

Feel free to use it or customize it, but it comes as-is without any support. If you do customize it, I’m interested to see what you’ve done!

November 16, 2006

CSS border-collapse applied to inline lists

05:29 pm, David Woods

One good trick using CSS is making wrapping blocks of elements. Grouping elements together used to be something developers used table cells for, but when CSS started to be used more regularly, alternate methods were invented. A common use is converting <ul> lists (which are typically vertical structures) into horizontal menus. The really good thing about the CSS-based solution is its flexibility when wrapping is involved.

For table-based designs, the number of rows and columns had to be preset. With a CSS-based wrapping solution the size of the container can dictate the wrapping. For instance:

  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
 

Can be produced like this:

The “block” and “caption” groups are kept together, and sequentially listed in the HTML. They are all floated, and therefore ’stacked’ horizontally, wrapping at the edge of the container. An arbitrary number of these groups can be placed using the same code, and the wrapping is taken care of by the rendering. Here is the same code with ten blocks:

  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
 

To get an even better demonstration, this link will open a new window that you can resize and watch how the wrapping takes place.

At first one of the drawbacks of doing this with CSS as opposed to table is the lack of a border-collapse style! As you can see from the examples above, the bordering edges are doubled. Uh-oh! Border-Collapse only applies to tables!

No problem, just reduce the right and bottom margins by -1. If you want thicker borders, just change these margins to the negative border thickness.

  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
  • block
    caption
 


November 14, 2006

PowerShell 1.0 (final) released!

02:52 pm, David Woods

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.

November 2, 2006

IE7: oh well

01:12 pm, David Woods

I really had a lot of hope for IE7. I was eager for the Big Day when IE7 would be pushed out to millions of computers around the world, changing the landscape of the internet overnight. Suddenly the support for PNG transparency would be in the majority of internet users! Suddenly CSS bugs would be vanquished, and multi-headed hydra designs would be a thing of the past as IE7 would bring better standards support to the majority of the population!

Oh well. It was a noble thought.

As developers all over the internet are discovering, IE7 simply replaces old bugs with new bugs. Most of what I’m seeing now seem to be pure rendering issues, such as the inability to redraw backgrounds in negatively-margined div elements after the users scrolls out and scrolls back in. I’m seeing some positioning bugs. And big problems with opacity support.

So now I’m stuck importing yet another stylesheet declaration into my html.

October 30, 2006

DebugBar for IE7: IE grows more developer friendly

06:41 pm, David Woods

As most Firefox-savvy web developers know, nothing quite beats the Web Developer Toolbar (WDT) extension. As if you didn’t already have enough good reasons to develop in Firefox instead of IE, the WDT gives you so much control that after using it, development in IE feels like building a house of cards in the dark. Even Microsoft recognized the advantage that WDT gave Firefox over IE, and developed their own version, called Developer Toolbar (DevToolbar). Isn’t that a clever name? DevToolbar, currently in beta 2, shares many of the same features of WDT but lacks overall polish and really feels like a beta. And Microsoft doesn’t seem to be in any hurry to finish it, either. It’s been in beta for a long time.

Recently I was pointed towards DebugBar, an IE addon that is the closest I’ve seen to providing developers a real impetus for using IE for development again. It combines features from three of my favorite Firefox extensions: Web Developer Toolbar, Firebug, and ColorZilla, as well as a few others like ScreenGrab, Live HTTP Headers, cookie viewers, source code viewers, and a couple of bookmarklets I use frequently such as Javascript Shell and RenderMode. It’s quite the toolbox.

Read on for more about DebugBar »

October 27, 2006

Joomla changes templating system

09:11 am, David Woods

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!

October 26, 2006

How to set a Joomla template variable depending on a module’s existence

10:43 pm, David Woods

As ye faithful readers out there (all three of you) will hopefully see in the next week or two, I am currently redeveloping the main Birnam Designs website. I am creating new branding, new content, and will be using the new Joomla 1.5 CMS for development. Joomla 1.5 is a terrific (and free!) CMS, if you haven’t used it before, and this is just one example of how easy the templating system is.

My goal was to set the CSS class of a <div> to a particular value depending on whether or not a separate module (that was specified outside of this div) existed or not — in my case I was trying to alter the margin of my main column depending on whether or not the right column existed.

I could have probably done the whole maincolumn <div> in a conditional template, but it’s a largish section of code and I really didn’t want to maintain such a chunk in two places. Fortunately the patTemplate system that the Joomla templates are based on has a var tag, and it can handle boolean expressions that are evaluated as PHP code. Here’s how to use it:

<jdoc:var name=”CLASS_RIGHTMARGIN” hidden=”true” default=”right” modifier=”expression” expression=”count(JModuleHelper::getModules($self))>0″ false=”normal” true=”rmargin” />

Replace the “default” attribute value with the template module you want to check for, and the “false” value with the value you want if it doesn’t exist, and the “true” value to what you want if it does. The expression evaluator automatically replaces the “$self” variable in the code with the value you specify in the “default” attribute, so you don’t need to modify the expression code unless you want to extend it.

This is all I needed to use the variable now:

<div id=”maincolumn” class=”{CLASS_RIGHTMARGIN}”>

It gives me a class of “normal” if I don’t have a right margin, and “rmargin” if I do.

(note: this is using Joomla 1.5 beta, I haven’t tested this in anything else)

October 24, 2006

jumping text wrap in Flash 8

01:56 am, David Woods

The new “anti-alias for readability” setting for text in Flash 8 and up looks really good. The only problem is that there are sometimes unexpected behaviors related to text wrapping. That’s because, by default, the advanced antialiasing uses “grid fitting”, which is not used by traditional (anti-alias for animation) text. Grid fitting is a text rendering technique that aligns horizontal and vertical lines in the font glyphs to a whole pixel. For instance, say you have a lower-case ‘L’ that is draw as a one-pixel wide bar. In order to render it as crisply as possible, that one-pixel wide bar should be lined up with the monitor’s actual pixels.

Unfortunately, this alignment process can alter the width of the text, which can alter the wrap points in multiline textfields. This normally wouldn’t be noticeable in static text fields, but it is very obvious if the textfield is being animated. Especially when being scaled! The text will jump around as the wrap points keep changing.

Fixing the jumping wrap problem »

October 23, 2006

inline search for IE7

02:18 am, David Woods

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.