For about a year now I’ve been keeping a ToDo list. It’s the first thing I reach for when I have a block of time to spend, I find it saves me a lot of spin up time, and makes me think about what’s important. It’s not a particularly new idea; heaps of productivity authors have written their take on it, but I thought I’d share some of the details of my own system.

I like to keep the list items in order of priority and really concise; usually three words and nothing over twenty words.

I keep my lists on Evernote so I can access them either on my phone or via the web interface. In meetings or at times where thoughts are being brainstormed I use paper and a pen. This is good because you can focus on the meeting and fiddle with a gadget less. It also gives me time after the meeting to help filter and prioritise what goes into the list I work from.

I actually keep a few lists, one for each context of my life that I switch between.

For some of the lists I keep a corresponding Done list. I find the Done list useful for self reflection or those funny old performance reviews.

These are some of my lists I switch between.

  • Work ToDo/Done
  • Ideas
  • Blog Post
  • Grocery Shopping
  • Other Shopping
  • Household Maintenance
  • Holiday Plans
 

A former colleague of mine recently published a post about Software Webinars that got me thinking. At my work we write software that is priced too low to pay a slick sales guy to jet around bending ears, unless a big new prospect is involved. So instead we use video conferencing tools to run webinars. After attending a few of these webinars I have dreamed up a strategy to maximise efficiency.

If the webinar is going to have five or fewer audience members and it doesn’t have to be repeated, then make it less formal and more interactive by using a question and answer type format. This way the audience members control the direction of the presentation.

If the conference has to be repeated or there are six or more audience members, then just pre-record the presentation part and press play when everyone has joined. At the end of the pre-recorded video, allow for questions and answers.

Pre-recording will take a bit of time upfront, but it will be reusable and you will be able to edit out any problems.

I think that five is the magic number of audience members, not three. With more than five people, the mood in the room is that of a broadcast, probably because it is difficult to find the opportune moment to interrupt. Also, the number of side conversations increases as the audience grows. A group of five can only diverge into two side conversations. Larger groups are also bolder, rowdier and it can be harder to get your message across.

 

Over a decade ago I used to run a Linux server (Redhat at first and later Gentoo) that did some routing, stored files and hosted my website and a squid proxy. The Internet link was a terrible upload capped cable connection with a dynamic domain name service to update the host name when the IP address changed.

The server was a bit of a beast with 4 hard drives in it so I imagine it would have used some electricity. Using the current electricity rates (0.19c per kwh * 24hrs * 31 days * 0.250kw) I estimate running the server would cost around $35. And that does not factor in the cost of the connection.

This long weekend I got myself a Virtual Private Server for around $7 a month (with the current good AUS exchange rate).

Here is the comparison:

  • The upload connection is 2mbps rather than 128kbps.
  • The disk space is a modest 5GB rather than 160GB.
  • Software these days seems to be pretty memory intensive and needed tweaking to run on 128MB efficiently; on the older server I think I had 512MB.
  • The CPU is 2.4GHz compared to a 350MHz but I am sharing it with other virtual machines.

Computing power is cheap and virtualisation is making it cheaper.

 

Abraham Maslow is a famous figure in the field of psychology. Interestingly he only studied the minds he considered the healthiest of the population. Perhaps this perspective is how he came up with Maslow’s hierarchy of needs. The concept describes the various levels of needs and wants that a human should fulfill before they will desire to fulfill a goal in the next level. It is my proposal that for most non-trivial real world software systems, a similar hierarchy of needs is required to help give you a sense of how to best direct your development efforts.

I learned about Maslow’s hierarchy of needs many years ago at university in an introductory Psychology course. I had long since forgotten about the idea until recently, when after working as a developer at an enterprise software company for many years, I drew the analogy between Professor Maslow’s hierarchy and my own thoughts about prioritisation in the development process.

Maslow's Hierarchy of Needs

Initially I had simply been thinking about balancing the interests of customers and the company. What this means in practice varies, but generally speaking the customer’s interests should come first, since they are the person paying the money. If the customer’s interests are not paramount, you could be working for a failing company (or a government organisation :) ). It’s also clear that the company has to consider how to best allocate its resources, which inevitably involves some kind of prioritisation. From here I realised that Maslow’s hierarchy provided a useful structure for showing the relative importance of the customer’s various needs.

