betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

01 March 2011

New blog: imagelog

The fun hacking project went online

Two weeks ago I embarked on my weekend fun hacking project, at the end of the last week it went online. It's my image blog. Well, I'm posting images in this blog too, but the new one is about the images only.

When there are images that need a long story, something more than a few lines, I'll link to this place here. Otherwise I'll just post a stream of images, one every couple of days, each in some relation to the next and previous ones.

Here you go: imagelog


Posted by betabug at 15:23 | Comments (0) | Trackbacks (0)
06 March 2011

Jumping over Fire

Out in the country for a long weekend
 

I'm with friends out in the country. It's a 3 day weekend, so the best chance to get away from the big city. Tonight we've lit up a fire outside to dance around and to jump over. It's raining, so the fire took time to start up.

Despite the gray weather, I managed to take some pictures with the Arca. I had decided to bring no other camera. Good thing, given the weather with gray skies and some rain I would not have used it, if I had brought another camera.

Now we took some small walks, ate a lot, drank a lot. It's nice to be out of Athens for a while.


Posted by betabug at 21:20 | Comments (0) | Trackbacks (0)
08 March 2011

Snowy Way Back

Better slow than stuck
Taking a snapshot after mounting snow chains on the car

The way back from our 3-day weekend turned into a nice little adventure. We went back on smaller roads, avoiding the national roads. That way we did not only avoid all the toll booths, but also the story that was to come from the snow that was falling. On our way we were passing a bit of higher ground near Bralos, taking it slowly and taking good care. Below that, the streets were again free of snow and we moved on faster.

When we came to lower ground, we kept on the smaller roads, going in parallel to the national roads (highways). At some point, the snow reappeared, both in the sky and on the road. We moved on like that for a while, then decided to put on snow chains for a safer drive. (Note that in Greece nobody has M+S "winter" tires, there's just too much summer here.) We even snapped a picture after mounting the chains.

With the chains we continued to move at a steaming 40km/h, at about that time we started to see the traffic on the national road totally blocked. There were 5 lanes of cars, totally stuck. Cue Chris Rea's "Road to Hell" here if you want a soundtrack. A friend of ours was stuck in there too. Turns out, all these cars were stuck there from 18:30 in the evening till about 3:00 in the morning (according to news reports).

We took off the chains some distance later, when the snowing had turned into snowy rain and then simple, plain rain. Finally we went onto the national road ourselves, which was almost empty at that point. We recovered all the time we had lost by stopping for chains and by moving with 40km/h, because the entrance into Athens, which is usually a big honking traffic jam was pretty much empty. We got home safe, dry, warm and without too much hassle and we were really, really thankful for our good luck.


Posted by betabug at 10:27 | Comments (0) | Trackbacks (0)
11 March 2011

Test Coverage on Zope Tests

Hey, I discovered it's already there!
 

Sometimes I'm a bit late to the party: This morning I was thinking about checking how much of my code is really covered by my tests. So I searched the f* web for how to run python coverage.py on Zope. Turns out it's already in there, ever since something like 2005. This is really one of the advantages of running a stable, mature platform like Zope.

What you need to do is to run zopectl test with the additional argument --coverage test_dir, e.g. I did:

./bin/zopectl test --coverage cov_test -k -m FinancialService

Then I found reports for every .py file in my FinancialService Product in the cov_test directory. The reports list how many times each line was run -- and they mark lines that weren't run at all. So far the test output is complaining about not giving coverage for functional.txt which is a file with functional doctest - this file consists of tests itself, I guess not testing it is ok. Since running the tests like this also takes much longer, I also had one test failing where a test on a timestamp failed.

Now I can fill the glaring holes in my test coverage. Sometimes I've missed a complete method, sometimes it's just a twisting turn in an if-clause. Testing fun, here I come!


Posted by betabug at 10:41 | Comments (0) | Trackbacks (0)
16 March 2011

square tokyo

Yes, there's more wrong than that

A few months ago I discovered the photoblog square tokyo through a link-from-a-link from tokyo camera style. I was stunned. Ever since, "square tokyo" had been an inspiration to me. Not in the sense that I wanted to make the same pictures, but in the sense that I totally dig the dedication to composition and excellence in pictures. It gave me something to aspire to.

Well, you all are stuck together with me and everybody else trying to follow the bad news from Japan. I can't say much about that. I don't know the dude that makes "square tokyo", never exchanged messages with him (assuming he's a "he"), never even tried an automated translation on the texts. But I sure hope he's allright. There are many, many more people in danger and dire need and I hope for the best for all them, but for me this was just one more personal touch.


Posted by betabug at 10:11 | Comments (0) | Trackbacks (0)
20 March 2011

hackfest.gr again

Going out for coffee and code

This Sunday was another installment of the hackfest.gr meeting. This is a loose get-together of all kinds of people who come together in a cafe somewhere to hack on whatever project they happen to work on. Or they might as well be there to socialize and have a coffee. This time I took my laptop with me and continued going through the tutorials of the pyramid framework.

Also at this hackfest there were a couple of talks given. Most important of these is probably that the guys from hackfest.gr are trying to get a hackerspace going, which is a permanent place to hack on hardware and software and generally have a geeky time. I wasn't so hot about the talks, as I was busy chatting with Javier and Dan and going through the tutorial at the same time. But I had a good time anyway.


Posted by betabug at 18:29 | Comments (2) | Trackbacks (0)
24 March 2011

Making Legacy Zope Apps Unicode Aware

Or: "Of Old, Old Zope Code and Unicode", we're talking pre-2.10 here
 

Back when Zope 2.10 came out, the major change was the switch to the ZPT implementation from Zope 3. This also brought a major switch to a different handling of encoding. Basically what it means is that there might be still some legacy (that is a nice word for "old") applications out there, that feed the ZPT UTF-8 encoded strings, store data in UTF-8 encoded strings and sometimes even process strings as UTF-8 from end to end (even though that breaks for something as simple as trying to get the length of a string).

Enough with the generalizations, I have 2 largish apps to "bring into a more modern period". My plan so far is...


Continue reading "Making Legacy Zope Apps Unicode Aware"
Posted by betabug at 15:30 | Comments (0) | Trackbacks (0)