Posts tagged developer
How to get logged-in username in Hudson?
Mar 3rd
Quick background
Have you ever thought your manager keeps shelling out more on your plate other than the officially tracked tasks? Do not feel bad. You are not alone
My manager recently asked me to clean up the build server we use for our project. To put simply, it was a mess. I ended up deciding to start from scratch. Looking around, we quickly zoomed in on Hudson. A great build/CI server. Met literally all my requirements (one of which is extensibility – with the source for Hudson available as open source, we could not have asked for more!).
After many Hudson code changes and UI customizations, we now have a great CI server up and running. One of the code changes I did is to a plugin called email-ext. This enables customizing many aspects of e-mail notification that gets triggered. Unfortunately the stock plugin missed one important thing (at least to us!) – no way to get the user name who triggered the build.
I added a new variable called BUILD_USER to email-ext. When used in the email-ext mail template, this will get replaced by the user who triggered the build. Our server is plugged in to our corporate active directory and this plugin will pick up the logged in user name.
You will find the source code and binaries down below. Note that this is based off 1.3.4.2 Hudson code and is running in our snapshot very well. YMMV and do enough testing before putting in production. Do send me any bugfixes you make, I will make them available for download.
How to use this?
Copy the HPI file to your Hudson web apps folder. Restart Hudson. Go to <your job> => Configure. Scroll down to “Editable EMail Notifications” section. Click on “content reference” help to make sure BUILD_USER is showing.
See the highlighted text shown below.
Any instances of BUILD_USER will be replaced by the current logged in user. In case of timer activated builds BUILD_USER will show “timer”. In case the build trigger reasons cannot be found out, BUILD_USER will be replaced with “<unknown>”.
Chess UCI protocol tracer utility
Jan 4th
I have this bad habit of starting coding on some application, bringing it to an alpha-ready stage, dropping it and moving on to the next one. Fortunately I don’t do this in my day job, else I’d have got the boot long time back.
Couple of months back, I was working on a chess application. I will not be able to discuss it further here, as I still think that app idea is a good one and is highly marketable. My chess GUI had to support UCI engines. UCI (Universal Chess Interface) is a protocol used by Chess GUI to talk to chess engines (see Figure 1). There are other GUI <-> Engine protocols, like Winboard, but UCI is an effort to create a standard. Since my software had to support all the existing UCI engines, I decided to understand the UCI protocol fully. I looked around for some way to capture the UCI transactions that go in between the GUI and the engine, but couldn’t find any tool to do that. So I wrote my own.

[Figure - 1]
In the attached file, you will find uciplug.exe, the main UCI tracer application. Tracer is a simple pump, which works as shown in Figure 2:

[Figure - 2]
It acts like a network repeater, by passing on everything it gets (either from the engine, or from the GUI) to the corresponding recipient, the only difference being it also logs that message to a file. Multiple instances can be used for running more than one engine simultaneously.
Download
[Download not found]
Chessbase Light 2007 Activation – eh?!
May 11th
I love the work being done by the good folks in Chessbase; IMO they have the coolest jobs, they get payed to develop software for CHESS
Ohhhh, I wish I had some kinda day job like that! I know video game development is as interesting, but anyway gaming has never been one of my serious interests. Anyway, coming back to CB…I check the Chessbase site more than my Gmail, sometimes, which reminds me of the lack of RSS in their site…but I am not going to complain about that ever, as I feel it is worth visiting their site for the excellent articles they post. I am not sure if Fredrick Friedel ever thought of creating a business model out of the Chess news network they can easily build. Ok, again I am digressing…
I read with interest the article on their Chessbase Light 2007 software. It provides nearly all the functionalities of the full-fledged Chessbase DB software, one of their flagship products, for FREE. Of course, the catch word in the above sentence is “nearly all“. BW, CB Light allows only viewing, you cannot create databases or save games using that. For that you need to upgrade to CB Light Premium, which I guess is the same as Chessbase starter pack minus Bigdatabase 2007/Player encyclopedia/CB Magz.