Looking at it from a customer’s perspective, I have defined these general needs that map closely to Maslow’s hierarchy:

  • Innovation/Improvement (Self-actualisation)
  • Performance (Esteem)
  • Cost/Usability (Belonging)
  • Security (Safety)
  • Existence/Deployment (Physiological).

Software Hierarchy Of Needs

Once again from a customer’s perspective, these are my justifications:

  • Software does not exist unless it can be deployed and used.
  • Once it can be used, they want to rest assured that they can use the software without any risk to their security. Some examples of things that need protecting could be health, property, employment, safety, etc. Customers invest a lot of trust in companies and software at this level, and breaking this trust is probably a deal breaker.
  • After customers can securely use your software  they want to be able to easily use your software at a competitive price.
  • Once software is easy to use the next expectation is that the software meets performance expectations.
  • After software is performing well the next expectation is that the software is not stagnant and is improving and innovating over time.

Keeping the software hierarchy of needs in mind might help you rationalise what the next priority should be for your software system.

 

Google Chrome (Chromium) recently released a version of their browser with support for server-sent events. I used this technology and ASP.net MVC to create a WebSlides application.

I created a nifty throw-away demo called WebSlides that switches between slides (PNG images). The slide show presenter navigates to a URL on their smart phone and is able to tap on back or forward links to change the current slide. The audience and the computer running the projector run a browser that points to another URL. As the presenter changes the slide all the clients connected see the updated slide.

What is a server-sent event?

Basically a server-sent event is a draft web standard that (on the ball) web browsers support to allow updates from the server to be “pushed” out to the browser. It is similar to WebSockets which has been all the rage (with cool experiments) but it is not a duplex communication channel. When you see the term “pushed” in regard to server-sent events you should note that what is actually happening is that the browser is actually polling a server URL. You can easily see this when you intercept traffic with fiddler. What it means though is you will not have to write the JavaScript to do the polling and it also gives you a way to only send data to the client when it is required. In my case I use it to update the slide the browser is showing when the presenter changes the slide.

How did I do it?

I created the WebSlides demo using ASP.net MVC, I believe I am the first to create something like this as support for server-sent events is pretty fresh. I found that this guy created a chat client with cold fusion on the server-side which is pretty cool.

In my demo I created a new ActionResult called ServerSentEventResult that does all the heavy lifting you need to do make the browser happy.

So all you have to do is use it like this in your controller.

ServerSentEventResult eventStream = new ServerSentEventResult();
Follower followerModel = new Follower();
eventStream.Version = followerModel.Version;
eventStream.Content = () =>
{
    JavaScriptSerializer serializer = new JavaScriptSerializer();
    return serializer.Serialize(followerModel);
};

Another interesting point to note about my implementation is the lambda used to get the content, you may remember that the browser will poll the server to get events, so why make the server serialize data if it is not necessarily going to send it every request.

The rest of the magic happens on the client side with jQuery, If you have come this far I will leave it to you to dig around on github to see how that works.

 

The web has rapidly evolved over the last 10 to 15 years. Recently there has been a lot of talk about the Internet or Facebook generation. So I thought it might be interesting to tell the kiddies about ancient web history, but purely from my own point of view (rather than Wikipedia’s).

When I first started out on the Internet, it was at libraries or other people’s homes. When I finally got the internet it home it was over a 33.6K modem. Imagine that folks – the internet being that slow and using up the phone line while you are on it.

My first website was created using an image editor called ‘Corel Draw’, which saved the picture as ‘html’. It was hosted on a url like this: www.isp.com/~myispusername. The image would take ages to download and there was only one page, but designing it was nice.

From there I progressed to WYSIWYG editors like FrontPage, HomeSite or HotDog. These tools allowed you to create static html. Hosting at the time was done on a free server like geocities which would give you a url like www.geocities.com/crazycitynametogroupcontent/yourusername and they would put banner ads on your pages. The trend at the time was to put up ‘under construction’ images, and replace it when you were finished with a page full of flaming and spinning animated gifs. I swear it’s true, half the internet was either under construction, spinning or on fire.

