Web Surfing Helps at Work

I have been claiming this for years. Web Surfing Helps at Work, Study Says:

According to a new study, Web browsing can actually refresh tired workers and enhance their productivity, compared to other activities such as making personal calls, texts or emails, let alone working straight through with no rest at all….Because Web-surfing can aid productivity, the researchers caution employers against over-restricting workers’ Web access. They recommend that managers allow time for limited personal Web browsing “since it has a salubrious impact on employees’ productivity,” while limiting access to personal emails.

It has happened to me many times that I am stuck on a problem and just come up with a solution. Then I spend a few minutes “wasting time” on some website and the answer comes to me. Nice to see it substantiated in a study.

Productivity during a normal workday and Telecommuting as a Solution

John Wesley writes (Why the 9 to 5 Office Worker Will Become a Thing of the Past, found via War-N) about how the traditional work day (”9-5″) is very inefficient for many of today’s workers, and ends up with less productive, less satisfied employees.

A continuous 8 hour work day is a relic of the past. It makes sense for physical labor and manufacturing work, but with information workers it doesn’t account for the mental energy cycle…In the case of the modern information worker, nearly all tasks involve creative or strategic thinking…

I can’t speak for all workers, but I’ve observed that productivity levels generally peak twice a day — first thing in the morning and shortly after lunch. The most productive period is the beginning of the day. People are capable of creative tasks like writing and solving complex technical problems. After a couple hours of intense work, energy levels drop and workers downgrade to less demanding tasks like responding to email and tinkering with existing creations. Towards the end of the cycle, the mind is so cluttered and drained that workers resort to “work related activities” that appear productive but don’t contribute to the bottom line. The afternoon cycle is similar but the productivity peak isn’t as high. For different people the peaks and valleys will vary, but overall I’d estimate only 3-4 hours a day could be classified as highly productive. This number isn’t caused by slacking. You can’t force an information worker to be highly productive when the energy isn’t there.

While the 9-5 work day is a relic of manufacturing labor, it does also make sense if there is a need for people to all be present at one location at one time. (Though I do remember a partial solution  at a company where I once interviewed: Everyone had to work 8 hours a day, and everyone had to be present on-site between the hours of 11am and 2pm. Thus there is a time when everyone can have meetings, and there are also accommodations in place for those who are early or late risers.)

Wesley suggests as a solution that the work day should be planned around times when the worker’s mental energies are at their peaks. This means that the 8 hours may not be consecutive, and will most probably be scattered in bursts throughout the day.

The solution that makes the most sense is a remote work arrangement because it reduces employer costs and allows employees to adjust their work schedule to their mental energy cycle. When a worker becomes mentally fatigued, they can go off the clock and engage in recharge activities that are personally productive like exercise or relaxation. When energy returns, the worker can start working again at a high level, effectively cutting out the low productivity period of the cycle. Employers don’t pay for unproductive time and employees get to work in a more natural pattern that adjusts to their personal lives.

A good point is made at the end of the article that the biggest barrier to larger scale adoption to telecommuting is inertia and office politics. I would contend though that there will always be certain industries that are better suited towards telecommuting (and outsourcing), such as computer programming, and certain industries that will never fully transition to this (hospitals, psychologists, universities and schools, power plants, manufacturing, etc).

(Cross-posted on The Telecommuterer)

Setting up a Customized Blog in 7 Easy Steps

When a person chooses to create a new blog, there are two routes to choose from: you can use one of the popular hosted blogging services (like Blogger or WordPress.com) or you host the blog yourself. The first option is definitely the easiest – someone else worries about all of the blog setup, database issues and hosting. You just put up the content. The second option however gives you more flexibility and control over the domain name, blogging software, plugins, advertising and template customization. However, when you set up the blog yourself, you become responsible for all aspects of its operation, a somewhat daunting proposition.

A couple of days ago I created a blog from scratch (Telecommuterer.com). I would like to review all of the different steps that went in to this. All told, it took about two hours to go from nothing to a fully functioning blog with initial content posted. Though it is more difficult than using a hosted blog service, I think that if you would like to use your blog for anything more than casual use and you are up to the task, in the end it is worth it to invest a little bit of time and money in setting up the blog by yourself.