The activation screen looks like the above screenshot (NOTE: I am using the screenshot provided by CB). When I saw this I was like ‘Eh?? What stupidity!!”…Do you see the captcha field in that window? Captcha are used for preventing the bots doing automatic signups, spams et al. Is there any sane reason why the user has to type the code shown in the image????
“Oh, ok…may be this code is part of the activation process”, I thought.
When I went to the site meant for generating Activation key, I didn’t find a field for entering the abovementioned captcha code. Then why the heck the CB Light programmers decided to show the captcha code in CB Light? Beats me!
Note that I may be totally missing a valid reason behind having that captcha in a desktop program, if so I’d appreciate if you’d enlighten me!
Performance appraisals – Should they be so complex?
Mar 21st

We went through the performance appraisal phase in my company last quarter. As we had come to expect, it was one of the stressful periods, so much that we literally threw a party when 360degree feedbacks were prepared and sent (ok, am just kidding. But, you get the point!). We call this process FOCAL; when I joined 3 years back, I asked one of the managers why the perfomance appraisal was called FOCAL. My luck, that manager was forced to quit in our last round of “leaning”/”increasing efficiency” process, before he got a chance to reply me
FOCAL is more of a ritual for us; focal FAQs and training mails get sent to everyone by November of every year. The newbies are forced to take an half-a-day instructor-led course. Then one fine day, we start getting lots of requests for feedbacks on our peers and stakeholders, we spend 60-70% on filling up all these. Except a few, I have seen most of my colleagues just copy/pasting the content from one feedback to another person’s feedback. Bad, I know, but if you look from their perspective, who would want to be original in their 24th feedback form? After this the managers come in to the focus, they need to collate all the feedbacks on a person, along with that person’s own (check this out for some good points on writing one’s own strenghts/weaknesses) in to one report.The “ritual book” states that the managers need to present this to other peers, convincing everyone that the person under scrutiny deserves something better or gets screwed. Fair enough, right? Wrong! As far as I’veseen, people tend to take shortcuts everywhere, and as Kelvin claimed “there is always thins thing called POLITICS“. The main problem, at least the employess are stating is that nothing is transparent! Most of the times they don’t understand why they got what they got.
The period after focal report delivery is again a “fun” filled phase. Disgruntled employees leave, promoted / well-compensated ones put in more time/effort, new people are brought in and the cycle starts afresh! Does this process need to be replaced? I don’t think so. Does this need to be made fool proof? Oh yeah! Should intel get away with this complex process for something simple, like Microsoft? May be a good idea!!
I know there are couple of other pages like this and this, but at least I don’t believe things are so bad in India.
Windows Beginner Developer Learning Center – Gr8 idea!
Mar 2nd
Microsoft has come up with a website totally dedicated to getting the programming newbies up and running (Of course, using MS technologies! :p )
BDLC covers both web and desktop applications. The best part is, it doesn’t assume any prior programming knowledge. I am pretty sure this is a great resource and is gonna boost the Windows developer base exponentially!
Some interesting topics from BDLC
- Web as a platform. The absolute basics of browsers, HTTP et al
- Kids corner
- RSS reader project
- ASP.NET events and postbacks
I have bookmarked some for my wife to go through, this weekend. I am pretty sure I will be directing her to this site more often from now!!
Dumb Code – 1
Apr 27th
Recently, I was helping a friend debug an application debugger. In one of the report/UI modules, he had to log the date execution started + more process meta info. For date conversion, instead of using one of the inbuilt CRT functions, with the true spirit of a good (!?) programmer, he decided to implement it himself. When I saw the code, I couldn’t help asking him “How many years have you been programming?”!! Check out this so called production-quality (??) code…
define MONTHS_SIZE 12
typedef struct __monthNoPair
{
char *strNoMonth;
char *strMonthName;
} monthNoPair;
More >

