Time Tracking Project: Version 0.5

January 27th, 2011

Just over a year ago I finished the first version of my time tracking application, which I created for my own personal use. The idea at the time was simple, I wanted an easy way to keep track of the time that I spent working on different projects, as well as a way to further develop my understanding of pylons; and more specifically a new library called FormAlchemy. Shortly after developing a draft of the code, my colleagues saw the concept and thought it would be great to use it within the company to help everyone get feedback on time taken to do specific work, compared to the amount of time that had been quoted for the work. This is of particular interest within our company, since everyone works at a different rate, which is based on previous experience and general aptitude for any given task. As an example, I know that I generally code faster in pylons than Ed and Tavo, but somewhere about the same as Damian. However, Tavo is faster at styling using CSS than all of us. This is not to say that the others can’t do a particular job, but that certain members of the team have honed certain skills within particular areas than others. So with needing more quantitative data on this to help with our quotations and billing, my application was deployed to the company server.

At the start this was great, everyone was entering their information and reports were being generated for both our clients and our own use. However, some time last year the use of the time tracker dwindled significantly, as the novelty worn off. Since it was only the first version of the application, I knew there were going to be some rough corners that needed some attention, which included the input method which became a bit cumbersome if you needed to enter lots of information (i.e. you had forgotten to enter your records at the end of several days).

With some free time at the weekend, I went back to code and started on modifying the system to make things more easier for users. Since I already had a user base, which were familiar of the basic system, I pushed the new updates to the company server, and waited. To my delight the new modifications have been a hit with the users, and people are again entering their information. One of the major modifications that I made was to provide a short cut for users when entering their records. This short cut pre-populates half of the form with information, which cuts down on the amount of time it takes for a user to create a record. To achieve this, I created a simple calendar display, which allowed the user to add an entry to a specific date. This means when clicking on the add button, the system can pre-populate the date field with the selected date, but still gives the user the ability to change it if they require. In addition, the system now pre-populates the project and the activity with the last used values. After talking with colleagues and looking at their entries it became clear that most of them work on a single project for a couple of days in a row, and if not work on a specific activity across multiple projects. So I’ve changed the code to pre-populate any new record with the last used activity and project. The reasoning here is that in many cases the user wouldn’t have to change anything, but if so the majority would only have to change either the project or the activity. I know for some people, which at the moment is only me, this is not ideal. As I am generally switching between various different projects, which also tends to mean different activities, but as I said at the moment I’m the minority with the current user pool, which means I need to make the software work for the majority first and then see if it can be modified for the corner cases like myself.

I still have more planned improvements, which will hopefully bring the application to a point were I can offer it for download.

Time Tracking Project: Draft

January 14th, 2010

The first version of the time tracking software for the company is up and running, well it has been for a while now. The basic structure and functionality of the system is there, but there is still plenty more to do. However, this will have to wait until we have some more time as new projects are just starting which demand my attention.

Having said this the system can perform all the basic operations, which include the following:

  1. Allow users to add and edit time records
  2. Allow users to generate reports for any particular month of a year from the current year back to 2006
  3. Manage and create new system users, projects, clients and activities

I would not call this an alpha release or even pre-alpha as it’s very sketchy in some areas. For example some of the forms controls are not in a human readable format, although all the people that are using know what these magic values mean which is why it has been left for later. Plus I’m still not sure about FormAlchemy, it seems it does the basic stuff really nicely, but when you want to do something more complex then it goes a little mad on the coding front. I think using the old method was better, but as this is my first pass at using it, I will give it another go and see what happens.

Hopefully in a month or so I’ll be able to spend some time with this project and develop it further. Ideally, I need to re-style the layout, which whilst completely functional and user friendly, it wouldn’t wow anyone (also why there are no screen shots of it here ;) )

Time Tracking Project: Research & Specification

December 2nd, 2009

So over the past couple of weeks I’ve been spending some more time on the time tracking project. The first thing I had to do was come up with a requirement list that we as a company needed for the application. Whilst many of the suggestion from my colleagues were items we could potentially compromise on, there were a few deal breakers for us. The first and most important was that we need a system which we could access for anywhere. The reasons for this is that as a company, we all work in different geographical locations. We also work on the same project at the same time so having records stored locally on my computer wouldn’t help the others see how much time we had already spent on a particular project. Finally, when traveling we might not have access to our own machine. Therefore based upon this requirement all solutions that run and store their information locally on your desktop machine were ruled out.

The next big things for us, is that we don’t use Windows for our day to day work. This is not to say that we don’t use Windows at all, in fact in our line of work we need to test to see how they perform under Windows. However, in general we use Apple macs and linux boxes to perform most of our work. So ideally we need an application that runs on Apple mac and/or Linux. The problem with this is that majority of tools created are aimed at Windows, and of those there are very few that are cross platform or have had a version created for another platform. This is not to say that we couldn’t gotten around it using some clever machine virtualization, but that is just something extra that in all reality we don’t want to do.

This didn’t really leave many options left. So from what I was left with, I sat down and evaluated the possibilities with the rest of our requirements in mind. I felt that none of what was left really fitted what we wanted to get from the time tracking applciation. For example, very few of them would allow me to store information about clients, projects and types of contracts in a manner that I could then easily query and get information from.

Based on this I’ve decided the route we need to go is to create our own personalized time tracking project which meets our needs. This of course means we can customize it to meet our full requirements and depending on the result possibly even offer it to other. So the next stage is to develop the structure of the database that will be used to record all this information.

Database Structure
dbLayout

