Louise Attaque

2008-07-01

I haven’t written a post about music for a long long time. I wanted to write about Nightwish’s “new” album Dark Passion Play, but since it can be summed up with “pretty good album, too bad the new singer’s voice is nowhere near Tarja’s” and since everyone and their dog already knows Nightwish, it wouldn’t be too enlightening.

In January I was searching for some good French music (since I like listening to French language) and so I asked scurge (I’d really like to link him, since he’s starting a go school, but sadly he has no webpage yet – anyway, if you are looking for a go teacher, check out “scurge” on KGS (he’s way stronger than the kgs 4d he has)) for suggestions. He told me to try Louise Attaque and remarked that they are “a bit weird”.

So, yes, Louise Attaque are a bit weird, but they are also absolutely awesome. Their music is pretty original, I’ve never heard anything similar before. And I can listen to their songs over and over and over and over and over and…

They have released three albums so far:

Louise Attaque
This self-titled album is their first and in my opinion also the best. J’t’emmene au vent is my favourite Louise Attaque song (it also has a cool video). Other extremely good songs are Ton invitation, Les nuits parisiennes and Fatigante (funny changes in rhythm and speed all the time).

Comme on a dit
Also the best album. I haven’t listened to this one as many times as the other two, but I’m trying to catch up. The best song here is La plume, people say it has a clever text – I think it’s about time for me to start learning French. Other notable songs include (but are not limited to) Tu dis rien, Sans filet, Tout Passe, Comme on a dit and Du nord au sud.

A Plus Tard Crocodile
Their last album is not as fantastic as the previous two… nevertheless, there are several pretty good songs: Revolver, Oui non, Nos Sourires (except the last minute, which is horrible) and Depuis Toujours (the best song from the album, imho).

Oh well, at least I managed not to list all the songs from each album. :-)

Tone Mapping with GIMP

2008-06-14

“Tone mapping reduces global contrast in images while increasing local contrast and shadow/highlight detail.” or so Gimp Addict’s Tone Mapper tutorial says. Go and read his tutorial, I will add few comments to it:
4) “radius of 100-500 is good” – yes, it usually is, but since we don’t know the size of the image, I’d rather say that 10% of image size (that is (width+height)/2) is a good starting point.
5) 75% is again a good starting point, but you might want to play around with the value.
7) It depends… if you want to increase the tonemapping effect, duplicating the “soft light” layer is the way to go (I’ve tried changing the layer mode and nothing else really worked at all).

So I wanted to create a script that would do this. After searching the GIMP Plugin Registry, I found Tone mapping script, which basically follows Gimp Addict’s guide. However, it only has two options – the amount of blur and the amount of layer transparency. That certainly isn’t enough for me. Luckily, the plugin is GPL…

(((GIMP’s Script-Fu) uses Scheme) (which is (a dialect) (of the (Lisp (programming language)))) ((Lisp is a (programming language)) (for people) (who (really (really (like parentheses))))))

And because I like parentheses almost half as much as an average Lisp programmer, I rewrote the Tone mapping script and created Advanced Tone Mapping script. Feel free to put it in your GIMP’s script directory (~/.gimp-2.4/scripts/ in my case).

There are four parameters for Advanced Tone Mapping script:

  • Gauss. Blur (% of img size) – is the amount saying how much the blurring should be used for the tone mapping. It is in percents of image size (where image size = (width+height)/2). Ten is a good default, but different values might be interesting too.
  • Opacity of blurred layer – this is the 75 default, which can be changed if you want stronger or weaker effect.
  • Opacity of merged layer – the default is 90. If 100 is not enough, consider increasing number of “copies of merged layer”.
  • Copies of merged layer – when one, it’s barely noticeable, you can deny any accusations of postprocessing easily. :) Three has a lot of “halo effect” and anything above five will completely mess all colours up.

