Youtube shenanigans

Browsing around YouTube for more videos to watch I got redirected to an empty page that was saying “I call shenanigans”.  It looked like this.

Obviously, something went wrong.  But shenanigans?  Really?  What’s that?  A brief Google search suggested an explanation from the Urban Dictionary:

Once a person calls shenanigans, he or she has temporary complete control over the surrounding events, objects, actions, and laws of physics.

Funny.  And ironic.  Especially considering the fact that I was watching the FAILblog channel.

PHP variables, strings, and curly braces

For the last couple of days we had a number arguments at work about what is the best way to surround a complex PHP variable inside a double-quoted string.  More specifically, should the sigil ($, dollar sign) be on the inside of the braces or on the outside.  Consider an example:

# my way
echo "Result: ${blah['something']}\n";
# the highway
echo "Result: {$blah['something']}\n";

While considering a number of examples, there seems to be no difference – both ways work.  We’d still need to pick one for consistency reasons though.  And I, as an ex-Perl programmer, was suggesting that we should use the dollar sign on the outside of the expression.  This how I remember it being in Perl (and PHP originated from Perl) .  This is how I am used to it.  And this is how makes most sense to me – a dollar sign immediately warns the programmer that the variable is ahead.

However, after consulting PHP documentation, I was proved wrong.  It is said that both ways often work, but it is much safer to use the dollar sign on the inside.  The manual page even provides a few examples where the dollar on the outside won’t work (such in case with objects).

While this is just a small thing to know and get used to, it still looks annoying to me.

The amazing Chromium

Being a web worker, I spend a lot of time in my browser. Over the years, I’ve used pretty much everything – from early versions of Netscape and Microsoft Internet Explorer, to text-mode browsers like lynx, links, and w3m, through a whole bunch of Linux desktop browser like Konqueror and Galeon, through mobile browsers, through the latest versions of Opera and Mozilla Firefox. And out of all that variety, Mozilla Firefox was pretty much my only true love browser. It was reasonably fast, free, open source, and with a billion of extensions.

In fact, I accumulated so many extensions that I had to group them into four different Firefox profiles. With all those extensions, I tweaked and tuned my browsing experience to exactly match my needs. And I was happy for a long time. And I couldn’t even think of leaving Firefox for another browser.

Lots of people complained (and still do) about Firefox stability. But I never had any major issues with it. My sessions were stored and backed up automatically, and in those rare cases when the browser crash, I’d just start a new instance and it would automatically open all windows and tabs and bring me back up to speed all by itself.

Most people complained about Firefox performance. Well, I can understand them. It does feel slow and sluggish sometimes, but I was thinking of it as a rather cheap price to pay for all the extensions that I had. Opera, for example, is a much faster browser, but doesn’t have even 1% of the extensions that I use. And that makes it pretty much useless to me. No matter how fast it is.

So I was mostly happy with my browser. I loved it and it loved me back. And then Google released their vision for a modern browser – Chromium. At first, it didn’t even run on Linux, which is my preferred desktop operating system. So I didn’t bother. Then it ran, but people were saying that there were no extensions what so ever. So I didn’t bothered again either.

But the hype was growing, and people were shouting all over the web about how fast and how convenient Google Chrome is. So I just had to try. I thought, I’d download and install it, and use it for a couple of days, just to get my own opinion of it. That was the very beginning of December 2009 and I wasn’t even remote thinking of switching to another browser.

Now that it’s almost middle of February 2010, two and a half month later, I have to confess. I switched to Google Chromium. But that’s not the most surprising thing ever. What’s extremely surprising, at least to myself, is that I switched to Chromium the first day I tried it. Without even knowing.

It was indeed blazing fast. Super-fast. Super-sonic even. Convenient – yes, but it was way faster than I though was even possible for a browser. Extensions were missing, but I was saving so much time with the fastest browser experience ever, that I could do anything my extensions did manually, and would still have plenty of time left. I was shocked and hooked.

And about two weeks later, when I just started to get used to how fast a browser can be, Google opened up their Chromium extensions site. So now I also had some extensions to install. And which I did. And there was no going back.

To this day, Chromium is my default, primary, and mostly preferred browser. It does still have a few shortcomings and things that I’d want different, but all of them are nothing compared to the performance boost that this browser brought into my web life.