Just for those of you that aren’t family with database diagrams, each of the blocks with a name inside it relates to the tables that I’m suggesting for our database. So we have one table to hold all the employees of the company, a table for all our clients, a table for each project and so on. Then each of the lines between these tables displays the relationship between the tables. So as an example the table clients is related to the table projects in that one client can have none, one or many different projects. The many element is denoted by the “crows foot” symbol on the end of the line.

So now it’s the big part, implemented the application. So the next question I have to face is how.

Time Tracking Project

November 22nd, 2009

For a number of weeks I’ve been research time tracking solutions. Between the three of us at Tauri-Tec we have identified the need to be able to more accurately track the amount of time we spend on individual projects, which should aid us in a number of ways.

Firstly, we should be able to quote more accurately for future work. The issue here is being able to judge the pace someone works at. This obviously differs, depending on their experience with not only the language, but also the project itself. The modification might only be a small one, but if you don’t know the project it’s going to take you longer to make the modifications required than someone that knows the project inside out. Also some people just seem to work faster on some things than other. I know back when I joined the company, that Ed was constantly over estimating how long it would take to complete parts of a project. Now you could be thinking “what’s the problem you get some down time”, but in all reality it actually means we are losing money. For example, it could be that we have several parts to a particular project that need to be done with a short space of time. If we have over estimated how long it will take to complete a particular part, then it might lead us to pay someone else to complete the other part, which is more expensive than one of us working on it. Not only in monetary terms, but also checking it against our QA standards. So having data on how quickly people work both; full time employees and freelancers that we use, will allow us to better judge costs, which also means we can be even more competitive when quoting for work.

Secondly, and this is actually something Damian pointed out. It’s nice for a customer to be able to see where the money is being split when they receive an invoice. Damian recently engaged a lawyer to help with drawing up some particular contracts. Attached to the invoice was a break down of not only what work was done, but also a brief outline of the number of hours that were spent doing different activities. Our company has clients that pay a maintenance contract, where they pay us to monitor their system, apply small updates, and fix any bugs that pop up from time to time. So this would be very helpful for these clients. However, and this is more important for us, we can more accurately monitor the amount of time we spend on these maintenance contracts, and then modify the service agreement for them. For example, if we aren’t spending as much time that our agreement covers, then we can re-visit this agreement and decrease the cost. Alternatively, if we are spending way over the amount of time that our service agreement covers, then we can again sit down with the client and discuss the possible need to increase the service agreement so that it covers the man hours that we are spending on their system.

So now we have determined the need, I’ve been given the job of finding a solution. As I see it I have two options, take some pre-existing time tracking software which nearly matches our specific needs, or write my own.

Code Snob?

November 11th, 2009

Over the last couple of weeks I’ve been thinking, is there such a thing as being a “code snob”, and if so am I one?

The reason I’ve been thinking about this is that I have been slowly picking up more and more small projects, where I’m having to either repair or update the existing code, which were created by other companies. Nine times out of ten I find myself starring at badly written code. For those of you not into programming, there are a number of metrics that can be used to classify how well code is written. I spent ten years being both taught and teaching students how to write “good code”. The majority of these rules are simple to follow, and are even common sense. For example, “name variables appropriately with a descriptive name”, so when you need a variable to store the total of a sum you might call it “total”, but don’t call it something random like “b” or “jklgh” (and yes I’ve seen undergraduate students do this).

The reason we have these metrics and guidelines to writing code is pretty simple. Good code is easier to read and understand, which means when it comes time for you or someone else to modify the code it will take them less time and more importantly be less frustrating. Whereas badly written code is just a nightmare to understand, let alone alter. I’ve even heard young developers say, “well it’s my code and I’ll be the only one that will be modifying it”, which is giving them false hope. Generally you as a developer will work on a piece of code and then move onto something new. Sometime later, could be a couple of months or a couple of years, you will need to revisit this code and make alterations to it, and trust me when I say you will have forgotten some of the fine details of why you did things in certain ways. Now if your code is well written it won’t be a problem to work everything out, but if it’s badly written code then the problem starts. There isn’t an excuse for badly written code.

My biggest pet hate, and any of the students I’ve taught programming to vouch for this, is code indentation. Some people say you must use tab characters to indent code, whilst others say spaces. Personally, I don’t care how you indent your code, just as long as you do and that you are consistent and use the same indentation throughout your code.

There are so many resources around to day that there is just no excuse for writing code badly. Even if you know you are never going to look at the code again, have a heart and think about the next person that will. You know the old saying what goes around comes around.

So to answer the starting question is there such a thing as being a “code snob”, I still don’t know. However, if there is then I think I might have membership to that club.

Table Manipulator

April 18th, 2006

I have been working in the Psychology Department at the University of Kent for nearly a year now and during this time I’ve been asked to write experiment and programs for a wide range of tasks. In addition, I have found myself helping students and staff handling the data generated by both my programs and 3rd party software. One particular operation that I seem to be carrying out on virtually a weekly basis, is to manipulate a table of data. Whilst it only takes a couple of minutes to knock together a piece of code to actually manipulate the data in the way that I need, it is wasted time. So this weekend I put together a little Java program that I carried out three of the common manipulations that I do.

Image of table manipulation program v0.1

At present there are four manipulations the program allows you to carry out:

  • Swap columns and rows over
  • Reverse the order of the columns
  • Reverse the order of the rows
  • Convert the table into a single row of data

In future version I plan to add the ability to specify you own delimiter, in case you are using something really strange, and possibly look at the feasibility of loading other file types i.e. excel, spss, etc.