{Snamell(it)}

  • {Snamell(it)}
  • Blog
  • About
  • Location
  • Contact Us

Category Archives: Uncategorized

July 4, 2011 · pti

Enable real idletime for Org Mode on Ubuntu

Org Mode can use the idle time to correct time tracking entries. On the Mac this works on the idle time of the computer, on other platforms it uses the idle time of emacs. Hence if you do a significant task in another program it will be idle for org-mode.

There is a little program delivered with org-mode sources to estimate the “real” idle time based on the information used by screensavers. Unfortunaltely it is in source code and needs to be compiled first. Everything is actually well documented, just scattered.

Let’s see where that little program is located

$ locate x11idle
/home/pti/.emacs.d/vendor/org-mode/UTILITIES/x11idle.c

This conveniently shows the location of the source file. If you might find a x11info file (without .c) in a bin directory then it is already installed and you’re done.

If you get no results and there is some remark that the database is too old then it is time to refresh it using sudo updatedb. Then the lookup should find the file.

Now go to the folder where the file is located. In my case :

$ cd ~/.emacs.d/vendor/org-mode/UTILITIES

We need to make sure we have the necessary X screensaver libraries for compiling :

$ sudo apt-get install lib-xss-de
sudo apt-get install libxss-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  x11proto-scrnsaver-dev
The following NEW packages will be installed:
  libxss-dev x11proto-scrnsaver-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.1 kB of archives.