The first set of pictures is simply a preview. The image on the left is the original image, and the image on the right is processed by Advanced Tone Mapping with Gaussian-blur set to 10, opacity of blurred layer equal 75, opacity of merged layer full 100, and finally three copies of the merged layer (note the way I use to show those values – it is also used for naming the layers, which can be handy if you later forget which layer is which or what you have done). The image on the right might be a bit over the top, but it shows nicely what can be done with Advanced Tone Mapping script:

Tone mapping

The next example shows some pretty conservative tone mapping. The one on the left was created with almost none blur, while the one on the right has 10% blur. Note the difference: the one on the left has no halo but appears a bit flat, while the one on the right has a slight halo but also has higher level of detail.

careful Tone mapping

Oh my… the following example shows what can go wrong with tone mapping (I’m sorry for all the people who already gouged their eyes out). The reason why image on the left appears so flat and awful is that almost no blur was applied. The image on the right is a comparison with healthy blur applied. Five copies is still a bit too much, but hey, at least it has kind of action-like look.

Tone mapping gone wrong

The last image shows the difference between the default blur and maximum blur available. As you can see in the right side picture, the halo is so huge it’s almost impossible to see. The bad news is that with maximum blur we lose a lot of detail near the borders of light/dark areas.

Tone mapping different halo

Ok, that’s it – now go and experiment with my script on your own photos. 8-)

PS: Underexpose your images – the dark areas can still be lightened, while the burned out areas are usually completely white and can’t be darkened.

PPS: The more contrast there is, the more layers you apply, the more blur you will usually need.

PPPS: Any kind of noise in your picture will be greatly amplified.

PPPPS: No, this is not HDR, this is just tone mapping of a single image (just jpeg, in my case). Tone mapping is a part of HDR, but HDR is not a part of tone mapping. ;)

Getting stoopid

2008-05-25

It’s been happening for longer time. I’m getting stupid. As in “not clever”. I’m learning new ways to solve specific problems, but my general problem-solving skills are very bad nowadays (in the timeframe of several years, not specifically at the moment (actually work helps a bit, I guess)).

I used to be good at solving easy problems that many people get stuck at.

Let me give you an example… There are two ways of making a thumbnail from a picture:

In the first one, you get width and height of the original picture and the boundaries (width, height) into which the thumbnail must fit. You resize the picture so as to preserve the width/height ratio. What is the width and height of the thumbnail?

The second one is trickier, but still falls into “must be easy” category:

Again, you start with width and height of the original picture, and width and height into which the thumbnail must fit. The difference is that now you must fill the whole thumbnail and cut off the exceeding parts. Suppose you want to have the thumbnail in the center. What are the left x-coordinate/y-coordinate and width/height of the area to cut the thumbnail from the original picture?

resizeIn case you say that I’m so dumb I can’t even describe the task, here’s a picture that (hopefully) explains everything.

Ok, now go and solve it. Seriously, take a pencil and paper, or fire up your favourite text editor and solve it. In case you “know it’s trivial but can’t be bothered to solve it”, don’t even bother to read on.

This kind of problem that doesn’t require (almost) any prior knowledge and has simple input and simple output is the kind of problem which used to be much easier for me to solve than for most people. Well, not anymore. And I wonder – can I do anything about it?

I thought that various logical puzzles might be a good way to force my brain to learn to solve problems again. So I searched a bit and found some excellent puzzles: blue eyes, three hats, and prisoners with hats in a long row (of course the comments under the post are wrong). The puzzles do not require any kind of “trick” to solve.

PS: Please don’t post solutions to the thumbnail problem. If you solved it, you know you solved it. If you are not sure, you haven’t solved it.

Mostly unordered list of photography tips

2008-05-09