I am assuming here that you already have the concept for the blog in place and a general idea of the types of content you would like to host. I will describe the process using blogging software from WordPress.org as I think it is the best free software available for the task (with easy setup, great plugin and community support).

  1. Get a Domain Name – Get a domain name for your blog. I use Go Daddy for all of my domain name purchases (though there are thousands of other providers that can do the same for you). For Search Engine Optimization (SEO) reasons, the shorter the domain name, and the closer it is connected to the main topic of your site, the better. If your first choices are taken, there are several services that will take your keywords and return a list of available names that might be good, like DomainsBot, DomainTools and DomainIt.
  2. Set Up Hosting – Set up your hosting for the website. The main requirements are that that you use LAMP (Linux, Apache, MySQL, PHP) based hosting. There are thousands of services out there that will do this for less than $15 per month. If you are using a service that is not well known, I highly recommend checking out their reputation on the web before using them. I personally use MediaTemples (gs) GridServer service and DreamHost for my personal and client sites and would have no reservations recommending them to others.
  3. Connect Your Domain – Set up a new Website at your webhost (they should have instructions on how to do this). Your host will give you their NameServer (or DNS) information. (This normally takes the form of something like ns1.hostname.com and/or an IP address). Take this information and go to the site where you bought your domain. On this site, in your domain management, change the Nameservers (or DNS settings) of the domain name to that which was given to you by your Web Host. After you do this, your domain name will now be connected to your website that is hosted on the servers of your Web Host.
  4. Install WordPress – Many hosting services have tools that will do this automatically via server-side scripting. If that is available and they offer it with the most recent version of WordPress (currently 2.2), go for it. Otherwise, you can do it yourself in a few easy steps
    1. Download the most recent version of WordPress
    2. Extract the files from the zip or tar.gz file onto your computer. Upload them to your web host servers using FTP
    3. Using phpMyAdmin or whatever other database control interface your web host provides, set up a new mySql database for your site.
    4. Follow the rest of the instructions on the WordPress 5 Minute Install page (it really does take just five minutes)

    After going to the /wp-admin/install.php page on your site and following the instructions there, you should have a working WordPress blog set up on your domain name with the default template in place (and absolutely no content). Log into your admin section (you may want to bookmark the page at /wp-admin/ on your site), go to the Options section (and its different subsections) to set up your blog settings as you would like (don’t forget to set Permalinks if you have the capability and want to use them to create nice-looking urls for your posts.

    Now the real fun begins.

  5. Set Up the Theme – If you are a real web-design pro and an expert with WordPress who can design their own theme from scratch, this doesn’t apply to you (and you don’t need to read any of this anyway). Otherwise, you should pick a theme for your site. There are hundreds of free WordPress themes out there to choose from. I recommend starting at the WordPress Themes viewer. It allows you access to test-drive hundreds of free themes and you can search based on features of the theme, layout options, etc. If it is too overwhelming, try filtering by theme features, using the list of most-downloaded themes (on the side of this page) or some of the themes featured here. When you have chosen a theme, download it to your computer and upload the files to your /wp-content/themes folder on your site. Go to the WordPress Admin > Presentation, and select your new theme.
  6. Customize the Theme – If you are scared of CSS and HTML and are completely satisfied with the way that the theme works, you can skip this step. Otherwise, it is advisable to go into your theme files and customize sections of it. This is done to differentiate the look and feel of your site from other sites that may be using the same theme, as well as to change the locations and look of elements of the theme to suit your specific needs.Any customization work that you will do will take place in the different theme files, found in /wp-content/themes/theme_name/. The files that you are most likely to change are header.php, footer.php, sidebar.php, index.php and single.php for content and styles.css for style changes. You can read about the different types of theme files, how they work, template tags and pages, customizing templates and more on the WordPress Codex and Support forums.The potential for changes is practically endless. To give some ideas of things to change here is a list of changes that I made on my new site
    • I changed made the font size larger for all content text
    • Removed “sponsor links” on the theme that were pointing to indecent sites (see Matt’s essay on this for more info)
    • Changed the RSS links to Feedburner feeds, added an Email subscription link (through Feedburner). Moved these links to higher on the page
    • Changed some of the default, hard-coded text on the page
    • Added some tags that had been left-out by the theme author (go to next page/post, etc)
    • Changed the format and information displayed in the post info section on both the main page and the single post page
    • Added links to stats tracking services (I use both StatCounter and Google Analytics)

    Some other things you might want to change in the theme to really change the look of it is the header image, background colors, link colors and other visual elements. As you are changing the template files, upload them to your site to check on how your changes look and make sure that you haven’t broken anything.

  7. Set up Plugins – As with the previous step, if you are completely satisfied with every aspect of your blog performance, you can skip this step (just remember to enable the Akismet anti-spam plugin that is included with the software). However, it is worth exploring the world of plugins if there is anything that you want to on your site that is not included by default or with the standard template tags. To set up any plugin, download its files, upload them to the /wp-content/plugins/ directory on your site, follow any specific directions that may be given with the plugin, go to the Plugins page in your site and enable the plugin. Some plugins work automatically in the background, some will require you to add tags to your template files (they should give instruction on how to do this).Plugins are hosted all over the internet, often on their author’s websites, and sometimes in centralized repositories. If you are in need of specific functionality, try searching for it (using keywords “[functionality] wordpress plugin” should give you some results if the plugin exists). Otherwise, try looking in some of the online repositories to get an idea of what is out there. Here is a list of the plugins that I used on my new site:

    Plugins can add lots of powerful functionality and totally change the way that you use your blog. They are one of the strongest features of WordPress and I highly recommend taking a look at what they have to offer.

You are now done setting up your blog (though as you use it more, you may decide to change are the template some more and add more plugins). Now all that’s left to do is to start adding content. Good luck!

Worried Yet?

In response to Jeff Atwoords post, Mike Gunderloy explained why he is seeking to move away from the Microsoft programming world and into Rails and open source. One sentence stuck out to me from his post:

Now, if the Microsofts of the world have their way, we’ll end up with everything in fenced-off gardens: every piece of user interface, every algorithm, every data structure, will belong to someone, and will not be available for use unless you pay for it somehow. It will become literally impossible to legally write software without entering into a web of commercial cross-licensing agreements.

When I first read this a few days ago, I thought “Mike is exaggerating a little bit here. Even if Microsoft (and other companies) hold lots of software patents, will they really go so far as to force licenses for every last thing? Talk about stifling development and pissing off the developers, developers, developers“.

Well, looks like Mike was on to something. A recent article in Fortune magazine said that Microsoft is looking to start enforcing licenses on 235 different patents that they claim are violated by Linux, Open Office and other pieces of Free Open Source Software (FOSS):

Microsoft counters that it is a matter of principle. “We live in a world where we honor, and support the honoring of, intellectual property,” says Ballmer in an interview. FOSS patrons are going to have to “play by the same rules as the rest of the business,” he insists. “What’s fair is fair.”

Microsoft General Counsel Brad Smith and licensing chief Horacio Gutierrez sat down with Fortune recently to map out their strategy for getting FOSS users to pay royalties. Revealing the precise figure for the first time, they state that FOSS infringes on no fewer than 235 Microsoft patents.

Where this will go is anyone’s guess. But the cat is officially out of the bag, and if it turns out that these 235 patents are laughable claims covering user interface items that have become completely standardized, moves like this on Microsoft’s part will do nothing but engender further segmentation of the programming world into us vs. them, which brings us back to a statement from Jeff’s article as a suggestion for all who have a vested interest in seeing both free and Microsof-based software development continue and progress unhindered:

As a software developer, you’re doing yourself a disservice by pledging allegiance to anything other than yourself and your craft– whether it’s Microsoft or the principle of free software. Stop with the us vs. them mentality. Let go of the partisanship. We’re all in this thing together.

Save Your Work!

My wife and I are in the process of designing a kitchen (with the aid of our architect) for our new home. The locations of the windows, walls, fridge, oven and sinks is basically set. So the remaining design consists of choosing the number, size and layout of all of the drawers and cabinets, plus lots of other details. Our architect has designed a layout for us to use, and we plan on shopping it around to a kitchen store plus some private contractors for quotes.

Today we went to the kitchen store. After (rudely) pronouncing that she disliked many aspects of the plans that we had designed with our architect, with the stated reason that “we are living in 2007 today, and this kitchen looks like it is from many years ago” (we are more into functionality than the flashiest, sleekest look, and we have need for lots of storage space), we then gave the rep a chance to redesign the space as she saw fit.

This store uses some kitchen design program (I didn’t catch the title) to do everything: layout all of the elements in the space in three dimensions, design the interiors of all the different cabinets. It can provide technical specifications and diagrams for the construction crew, allows designation of colors and materials. And lets you see a virtual view of the kitchen from any height, angle and perspective, rendering the kitchen in full 3-D along with colors and textures. And it uses all of this information to give price quotes. Quite a cool piece of software.

As the sales-rep was rendering the screen to show us a 3-D perspective of the kitchen, an error popped up on the screen (with a pretty lousy and unusable error message, one which was probably never intended for a non-developer to see). This was followed by five more errors and the program abruptly closing.

This in itself shouldn’t have been much of a problem. The sales-rep should have been able to just restart the program, open our file, and continue. One problem – she never saved here work. 45 minutes of design time down the drain. There was no more time for her to start over, so we could not get a price quote, could not look at any more colors, surfaces. Nothing. Our time was completely wasted, and she made herself and her store look bad (and made it less-likely that we would buy from her). All because she didn’t save her file.

For me as a developer, this is a foreign type of behavior. When I create a new file, I always save it. And I have it wired into my subconscious that whenever I make any change and pause for a few seconds, I perform a Ctrl-S on my keyboard.

However, can we totally blame the sales-rep in the kitchen store for this? She is not a programmer. True, she should have saved her work incrementally as she proceeded (and hopefully she has learned her lesson for the future). I think that well-designed software should have been there to force her (or at least annoy her) into performing this most vital of steps. Many programs are now featuring auto-save capability. Some of the more sophisticated ones (like MS Office and Visual Studio, to name a few examples that come to mind) will also save any of your unsaved work if the program execution abruptly ceases. In my opinion, this feature should become as standard as File/Open/Save/Close. The kitchen design program that the sales-rep was using today incorporate many thousands of man-hours in development time, costs thousands of dollars per license, and is used by the kitchen store as the centerpiece of their technology suite. Yet, for failure to help protect the user’s from their own ineptitude, it has wasted my time, and may have cost them a sale.

WYSIWYG Editing of HTML in a Windows Forms Control

In a WinForms project that I am working on right now, I have text stored in HTML format in the database. I need a way for novice users to be able to edit this text using a WYSIWYG interface.

The most obvious choice for this in the Windows.Forms control library that is part of the .Net 2.0/3.0 framework is the RichTextBox control. This control gives you a textbox that has functionality similar to the WordPad application found in the Windows OS. It can display formatted pretty well. Aside from the fact that you have to handle all formatting of text in code, RichTextBox it has one major shortcomings: It can only input/output plain text or RTF encoded text. If I wanted to use a RichTextBox control to edit HTML, I would need some way to translate from the source HTML (stored in the DB) to RTF (to be displayed in the RichTextBox) and then back to HTML (to be stored again in the DB). Although I found some components from Sautin Software that seem to do the job, they cost money that I would rather not spend, and add a layer of complexity to my code library that I would rather avoid.

I found a couple of controls that extend the RichTextBox in order to allow input of HTML: An extended RichTextBox to save and load “HTML lite” files by Oscar Londoño (Code Project – For .Net 1.1/VS 2003) and RichTextBox that Displays XHTML by Eric Voreis. Both of these controls extend the RichTextBox control in the Windows.Forms library so that it can translate on the fly between RTF and HTML code (so you can input HTML code, see it displayed in the RTB and export HTML code). However, both are old and only support a small subset of HTML tags (although this can be extended in the source, it required knowledge of how RTF works). Also, since they use a RichTextBox control for editing and display, the display is similar but not identical to what you would get using a WebBrowser.

The next method that I found for providing this type of error is HTML Editor by Carl Nolan (Microsoft Consulting Services). This control (written in 2003 for .Net 1.1) modifies a WebBrowser control to allow inline editing and display of HTML. It is professionally written, provides support for many HTML tags and does just about everything that I need (and is free). The one problem is that it is pre-.Net 2.0. It uses a WebBrowser control from before this control was included as part of the Windows.Forms library in .Net 2.0 and thus has to reference Win32 calls and perform other types of acrobatics in order to get the control to function properly. This matters to me because it decreases portability of the control (using Mono, for instance), and makes it harder for me to customize and edit.

WebBrowser-based HTML Editor in action

The control that I am using in the end employs the same general idea used in HTML Editor, but takes advantage of new features (like the native WebBrowser class) provided by the .Net 2.0/3.0 framework and and Visual Studio 2005. A Windows Forms based text editor with HTML output by Kevin DeLafield uses a WebBrowser control with modified functionality to allow WYSIWYG display and editing of HTML text. It provides all of the functionality that I am looking for and allows for easy modifications and customizations in Visual Studio 2005. I recommend that anyone in need of similar functionality take a look at this control.