Tim

Footprints in the snow of a warped mind

February, 2007

Where to find me

Flickr Icon  Twitter Icon  Linked In Icon  FaceBook Icon  Windows Live Alerts Butterfly  RSS 2.0 

The Site Doctor is Hiring!

Enjoy what you read here?
Think you can do better?
Join our team and get paid
up-to £35,000.
Apply now.

Tag Cloud

AJAX (4) Analysis (3) ASP (6) ASP.Net (59) Error Reporting (4) Web Service (2) WSDL (1) Atlas (2) Azure (1) Born In The Barn (1) Business (95) Business Start-up Advice (37) Client (17) Expanding Your Business (24) Recruitment (1) C# (25) Canoeing (4) Canoe Racing (5) Cheshire Ring Race (5) Racing (2) Training (4) Christmas (1) CIMA (1) Cisco (1) 7970G (1) CMS (1) Code Management (1) Cohorts (4) Commerce4Umbraco (1) Content (1) Content Management (1) Content Management System (1) CSS (4) dasBlog (5) DDD (2) DDDSW (1) Design (12) Icons (1) Development (28) Domain Names (1) eCommerce (13) Email (1) Employment (2) Festive Sparkle (1) General (39) Christmas (6) Fun and Games (11) Internet (22) Random (46) RX-8 (8) Git (2) Google (1) Google AdWords (1) Google Analytics (1) Hacking (1) Helpful Script (3) Home Cinema (2) Hosting (2) HTML (3) IIS (11) iPhone (1) JavaScript (5) jQuery (2) LINQPad (1) Marketing (6) Email (1) Multipack (1) MVC (3) Networking (3) Nintendo (1) Nuget (1) OS Commerce (1) Payment (1) Photography (1) PHP (1) Plugin (1) PowerShell (3) Presentation (1) Press Release (1) Productivity (3) Random Thought (1) Script (2) Security (2) SEO (6) Server Maintenance (7) Server Management (12) Social Media (2) Social Networking (3) Experiment (1) Software (11) Office (5) Visual Studio (14) Windows (6) Vista (1) Source Control (2) SQL (13) SQL Server (19) Starting Something New (2) Statistics (2) Stored Procedure (1) Sublime Text 2 (1) SVN (1) TeaCommerce (1) Testing (2) The Cloud (1) The Site Doctor (140) Turnover Challenge (1) Twitter (3) uCommerce (20) Umbraco (37) 2009 (1) 2011 (1) Useful Script (6) Virtual Machine (1) Web Development (72) WebDD (33) Wii (1) Windows Azure (1) XSLT (1)

Blog Archive

Search

<September 2014>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

Recent Comments

Blog Archive

Various Links

Google+

Blogs I Read

[Feed] Google Blog
Official Google Webmaster Central Blog
[Feed] Matt Cutts
Gadgets, Google, and SEO
[Feed] Ol' Deano's Blog
My mate Dean's blog on my space, equally as random as mine but not off on as much of a tangent!
[Feed] Sam's Blog
Sam is one of my younger brothers studying Product Design and Manufacture at Loughborough, this is his blog :) Enjoy!

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

newtelligence dasBlog 2.2.8279.16125

Send mail to the author(s) Email Me (Tim Gaunt)

© 2014 Tim Gaunt.