After animated gifs went out of fashion the next craze was to steal javascripts to put on your site that didn’t really do anything useful, but it was cool.

Then came the age of the guestbooks and hit counters. Everyone needed to use a guestbook and/or hit counter service so that your friends and family could prove that they went to your web page.

After guestbooks and WYSIWYG editors we all started to learn html because many of the WYSIWYG editors showed the html as well as the design surface. We also wanted to have a navigation bar that allowed easy navigation between multiple pages, but we didn’t want to design a navigation bar on every page. So we resorted to iframes.

Then we all realised that iframes meant the URL that appeared in the address bar was not very useful. By this time, because we used guestbooks and counters we started to get cluey about CGI perl scripts and probably even PHP. Now we could use these CGI technologies and html tables for the layout, to create a navigation bar on every page without having to write the html for it many times over. But just imagine the excitement of being able to dynamically create content on your web page! However, not many hosts allowed server side scripting, not for free anyway.

It was around this time that broadband came out, so now with an always-on connection and the availability of dynamic DNS services it became possible to host your home page on your own server. No ads, no hosting fees, all the server side scripting you want, and… a domain name!

Because we were now running our own webservers, server side web applications became much easier to cobble together, and we could actually create something useful, like shared calendars or photo albums.

Now I missed this craze because I was too cheap or sensible to buy windows for a server, but because scripts were nasty non-object oriented demons, ASP.net WebForms abstracted that pesky webby stuff away from the developer. Sadly the html it created was nearly as crap as the WYSIWYG age, and some times abstractions get in the way.

Then Google started to make web application really nice to use and powerful, so now any idiot on the internet can do more with the free services than the elite gurus that wrote or hacked together scripts and hosted them on their own server at home.

Around the same time hosting became free or close to free. The cost of electricity to run your own server made the exercise seem redundant.

Now with ASP.net MVC, .net developers are following Java and Ruby developers and remembering how the web works and how to write html, how to layout content with CSS and how to do actual useful stuff with javascript or jQuery (to get cross browser compatibility).

And that is how it happened, kiddies.

 

A webpage that can render itself in PDF?

During a recent blog reading session, I stumbled upon some information about jsPDF. It’s basically a nifty JavaScript API that can generate PDF documents. It works by manually creating a base64 encoded datauri. What this means is that modern web browsers like Chrome, Firefox and Safari can create PDF documents on the client side.

I had a cool idea for a useful project that I don’t believe yet exists. I thought it would be awesome to progressively enhance (in a browser that supports datauri) an html page to show a link that would render the text in the current page in PDF, ready for efficient paper saving printing. I can see such a project being useful for resumés, shopping lists, bills and receipts.

So I created a prototype and started up a new github project http://github.com/kezakez/PDFRender

If you haven’t heard about github, it is free source control in the cloud with the killer feature of being able to reference code to the line number via URL. Exciting stuff!

 

You know the kind of issue. No-one can reliably reproduce it and you wouldn’t believe the bug existed if it wasn’t for the screen shot. I’m talking about impossible bugs.

I have recently been fixing a few bugs that are as difficult as they come. In this post I would like to give some tips on how to solve them.

Attitude

It might sound like psycho-babble but your attitude effects your motivation, which in turn affects the outcome. You might be your own worst enemy, but you can always change that.

Be Confident, Stop passing the buck

Someone has to fix the problem, why not you? If you think someone else is going to fix the problem, then you are hardly in a motivated state of mind.

Be Scientific

It is great to brainstorm some ideas about what the problem might be, but before investing lots of time hacking away at code based on an assumption, stop! Treat your assumption as a hypothesis and then think of how you can scientifically test that hypothesis.

Set a goal

Have a set goal and do not stray from it. You need to be dedicated and single-minded. If during your investigation you find other issues, instead of fixing them, document them and get back to the task at hand. Otherwise you are just complicating an already complicated problem.

Take a break

If you’re sleep deprived or stale when problem solving, your brain is going to be sluggish. Ideas will often come when you walk away from a problem or come back to it.

