Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

jonasbn
  {jonasbn} {at} {cpan.org}
http://usr.bin.dk/~jonasbn/
AOL IM: BJonasN (Add Buddy, Send Message)

Freelance Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer
and maintainer of:
  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Saturday April 26, 2008
03:40 AM

iPod+Nike+, a milestone and a record

Yesterday I ran 10 km. This brought my accumulated amount of run kilometers above 1400. At the same time I ran my fastest 10 km. with an average pace of 4.40 minutes/km.

I am feeling quite good and I am sure I will be as ready as I can be for the Copenhagen marathon, my legs feel tired, but that is the usual feeling I guess from running so much as I do.

Sunday I will run 25 km. and Tuesday 10 km. this mean that I will have run 180 km. in April.

We are leaving for the summerhouse Wednesday so I expect to get a lot of training passes completed when we are on Bornholm.
Tuesday April 22, 2008
04:11 PM

Workflow-0.32_2 released

I have just made the our second developer release of Workflow to CPAN. We have added some more experimental stuff. Workflow currently defaults to auto committing where appropriate, this level of control is not exactly enough so Jim Brandt have added control of the transactions and the possibility of using manual commits and rollbacks.

Feedback is very welcome either on the mailing list or directly to me.
03:42 AM

iTunes+Nike+, longest run

I completed my longest run ever - running.

The last 7 kilometers were painful though and not having run in March shows it signs, I am however full of confidence and with 4 weeks left to the Copenhagen Marathon, I actually think I can get ready.

My legs felt quite sore when I finished. But it was in the mucles, I felt no other pain - so I am quite confident that it is simply a matter of training. No sore angles, feet or knees. My back was tired though.

When getting in the shower at home I however experienced a new sensation. Underneath one of my arms all of my skin was all red, above and below the armpit. Apparently my running shirt had irritated my skin the skin felt like I had got burned. So when I smeared it in lotion the pain came - the next time I think will use aloe vera.

This was quite interesting however. One thing is running and you can get into to shape to run really long runs, but does your gear work as expected.

I have had no problems with this shirt on my shorter trips, but apparently the combination of time and sweat made this occur and luckily I did not notice until I was in the shower.

One of my friends have given some advice on running a marathon, he said 'running socks' are your friends. and he was right. He also said 'vaseline' is my friend - I think he might be right.

So I am going to follow the advice on vaseline and duct tape to avoid friction problems while on the marathon.

Next weekend is 25 km. I will run in a different shirt to see how it plays along - I expect I need a wardrobe of at least one short and one long sleeved shirt for the Copenhagen Marathon since the weather might be good or bad, last year it was really hot, but lets see when we get closer, right now we have a fantastic spring time here and the weather is good for running and I need to cover some miles within the next four weeks.
Thursday April 17, 2008
04:31 PM

iPod+Nike+, longest run coming up

I ran a half-marathon last Sunday, I could still feel it in my legs after two days. So I skipped the run tonight. Instead I will go running tomorrow - tomorrow is a holiday here in .dk.

Anyway Sunday I will have the chance to run the longest trip I have ever run: 30 km.

This will be the last test, so if I can run 30 kilometers I will sign up for the Copenhagen Marathon.

This will give me a month to get the last 12 km. into my legs.

I am however somewhat uneasy and concerned about the training pass Sunday. I no longer run trips shorter that 10 km. but 30 km. will be my longest trip ever and it goes well, well I will go for an even longer run.
Wednesday April 09, 2008
08:00 AM

Role Model

I got contacted by a consulting firm. I am in their database, but the inquiry originated from the IT business interest organization ITB. The ITB have launched a campaign to attract young people to the IT business since we are seriously lacking people in this sector in Denmark.

I have previously had a student in training in my company for a week and I very much believe in this concept for giving a people a glance into a world they have no chance of getting to know, while in school unless they have direct contact with the business via family or something.

So this new inquiry sounded very interesting and I mailed ITB the relevant information and indicated my interest.

Now I am officially a 'Role Model' with ITB and perhaps they will ask me to visit a high school or job fair to give my view and version on how it is to work in the IT business.

So yesterday I was invited to a workshop on being a role model and how you would go about adressing high school students.