For newbies, by a newbie.

  • It doesn’t really matter what kind of a camera you have (ok, no cell phone camera, you need some kind of a lens).
  • Most modern cameras can decide the exposure settings just fine in 90% of cases. Nevertheless, you should learn to operate in manual mode too (for example, the closest distance my camera is able to autofocus at is about 15cm, using manual focus makes it about 2cm (it used to be my dad’s camera and he thought for two years that 15cm was the closest it could do)).
  • Flash is evil. (funny, exactly the same rule applies in webdesign)
  • The only exception to the above rule is using flash to light nearby dark objects in an otherwise well lit scene.
  • If you do not have enough light, feel free to increase the ISO speed. Or bring a tripod. Or emulate it somehow (don’t forget to use a short timer to avoid touching the camera when it fires).
  • By far the most important thing is the composition. (there are also other good resources about composition)
  • Actually, there are no rules for composition. But it is still the most important thing.
  • Postprocessing is your friend. (the examples here use GIMP, but similar techniques will work in other image editing software too)
    • Three alternative ways to do a Very Important Thing (tm):
      • the easiest and fastest: Colors > Levels > Auto (this works when you have both real “white point” and “black point” in your picture)
      • slightly more control: Colors > Levels, and play with it (you usually want to leave the output levels alone and shrink the input levels according to the histogram, you can set this individually for each color channel)
      • and finally: Colors > Curves (this is like Levels but with more control – you do not only set the starting and ending point of the curve, you can also change its shape (slight S curve often improves the image a lot)
    • Orton effect (aka dreamy look): duplicate layer > Filters > Blur > Gaussian Blur (set something reasonable depending on your picture size, experiment) > set layer mode (multiply, overlay, hard light, or whatever… experiment) > set layer transparency (uh, guess what… experiment?)
    • Tone mapping: duplicate layer > duplicate layer > Desaturate > Invert Colors > Gaussian blur > Layer opacity to cca 70 > merge layer down > set layer mode > set opacity
    • Vignette effect (aka lomography): new layer > E (elliptical regions) > select accross the whole picture > invert selection > Select > Feather (set to something reasonable, experiment) > fill selected area with black > set opacity (usually 20 or so)
    • And while all these effects are great, try not to use all of them at once. :-)
  • Finally, publish your photos on the internets (flickr, picasa, etc).
  • Flickr is still the best photosharing site around (even though they have the bloody videos now – which even started polluting Explore), it has the most amazing community and most talented photographers
  • By the way, all that I know about photography (ok, not much) I learned on flickr, just watching Explore, and sometimes reading the comments.

What a mess of a post. :-Z
On the other hand it does contain plenty of good info, it’s just a bit too much concentrated.

Hardy Heron

2008-04-27

As my Ubuntu Edgy (6.10) was not quite cutting edge anymore, I decided to get Hardy Heron.

Upgrade over two skipped releases would be suicidal, so I decided to do a fresh install. I also wanted to preserve my old Edgy… you know – just in case. That involved cutting off half of my system partition to create a new partition. You might expect a horror story now, but in fact it all went flawlessly (I just used gparted, the ext3 got fscked, shrinked to a half without a single glitch, passed fsck again and voila).

Installation of Hardy was provided by a nice graphical installer that didn’t even bother asking questions about my hardware (it just asked me about country and language settings and stuff like that). It recognised my monitor resolution, I installed the proprietary nvidia-glx-legacy drivers with two clicks (yes, it’s not even necessary to touch xorg.conf anymore). I just had to set up the wifi connection manually, because the access point has a hidden ESSID (but all the drivers were already there).

I was amazed how everything works out of the box or almost out of the box. Need to play a movie and don’t have the codec? You get a pop-up asking if you would like to download the codec. You click yes and enter your password, you are all set.

Hardy Heron includes Firefox 3 (beta 5 as of now), which is great, because the speedup over Firefox 2 is rather significant (and it does have some nice new features too). The only sad thing is that Google Toolbar doesn’t work in FF3B5 (yet), but well, I don’t really need to see the pagerank of every page I visit.

With my old 32MB GeForce 2 I never bothered installing Compiz, but as it comes out of the box now, I just had to try it. And whooo it rocks. The cube is amazing and there is also this great “scale windows” thingy, that shows all open windows at once so that you can switch between them. And then there are hundreds of different visual effects…