After this operation, 225 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://be.archive.ubuntu.com/ubuntu/ natty/main x11proto-scrnsaver-dev all 1.2.1-1 [21.3 kB]
Get:2 http://be.archive.ubuntu.com/ubuntu/ natty/main libxss-dev amd64 1:1.2.1-1 [12.9 kB]
Fetched 34.1 kB in 0s (200 kB/s)
Selecting previously deselected package x11proto-scrnsaver-dev.
(Reading database ... 567603 files and directories currently installed.)
Unpacking x11proto-scrnsaver-dev (from .../x11proto-scrnsaver-dev_1.2.1-1_all.deb) ...
Selecting previously deselected package libxss-dev.
Unpacking libxss-dev (from .../libxss-dev_1%3a1.2.1-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up x11proto-scrnsaver-dev (1.2.1-1) ...
Setting up libxss-dev (1:1.2.1-1) ...

Now we can compile x11idle. We need to specify to link against the X11 and X Screensaver libraries (Xss). I immediately place the resulting executable file in ~/bin/x11idle. Alternatively you could use the /usr/local/bin folder, but first compile to a temporary location like /tmp and move it there : sudo mv /tmp/x11idle /usr/local/bin.

$ gcc -o ~/bin/x11idle -lX11 -lXss x11idle.c
x11idle.c: In function ‘main’:
x11idle.c:19:5: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
$ x11idle
22
$ x11idle
20

I tried to run it using the normal path and got 22 and 20 seconds idle time : it works !!!

The orgmode code will now find and use it.

For more background info see

  • Blogpost about getting idle time in linux.
  • The message with the patch proposal for including it with org-mode

2011-07-04 Mon 11:11
Track down reason for Dangling Time References

Posted in Uncategorized | Leave a comment |
June 23, 2011 · pti

Fix for Sonar choking on ‘result returns more than one elements’

Recently our sonar installation on our Hudson CI choked again, this time with an error I have not seen before. It was just before the release of an important milestone for the team, so not being unable to publish new version on the test server could not come on a worse time.
In the Console Log of a failing built we found the message.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.791s
[INFO] Finished at: Thu Jun 23 09:20:05 CEST 2011
[INFO] Final Memory: 20M/429M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0-beta-2:sonar (default-cli) on project pfus: Can not execute Sonar: PicoLifecycleException: method 'public void org.sonar.batch.ProjectTree.start() throws java.io.IOException', instance 'org.sonar.batch.ProjectTree@50a6023a, java.lang.RuntimeException: wrapper: result returns more than one elements -> [Help 1]

Ok, apparently something returns 2 results which should only have one result and it stands to reason that it is coming from the database. Pity there is no indication on which table would be affected.

Some googling retrieved this post which points to the snapshots table and more specifically to records with the field islast set to true.

A quick check in …/conf/sonar.properties revealed the database connection parameters.

Ok, this is a good time to check you have an up-to-date backup of your database. (Or make one if you’re not sure)

Using your SQL query tool of choice (I used the built in Data Sources tool in IntelliJ) connect to the database.

The snapshots table contains a project_id which confusingly does not really contains projects, but actually all kinds of assets, artefacts, files, however you ike to call it. Unfortunately there are many thousands. Even if I limited to only the ones with islast=1 there were close to 1000 records.

Narrowing further down with :


select project_id, cnt
  from (select project_id,
          count(*) as cnt
        from snapshots
        where islast=1
        group by project_id) as cntsnap
  where cnt > 1

Gave me the project_id I’ve been looking for, in my case 2089

Now a quick

select * from snapshots where project_id=2089

Gave the 2 offending rows. A quick glance showed that one of them was very suspicious : the parent_id was the same as his own project_id and there were lots of null columns.

I deleted the row based on the id. Retriggered hudson to rebuild the project, and the build succeeded and sonar seems to be happy again.

I hope there will be no other repercussions. For our purposes the sonar data is not really critical and we could also restart without any impact. If your sonar data is more critical a better choice would be to restore from backup before the build started failing.

 
Posted in Uncategorized | 1 Comment |
September 27, 2008 · pti

Learnings from the PMI Benelux Day.

I went to the PMI Benelux Day today.

The theme today was A symphony of Knowledge, a theme which ran through the plenary sessions topics.

I choose to see the use of earned value techniques applied to the Galileo project presented by Francois Picaut. It was interesting to see how this technique was applied in a quite straightforward manner by just entereing the AC provided by the accountants and the EV provided by the products completed at roughly biweekly milestones. All other performance numbers were calculated from these numbers.

One learning was that in the case of subcontracted work under a FFP contract, the EV = AC. Of course once you think it over this is evident, but this quarter took a while to drop.

Some additional metrics were defined like the ES (Earned Schedule, or the time when the current EV should have been reached) and ‘To Complete Performance Indexes’ in their cost and scope variations. Apprently these metrics should show the effectiveness of the project management when plotted over time. 

He applied EVT on FFP projects with good success as part of project assurance. One anekdote was the case when the project manager presented a ‘project on track’ report while the EV calculations showed the project would end with a 1.000.000EUR loss. This triggered a discussion about the variances which triggered corrective actions. As such this proved the value of the method to confirm the results from bottom-up or other estimates. 

In the area of risk management presented Daniel vander Borcht a session about why the ABCD methodology works where so many other risk management approaches fail. ABCD stnds for Assumption Based Communication Dynamics and a key part is the central role of assumptions in this model. Next to the classic issue register and risk register a assumption register is introduced. I need to research this some more

Jean Diederich presented the Test Monkeys and Banana Software talk. He made the case that thinking of testing still occurs way too late in the project. He proposes to involve tests at the earliest opportunity to help start the acceptance test design, release test design, … in parallel to development rather than afterwards. This is the same story I heard from Suzanne Robertson a couple of weeks ago in the context of requirement gathering. This confirms again my conviction that a good requirements process will make life in the project considerably easier. 

A last presentation was by Hedda Pahlson-Muller regarding KPO’s or knowledge process outsourcing. This was a very instructive talk which clarified this form of outsourcing. Roughly they provide analysts or other knowledge workers in the company the possibility to have an external team to do the legwork and provide collected data for further analysis by the company itself. Due to this business model they face a glass ceiling to the service they cannot deliver analysis or recommendations. For this they are looking for PM/Consultants to use their experience to analyse and interprete the data for the companies which ask this.

Nice interesting day, bought a couple of books, talked PM with other people. Time well spent.

Posted in Uncategorized | Leave a comment |

Pages

  • {Snamell(it)}
  • Blog
  • About
  • Location
  • Contact Us

Archives

  • July 2013
  • March 2012
  • July 2011
  • June 2011
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008

Categories

  • build (2)
  • Java Stuff (6)
  • linux (5)
  • MacOSX (1)
  • Personal (1)
    • Huiswerk (1)
    • Kinderen (1)
  • Plone (1)
  • Project Management (2)
  • Ubuntu (6)
  • Uncategorized (3)

WordPress

  • Log in
  • WordPress

Subscribe

  • Entries (RSS)
  • Comments (RSS)
© My Website