I somewhat assumed what the audience at the workshop would be, so I wore my 2600 hooded sweatshirt, with the writing 'hacker' on the back. The last workshop I attended was the NPW, but this was different - And as I assumed I totally stood out. Ties, black suits, high-heels and lots of ironed pants - it looked like a business school class reunion.

I actually met a fellow Perl hacker whom I now from back when I was a Linux user and a member of the local LUG (SSLUG), he had however chosen to wear a more formal outfit - oh well.

In general the workshop was quite good. We got information from a journalist specializing in story telling and in the end the principle from The National Film School of Denmark

And that guy (Poul Nesgaard) is really funny, I used to watch him on TV when I was a kid and he could still make me laugh.

So now I am just awaiting an invitation to go out and entertain young people with the delights of working in the IT business.

I am trying to gather as many anecdotes from my work as I can to see if I have any which can be entertaining enough to present to the targeted audience.
07:26 AM

Code Talk Kills

Dr. Dobbs latest initiative: Code Talk has already killed my Firefox 5 times (it was 3 the first time I attempted to write this journal entry).

Anyway, I got a mail from Dr. Dobbs promoting this new thing, but I had already visited it, lured there by some banner or something and a video on Beautiful Code, this sounded interesting to me, since we have in line with the whole Beautiful Code thing, themed the next YAPC::Europe; 'Beautiful Perl'.
Monday April 07, 2008
08:38 AM

Travelling home from Oslo QA hackathon

I wrote my journal entry on the QA Hackathon Sunday before leaving for Copenhagen, so I did not really get to describe my traveling home.

I went from Linpro taking the subway to the central station. On the central station I went directly to the platform and the train arrived after two minutes.

When I got to the airport I gathered it would be the best idea if I could just get through security and then I could eat/drink/hack etc. So I appended my self to the line leading to the check-in counter.

When I got to the counter I just gave the lady there my ticket and my danish health insurance card. I had my passport in hand, expecting that I would need both (as in Copenhagen airport).

She just looked at the health insurance card and commented something like (translated from Norwegian).

Funny you can use in Denmark considering they do not hold a picture

I responded (translated from Danish)

Yes, it is

She concluded our business with the following remark (translated from Norwegian)

Have a pleasant flight

After this I went to the security check line, where I had to take out my laptop, take of my belt, shoes and jacket.

I should not present anything, I expected the hardest thing was over and I went to the flight information board. My flight was listed as boarding..., so I immediately headed towards the gate, so no eat/drink/hack for me.

I came to the gate presented my boarding pass and expired passport and I was let on board.

After an hours flight in a much more comfortable seat than the last time, where I was able to eat/drink/hack. I landed in Copenhagen airport, picked up some LEGOs for my sons and went through customs with nothing to declare, went on the subway and got home.

I only regret the loosing of a bootle of iKlean, which was confiscated in Copenhagen airport security check, since I had put in the wrong back.

I could have offered laptop cleaning at the QA hackathon in Oslo, well I must do that the next time.

So now I just need to renew my passport and get a new bottle of iKlean.
05:21 AM

Note on YAML config in Catalyst/DBIC context

I am currently debugging a Catalyst application. I have run into several problems where I found the stacktrace practically useless.

The code uses InstantCRUD, which I think requires a word of warning. I should write a constructive CPAN review of this distribution in addition to mentioning it here.

Anyway, it ended up with me writing a work-around, since I could not get it too work after several attempts and different solution scenarios.

DBIC was of course swell in the end when implementing the work-around (a work around InstantCRUD that was).

The problem is actually not that the code did not work, we can fix code if we can locate the bugs. But locating bugs in Catalyst/InstantCRUD apps is not trivial. Anyway if the transaction went bad (as it did) the whole server was rendered useless and nothing else could go on until the Apache server was restarted.

So the work-around would make the imminent problem go away, but not the actual problem. I am only treating the symptoms so to speak and as a programmer that feels VERY unsatisfying.

One of my attempts was to control auto-commits in DBI. Just getting this into the connect_info part of the YAML file was quite an adventure - I hate those, they make me stray from my original goal and distract me from my current focus, this might be fun for when experimenting and hacking around, but in a w0rk situation it is not always optimal.

So if you have a YAML configuration somewhat like this:


Model::FAIadmin:
        schema_class: 'FAIadmin::DB'
        connect_info:
                - 'dbi:Pg:dbname=logicshop2faiadmin'
                - username
                - password
                - pg_server_prepare: 0


And you want to add additional DBI parameters it can be done (according to the docs), but nobody provides good examples of this.


Model::FAIadmin:
        schema_class: 'FAIadmin::DB'
        connect_info:
                - 'dbi:Pg:dbname=logicshop2faiadmin'
                - username
                - password
                - pg_server_prepare: 0
                - AutoCommit: 1


Looks quite natural and feels intuitive and you can even get ysh to eat it, but ysh knows absolutely nothing about context, more on this later.

But this does however not work, no - you have to get the last parameters parsed to a hash (I found this hint in a mail archive googling).


Model::FAIadmin:
        schema_class: 'FAIadmin::DB'
        connect_info:
                - 'dbi:Pg:dbname=logicshop2faiadmin'
                - username
                - password
                - { pg_server_prepare: 0, AutoCommit: 0 }


Anyway, ysh can really provide useful.

From the POD:

cat yaml.file | ysh | less


This can help you examine what goes on and it can help you get the right result, you still have to take context into consideration, so hints (or improved POD) can assist you here.

So now everything seems to work, but I have only made the symptoms go away - I know the problem still persists, but I do not have time to fix it now.

Anyway one of the other people involved in the application changed something in another YAML config file, and the server refused to start.

I had just introduced changes in several components late last night, so I thought I had broken something. I googled for the error message


"->config->{schema_class} must be defined for this model


and again it pointed to YAML.

I ran the YAML configs through my new toy ysh and boom. One if the files did not parse, I looked at it and I could not see any problems. Luckily the file was rather short and I remembered that my colleague had mentioned that he intended to change some values and this was the file containing the values.

Great!

So I deleted the contents and started to rebuild the file, line by line, running it though ysh after every addition and success, in the end my server would actually start.

Now I cannot remember what I fixed, I exchanged some tabs for spaces - so in order to find out I have requested the file, which might have been updated via SFTP from my colleague a hex editor comparison might be a good idea, so I know what to look for the next time this occurs, since I feel this is not the last time - perhaps we should change configuration file format?
Sunday April 06, 2008
07:32 AM

Oslo QA Hackathon 2008, day #3 (sunday)

I slept like a baby last night - it is nice and quiet living at a hotel, however I can slowly feel the urge to go home. I am missing my boys. I talked on the phone with Villads (3 years) and he explained too me that he had gotten new LEGOs talking to Sylvester (1 year) was not as successful he just fooled around with phone and started to cry when me wife took it away from him.

So today I am getting into 'getting back to work' mode, I have some stuff I need to finish before Monday, since my Friday was totally crazy I did not have time and as explained earlier working on the plane here was not a success, so I have the following TODO before Monday morning:

- Update specification on application A for client A
- Write specification and estimate on application B for client A
- Fix bugs in client catalyst application C for client B
- Finalize import utility for application C for client B
- Test and validate module A for application C for client B

I can see know that I am not able to complete all of this, but with a proper prioritization I can at least get most of the stuff out of the way before tomorrow morning.

So today I have been mostly lurking at the hackathon, I discussed a CPAN meta data model with RJBS, reported PAUSE problems after having uploaded Workflow-0.32_1.tar.gz, it seems DAGOLDEN and DOMM experienced the same problems.

It really bothers me, but I always seem to have a truckload of work with me, no matter where I go - conferences, holidays or weekends, I would love for this to improve so I could spend more time participating in open source activities.

But for now, mentally I am on my home, traveling in the middle of the day, sort of ruin the whole day.

The hackathon has from my standpoint been a very good experience you can do hacking while not feeling bad over missing talks like when you are attending YAPCs or workshops.

It will be interesting to see if anybody dare organize something like this in our part of the world - I for one hope so.
03:40 AM

Workflow 0.32_1 released

I have just made the first alpha release of Workflow to CPAN. We have added some experimental stuff that we would love to see tested before we move on with is, hence the alpha release.

From the Changes file:


- Typed conditions makes it possible for different workflows to hold unique methods for workflow steps even with names colliding.

    Example:

workflow foo and bar can have a condition baz, but baz are two different implementations in foo and bar respectively


Feedback is very welcome either on the mailing list or directly to me.