Gnome now allows repositioning the window toolbar items by drag&drop’ing them. That is the feature I’ve always (secretely) wanted. It’s really useful (as opposed to grouping, which I always (not so secretly) hated).

All I can say is: “Wow”.

PS: I don’t say this often, but I have to say it now: In case you haven’t done so yet – with XP being obsolete and Vista near unusable – this is definitely the best time to switch to Linux. And if you encounter any problems, I’ll be happy to help you with troubleshooting.

Common sense and frustration

2008-04-23

Do you know what common sense is?

Common sense is:

  • NOT setting fixed height for elements whose actual height can change anytime, and especially not setting this particular height to three elements next to each other, to keep them with the same height (common sense solution is to wrap it all in another element)
  • NOT calling your database tables j_aidx_1, j_aidx_2 … j_aidx_n and calling the columns m_1, m_2, m_3, etc; which leads to people writing queries like SELECT a.m_85, a.m_167, b.m_17, b.m_56 FROM j_aidx_5 AS a LEFT JOIN j_aidx_8 AS b ON a.m_103 = b.m_42 WHERE b.m_58 = ‘1’ AND a.12 = ‘0’
  • invoking the live server settings as default instead of using testing environment settings as default, because when something goes wrong in the decision process, you don’t want the live server to get fucked up
  • NOT having the very same function copied to several different “modules” of the application so as to make it extremely inconvenient to change
  • NOT calling your backups “new”, “!new”, "new“,”___new“,”!!!!!new" etc, especially when each person uses a different flavour of this method
  • using a version control system, and if you are unable to do so, calling your backups by date (preferrably in YYYY-MM-DD format, since it sorts itself naturally)
  • using either tabs or any amount of spaces for indentation, but keeping it consistent (or at least, for fuck’s sake, keeping it consistent within one file)
  • NOT internally calling files for inclusion 1.html, 2.html, 3.html etc., especially when you already went through the hassle of creating nice looking URL’s
  • NOT totally breaking your URL’s and titles by adding a lot of random keywords just to game search engines, when that makes your site either unusable or extremely confusing for humans
  • using one language (human language, like English or Czech) in your application, or at least avoiding mixing up several languages inside one particular variable or function name (findAllNovinky is just lame function name)

… do you know what frustration is?

EPGC Kraków 2008

2008-04-14

As I was planning my journey to Krakow and there was only one reasonable train to take, I worked overtime during the week so that I could leave work earlier on Friday. Well, the train was delayed, so I wouldn’t be able to catch the following train, which meant there was basically no way to get to Krakow. After giving up for a few hours, I realised that I really really wanted to go there and decided to take a night train. So I left home at 9pm again and headed for the train. The journey was quite ok except two things: 1) I had to change trains at 3am and 2) my camera got stolen.

Krakow is a beautiful city and I had several hours to walk through the center (kind of sucks I didn’t have the camera, as at 6:30am the lighting was just perfect). I especially enjoyed the Wawel castle, which provides a nice view of the city and is in itself rather spectacular.

The tournament (European Pair Go Championship) was well organized, and there were free cookies and water (even for visitors such as myself!). By the way, pair go tournaments have an interesting feature that half of the participants are girls. ^^

I spent the day relaxing, playing and taking photos (a friend lent me her camera because she was playing and couldn’t take photos anyway). We spent the evening at juggler’s place, which was a lot of fun… juggler has table football at home, so we spent a lot of time playing that (and the rest of the people played go, of course).

Once again I got very lucky by going somewhere where I really wanted to go after a big obstacle appeared, and once again I’m really glad it went this way. I had a great time, I met lots of people whom I haven’t seen for far too long (spirit (been a while), kotasia (cute new hair), hitech (I finally started reading GEB), gertzu (thanks!), agusia (babusia~~), elusia, michal, iskierka, juggler (thx for saturday evening), vertigo (yeah, ruby, we know), sheena, yapi, shaa (hope the leg is getting better), fajnymis, kamyszyn (ban ’em all), comboy, sosna (no more photos, I promise), nil, cichacz (dupa!), kabu (xD), grabol and everyone else whose name I forgot to write in here) and I met some other people in person for the very first time (Lothus, and… um, actually, isn’t Lothus enough? ;-))

Edit:
Some photo galleries:
My photo gallery
Official photo page, with links to other galleries

It is the journey that matters

2008-04-04
It’s not the end
Not the kingdom come
It is the journey that matters
– Wanderlust by Nightwishes

I think I know why I’ve been happy recently – I found the meaning of life.

And the funny thing is that I found the meaning of life without actually realizing I found it. The trigger to my realization was a video called Music and Life (by Alan Watts) (it’s short enough, I promise).

Zen … does not confuse spirituality with thinking about God while one is peeling potatoes. Zen spirituality is just to peel the potatoes.
Alan Watts – The Way of Zen, pt. 2, ch. 2 (1957)

I think I’m starting to like this Zen thingy.

As it’s the journey that matters, and not the end, being an inquisitive type, I of course started thinking about the end of the journey. And I found out I’m not really scared. When I’m dead, there will simply be void. The same one there was before I was born (or, before I was conscious (btw, this post is not big enough to contain a discussion about abortion)). It’s actually quite consoling… no matter how bad I fuck up, the worst there can be at the end is void.

The only people who have a reason to be afraid of death are followers of various religions that believe in afterlife. Also, life itself is not the ultimate fun for them, as the eternal afterlife is far more important. Oh well, I just couldn’t do without a little trolling, could I? 8-)

Tignes 2008

2008-03-24

Friday: I couldn’t sleep well, sweating and waking up all the time. In the morning I didn’t feel any better plus I had a horrible headache. After measuring my temperature and finding out it was slightly over 38˚C, I knew I had a problem. A big problem.

Decisions, decisions… First thing, I’m not going to go to work, that is completely out of question with my head spinning at about 180 rotations per minute. The big decision was whether to take vacations or become officially ill. If I became officially ill, I obviously couldn’t go to France in the afternoon. So I decided to risk it, called my boss, explained the situation and asked him whether I could take Friday off. He wasn’t too happy but he actually didn’t have much of a choice…

Then I slept for few hours and after that went to visit the doctor. After explaining my symptoms, I got the expected “no way you are leaving anywhere today” response. I let her know that I’d really really like to go there, and after some tests (urine, blood, etc.), none of which ended up well, she concluded that maybe I could try it.

Off to buy Paralen and Smecta. Temperature jumping back and forth between 37 and 38˚C. Funny how it was completely in sync with my headache.

After getting diarrhoea, drinking smecta (I bet I could get some clay way cheaper than this) and sleeping through the whole afternoon, I was facing a decision: should I stay home, get healthy in three days and regret it for the rest of the week, or should I leave and die far from home? Opposed to advice from almost everyone, I decided to leave.

Those 24 hours in the bus weren’t so bad, I just kind of sat there and waited. Both high temperature and headache were practically gone, all I was left with was a diarrhoea. And smecta for the rescue (it really tastes like mud). I think I ate about one roll during the journey.

We arrived at Tignes a bit earlier than planned, so we had some time to just enjoy the sunny weather and look around the town/village.

Sunday morning was rather sunny. There were ~30 centimeters of fresh snow, which was, uh oh… very nice… at least for those who were able to ski in it somehow. As for me, I never was any good at skiing in deep snow. I think I fell about 4 times. Moreover, stale rolls + smecta did not exactly give me much strength to fight all that snow. Luckily, the weather got substantially worse in the afternoon, so I just stayed home and slept through it all.

I don’t remember much of Monday, except stale rolls, smecta, and bad weather. I slept through the morning and only went skiing in the afternoon, but I don’t recall the details too well.

Tuesday was the turning point: The diarrhoea stopped (well, almost), I tried some new food like rice and even had two squares of chocolate. Weather was perfect, there was no new snow (ie. the pistes were groomed) so we went exploring the surroundings.

You might want to consult the map, as I’m going to present some otherwise rather boring names:

After skiing on Tichot for over an hour, while my sister was getting her snowboard repaired, we went up from Val Claret through Tichot and Col du Palet to L’Aiguille Percee (2748), then went through Sache piste all the way down to Tignes les Brevieres (1550). Over 1km vertically down in one go. It was very nice and there was plenty of nature around, so we had a nice lunch in the forest. Then we returned to Tignes 2100. As there was still a lot of time left till the evening, we went over Toviere (2704) down to La Daille (1785) and then by “funiculaire” up to Rocher de Bellevarde (2827).

Wednesday was also great. The weather was excellent, so we headed straight over Col de Fresse and Rocher de Bellevarde to Val d’Isere (1850). Then up to Solaise (2560) and down to Le Laisinant. From there to the fifth (!) and (as we thought) last valley. There we went down to Le Fornet (1930) where we had lunch (mmm, cheese). “Signal” was possibly the steepest red slope I’ve ever seen. We were rather surprised that Glacier de Pissaillas and the slopes on it were in yet another valley, it certainly didn’t look so on the map. And boy it was cold in there. So, after going Cascades once, we headed back using Leissieres Express, which is a silly chairlift that takes you up on one side of the hill and down on the other. Alas, it was the only way to get back. We returned in basically the same way from here (Solaise, Val d’Isere, Rocher de Bellevarde, Col de Fresse). As there was still some time left, we went to funiculaire Grande Motte, and then to the huge cabin (they call it “cable car” in English, but I don’t think that describes it well, “fucking huge cabine” describes it much better, imho). At 3456m, this was the highest point we reached in Tignes.

The weather worsened significantly on Thursday. We spent the morning on Lanches, with the occasional funiculaire not to get bored. As the weather was so-so, we lunched back in our appartment. After the lunch we went to Tignes 2100, where we spent the rest of the day.

Friday morning, clouds and fog everywhere. Plus 20cm of fresh snow and still snowing. First few rides were an ordeal, I tried skiing the way I’m used to (long turns accross the whole piste, mostly carving, sliding slightly on steep slopes to keep the speed under control). After getting no answer from my dad, I watched others and noticed most of the people who seemed in control of the situation were doing very short turns. I think it almost trippled my speed when I discovered (almost simultaneously) two very important things about skiing in deep snow:

  • It is vital to only have your weight on one leg at a time (I used to be very precise about this, but with carving I kind of forgot, since there it is not very important). If possible, try to have the other leg high enough not to get it stuck somewhere.
  • To greatly increase your stability, you should try to move your body in a constant direction at a constant speed. Make extremely short “turns” just with your legs. These slow you down considerably, while constant direction and constant speed of your body provide perfect stability.

Actually I didn’t fall at all on Friday, which is very good considering the zero visibility and huge amounts of snow (which got irregularly scattered during the day). There were many (dozens) cases where I almost fell down, but always somehow miraculously prevailed.

We spent the afternoon on Bollin and Tichot, as all the other lifts were closed.

The journey back home took a bit longer (slightly over 24 hours) as we got stuck in a traffic jam, but otherwise it went ok.

All in all, it was a great week, I further improved my carving skillz, and I finally learned to ski in deep snow. :-)

I have a drinking problem

2008-03-13

I think I have a drinking problem.

During all of my life, it was enough for me to drink 4-5 glasses (slightly over a liter) a day. I was never thirsty and often had to force myself to even drink at all.

Recently, this has changed tremendously – I drink over 4 liters a day. Maybe it has something to do with the fact that I drink water almost exclusively. I used to drink a lot of sweet carbonated water, but now I can’t stand it. It leaves a very annoying aftertaste (funnily, I used to think exactly that about pure water). I am not sure when I started drinking water so much, but I think it was around last summer. I usually drink just tap water, and at work there are big canisters with water kind of similar to tap water.

Think think think… There must be some kind of a point at the end… Or just something…

Does anyone have any idea what could have been the cause of such a dramatic change in the amount of water (or liquid, if you prefer) I drink daily?