Sign In

    # Wednesday, February 28, 2007

    SQL Server SP2 quirks

    Wednesday, February 28, 2007 6:35:40 PM (GMT Standard Time, UTC+00:00)

    Ok, as sad as it sounds I've been looking forward to the latest SQL Server service pack since I heard about some of the issues it fixed as there was two "glitches" in particular that seriously bugged me, namely:

    • Loading a SQL file into the query editor on a live connection would ask you to log in again -this bugged the hell out of me because I have a number of routines saved on my disk as SQL files that manage client's servers and so I don't always have the password to easily hand which would just delay development (ok all be it by 30seconds or so but that's not the point)
    • It would never remember my password in the initial splash screen, again see why above.

    Anyway, it's great to see that these two points were fixed as well as a load of other issues but I couldn't help but chuckle when I saw the new context menus, I don't know about you but when editing this table I didn't know which one I needed to choose:

    Confusing SQL Server Context Menu

    FWIW you need "Design" to open the design view and "Edit" to generate a SQL CREATE Script. Genius!

     

    Don't forget to follow me on Twitter.

    SQL Server SP2 quirks
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: SQL Server
    # Tuesday, February 27, 2007

    Employing someone 101

    Tuesday, February 27, 2007 9:22:48 AM (GMT Standard Time, UTC+00:00)

    Stacey recently wrote an excellent brief on the pro's and con's of employing someone however this morning when I came to post it online I realised that it was deleted when I formatted the laptop for a system demonstration last week. Luckily however I have a hard copy so I'll have it re-typed and put online ASAP.

    In the meantime however I shall reflect with this classic (which I’m looking to implement in The Site Doctor ASAP)…

    Attire

    It is advised that you come to work dressed according to your salary. If we see you wearing Prada sneakers and carrying a Gucci bag, we assume you are doing well financially and therefore you do not need a raise.

    If you dress poorly, you need to learn to manage your money better, and therefore you do not need a raise. If you dress in-between, you are right where you need to be and therefore you do not need a raise.

    Personal Days

    Each employee will receive 104 personal days a year. They are called Saturday and Sunday.

    Lunch Break

    Skinny people get 30 minutes for lunch as they need to eat more so that they can look healthy.

    Normal size people get 15 minutes for lunch to g et a balanced meal to maintain their average figure.

    Sick Days

    We will no longer accept a doctor statement as proof of sickness. If you are able to go to the doctor, you are able to come to work.

    Restroom Use

    Entirely too much time is being spent in the restroom. There is now a strict 3-minute time limit in the stalls. At the end of three minutes, an alarm will sound, the toilet paper roll will retract, the stall door will open and a picture will be taken. After your second offence, your picture will be posted on the company bulletin board under the "Chronic Offenders" category.

    Surgery

    As long as you are an employee here, you need all your organs. You should not consider removing anything. We hired you intact. To have something removed constitutes a breach of employment.

    Thank you for your loyalty to our company. We are here to provide a positive employment experience. Therefore, all questions, comments, concerns, complaints, frustrations, irritations, aggravations, insinuations, allegations, accusations, contemplation, consternation and input should be directed to the State Unemployment Offices.

     

    Don't forget to follow me on Twitter.

    Employing someone 101
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: Fun and Games | The Site Doctor
    # Saturday, February 24, 2007

    DasBlog RSS Feed Macro

    Saturday, February 24, 2007 2:39:04 PM (GMT Standard Time, UTC+00:00)

    As part of my blog’s re-design I wanted to integrate my statistics from Last.FM which monitors what music you’re listening to and generates a stack of statistics about your listening habit (see About Last FM for more information).

    Anyways, I started writing my own RSS macro when I came across one already developed by John Forsythe (http://www.jforsythe.com/) which did pretty much exactly what I was planning on developing, the only difference though was that his was hard-coded to preset node names whereas I was planning on using an XSL file to format mine to offer maximum flexibility in the long run so I updated his with the use of reflector (thanks to John Forsythe though!!).

    There are a couple of difference to note with this code and John Forsythe's:

    • The RSS retrieval is no longer handled by an external library -in this instance I wanted to keep this as simple and stand-alone as possible.
    • There is no max item count at present -this is mainly because I didn't need it for the Last.FM Feed, I may alter that later.

    Source code for a dasBlog XSL based RSS reader

    using System;
    using System.IO;
    using System.Security.Cryptography;
    using System.Diagnostics;
    using System.Text;
    using System.Web;
    using System.Web.UI;

    using newtelligence.DasBlog.Runtime;
    using newtelligence.DasBlog.Web.Core;

    namespace TSDMacros
    {
        public class TheSiteDoctor
        {
            protected SharedBasePage requestPage;
            protected Entry currentEntry;

            public TheSiteDoctor(SharedBasePage page, Entry entry)
            {
                requestPage = page;
                currentEntry = entry;
            }

            /// <summary>
            /// A dasBlog macro to retrieve an RSS feed and apply XSL to 
            /// it before caching it for x minutes
            /// </summary>
            /// <param name="xslVPath">The virtual path of the XSL file</param>
            /// <param name="rssPath">The RSS feed URL</param>
            /// <param name="minutesToCache">Number of minutes to cache the file for</param>
            /// <param name="debugMode">Output the debug information</param>
            /// <returns>A control that can be inserted into a dasBlog template</returns>
            public virtual Control GetRSS(string xslVPath, string rssPath, int minutesToCache, bool debugMode)
            {
                string cacheVDir = "./content/getrsscache/";
                string cachedFileLoc = String.Empty;
                StringBuilder output = new StringBuilder();

                bool writeToCache = false;
                bool cacheExpired = false;
                bool cacheExists = false;

                #region Debug output
                if (debugMode)
                {
                    output.Append("<strong>&lt;start debug&gt;</strong><hr />\r\n");
                    output.AppendFormat("<i>RssPath</i>: {0}<br />\r\n", rssPath);
                    output.AppendFormat("<i>minutesToCache</i>: {0}<br />\r\n", minutesToCache);
                    output.AppendFormat("<i>CacheStorageFolder</i>: {0}<br />\r\n", cacheVDir);
                    output.Append("<hr />\r\n");
                }
                #endregion

                #region Check whether we need to cache or not
                if (minutesToCache > 0)
                {
                    writeToCache = true;
                    //Find the cache directory
                    string cacheDir = HttpContext.Current.Server.MapPath(cacheVDir);
                    //Work out what the file would be called based on the RSS URL
                    cachedFileLoc = Path.Combine(cacheDir, HttpUtility.UrlEncode(TheSiteDoctor.GetMd5Sum(rssPath)) + ".cache");
                    #region Debug output
                    if (debugMode)
                    {
                        output.AppendFormat("<i>cache file</i>: {0}\r\n", cachedFileLoc);
                    }
                    #endregion
                    if (!File.Exists(cachedFileLoc))
                    {
                        cacheExpired = true;
                        #region Debug output
                        if (debugMode)
                        {
                            output.Append("<i>cache age</i>: no file exists<br />");
                        }
                        #endregion
                    }
                    else
                    {
                        FileInfo info1 = new FileInfo(cachedFileLoc);
                        TimeSpan span1 = (TimeSpan)(DateTime.Now - info1.LastWriteTime);
                        if (span1.TotalMinutes > minutesToCache)
                        {
                            cacheExists = true;
                            cacheExpired = true;
                        }
                        #region Debug output
                        if (debugMode)
                        {
                            output.AppendFormat("<i>cache age</i>: : {0} min old <br />\r\n", span1.TotalMinutes);
                        }
                        #endregion
                    }
                }
                else
                {
                    #region Debug output
                    if (debugMode)
                    {
                        output.Append("<strong>caching disabled - CacheStorageAgeLimit=0</strong><br /><span style=\"color:red; font-weight: bold;\">FYI: All requests to this page will cause a new server request to the RssPath</span><br />");
                    }
                    #endregion
                    cacheExpired = true;
                }

                #endregion

                #region Debug output
                if (debugMode)
                {
                    output.Append("<hr />");
                }
                #endregion
                //Check whether or not the cache has expired
                if (cacheExpired)
                {
                    #region Debug output
                    if (cacheExists & debugMode)
                    {
                        output.Append("<strong>file cache is expired, getting a new copy right now</strong><br />");
                    }
                    else if (debugMode)
                    {
                        output.Append("<strong>no cache, getting file</strong><br />");
                    }
                    #endregion
                    //The cache has expired so retrieve a new copy
                    output.Append(TheSiteDoctor.delegateRss(xslVPath, rssPath, 0, writeToCache, cachedFileLoc, debugMode));
                }
                else
                {
                    #region Debug output
                    if (debugMode)
                    {
                        output.Append("<strong>cool, we got the file from cache</strong><br />");
                    }
                    #endregion
                    //The cache still exists and is valid
                    StreamReader reader1 = File.OpenText(cachedFileLoc);
                    output.Append(reader1.ReadToEnd());
                    reader1.Close();
                }
                #region Debug output
                if (debugMode)
                {
                    output.Append("<hr /><strong>&lt;end debug&gt;</strong>");
                }
                #endregion

                output.Append("\r\n<!-- \r\ndasBlog RSS feed produced using the macro from Tim Gaunt\r\nhttp://blogs.thesitedoctor.co.uk/tim/\r\n-->");

                return new LiteralControl(output.ToString());
            }

            /// <summary>
            /// RSS feed retrieval worker method. Retrieves the RSS feed 
            /// and applies the specified XSL document to it before caching 
            /// a copy to the disk -this should be called after it has been 
            /// established the cache is out of date.
            /// </summary>
            /// <param name="xslVPath">The virtual path of the XSL file</param>
            /// <param name="rssPath">The RSS feed URL</param>
            /// <param name="timeoutSeconds">Number of seconds before the request should timeout</param>
            /// <param name="writeCache">Whether to cache a copy on disk</param>
            /// <param name="xmlPath">Physical path of the XML file on the disk</param>
            /// <param name="debugMode">Output the debug information</param>
            /// <returns>An XML document as a string</returns>
            private static string delegateRss(string xslVPath, string rssPath, int timeoutSeconds, bool writeCache, string xmlPath, bool debugMode)
            {
                StringBuilder output = new StringBuilder();
                bool errorThrown = false;
                string cacheVDir = "./content/getrsscache/";
                string xslPath = HttpContext.Current.Server.MapPath(xslVPath);

                try
                {
                    //TODO: Replace this with a HttpRequest and timeout to ensure the visitor is not left waiting for the file to load
                    //Load the XML
                    System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
                    xmlDoc.Load(rssPath);

                    //Load the XSL
                    System.Xml.Xsl.XslTransform xslDoc = new System.Xml.Xsl.XslTransform();
                    xslDoc.Load(xslPath);
                    
                    StringBuilder sb = new StringBuilder();
                    StringWriter sw = new StringWriter(sb);

                    //Apply the XSL to the XML document
                    xslDoc.Transform(xmlDoc, null, sw);

                    //Append the resulting code to the output file
                    output.Append(sb.ToString());
                }
                catch (Exception ex)
                {
                    errorThrown = true;
                    #region Debug output
                    if (debugMode)
                    {
                        //Log the exception to the dasBlog exception handler
                        ErrorTrace.Trace(TraceLevel.Error, ex);
                        output.AppendFormat("<ul style=\"\"><li><strong>RSS request failed :(</strong> <br />{0}</li></ul>", ex.ToString());
                    }
                    #endregion
                }

                //Save a cache of the returned RSS feed if no errors occured
                if (writeCache & !errorThrown)
                {
                    //Find the cache's storage directory
                    DirectoryInfo dir = new DirectoryInfo(HttpContext.Current.Server.MapPath(cacheVDir));
                    //Check it exists
                    if (!dir.Exists)
                    {
                        dir.Create();
                        #region Debug output
                        if (debugMode)
                        {
                            output.AppendFormat("<strong>just created the directory:</strong> {0}<br />"HttpContext.Current.Server.MapPath(cacheVDir));
                        }
                        #endregion
                    }
                    //Create the file
                    StreamWriter writer1 = File.CreateText(xmlPath);
                    writer1.Write(output);
                    writer1.Flush();
                    writer1.Close();
                    #region Debug output
                    if (debugMode)
                    {
                        output.Append("<strong>just wrote the new cache file</strong><br />");
                    }
                    #endregion
                }

                return output.ToString();
            }

            /// <summary>
            /// Worker method to identify the MD5 checksum of a string
            /// in this instance used to ensure the RSS file isn't already
            /// cached (based on the URL supplied)
            /// </summary>
            /// <param name="str"></param>
            /// <returns></returns>
            public static string GetMd5Sum(string str)
            {
                Encoder encoder1 = Encoding.Unicode.GetEncoder();
                byte[] buffer1 = new byte[str.Length * 2];
                encoder1.GetBytes(str.ToCharArray(), 0, str.Length, buffer1, 0true);
                byte[] buffer2 = new MD5CryptoServiceProvider().ComputeHash(buffer1);
                StringBuilder builder1 = new StringBuilder();
                for (int minsToCache = 0; minsToCache < buffer2.Length; minsToCache++)
                {
                    builder1.Append(buffer2[minsToCache].ToString("X2"));
                }
                return builder1.ToString();
            }

        }
    }

    XSL that I use for Last.FM

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html" /> 
      <xsl:template match="/">
        <h2>Recent Tracks</h2>
        <ul>
        <xsl:for-each select="recenttracks/track">
            <li>
                <a href="{url}">
                    <xsl:value-of select="artist" /> - <em><xsl:value-of disable-output-escaping="yes" select="name" /></em>
                </a>
            </li>
        </xsl:for-each>
        </ul>
        <p><a href="About-Last-FM.aspx" title="last.fm - The Social Music Revolution"><img alt="last.fm - The Social Music Revolution" src="images/lastfm_mini_black.gif" /></a></p>
      </xsl:template>
    </xsl:stylesheet>

    To use it on the blog template

    <% GetRSS("LastFM.xsl", "http://ws.audioscrobbler.com/1.0/user/timgaunt/recenttracks.xml", 25, false)|tsd %>

    This is a pretty crude way of doing it IMHO because the XSL transforms the stream directly, eventually I’ll update the code so it includes a timeout (as John’s did) and having seen the performance implications on my blog, make sure the request is made asynchronously.

    FWIW I have set my cache value to 25minutes, I did have it as 1min for fun but it killed the blog, why have I set it to 25mins? Well, most of my tracks I would think are 2-3minutes long, as I list 10 tracks at a time that’s 20-30minutes listening time so it’ll still keep a fairly accurate overview of my tracks without having massive performance issues on my blog :)

    Incase you don't want to or know how to create this macro as a DLL I have created it for you :)

    dasBlog RSS feed macro" onclick="javascript:urchinTracker('/download/zip/TSDMacros_v1_23-02-07');" href="/tim/files/TSDMacros_v1_23-02-07.zip">Download the complete dasBlog RSS feed macro (4KB - MD5 Hash: e3d7d6320109fd07259e8d246b754f13)

     

    Don't forget to follow me on Twitter.

    DasBlog RSS Feed Macro
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [2]  Trackback LinkTrackback
    CategoriesTags: ASP.Net | dasBlog | The Site Doctor | Web Development
    # Friday, February 23, 2007

    Firefox class name and space idiosyncrasy

    Friday, February 23, 2007 6:20:17 AM (GMT Standard Time, UTC+00:00)

    We’re currently reworking www.florame.co.uk to improve it’s search engine ranking from virtually non-existent to (hopefully) first page for various inflections of organic aromatherapy, organic essential oils and all sorts of other aromatherapy products.

    Despite the on-going debate on whether search engine crawlers prefer pretty XHTML or not, I still believe strongly that having your site’s content as the dominant code on every page MUST be better than having a plethora of tags (aka tag soup) but that’s for another post. So, with my feelings on XHTML (or at least neat HTML) in mind one of our recommendations was to re-work the site’s code –most importantly with the removal of the JavaScript menu at the top which is seriously impeding the site’s ranking. I decided we should opt for a form of CSS menu and those in the know, know there are only a few available options, for reference we used Suckerfish drop down menu.

    The Suckerfish CSS drop down menu has been fairly heavily tested but I think I’ve found an issue with Firefox, basically the JavaScript marks up the LI with a hover class (sfhover) which then ensures it works as expected (this isn’t needed in IE7 or FF btw). The catch I’ve found however is that in FF1.5 (will test in 2.0) with scripts enabled, the menus are staying shown.

    After a little head scratching the issue was narrowed down to this line of JavaScript:

    this.className = this.className.replace(new RegExp(" sfhover\\b"), "");

    Thanks to Firebug I was able to step through the code and check out the properties at every stage, in this instance I found that Firefox trims the leading and trailing space from the className so instead of it reading class="sfhover" as it is written, it had class="sfhover" which may be correct in some ways but obviously cocked up the regEx.

    The solution is really rather simple, just change the space so it’s optional:

    this.className = this.className.replace(new RegExp("\\s?sfhover\\b"), "");

    It’s not an ideal fix but in the case of Florame organic aromatherapy it sorted the issue :) I’m going let Mozilla know about this as in some ways I think this is a glitch (though I can see their thinking that the developer didn’t mean to add the leading space) to see what they say. It wouldn't surprise me though if it was something I had done wrong!

    For reference, the entire menu script now reads:

    <script type="text/javascript"><!--//--><![CDATA[//><!--
    sfHover = function() {
        var sfEls = document.getElementById("nav").getElementsByTagName("LI");
        for (var i=0; i<sfEls.length; i++) {
            sfEls[i].onmouseover=function() {
                this.className += " sfhover";
            }
            sfEls[i].onmouseout=function() {
                this.className = this.className.replace(new RegExp("\\s?sfhover\\b"), "");
            }
        }
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //--><!]]></script>

    Update 7th May 2007: Darren over at Forma3 has come up with a new an improved version of the SuckerFish menu which includes a number of nice improvements and is well worth checking out: CSS drop down menus with persistent top level menu styling

     

    Don't forget to follow me on Twitter.

    # Friday, February 16, 2007

    Business start up advice downloadable PDF

    Friday, February 16, 2007 6:54:35 AM (GMT Standard Time, UTC+00:00)

    I’m still somewhat shocked at how well the series on business start up advice was received, I was expecting one or two hits on it but so far I’ve had over 1,000 visits to the article which is pretty shocking as this blog in its entirety was only getting that a year(ish)! I’ve also had some fantastic feedback which is very touching so those of you who have got in touch thanks!

    Ok, following the posting of my recent business start up advice mini series I was asked by a number of people to post it as a PDF which I’ve finally managed to do. It’s rather long I’m afraid weighing in at around 26 pages so it should keep you busy giving me time to write the additional articles!

    Download the PDF version of the complete business start up advice article here (27 printed pages including a 1 page feedback form - 189KB).

     

    Don't forget to follow me on Twitter.

    WowWee FlyTech DragonFly -awesome!

    Friday, February 16, 2007 6:49:41 AM (GMT Standard Time, UTC+00:00)

    I was planning on writing about this new gizmo that a friend of mine from the states Doug Setzer has got his hands on but then he asked me to and I didn’t really feel like it after that ;)

    The WowWee FlyTech DragonFly

    Just kidding, Doug’s bought a WowWee FlyTech DragonFly and I have to say it looks great fun. He’s written a review about the WowWee FlyTech DragonFly at www.mydragonfly.info which is worth checking out. As usual he’s pimped the site out with Google AdSense so before you start clicking on his adverts make sure you have a click on mine!!

    Now I’ve got to plan a trip over to the states so I can have a play with his WowWee FlyTech DragonFly...

     

    Don't forget to follow me on Twitter.

    WowWee FlyTech DragonFly -awesome!
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [3]  Trackback LinkTrackback
    CategoriesTags: General | Fun and Games | Random
    # Wednesday, February 14, 2007

    My first heads up (I think)

    Wednesday, February 14, 2007 6:28:29 AM (GMT Standard Time, UTC+00:00)

    Awesome, I had my first non-friend/family cross-blog comment the other day (very exciting stuff!) so I decided to check out the referring site and there, in all it's glory was a link to by blog! Seeing as one of the primary aims of this blog was to help others -even if it was just with simple information that other's may consider trivial- I'm over the moon! (Yep, it's the simple things in life that please me!)

    So thanks to -=DeathToSpam=- whoever you are that made my day :)

    If you don't believe me, check out the "Noteworthy Dev-Blogs" list at http://aspnyc.blogspot.com/ personally I don't feel I'm worthy enough to be listed next to Phil Winstanley and Scott Guthrie but it's certainly an honour!

    If you've linked to my blog I'd love to hear from you and see what you're saying.

     

    Don't forget to follow me on Twitter.

    My first heads up (I think)
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: Internet | Random
    # Tuesday, February 13, 2007

    Importing/Referencing DLLs in Visual Studio

    Tuesday, February 13, 2007 8:03:03 PM (GMT Standard Time, UTC+00:00)

    A couple of people have got stuck on various lists/forums I’m on moving from ASP to ASP.Net and the differences there are, the one first major sticking point I had was referencing DLLs –so don’t worry you’re not the only one! So this is a really simple look at what you need to look at and how you reference DLLs –if you’ve ever added a DLL before you’ll probably find that this is too simplistic for you but read on anyway!
    Firstly, referencing a DLL is basically a way of including someone else’s code within your project (or a common codebase that you re-use), this also includes controls, useful/common functions or just additional functionality such as Crystal reports.
    Before you can use someone else’s code (i.e. Phil Whinstanley’s error reporting class) within your code you have to include a reference to the relevant DLL. The first thing I would do is create a folder somewhere that’s easily accessible to all machines that may need to reference the DLL i.e. “c:\Useful DLLs\”. Then, within this folder, I would create the following sub folders:

    • c:\Useful DLLs\.Net 1.1
    • c:\Useful DLLs\.Net 2.0
    • c:\Useful DLLs\.Net 3.0
    • c:\Useful DLLs\ASP.Net 1.1
    • c:\Useful DLLs\ASP.Net 2.0
    • c:\Useful DLLs\ASP.Net 3.0

    This is something that I’ve only recently started doing after having multiple releases for the same DLL. For each DLL place a copy within the relevant folder.
    Next, load your project within Visual Studio, right click the solution (this is the very top of the tree) and select “Add Reference":

    A window will then popup that looks something like this:

    Depending on what sort of reference this is, the majority of the time I would expect you’ll be needing to use the “Browse” tab –this allows you to navigate the FSO and find the DLL to reference (which should be somewhere in c:\useful dlls\). Once you’ve found it select the DLL and click Add.

    Your DLL is now referenced and you should be able to start using it straight away. Depending on what you need to do with it you’ll also need to add Page and/or Codebehind imports. To check that it has imported correctly, in Visual Studio 2003 you should be able to see it in the references folder or in Visual Studio 2005 you will need to click into the "Class View" tab of the Solution explorer:

    How do I identify the namespace?

    I had someone ask me a while ago why the his code was throwing a compilation error, it turned out that although he had named the DLL MyDLL, the namespaces within the DLL he wanted to reference was MyNamesapce so how can you identify the namespace?

    The easiest way to do this is to use something called the Object Explorer, this should list all the referenced DLLs for a given project and allow you to navigate the namespaces, classes and objects within the class. To open the Object Explorer click on the View menu and then “Object Explorer” within the “Windows” menu. Navigating the DLL is easy, you can either search through it using the search box at the top or alternatively navigate using the object tree.

    The best way to work out what declaration you need to add is to locate the object, method or control you plan on using either using the tree navigation or searching, then selecting it. Once selected you will notice the bottom pane of the Object Explorer will change and the namespace will be listed, this is what you need to add as your reference. If you need to enter the assembly name, you can identify this easily as it’s the name given to the top node of the tree –this should have a little grey icon next to it.

    If the DLL is adding a control to the page

    You’ll need to reference the namespace at the top of the page like this:

    <%@ Register TagPrefix="TSD" Namespace="TheSiteDoctor.WebControls" Assembly="TheSiteDoctor" %>

    You can use whatever prefix you like for the control, I tend to keep it between 2 and 4 characters in length for ease i.e. “TSD” but that’s up-to-you. Adding the control is done in the same way you add the standard controls:

    <TSD:SuggestionTypeRadioButtonList runat="server" ID="radCategories" CssClass="inputRadio" ValidationGroup="suggestion" />

    You’re all set :)

    If however this is a control set that you plan on re-using throughout the application I would opt to add a reference within the web.config, this means you don’t need to repeatidly add the reference for each page. To do this you’ll need to add the following to your web.config file:

    <system.web>
       <pages validateRequest="false">
         <controls>
           <add tagPrefix="TSD" namespace="TheSiteDoctor.WebControls" assembly="TheSiteDoctor" />
         </controls>
       </pages>
    </system.web>

    If the DLL is adding functionality to the codebehind or you want to use the control within the codebehind

    If you want to use the control or add the control to the page dynamically you will need to include a reference to the namespace within the codebehind –in the same way you do the System namespaces. This is really simple, at the top of the page you should see a few “using” statements or in VB “Imports”, you’ll just need to add the referenced DLLs namespace below (or above –or- in the middle!) of these others, as long as it’s with the other statements you’ll be fine. You can then reference the various methods and properties of the control.

    using TheSiteDoctor.WebControls;

    public partial class SuggestionsPage : System.Web.UI.Page
    {
        protected void btnAddEntry_Click(object sender, EventArgs e)
        {
            int cat = radCategories.CategoryId;

            //Do something with it here...
        }
    }

    I hope that helps you getting started with this new way of importing common code, it’s fairly intuitive once you’ve done it once or twice, but those first few “Could not find xyz –Are you missing an Assembly or Reference” messages do drive you nuts ;)

     

    Don't forget to follow me on Twitter.

    # Saturday, February 10, 2007

    Automatically delete old IIS log files

    Saturday, February 10, 2007 4:23:10 PM (GMT Standard Time, UTC+00:00)

    This is a really useful little VBS script that I’ve been meaning to post for a while now (along with a couple of other little applications I’ve written for log file analysis). I don’t think I wrote this script but at the same time can’t recall where it came from.

    It basically traverses the FSO finding files with the designated extension and assuming the match the standard IIS date format, checks whether they’re older than x days, if they are deletes them. Running it is simple, place somewhere obvious on the server and just double click it. Alternatively if you want to read the output, run it from CMD. For safety’s sake, the first time you run it I would leave it just printing out the files that will be deleted.

    Personally I don’t schedule this script as although automation is great, I’ll probably have it delete the logs before I’ve had a chance to download them so what I tend to do is download the logs and then after that (or the next time I’m on RDC) I run it, I find that way I ensure I get all the log files i.e. if I go on holiday.

    I’ve got two other applications that I’ll post shortly, one outputs the location of the log files for each domain name within IIS and the other combines the log files into one for analysis –it also takes the exported file/folder locations and names the combined log files with the domain’s name –saves a ton of time!

    Download the VBS script as a ZIP file

    Option Explicit

    Dim intDaysOld, strObjTopFolderPath, strLogFIleSuffix, ObjFS, ObjTopFolder 
    Dim ObjDomainFolder, ObjW3SvcFolder, ObjSubFolder, ObjLogFile, ObjFile

    intDaysOld        = 5        'Number of days to retain on the server
    strObjTopFolderPath    = ""        'The location of your log files
    strLogFIleSuffix    = ".log"    'The suffix of your log files

    Set ObjFS = CreateObject("Scripting.FileSystemObject")
    Set ObjTopFolder = ObjFS.GetFolder(strObjTopFolderPath)

    For Each ObjDomainFolder in ObjTopFolder.SubFolders
    WScript.Echo("Folder: " & ObjDomainFolder.name)
        For Each ObjW3SvcFolder in ObjDomainFolder.SubFolders
            WScript.Echo("  Folder: " & ObjW3SvcFolder.name)
            Set ObjSubFolder = ObjFS.GetFolder(ObjW3SvcFolder)
                For each ObjLogFile in ObjSubFolder.files
                    Set ObjFile = ObjFS.GetFile(ObjLogFile)
                    If datediff("d",ObjFile.DateLastModified,Date()) > intDaysOld and lcase(right(ObjLogFile,4))=strLogFIleSuffix then
                        '*****************************************************
                        'DON'T UNCOMMENT THIS UNTIL YOU KNOW IT WORKS PROPERLY!!!
                        WScript.Echo("    Will delete " & ObjSubFolder.name & "\" & ObjFile.name)
                        'WScript.Echo("    Deleted " & ObjSubFolder.name & "\" & ObjFile.name)
                        'ObjFile.Delete
                        '*****************************************************
                    End If
                    Set ObjFile = nothing
                Next
            Set ObjSubFolder = nothing
        Next
    Next

    Set ObjTopFolder = nothing
    Set ObjFS = nothing
     

    Don't forget to follow me on Twitter.

    Automatically delete old IIS log files
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [29]  Trackback LinkTrackback
    CategoriesTags: IIS | Windows
    # Friday, February 09, 2007

    Some great software I use

    Friday, February 09, 2007 4:44:44 PM (GMT Standard Time, UTC+00:00)

    I was recently on the search for a new firewall after having so many people complain about it (and having a few issues myself). I asked a forum that was very happy to criticise ZoneAlarms what they recommended to use as people were quick to flame and not explain.

    Sadly, despite making very clear I wasn't interested in flaming, the majority of the responses I got back were still flames about ZoneAlarms but there were a couple of nice people who responded with useful suggestions. I thought as there seems to be very little advice about suitable firewall replacements to ZoneAlarms I would post what I've got installed as well as a couple of other useful programs in the process.

    Firstly let me explain why I feel the comment "If you've got a hardware firewall you don't need a software firewall" is a ridiculous statement. My reasoning dates back to Greek times -notably the Trojan war when seeking entrance to Troy, Odysseus had a large wooden horse (the sacred animal of Poseidon) made as a gift. As I'm sure everyone is aware, the horse was hollow and filled with a load of soldiers which popped out after the Trojans were done celebrating the end of the siege and let the rest of the army in through the front gates to slaughter all the drunk Trojans. Anyway, back to my point, yes you may have a hardware firewall that will stop nasty attackers getting in but what happens if you unwittingly invite one in? The likelihood is it'll invite a load more in after it which will end up crippling your computer. So for that reason I have a software firewall to monitor the traffic in and out on my machine.

    The software

    The first thing to note here is that all this software (at time of posting) is free -what can I say? I'm a cheapskate ;) The links are to the file download page so please let me know if they've broken since posting.

     

    Don't forget to follow me on Twitter.

    Some great software I use
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [1]  Trackback LinkTrackback
    CategoriesTags: Software
    # Thursday, February 08, 2007

    The Behemoth has arrived

    Thursday, February 08, 2007 6:14:19 PM (GMT Standard Time, UTC+00:00)

    Quite why I’m posting about my new mug I don’t know but hey why not –it’s all good for a laugh!

    Basically Stacey got me a new mug for Christmas and it’s put my last ones (largest “old” mug was ½ liter) to shame so much that I just had to write about it! This mug is awesome, I can make a cup of tea in the morning before I go into the office and it’ll keep me going until at least mid-morning.

    • The mug from the front
    • The mug from the above
    • Comparison of new and old from the front
    • Comparison of new and old from above

    The stats

    Height
    14cm
    Diameter
    12.5cm
    Circumference
    39cm
    Capacity
    1.2 Liters
    Teabags per brew
    2
    Time to drink
    15mins+

    As usual, this post is more just about fun than anything else ;)

     

    Don't forget to follow me on Twitter.

    The Behemoth has arrived
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: Fun and Games | Random | The Site Doctor
    # Tuesday, February 06, 2007

    WebDD -I was there, were you?

    Tuesday, February 06, 2007 12:00:26 PM (GMT Standard Time, UTC+00:00)

    What an awesome event, I was originally in two minds about going to the latest conference installment from Phil Winstanley, Dave Sussman (and all the other dedicated people involved with the other DDD events) but boy am I glad I went.

    This time I decided to take it to the next level and rather than driving down and back on the day I’d drive down the night before with Stacey and stay over in a local hotel. This worked really well, not only did it mean I was awake for all of the seminars but I could get some work down the next day too ;)

    Anyhow, back to the day, for once I had the foresight to choose the seminars I was going to attend before I arrived and decided not to attend all of Scott Guthrie’s talks mainly because of the following I knew he’d have but also because of the great alternatives available so here’s my breakdown of who I went to see and what I thought of their talk:

    Microformats - HTML to API (Glenn Jones)

    Read Glenn Jones' blog post about the day

    GlenN Jones (not Glen Jones as was listed in the schedule ;)) presented a very interesting talk on microformats, it’s not quite what I first thought it was (for some reason I thought it was some form of HTML applets but lets not go there!). Microformats are certainly something I’m going to look into in the future but as Julian Voelcker has pointed out quite how practical they are to use in a CMS situation I’m not sure.

    I think from an SEO point of view and also from an information sharing POV they’re very interesting and I’ll certainly be integrating them into various sites for testing purposes sooner rather than later (in fact if you check out my about me page they’ll be there with the new update coming soon … now I just need to re-work my tag output* using IISMods' URLRewrite).

    *Glenn pointed out that  when using the rel=”tag” attribute the last “word” in the associated URL should be the tag itself -something I didn’t know but will be sorted as atm it’s along the lines of “CategoryView,category,Business,Business%20Start-up%20Advice.aspx” etc which isn’t very useful.

    I think in principle microformats are a good idea for something like a blog or a semi-static site where the developer (or someone with knowledge of microformats) has control over the content but how you could role them out in a client managed site is a little more complicated and something that will need some more thought -do you offer buttons to insert the code markup for them? Can you offer nested content easily etc.

    The other thing about them I’m not too sure about is (miss)use of the abbr tag -again that was only something I picked up in the talk so may have missed the point, I’ll need to look into it further.

    Either way it was an interesting insight into a new concept that I’m going to support if I can :). Check out the main microformats site at: www.microformats.org

    Glenn Jones is also the developer behind the back network site that was used to link all the delegates together, it’s an interesting concept that once again promotes a social network on the internet which is all the rage at the moment but also allows you to interact with other delegates before the event -this is something I’d have done had I had more time before the event!

    Download the slides to the Microformats - HTML to API talk by Glenn Jones

    Web Accessibility: What, Why, How, and Who Cares? (Bruce Lawson)

    Read Bruce Lawson's blog post about the day

    Making web sites accessible is something I’ve been interested in pretty much since I got involved with ASP.Net 1.1 and I get endlessly tired of hearing fellow ASP.Net developers complain that you can’t make web sites accessible using the ASP.Net platform -balls can’t you, ok it’s not something that comes out of the box and at times is a little awkward but a lot of it is just common sense and consideration.

    Bruce Lawson’s talk was a breath of fresh air, it was great to see someone having the courage that I’m yet to muster (well, more the time but hey) to convince my fellow developers to make their sites accessible.

    Why the hell shouldn’t your site be accessible to all? It’s not all about money, in my mind it’s just about being fair to others -following (as ever) Google’s moto of don’t be evil. I liked Bruce’s method of presentation as it was far more personal than the usual “you should care because it’s the law” or “you should care because you’re missing out on a ton of money”, when asking the question “who cares?” -using his words not mine- he said “rather than quoting facts and figures at you trying to convince you, -my mate Theresa does”. I think this in itself was a different method of engaging the audience and I certainly felt it worked.

    The talk wasn’t particularly in depth (which baring in mind the audience I expected) but I felt it was enough to plant the seed of interest with those that weren’t otherwise that aware or interested about accessibility. I hope that they’ll now actively encourage fellow developers to take action -not necessarily by redeveloping their past sites as many clients can’t afford this, but by giving some consideration to accessibility in future designs -i.e. DON’T use buttons for menu systems!

    I can’t hand on heart say all our sites are overly accessible but I’m learning and I feel each new site we’re involved in is that little bit more accessible. Bruce did share a very useful site called “Blind Webbers” where you can get in contact with screen reader users -I’ll certainly be checking that out with the new design for The Site Doctor, for others interested Bruce sent me the link: http://www.webaim.org/discussion/mail_message.php?id=9019. I’m thinking I’ll see what they think of Miss Mays adult store -could be a good introduction!!

    The point that made me laugh the most was his demonstration of using “Click Here” as link text, his demo was simple but effective -you can check it out on his site: http://www.brucelawson.co.uk/index.php/2007/webdd-conference-slides-and-questions

    One thing I do need to think about is the order of elements on the page, i.e. at present this blog layout has the menu appearing before the content -mainly because that was the quickest way I could get the layout sorted, but I think I need to re-order it so the menu comes last -that said I do have a “Skip to content” link at the top -how effective it is I’ll let you know. Another thing I also want to pass by Bruce is image replacement techniques as I’ve tried a few now and I’d be interested to see how they perform on screen readers and the like.

    Download the slides for the Web Accessibility: What, Why, How, and Who Cares? talk by Bruce Lawson

    Quick and dirty Usability tests - one week, no budget, and no usability facility (Zhivko Dimitrov)

    Read Zhivko Dimitrov's blog post about the day

    Again, interested in making my sites as user friendly as possible I thought that this would be an interesting talk but it wasn’t quite as it was portrayed -instead he went into how they perform remote usability tests with a budget. None the less it was a fairly interesting talk.

    Zhivko is from Telerik and clearly has a fair amount of experience in usability testing, I was hoping he’d have some good ideas on how to offer usability testing on no budget but sadly he didn’t. There were a couple of interesting points raised however that I don’t think I would have thought of -firstly the re-use of testers, if you use a tester more than twice within a year they’ll start to know what you want them to say rather than what’s there. The other point raised was if you’re using remote testing, you loose the non-vocal indicators of frustration such as a furrowed brow or someone scratching their head.

    Zhivko’s opening demo however was a recording of a guy trying to find a grid component on their competitors site, despite the fact they spent a fair amount of time laughing at the guy in the background I thought this was a great example of a poorly designed site and how important it is to highlight your site’s calls-to-action which is something that I’ll have to remember while optimizing our newest SEO client for online poker The Rivercard -one of the issues we have already highlighted is that many of their download links are below the fold of the screen which reduces the chance the user will click the link.

    Download the slides from the Quick and dirty Usability tests - one week, no budget, and no usability facility talk by Zhivko Dimitrov

    Connecting Design to Real Business Value (Brandon Schauer)

    Visit Brandon Schauer's blog

    As with Zhivko’s talk, this was another talk that wasn’t quite as it was portrayed by the title, but I was pleasantly surprised by the content. Brandon Schauer’s talk was more about business modeling and how analyzing the current business method can be improved with a little thinking (and design) -ok that’s obvious ;) but his methods were nice.

    I found the talk incredibly interesting -especially following my mini-series on business start-up advice, I thought this was a really well timed and interesting talk. Some of the ideas he offered were simple and to the point so you can apply them to any business, the issue I have with it though is whether I can apply it to any of my clients -I’d love to take the time to go through Miss Mays adult store and help them improve some of their business processes but they don’t have the money to invest and sadly neither do I.

    I do however think that I can apply some of the concepts he was talking about to an example business which in turn could then be a starting point to discuss business improvement with clients. This however will take a little time and I think Stacey will need to be involved as this is what she’s primarily trained in. Although I love developing and I don’t think I’ll ever get away from it (certainly not in the foreseeable future anyways) I am getting more and more interested in business analysis, it’s not something that I’ve really got any experience in yet (having only been in business for a few years) but perhaps one day it’s an alternative career path I can choose…

    Either way, Brandon’s talk was well worth seeing and if he’s ever at a future conference I attend I’ll certainly make the effort to see him talk.

    Download the slids from the Connecting Design to Real Business Value talk by Brandon Schauer

    WPF/E (Scott Guthrie)

    Visit Scott Guthrie's blog

    For the final talk I decided to watch Scott Guthrie’s talk about WPF/E and boy what a talk it was! I almost didn’t get in as we were hearded in like cows (which was most amusing I have to be honest), the woman stopped me right on the entrance -I think much to Julian Voelcker’s delight as he’d managed to get a seat. Luckily though the women on the doors (yes women -not burly bouncers!) took pity on us poor, desperate geeks in admiration of some Yank they didn’t know and let us line the sides of the auditorium -which meant I ended up getting a front row (floor) seat.

    The talk was one of those “look at what’s coming” type talks but with a twist, it was something that I can see being of real use -and more than that gave you the urge to try it out. WPF/E looks like a really exciting new technology -even if Julian does think it’s just the same as Flash. As I don’t particularly like flash I think this will be a nice introduction to our development arsenal. That and the possibilities are far greater than those offered by Flash -especially where data interaction is involved.

    Scott Guthrie did show an impressive demo of WPF/E which can be seen at www.vista.si -it’s one of those “wow, I can’t believe I’m seeing what I’m seeing” moments, the site is basically a replica (working replica) of Windows Vista -but on the web. It even works with Firefox!

    The interesting point that I picked up on is their method of rolling out the WPF/E platform to users, rather than offering the usual Windows Update installer, it sounds as though it’s all going to be done in the same way the flash play is -a small (1.1MB IIRC) file will be downloaded the first time you visit a site that requires WPF/E and that’s it!

    I do have concerns over the accessibility of WPF/E but Scott Guthrie did assure us that later versions of WPF/E will be made more accessible. At the end of the day however, I guess it’s just the same situation as entirely flash sites -those that want to offer them, have to offer an accessible alternative (and as Bruce Lawson pointed out -NO, IT DOESN’T HAVE TO BE UGLY!).

    It was also nice to see Scott Guthrie talk as there are so many blog posts around the net talking about how they saw him, now I can say that I’ve seen him talk -somewhat sad but hey!

    The slides aren’t yet online but I’m sure Scott Guthrie will upload them to the Scott Guthrie's presentations page soon enough!

    In summary

    I always take a conference as a whole -there’s always going to be at least one talk which isn’t quite what you expected, if you can come away with at least one nugget of information that you didn’t have before -or- with a little of that zest for doing what you do back again it was well worth attending. In this case I got a real buzz out of most of the talks and have plenty of things to try out -now I just need to find the time!

    And if all that wasn’t enough to get your juices going and wanting to do some more development, I (I think for the first time ever) won something in the raffle -I was in the queue hoping for the book on accessibility by Bruce Lawson but actually won a years subscription to ComponentArt’s Web.UI component set -I’m well chuffed at that, now I just need to find somewhere to use them!! Oh, I shouldn't forget the free copy of Microsoft Expression Web we were given, and the T-Shirts and, and... :D

    I did get to meet up with a few people off the MsWebDev list but sadly not all -Mickey, I’ll have to say hi next time. The one thing that did amaze me was how long the lunch was, I don’t recall any of the DDD events being that long.

    If you went and you’ve not already done so, you should go and leave feedback on the event -it’s the only way they can improve it ;) so go leave your feedback on WebDD (http://webdd.co.uk/Feedback.aspx). Apparently you can also review it on the back network site (http://webdd.backnetwork.com/reviews/editreview.aspx

    If you missed out on WebDD 1, hopefully there’ll be a WebDD 2, I’ll post any news I have as soon as I have it -for my one blog reader that is :)

     

    Don't forget to follow me on Twitter.

    WebDD -I was there, were you?
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: ASP.Net | Business | Design | General | The Site Doctor | WebDD
    # Sunday, February 04, 2007

    Finances (VAT, Accountants etc)

    Sunday, February 04, 2007 8:58:09 AM (GMT Standard Time, UTC+00:00)

    Billing

    This is something that we’re in the process of re-working as we have a variety of billing periods ranging from ad-hoc to annual. This is fine as long as you have some method of determining which method a client requires.

    Stacey has devised a very good suggestion that should also avoid any complications with large annual invoices:

    • £0 - £300: Invoice Annually
    • £300 - £600: Invoice Bi-Annually
    • £600+: Invoice Monthly (£50+pm)

    There are a few reasons I like this method:

    1. You won’t upset your client by sending them a £500 invoice they’d forgotten about
    2. It keeps you in contact with larger payers more frequently
    3. For the larger invoices it reduces the impact to you if the client chooses not to pay
    4. £50pm+ is sufficient an amount to justify the 10 minutes admin a month

    Payment periods are important, make sure every invoice has a payment period on it but don’t expect your clients to adhere to it. You’ll learn what each particular client is like at paying as you build your client base but many will wait until the last payment date to pay, if at all until you start to bug them (see: Processes and Procedures about having a dedicated admin day). Having a shorter payment period (or “Payment Required on Receipt”) will allow you to start chasing the client sooner.

    What should your invoice look like?

    There are a lot of example invoices on Microsoft’s Template website [http://office.microsoft.com/templates/] but it’s simple, keep them simple (this is a nice example: Services invoice with hours and rate) and only contain the information you need. Have your designer design you a nice letterhead that you can use with your invoices, not only does it look more professional but it ensures your main contact details are contained on the invoice, if your letterhead is a little different you never know, they may pay it faster as it catches their eye!

    Again it depends on your particular line of business but I would suggest you have the following information on it at the minimum:

    • If the invoice isn't on your letterhead paper then make sure your address is shown
    • Their address –and if it’s a corporate client include a contact’s name to ensure it lands on the correct desk
    • An invoice reference (an auto-number should suffice but you could prefix this if you like)
    • If you have it, the purchase order number
    • The date your invoice was issued
    • The payment due date
    • A summary of the items included on the invoice including:
      • An SKU (if relevant) i.e. 1HOURDEV for 1 hour of development work
      • A narrative (description) of the item
      • Unit cost of the item
      • Quantity of the item
      • Line total
    • Total amounts –if you’re VAT registered, include the amount with VAT, without VAT and the VAT itself
    • Your payment terms (i.e. all invoices must be paid within 14 days)
    • You payment details –sounds crazy but I see so many invoices without bank details or even information on who to make the cheque out to anywhere. It’s so simple to place this information on the bottom of the invoice, why make it harder than it needs to be for your client to pay you? If it’s not there, they need to make contact with you (if you’re around), you then need to look up that information, they then… ok you get the idea ;)

    It’s obviously optional and up to you but I think it’s nice touch to thank the client for their business on or with i.e. on a complimentary slip the invoice (see: Client and Supplier Relations) –yes, I love my clients!

    Accounting

    I’m not an accountant myself but my (far) better half Stacey is a chartered management accountant with CIMA (an alternative to ACCA) and I ran this past her as I had concerns with it. Her response was rather than obtaining (expensive) textbooks that you’re unlikely to understand (I’ve seen them, I can understand them but they’re somewhat boring) the best thing you can do is read through the documentation from the Inland Revenue –mainly because as soon as that textbook is printed it’s out of date which can (obviously) have massive re-processions for you!

    There are many different accounting bodies and they all have their own specialities. It’s important to understand that a Chartered Management Accountant can’t necessarily help you with your tax return, in the same way a taxation specialist can’t necessarily help you with profitability analysis (whereas a Management Accountant can). One amusing ditty about Chartered Accountants (and I expect this covers other industries with multiple bodies) is that they all feel their chartering body is the most superior whereas they’re probably all much the same.

    It’s important to remember that it’s the same as your industry, it’s great that the client knows what you’re talking about but it’s highly unlikely they know as much as you.

    Again from Stacey, any accountant worth their money will save you more than they cost you, as with many things in business –recommendation is key, ask around friends and family or fellow businesses to find a reputable accountant and if at all possible get a few references.

    There are many accounting bodies out there (CIMA, ACCA, CIPFA to mention a few) but make sure when choosing your accountant that they are chartered in some way or another as this means they’re more likely to be up-to-date with their knowledge and to some extent being regulated. When you’re setting out, you should be able to have all your books done for under £500pa comfortably.

    VAT

    Should you go VAT registered or not?

    When setting up The Site Doctor, I chose not to go VAT registered on the basis that the majority of our start-up contracts would be non-VAT registered companies. As it turns out I was wrong as every man and his dog these days is VAT registered but more than that I feel that many businesses perceive non-VAT reg'd companies more fly-by-night.

    Most people (especially in business) expect companies to be VAT registered so it hasn't affected potential contracts and we have the added advantage that we can claim money back ;). Sadly, the only people that suffer are non-registered people and at the end of the day they're unlikely to have the money to justify you not going VAT registered.

    One thing to note if you’re setting up as a team is there is a limit on the turnover of the company at which point you are forced to be registered, this year (06/07) the limit was around £65k (refer to the Inland Revenue’s website [http://www.hmrc.gov.uk/]) so if there’s 3 of you in the team and you hope to take home £20kpa you’ll need to go registered straight away.

    You don’t need to be over the threshold to be registered as you can voluntarily register before you reach this threshold. There are a couple of benefits to voluntary registration that come to mind:

    • The perception of your company’s earnings is increased. When not registered, your clients will know you have a turnover lower than the current threshold. This is not a good start when approaching clients with a proposal near over this threshold.
    • By charging input tax to your clients, you can claim some money back, virtually ever purchase you make has VAT added to it which you can offset on your charges.

    One flipside however is the additional administration work.

    Once VAT registered

    Yes, a great tip and this is so easy to do if you've got access to internet banking through your bank, it also means you have a nice nest egg at the end of each year as Sean said -I did the same with my personal tax before going VAT registered.

    In the case of LloydsTSB they allow you to manage both accounts within the single login which makes it even easier, if you want to be really prepared, just halve each invoice, put one half in your savings account to cover VAT and Taxes etc and the other half is what you take home.

    Having a little money totting up on the side in this way allows you to have either: A nice little Christmas bonus (by this time you should know what your tax bill is going to be and you’ll have a reasonable idea of your Quarter 3 VAT return) -or- A tidy sum to invest into the business someway :)

    We recently registered for VAT and the official stance on claiming VAT back was:

    3 years on goods (hardware etc) as long as on the day of incorporation you still have the item, receipt and you've not sold it on.

    6 months of services (hosting, domains etc) as long as you have the paperwork.

    I was told that the Inland Revenue think nothing of start-ups and businesses in the IT sector to have a very low (or credit) first return (and if you're going registered from day one then the first few returns) due to the cost of setting up.

    For the latest up-to-date information check out the Inland Revenue’s website: http://www.hmrc.gov.uk/

    I couldn’t agree more, when you’re small, set aside a day a week to input your expenses into a database and as long as you’ve got your invoice lists to hand totalling up your income isn’t hard, the form’s dead simple (see photo) so there’s no need to worry about that. I’ve even uploaded the MDB that we’re currently using as a stand-in while our accounting system is finalised.

    • Front page of a VAT Return
    • Rear page of a VAT Return

    While on the subject, in-house system development –choose it carefully, weigh up the costs of doing it yourself against buying an off-the-shelf solution. As a developer it’s all to easy to say “I’ll do it myself and save a few quid” –it’s not always the case, I’m only having ours custom built so I can tie it in with other areas of the business.

    Example Microsoft Access Accounting Database (21KB)

    Banking

    Whatever you do, make sure you have a separate business account, it portrays a more professional image for your company (payments to your company will be addressed to your company name rather than your personal name).

    Keeping up a pension is important, talk to your accountant about the options available to you. It’s also worth considering alternative pensions such as property investment. I know a few business owners that own the property the business operates within.

    That’s a fine tip, using a personal account for your company savings can indeed earn you an extra 3-4%pa which soon adds up. Make sure however it’s a separate personal account that you don’t tap into and don’t top-up with personal funds. That way you’ll make life a whole lot easier when calculating the business’ income from interest.

    LloydsTSB also offer an e-banking option which is exactly the same as all other accounts except electronic payments (debit cards, e-pay etc) are free, paying in cheques however still costs (and a little more IIRC). It’s a good account to have if you’re web savy and can do the majority of your banking online.

    Good point, the banks love you when you’re doing well however expect to be charged for your overdraft –many banks now charge a (reoccurring) annual charge of £50-100 for your overdraft facility, it may be a better (and cheaper) option to loan the business from your credit card if needed –taking advantage of the 0% period etc.

     

    Don't forget to follow me on Twitter.

    # Saturday, February 03, 2007

    New Business

    Saturday, February 03, 2007 8:57:30 AM (GMT Standard Time, UTC+00:00)

    Call me a sceptic if you like but once you’ve been in business for a while there are two common elements to pretty much every new client:

    1. Every client’s idea is going to be the next big thing (in their eyes anyway).
    2. Every client has so many contacts that they’ll generate you more business than you can possibly handle

    Both statements are usually used to encourage you to give them a bigger discount or agree to some form of partnership. I’m not saying you should immediately dismiss what they’re saying, the best business comes off personal referral from a past client but instead take it with a pinch of salt.

    Don’t feel that you need to agree to any partnership etc on the spot, go home, have a drink and then weigh up whether you feel what they’re saying can be backed by what you see or whether it’s likely to be a load of baloney. You really should look at every client as a long term relationship rather than a one-off squeeze.

    While on the subject of investment partnerships with clients I think in the right situation they are a superb idea. Since setting up The Site Doctor we’ve setup a number of investment partnerships with our clients which have in some cases been very profitable, others not so. The trick is to form your own opinion, if the client suggests you do all your work for free and they’ll invest their time, ask yourself why they don’t have faith in their own idea to invest any capital. Sometimes they don’t have the capital ready and it’s a great idea, sometimes the investments can be quantified equally through doing this just don’t let them talk you into something your gut says is wrong.

    What I tend to suggest in the case that they can’t raise the full amount for your services is suggest a part share, part capital payment but again you must decide how much the shares are worth. It does take a little time to investigate someone else’s proposed business but you’ll be kicking yourself if you don’t!

    Once you decided whether or not to invest your time and you’ve negotiated the best deal you possibly can make sure you get it down in writing. This is very important and we’ve been caught out with this in the past. We had a client who suggested a 15% turnover share for the first year to cover 50% of the development costs. We negotiated over email and had the agreement written down, where we were caught out however was with a misunderstanding on our behalf –we assumed that we would get 12 monthly commission payments but what wasn’t clarified was the client offered the first month of subscription free –so straight away we were down to 11 months. Then thanks to WorldPay, the first payment wasn’t received until 2 months after the customer paid which meant we only received 10 months of payments –luckily we’ve got good relations with the client and it was resolved amicably.

    So if you’re going to go into an investment like this, make sure all the cards are on the table otherwise you may not be as lucky as we were! Before finishing this point, I personally wouldn’t agree to a profit share on the investment without having a breakdown of all the expenses otherwise an unscrupulous client may over-inflate the expenses and so reduce your share.

    Having a portfolio is a great start, depending on your industry this may not be possible. If you’re starting out and have no portfolio (and have time) then why not generate a few mock-ups of your work, don’t spend too long generating them and they don’t need to be perfect working examples but people do tend to respond better to something they can touch/see.

    Networking

    The classic phrase of “it’s not what you know –it’s who you know that matters” couldn’t be truer. When I setup The Site Doctor I was lucky to have some excellent contracts through a good friend Vladimir Srdanovic, though previously a developer he felt that he no-longer wished to develop but instead just generate new business. I was keen and ready to develop on a mass scale so teaming up made sense.

    If you’re not lucky enough to have someone like Vlad within your midst already then networking is an ideal way to generate new business and as you grow will become invaluable, whatever hang-ups you may have (age, gender etc) don’t let them come into the equation.

    Your local Chamber of Commerce will most likely host events, the fee depends on your local Chamber of Commerce, but the Birmingham Chamber of Commerce for example charges an annual fee, after which the majority of events are free to attend. We were a member of Birmingham Chamber of Commerce for a couple of years however last year we opted out because of the mentality within our local chamber. On reflection I would probably opt to try more dedicated events such as those run by dedicated networking companies but be prepared to pay through the nose.

    Don’t forget that networking isn’t just about making useful contacts to sell to, it’s also a chance for you to meet your competition and other people involved in your industry. I’ve been meaning to find time to setup a new media type networking group up in the Midlands for a while but I believe the Multipack [http://www.multipack.co.uk/] does pretty much the same thing as I was proposing.

    Meeting your competition and others involved in your industry is also useful because they may be able to throw you work that they’re not able to undertake for themselves, for instance you’ll find many design agencies have a mutual agreement with a development company in place by which they pass web development work to their partner and vice-versa.

    It’s also worth noting that networking is no-longer just a face-face meeting event thanks to online networking sites such as SoFlow and LinkedIn to mention a couple, getting involved in these online communities may not generate any business directly but will again give you the opportunity to promote your business.

    As time goes by, you’ll be surprised where your business will come from –always be pleasant to people and whenever possible have time for people as they’re bound to thank you in one way or another later. It’s always worth thinking long-term with any new contact, they may not contact you straight away but get in touch from time to time and you never know what may come of it.

    When you’re at a networking event –in fact anytime you could bump into a potential client make sure you have plenty of business cards available with you. The best thing you can do to save fumbling through every pocket trying to find a card is to have 5-10 cards in each pocket (yes EVERY pocket!). That way no matter which hand you reach with you’ll quickly find a card. For those times you’re not expecting, keep a few cards in your wallet too or perhaps attached to the back of your phone* -basically with anything you take with you everywhere. Keep the supply refreshed too, I’ve been caught out before and you may just miss a great opportunity!

    *I’ve not tried this but it’s a thought!

    “Keep your hands free” -that was something I was told by a networking advisor and has always stuck with me and it makes sense, they always have a lot of free food/drink at these networking events so avoid the rookie mistake of piling a plate high of food and taking a glass of wine in the other hand –how will shake hands on introduction? Have a small plate of food and/or a glass of wine* –it keeps at least one hand free to shake hands with or hand out business cards!

    *Some events shell out on fancy clips that hold the glass on the side of your plate but don’t get me started on those! Just don’t try is the best advice I can offer there ;)

    Fantastic tip! This is something that we do but haven’t pushed a great deal –a while ago, The Site Doctor teamed up with a Bristol based Mobile Development company called Mobile Pie, I grew up with one of the owners Richard Wilson while at school and felt that his services complimented ours. By teaming up we’re able to offer a broader set of skills without taking on additional cost. By reselling their services you can also start making money without needing to do all the work.

    Along the same lines, if you’re going into web development, identify and be-friend good/great design companies, if you’re able to get 2 or 3 design companies on your side then you’ll probably find they’ll bring enough work to keep you busy all year around.

    Meetings

    You’ll find your own style of meeting once you’ve had a few meetings with your new clients and the format of these meetings will obviously depend on your business sector but here are a few (some obvious) tips to having a successful meeting.

    Before the meeting

    • When arranging the meeting or at least before the meeting contact the client and ask them whether there is anything specific they would like to discuss.
    • Prepare! It’s probably best to think of a meeting a little like a job interview, before your meeting do your research into the company.

    The day before

    Get everything together the day before your meeting, if needs be have a list of all the items you need to take with you and tick each one off. At the least I would get together:

    • A pen and pad of paper (make sure there’s ink in your pen!)
    • Contact details of the client –I would write these on paper rather than just relying on your mobile
    • Directions to the client
    • Any supporting documentation for the meeting
    • Whatever you plan to wear. Deciding what you’re going to wear the night before the meeting saves time on the day and ensures that you’re not left needing to iron your shirt 10 minutes after you should have left…

    What should you wear?

    What to wear comes down to your personal feelings and what you feel is appropriate for the client. When I first set out I would wear a suit to every meeting as I felt it was what was expected of me –I expect this came partly from the fact that I went to a public school but also from the image I had portrayed in my mind but choosing what to wear isn’t always that cut-and-dry.
    More recently I’ve been going to meetings more casually dressed, this is carefully judged however from my research of the company before the meeting (or after the initial meeting) but I’ve found that when dealing with SMEs –especially when you’re dealing with the founder of the business people seem to respond better. Wearing smart casual clothes also portrays the image that you’re comfortable with yourself and confident in what you’re doing.
    Steve told me an interesting story about one of his friends who runs a very successful industrial heating and air conditioning company. This guy has a phenomenal turnover (his average contract is into 6 figures) but said that he soon realised he got most of his business when he turned up in a dirty boiler suit. His theory is that his clients feel that he as the MD is not afraid to roll up his sleeves and muck in.
    That’s not to say however that there’s no place for the suit! I still wear a suit to corporate clients as it’s what’s expected, I love wearing a suit I’m just saying wear whatever you feels right for the client and industry.

    On the day

    • Be yourself, what you wear is crucial to this, if you don’t like wearing a suit or jeans then don’t. Getting a new client is all about being able to bond with the client, feel comfortable in yourself (and not putting on a front) and you’ll find it a lot easier to find some common ground. You’ll also find that people can see through you if you’re putting on an act, if this is your first meeting, that’s not a very good way of building your trust!
    • Get there early. 10 minutes early is sufficient, if you get there earlier, wait in the car or around the corner but whatever you do, don’t be late. Yes you could argue that it’s because you’re so busy, but I feel it shows that you don’t care about the client more! If you’re going to be late due to i.e. the traffic, call the client and let them know 30 minutes – an hour before hand (with mobile phones you don’t have an excuse now!)
    • Have fresh breath –nobody likes talking to someone with smelly breath and if you’re up against a couple of competitor companies you certainly want to be remembered but not as the “guy with the bad breath”. Keep some chewing gum, mints or even mouth wash in your car or laptop bag
    • “To Tea or not To Tea” that is the question! I’ve found this can really disrupt a meeting if it’s a one-man-band. When the client asks if you’d like a drink, best respond something along the lines of “only if you’re having one” –if they walk in with a fresh brew you don’t want them to waste 10 minutes of your scheduled time making you a drink when you could be selling!
    • Make notes. When you get into the meeting, open your notepad to a fresh page, head it up (client name, date, attendees etc) and leave it open with the pen/pencil ready to use. Pay attention to the client, remember what you can but if there’s something you feel is important write it down –all to often I’ve got out of a meeting, intending to make a note of something I’ve forgotten! Don’t make the same mistake. Make notes about the little things, names of the client’s family, birthdays etc as it will allow you to personalise future correspondence.
    • Listen to what the client is saying. I can’t stress this enough, showing an interest in what they’re saying is important as the client is bound to give you lots of useful information –not necessarily about the job in hand but perhaps information you can use to your advantage later i.e. knowing they don’t like Whiskey would come in useful when sending them a gift.
    • Don’t invite distractions to the meeting. I’ve decided against taking a laptop into meetings these days because they make the meeting very disjointed and it’s often unneeded –especially in the initial client meetings, opening your laptop screen between you and the client is like erecting a large wall between you! Make sure your phone/BlackBerry/PDA is turned off and any.
    • Thanks to Mike A: Try to avoid talking business for the first 10-15 minutes of the meeting, use this time to talk about anything else possible. Look around the room and pickup on anything you can use as a talking point –perhaps it’s an example of their product or a family photo.

    After the meeting

    Whether you consider it successful or not make contact with the client after your meeting thanking them for their time and remind them of any information they’re meant to send you and/or any tasks you’ll be doing for them.

    Client and Supplier Relations

    Personally I think having good relations with all your clients is incredibly important. As I’ve said several times in this series of articles already, the best business comes from referrals, never underestimate the value of a good word. It really must speak volumes when a potential client contacts you and you’re able to say “look through our portfolio and feel free to contact any of the clients listed for a reference”.

    Having excellent client relations isn’t really hard, give them an shining service, keep it personal, be open and honest and keep in contact after they’ve paid, I don’t mean call them up and talk for hours everyday but drop them an email or a call once in a while asking if there’s anything you can do to help them and if you supplied a service or good to them such as a website ask whether it’s still meeting their needs. Making this little effort can often land you more work as there are numerous times I’ve contacted a client to say hi and they’ve said “Oh hi Tim, I’ve been meaning to call you about xyz for a while”… Remember that your clients are no-doubt just as busy as you so make it easy for them to contact you.

    The theory behind excellent client relations is that a happy client who has received an excellent service will come back -and- refer you to other clients. An unhappy client however who feels they have had a poor service will not only not give you their next piece of work, but they will tell a number of other people about the bad service they received. Someone once told me that 8 happy clients may refer you to one other client by one unhappy client will let 8 other potential clients know!

    If you’ve had a good service, let them know. All to often people are quick to criticise and point out the faults with any given situation so thanking someone for a good service is a real breath of fresh air, it can really lift someone and make them feel that all the hard work and effort that they have put into the product and/or service given to you has been worth it. Remember that even if they’re a supplier, they may very well need your services later down the line and taking a little effort to thank them will go along way!

    Absolutely, I feel karma has a lot to answer for in business. At the end of the day, you’re the boss, if you’re seen to be open and honest with people, they’re more likely to respond well, as your parents have probably always said, honesty is the best policy. If you’ve got a technical issue you may find they have a solution to it that means less work for you. If you call them to confess to some service downtime before one of their clients tells them, that’s got to be a good thing!

    Christmas Cards/Gifts

    I like sending out cards and I think excellent client relations are very important but every Christmas I hit the same question “What should I do this year?” Each year it generally ends up with me doing nothing but this year I actually got my act together and sent out a couple of gifts which seemed to go down well.

    Steve, my father-in-law has a client that makes luxury hampers and he recommended I contact them to see if they could help as the hampers were pretty darn impressive, he was right. The issue I quickly realised was however, who should I send them to? Some of our clients only bring in £20-30pa which didn’t really justify a £20 hamper. This year I had already decided which clients I should send to, but while doing my books I noticed a couple of other clients that I would have liked to send them to so in-line with my current business reforms we came up with a system of grading clients which I think will work well for next year.

    It’s quite simple really, work out the turnover and profit generated by each client/contact you have and grade each one. For instance, you could spend £10 for every £1000 of business the client/contact brings. I wouldn’t stick strictly to this however as you may have some lower profit clients who you enjoy working with –don’t be stingy, it’s Christmas!

    Then you have the issue of deciding what gifts you would like to send out, the first year I was going to send out a few bottles but a friend said that it was tacky, over-done and thoughtless (especially in the city) so I didn’t bother. Try and make it relevant to your company and different i.e. Cocoa Creative [www.cocoacreative.co.uk] this year sent us a bar of chocolate wrapped in pink paper, I thought that was cool, Stacey thought it was tasty. Either way it got them a mention  here which clearly means I’m thinking about them…

    A word of caution: before sending out extravagant gifts to your client it is advised that you check any restrictions that may be in place on the total value of gifts allowed. I say this because there is a limit imposed on the value of any single item for doctors -at one point drug reps were giving away holidays for doctors to use their product over another so it may also apply to other industries as well.

    I keep referring to clients and contacts here because I would thank anyone that generates your business more work, it’s a great situation to be in if you’ve got several mini-sales people!

     

    Don't forget to follow me on Twitter.

    New Business
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: Business Start-up Advice | The Site Doctor | WebDD
    # Friday, February 02, 2007

    Day-day running

    Friday, February 02, 2007 8:54:07 AM (GMT Standard Time, UTC+00:00)

    Day-day running

    Evaluating when it’s best to do something in-house and when to outsource it is invaluable -especially in the case of a developer, the temptation to develop all your internal applications is great. Sometimes it’s better to outlay £500 rather than spending many hours not getting paid by clients.

    If you’re starting up with more than one person, having some form of blog is a useful method of conveying this information as it means people can easily subscribe to the RSS feeds and keep up-to-date with the latest information with minimum effort. If you use blog software such as DasBlog [www.dasblog.net] you are also able to have different authors on one portal.

    While on the subject of blogs, I would recommend setting up a company blog, or at least a personal blog with plenty of references to your main website. These back links will increase your visibility and hence ranking on Google but it will also increase your company’s profile.

    I would advise reading my other posts [The Scourge of Google and Public Facing Blogs and Blogging And Competition] which overviews what I see as the pros and cons of blogging. As you’re here reading this, it’s evidence enough as to why you should blog IMHO.

    Processes and procedures

    Depending on your background, you may not be too interested in the management side of business but it is very important to have a number of management processes in place, you won’t necessarily be able to set these up before you start but as you learn your business, get them in place ASAP.

    What sort of processes am I referring to?

    • Have a client sign an agreement that outlines the responsibilities of both parties (what you’re going to do for them and what they’re going to do in return –e.g. pay) before you start work for them. Make sure you’re as clear as possible so you can charge for additional services without the client quarrelling with you.
    • Depending on the size of the company have the client provide you with a purchase order number. It’s best you ask whatever size the company is as it portrays the image that you’re dealing with larger organisations but the worst they can do is ask you what you mean. A purchase order number is basically a reference in the clients purchase database letting their accounting department know your invoice is on the way in. In many situations it also speeds up payment. When dealing with larger invoices it’s a must because it’s the loosest form of guarantee the person you’re dealing with has informed their accounts department and had the amount authorised.
    • After you’ve had a meeting with a client follow it up a few days later with an email/phone call thanking them for their time, make it relevant to the meeting if you can and word it so it requires some form of response from the client. Making this post-meeting contact can be the difference between getting the work and not –in the same way making contact with a recruiting company after your interview thanking them for their time can make the final decision sway your way.
    • Have a dedicated admin day. Initially this can be something you do once a month but as your business grows you’ll most likely need to increase this to once a week, as outlined in my previous blog post about setting your rates [Pricing your work] you’ll probably find around two days a week are taken up with adminy type work. People are forever moaning about how boring doing a years accounts is however, if you do break it down to say 2-3hours a week it’s a lot easier It’s important to remain strict with yourself as there’s always something more interesting available ;).
    • Invoice regularly! Sounds obvious but it’s important. Depending on your business model, I would recommend setting a day aside every month which is solely for invoicing. I’m not just talking about sending out invoicing, I also mean chasing invoices as you’re bound to have plenty of clients who will delay paying until you really bug them!
    • Log payments and receipts –this should be part of your admin day but it’s worth mentioning again. If you log all your receipts and any payments on a weekly basis it should dramatically save that end of year rush trying to find all your receipts for the accountant, if you do it really well it should also save you a few quid!

    Team structure

    Having someone who’s able to carefully put people in their place and ensure the company is moving in the right direction is important, it’s even more important when friendships are involved. If one of you can’t cut the niceties and point out the obvious you’re more likely to fail from the start.

    Having someone who is presentable and can communicate well is intrinsic to getting new business, everyone operates differently but if your new client can’t relate to your representative you’re unlikely to retain them for very long. As James said, if you can’t at the same time tell them to cough up, you’ll probably find yourself with a very low cash flow very quickly.

    Getting Employees

    This is something that I’m approaching at the moment, so it’s probably best to add in an article later however there is a very good series of articles on Joel on Software [www.joelonsoftware.com] about Finding Great Developers which is a good start [http://www.joelonsoftware.com/articles/FindingGreatDevelopers.html].

    The hardest thing you’ll face (if you’re anything like me that is) is loosening that tight grip you’ve got on your business. It’s taken me 3 years but I’m finally allowing Stacey to take over some of the admin work for The Site Doctor in an effort to lighten my work-load (admittedly I should be blogging less too but hey). Accepting that other people work in different ways is a surprisingly hard thing to accept when it’s your own business. I’ve already accepted that if I want my business to grow, I’ll have to put up with someone else’s coding style until we’ve found common ground.

    One final point I’ll make here though is (again depending on your business model) you will need to get employees at some point so make some form of provision for them. If you don’t get an employee and try to do all the work yourself forever your business is capped and you’ll more than likely burn out. Someone once told me the perfect business is one that can easily be converted into a franchise.

    Business Management

    Well put, you need to be able to fall off your bike and get back on again so to speak, you will make mistakes and if you don’t I doubt you’re taking enough risks and so will just end up ticking over, there’s nothing wrong with making mistakes as long as you can learn from them and move on. Listen to your gut instinct and as soon as it turns sour pull out!

    Taking an all -or- nothing approach to things, giving it everything you can/need to until the point that your instinct says enough and then cut it off straight away is important.

    Be careful, but don’t let your project or company suffer as a result of being prudent. If you’re going to talk to someone that’s in the position to do what you’re proposing (i.e. they have the skills or can buy them) at the very least have them sign an non-disclosure agreement to give you a little backup. If you’re really worried, prepare your material so it gives them the minimum amount of information required for their input and explain your reasons for doing so.

    Either way, if you ever discuss a project with someone else (even internal employees) there’s a chance it’ll get stolen. The best advice here is learn from it and move on. If you want to pursue the matter in the courts weigh up whether it will be at the cost of the detriment of your company and/or image.

    When I first set out, I had to take a client to court and cutting a long story short settled out of court because I calculated the rest of the time I would spend preparing for court would cost me more than I would be awarded. It’s also worth noting that if the amount is below a threshold (IIRC £5000) you can go through the Small Claims courts which saves you a lot of expense and agro.

    Action pack or Empower

     

    Don't forget to follow me on Twitter.

    Day-day running
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [0]  Trackback LinkTrackback
    CategoriesTags: Business Start-up Advice | The Site Doctor | WebDD
    # Thursday, February 01, 2007

    Working from home

    Thursday, February 01, 2007 8:52:38 AM (GMT Standard Time, UTC+00:00)

    When you set out, cutting costs is crucial to your long-term success so working from home is an ideal solution, but is it really a good idea? What will happen when a client wants to meet? Will I ever be able to leave work?

    Your working environment

    Firstly, make sure your office space is as dedicated an office space as possible, I know it’s difficult to spare the space when you live in a 1bed apartment but at least have a desk that allows you to fold away your papers safely. This is doubly as important if you’ve got kids or a loved one as that will take away the opportunity for them to “accidentally” spill a mug of coffee over your latest proposal.

    If at all possible, dedicate an entire room –or even a floor if you can spare it to the business, there are a couple of reasons for this, the first is that you’ll be able to rent it to the business and then offset that expense on your tax return, another and I feel more important reason is that you’re able to get into another frame of mind when entering that space. I have an office at the rear of our property which is completely separated from the house with the exception of a small tea hatch. I’ve always felt that this has allowed me to semi-detach* work from home even though they’re within the same boundaries. Where at all possible I avoid mixing the two to re-enforce the segmentation.

    *You’ll never really be able to detach from your business –it’s part and parcel of running your own business I’m afraid.

    Depending on your personal mentality, having some form of dress code can also help you segment home from work, if you’ve already got a suit from a previous role, why not wear that while at work, then when you get home in the evening change into your home clothes. This may seem wacky but you’re not doing it for others, more so you can mentally detach from work. At the end of the day, you’re working from home so you can wear what you like and the likelihood is no-one will know*.

    *I was told an “interesting” fact the other day, apparently it’s been estimated that somewhere in the region of 30% of home-workers work naked. It’s a disturbing thought –especially when you’re on the phone to someone you know works alone. Luckily I can reassure you that I’m not in that 30%. Yet.

    Have a routine

    Have a routine –this is very important, in the same way you would if you were working for someone else, make sure you’re in work for a given time and stick to it. Luckily, my better half Stacey has a full-time job which means she is up at 0630 every day for work as it is, I’ve forced myself to get up with her and get into the office ASAP which has worked well. It doesn’t matter whether your routine is 0900-1700 or 1700-0900, as long as you stick to it you’ll avoid countless duvet days –remember, when you’re not working, the likelihood is you’re not earning*!

    *Again, this depends on your business model!

    It is also worth setting yourself a finish time as part of your routine, you’re likely to work over a lot of the time but actually having a time to stop and get your coat gives you a deadline to work towards. There is a great article from Ryan Carson on A List Apart about working 4 days a week [The Four-Day Week Challenge], I think it’s a great idea and one that really is achievable but I agree with him, it's worth accepting that there'll never be enough time to finish everything.

    Being the only person in the office I didn’t overly want to leave the office to itself and not having anyone to spend that extra day with (Stacey’s at work), I’ve chosen to make this change in stages. At the moment I’m following Google’s example of 20% time. 20% time is something that Larry and Page adopted from academia but in short, everyone is allowed to dedicate 20% of their working week to something that isn’t part of their day-job. This may be something they’re interested in developing for personal reasons or just an idea that you could profit from.

    I’ve found this to be very beneficial to my working week especially when I’m in the middle of a large project, it gives you a little breathing space which in the past has allowed me to work out issues that had me banging my head against the wall. It also makes the weekend feel longer so you can relax more and prepare for the week ahead.

    I like this 20% time concept (or as I call it “Fun Fridays”) not only because I'm able to step back from any on-going projects and relax a little more during the weekend (even when working on the weekends) but also because of where it takes me. For instance, a couple of Fridays ago I came up with the idea of writing a “Suggestion Box” -a simple Web User Control that can be added to any future project, it allows the user of the site (usually an admin user I would think) to suggest additions/alterations to the application. The suggestions are then stored in a central database for me to review later. The users can also rate other suggestions (using a little AJAX rating system ;)) so the managers are able to see the most popular ideas and gauge which are worth adding to the system. The plan is to review the (user) based suggestions with the management on a regular basis (even if it's just over email) and generate more work that we wouldn't have otherwise had. Although I identified the idea during the normal working week, had I not had “Fun Fridays” it would still just be an idea.

    Having a routine for starting and finishing your day will allow your mind to be in the right frameset and again add another level of segmentation of home and work life. Being able to turn off at a given time and feel that you’re able to relax in the evening is very important.

    Won't my clients mind?

    In a word: No. I wouldn’t worry too much on having clients come to your house for meetings as depending on your business, I expect you’ll find that the majority of your client face to face meetings will be on site but for those that aren’t, why not check out the local hotels, pubs and coffee houses for a suitable meeting place. Find a couple of options and check them out at various times of the day and week so you know what to expect. Are they quiet? Are the tables big enough? Does it portray the right image for my company?

    Many local hotels now offer conference and meeting rooms that include facilities like internet access, tea/coffee and other amenities but they’re at a cost. Alternatively your local Chamber of Commerce is likely to offer the same forms of facility if needed.

    Asides from the work/home segmentation, one downside to working from home is that you will get rather cut off from the outside world. This is fine if you have the need for many client meetings or on-site consultancies but can be tough if not. You can easily remedy this by finding your local coffee shop, gym or pub and take a little time each day/week to get out of the office.

    There is a new form of business establishing itself at the moment which offers dedicated office space on a monthly retainer so if you choose to work from home for the majority of the month but would still like to retain a little face-to-face contact with the outside world you could check out the serviced offices. Another advantage of having these offices will also mean you meet other businesses.

    Telephony

    I’ve been working out of an office at the back of the house for 3 years now and it’s the same telephone line, friends and family know this so when they call and I don’t answer, the “Welcome to The Site Doctor” answer machine message doesn’t worry them. I’ve not had any issues with this, the only thing I would recommend is you have Caller Id added and if you can’t remember telephone numbers get a phone/display that has a memory for you, that way you can easily ignore business calls out of hours if you so wish.

    Remember that when starting out, it’s important to keep costs as low as possible and although having dedicated office lines is nice, it can also be expensive. Skype is a cheap VOIP solution however I’ve had issues with it’s reliability for Skype-Skype calls in the past so can’t personally recommend it.

     

    Don't forget to follow me on Twitter.

    Working from home
    Useful Links:  #  digg it!  del.icio.us  Technorati  email it!  Post CommentsComments [3]  Trackback LinkTrackback
    CategoriesTags: Business Start-up Advice | The Site Doctor | WebDD