Tuesday, July 31, 2007

Exporting custom columns to PDF

A few more evenings of coding resulted in ability to export custom columns to PDF. There is a new theme Samara which is aware of custom columns. User interface is very simple: columns that you see in the task table are columns that get exported to PDF, plus resources and task notes. Samara theme tries to keep proportions of column widths, places notes under task names, using smaller font and indent and uses task colors in a narrow column on the left, rather than in the whole task row.

A screenshot below shows our HouseBuildingSample project exported to PDF with Samara theme.

Samara is a big and old Russian city on Volga river. I have never been there (except for one sporadic transit through its railway station 13 years ago) but GanttProject feels comfortable there (as well as in many other cities worldwide :)

Update: These changes will be available in GanttProject 2.0.5

Monday, July 23, 2007

Importing custom fields from .gan files

Having spent a few evenings on refactoring of kilobytes of code, I finally added custom fields to the importing of .gan files. So, if you import one project into another, custom fields of your tasks will not be lost.

Two lessons which I personally have been familiar with for quite a long time, but other developers may not know:
  1. Singleton pattern is very dangerous and one should avoid using it unless he is absolutely sure that two instances of that class is a non-sense. And even in this case avoid accessing singleton and prefer passing that singleton object as a parameters to the methods where it is required.

    In our case the instance of CustomColumnsStorage class was accessed as singleton from just everywhere. So when I decided to create another instance which would load custom fields from a file during import process, I had to patch all those places.

  2. Classes which represent user interface must not be used as a model for code that reads data from files (it is just a rephrased Model-View-Controller).

    In our case code that handles tags storing custom fields in .gan files directly used instances of GanttTreeTable (a class that represents the table view). So if I want to keep in memory two .gan files (one is a project we work with and another is a project we import), I either have to create two UI tables or to refactor the smelling code and give that tag handler the interface it needs. I chose the second way.
These changes will appear in GanttProject 2.0.5

Saturday, July 14, 2007

Bugfix: dependency type updates the gantt chart

One more bugfix. Now when you change a type of some dependency (say, from Finish-Start to Start-Start), the Gantt chart updates immediatly

GanttHive with captchas

Effective today, creating accounts on GanttHive is protected from robots by capthas (images with verification code that person who creates an account needs to type).

17/7/7 to be 17/07/2007

A funny UI problem is fixed. Now even if you type "17/7/7" in the begin or end date column (that is, one-digit year) it will be recognized as "17/07/2007".

But what if your project really dates from the beginning of Anno Domini? No problems, just create only one task from that period typing its date without missing zeros: "17/07/0007"

and GanttProject will stop adding 2000 to your one-digit year. If your project start date is not around year 2000 then one-digit year is interpreted literally, as 0007.

Monday, July 9, 2007


A stupid bug that blocked functionality of importing one GanttProject file into another has been fixed.

Sunday, July 8, 2007

Profiling session

A number of people complained about performance problems in GanttProject 2.0.4 so I have spent last two evenings on profiling.

In one case the problem was in the project file: I found there one task that started in year 0007 (yep, 2000 years ago) and was half a million days long. It must've been an effect of this UI problem related to entering years using short notation ("7" instead of "2007").

In the second case the problem was in a code doing a lot of unnecessary stuff when loading a project file. Changes were quite easy and small and in the end I successfully loaded a project consisting of 1500 tasks and was able to work with that project with no significant pain.

Thursday, July 5, 2007

User base is growing!

The latest updates from GanttHive user survey:
  • More than 700 active users who work with GanttProject on daily or occasional basis
  • Most users are from US, Germany, France, UK and Japan (totally more than 500 out of all active users)
  • Users like our usability and easy learning even slightly more than excellent price. That's great!


Let's start blogging!

A few days ago I realized that current implementation of gantt chart renderer had become overcomplicated. So I decided to do some refactoring. Fortunately, refactoring is not going to turn into an absolute disaster. And not only the code becomes more clear and understandable, but also a long awaited feature of showing quarters and years in a timeline gets closer to reality.