Don’t give up

There is always something that can be done. It might be finding a simple work around or rewriting entire modules. What you are doing is just an exercise in searching for a solution in the most optimal manner.

Technical

Once you have the right mindset, how do you go about solving impossible bugs?

Make notes

Keep notes on what you tried and any other details about the problem as they come to hand. If the problem becomes complex you may need to retrace your steps. It also helps to have something documented if you need to involve other people. Make sure that in your notes you can distinguish proven facts from possible theories. And if you are working with many people it also helps to be able to distinguish each person’s notes.

Do quick things first

Keep a list of available options and execute the list in an order that is efficient. Usually this means trying the quick things first. Cross off the options as they become exhausted and add in new entries as you think of them.

Find the problem and verify that it is the problem before you start working on the solution, otherwise you could be wasting time fixing something that “ain’t broke”.

Stop talking, Start listening

If you can watch the problem occurring, listen carefully to people who encounter the problem and then ask questions to clarify the issue. Be careful how you ask questions, you don’t want to lead people into telling you what you want to hear instead of something factual.

Look for patterns

Finding patterns that relate to the problem will help you come up with a hypothesis about what the problem is. The patterns could be usage behaviour leading up to the problem, or environmental conditions under which the problem occurs.

Delinquent changes

If you can reproduce the problem to some extent and your software is released in revisions, it often pays to check if the issue has been introduced. If it has, you should be able to do a binary search over the versions until you know when it started occurring. From there if you have a good source control system you should be able to track down the delinquent change.

Use tools

Learn how to use a debugger and a profiler.

I can recommend yourkit (not free) for java and .net. I have also heard of a reflector add-in called deblector (free).

Get involved

Do what you need to. Add logging to your code, re-deploy and re-test.

Common Impossible Bugs

Environmental

Environmental problems are usually related to the operating system, framework or other software that your program relies on. These types of faults are usually easy to reproduce, but not on the machine where all of your development tools are installed. :)

Configuration

Configuration problems can sometimes be misdiagnosed as environmental issues as they can have the same symptoms. Just like environmental issues, the problems are likely to be easy to reproduce. If you can isolate the software and configuration from the environment and still get the problem, you can suspect the configuration.

Threading

Threading issues will usually be difficult to reproduce, even on the same machine. The problem may occur on one test run but not on another similar test run. If you can find patterns in the places where the issue arises, you might be able to deduce where the problem stems from. Logging can often help you track down threading issues.

Memory leaks

Memory leaks can be the root cause of some intermittent bugs that are usually difficult to reproduce. The pattern you should look for is “after running for a long period” or “do this many times over”. Getting good information about the steps required to reproduce the problem and profiling the application will often get a result sooner.

Jul 252010
 

Ruby, it’s all over the place. Ruby this, Ruby that. Ruby-Ruby-Ruby-Ruby! :)

Recently I have played around with Ruby by following a nifty interactive tutorial on tryruby.org.

Admittedly this will probably only give you a cursory glance into Ruby, but it sure beats setting up an environment and writing print “Hello World”.

So far it reminds of my days writing Perl, PHP or even bash scripts but maybe that’s just because I’m not in an IDE.

The technology behind the tutorial is interesting in itself. It’s using JavaScript to post and get responses from a CGI script that runs Ruby. At the same time it also updates an html element to give you a guided tour.

 

My TFS Mail Add-in has been improved!

Features:

  • Added template instructions
    • Now you will know how to create new templates. The blank template command now includes instructions.
  • Menu appears in more places
    • Now you can right click on your currently-open work item document to get the same menu.
  • Specify where templates should be read from
    • Now you can specify where you want template files to be read from by editing the TFSMailTemplateDirectories.xml file.
  • Bug Fixes
    • Addressed an issue where clicking on templates in the query window would do nothing.
    • Addressed an issue where some templates that have fields that span multiple lines would not get substituted.

Incidentally, the add-in appears to work with Office 2010. One day I might get Visual Studio 2010 and be able to tell you if it works on that too.

My TFS Mail post still has the link for downloading the Add-in.

© 2011 keza.net Suffusion theme by Sayontan Sinha