A french/american blog with some hungarian spices…
geeky
Convert a week number to a date in perl
Jun 11th
Today I had to hack a quick script to convert a week number to a date in perl. To my surprise, the answer was not straightforward and I had to test and try a little bit before to get something working.
So here it is:
#!/usr/bin/perl use strict; use Time::ParseDate; use Time::Local; sub convert_week_to_date { my ($year, $week) = @_; my $ref = timelocal(0, 0, 0, 1, 0, $year); my ($s, $m, $h, $dom, $m, $y, $wd, $yd, $i) = localtime($ref); my $time = parsedate("+".$week." weeks", NOW => $ref); my ($s, $m, $h, $dom, $m, $y, $wd, $yd, $i) = localtime($time); $wd -= 1; my $time = parsedate("-".$wd." days", NOW => $time); my ($s, $m, $h, $dom, $m, $y, $wd, $yd, $i) = localtime($time); return (sprintf("%04d/%02d/%02d", $y + 1900, $m + 1, $dom - $wd + 1)); } print convert_week_to_date(2009, 1)."\\n"; print convert_week_to_date(2009, 52)."\\n"; print convert_week_to_date(2010, 1)."\\n"; print convert_week_to_date(2010, 22)."\\n"; print convert_week_to_date(2010, 23)."\\n"; print convert_week_to_date(2010, 24)."\\n";
Download this code: convert_week_to_date.pl
Hopefully it will help someone one day.
Closing the gap
Nov 22nd
I got to find about Eric Sink’s blog today… Better late than never
He is writing about a lot of interesting topics related to software engineering.
My favorite column from his blog:
End of spam?
Nov 13th
As a consequence, there is a big drop in the spam traffic in the world
Even on happycoders.org, we saw a difference in the daily average of spam received:
- before: Received 149MB 26945 3841
- after:Received 109MB 10351 1563
More details:
San Francisco’s computer network locked down
Jul 16th
Here is an incredible subject for a movie… unfortunately it’s not fiction it’s reality…
Hungarian notation
Mar 27th
I recently came to cross the name “Hungarian Notation”. I found it quite funny as I know this method for long time but I didn’t even know it has a name… If you are a geek check this:
Hungarian notation – Wikipedia, the free encyclopedia
And if you have really too much time, and you don’t know what to do, check this document:
Demonstrate a unix command usage from powerpoint
Nov 15th
Here is the reason why I tried to demo a website from powerpoint… I needed to demonstrate how to use a new Unix application, but I wanted to do that from my powerpoint presentation. After some time spent on google, I didn’t find any way to integrate a ‘unix terminal’ component in a power point slide.
So my solution was to use the embedded browser and use Ajaxterm to connect to a remote linux host… This works… but there is a limitation as it’s not possible to use PageUp, PageDown to go up and down in your terminal… In order to fix that, you can start ‘screen’ on your unix host, and then you can navigate in your terminal using Ctrl+b, Ctrl+f.
I believe that there is a cleaner to connect to a unix host from powerpoint… but I didn’t find it. If you know other solution… please share
Some links to finish, I didn’t try anyterm but it looks cool too…
How to demo/browse a website using powerpoint?
Nov 14th
Problem: You are giving a powerpoint presentation, and during this presentation you need to show/browse a website. The solution that most of the persons will chose will be to hit “alt+tab” to switch the focus to their browser… Yes that does the trick… But you may want to show the website from your powerpoint to keep your audience captivated. I personally think that people has a tendency to get distracted when you switch away from your fullscreen powerpoint.
My solution is to integrate a “Microsoft Web browser” component on your slide, so you can use it to browse a website. Start by adding the component as shown in this screen shot.
Then you can put several buttons on your slide to control your embedded browser. It should look like on this screenshot.
Finally you will have to add some Visual Basic code to your button’s callbacks. Something like:
Private Sub FontDecrease_Click() Dim Z As Variant WebBrowser1.ExecWB OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Null, Z If Z > 0 Then Z = Z - 1 Else Z = 0 End If WebBrowser1.ExecWB OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Z, Null End Sub Private Sub FontIncrease_Click() Dim Z As Variant WebBrowser1.ExecWB OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Null, Z If Z < 4 Then Z = Z + 1 Else Z = 4 End If WebBrowser1.ExecWB OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Z, Null End Sub Private Sub StartDemo_Click() WebBrowser1.Navigate ("http://samuel.happycoders.org/") End Sub
Download this code: test-www-ppt.pas
And here is the result:
Download the example
In the next post I will explain why I wanted to do that… I have a really geeky reason
Status after one month with the kinesis advantage keyboard
Oct 21st

For the last 3 years, I was using a “happy hacking” keyboard. This keyboard is really small and looks
like a laptop keyboard. I really liked it and was able type really fast with it. Unfortunately, after spending too
much time behind a keyboard I started to feel wrist pain. This keyboard is comfortable, but on the long run I realized that I was typing with my left hand turned to the outside.
I finally decided to try the kinesis advantage keyboard. I’m now using it for a month and here is my first feelings about it.

- I’m using the qwerty mapping
- I found it really hard to use at the beginning. I switched to it in one week, and as recommended in the guide, I didn’t use any other keyboard the first week. The hardest is the frustration of not being able to type as fast as before…
- I started to do the exercises given with the keyboard but quickly stopped the second day… I used http://www.goodtyping.com/which was really really useful
- The default mapping was not optimal for me, I had to remap some of the keys.
- The arrows are at a very bad location… but I’m started to get used to it.
- The {, }, [ and ] are really are to type… which can be a problem when coding.
- I’m still slower than with my previous keyboard
- I really found this keyboard comfortable, and it’s true that it’s hard to get back to a classic keyboard once you are used to this one.
- Since I’m using it, I don’t have pain anymore
Next status in one month… hopefully I will get back to my full typing speed
Some links:
