Aleksandar • Vacić

iOS bits and pieces

Post-processing magic

I’m trying out Adobe Lightroom, and so far I’m thrilled how much power it gives you over your photos.

Ana in Paris

Exposition all wrong, overblown highlights, details buried…blaaah

You have certainly had those moments. You’re abroad, excited to be where you are and do not pay much attention to status display. You just shoot and shoot, trying to capture as much atmosphere as possible.

Only after you get home you see that some very dear photos are…well, not that good. Despair often ensues, when you realize that there is no going back - you may get there again, but that one moment, that single memory is gone and can’t be recreated.

I used to fix this in Photoshop, but it was tiresome to do it and took way too much time. And I never really mastered the photo re-touch in Photoshop, all that I did was mostly stumbling in the dark until the sudden light.

Lightroom on the other hand, is a miracle in simplicity and power; in under 10s, with just few mouse moves in the histogram palette - et voila.

Ana in Paris

Look, there is color in the sky!

Add-in fantastic crop tool and this alone is well worth the price. There will be a whole post or two about this honeyweek of ours ;) but I had to share my joy about Lightroom. I’m so happy going through 1500+ images I took in Paris - it’s a joy to develop them.

McLaren resurrected

First a double win in Malaysia and then the second place for Hamilton in Bahrain. Frankly, I did not expect them to bounce back so quickly, but it’s a pleasure to watch. Of all ex-Michelin teams, McLaren adapted the best. And Renault the worst. It must be really hurting for them to see them being passed by Toyota and even Red Bull at some point of the race.

Alonso could not have picked better and it could really be that he will win 3rd title with McLaren. But the biggest impression must be Lewis Hamilton. 3rd, 2nd, 2nd - absolutely amazing.

April's dulls

On this day, it’s better not to open the browser and read news sites. Lots of forced jokes and stupidities that are getting more annoying as the years go by.


innerHTML kills event handlers

This is probably old news to regular Javascript coders, but for me it was an ugly bite. I have renewed my interest in JS with the abundance of libraries springing up and started coding few solid client side interfaces in the office.

A certain interface was previously built in a hurry and HTML code was littered with plenty onclick="somefunction()" code. I re-factored all of that so that handlers were added on DOM.load; however, there was one nasty feature left in the code.

I had a table of 6 rows and button which that says “Add line”. Adding lines is easy: create the whole table row HTML on server, fetch that with XHR call and do tbody.innerHTML += sRow. Actually, this was the code I used for IE and as soon as this is done, all the previously set event handlers went missing. Like they never existed.

Bottom line: changing innerHTML property removes all late-bound event handlers and script on that piece of the page.

Solution was to get off my lazy fingers and type in proper DOM calls: insertRow and insertCell. Clean code and no browser branching. :)