Friday, December 23, 2011

Highway to Hell (not!)

December is almost over, and what a December it has been... most of it has been spent on the road, away from home. With the Southern Expressway opening up, the long journey up to Delwala has been shortened to a 2 hour cruise along scenic routes. The stretch of road between Agalawatte and Kalawana must be one of the most beautiful and naturally set roadways in the island. And the land surrounding the expressway isn't hard on the eye either (for now...)

A few snapshots of the expressway:





...the Kalawana road:



This is, I believe, the famous "Akasa Bokkuwa"

Delwala Valley, from the Kalawana - Thiruwanaketiya road

We even caught a fleeting glimpse of Siri Pada
(faintly appearing in the middle of the picture)

A bridge on the road during a normal day...

...and on the day we got caught in a storm :D

But to be honest, the most beautiful road that we got to travel on was the Rathnapura Panadura road, which is a messed up road to drive on (has way too many curves, and is narrow... we passed one head-on collision), but has views that are to die for. After coming down from the mountains, there are the industrial parks of Horana, which are vast! (You literally can't believe we have such huge factories in Sri Lanka)

There is also a bad ass bridge across the Kalu ganga somewhere near Kiriella that I wasn't able to snap, which is a shame coz it looked really nice, deserted like an old Western film and leading to a haunted-looking rubber estate on the other side. :D

Update: Here's a photo of the bridge I managed to catch a few weeks later. It doesn't look that haunted in the mid-day sun, but at the right time, in the right light, it looks seriously haunted. ;)



Huge rubber estates were a recurring theme

So were awesome sunsets

Here's something strange I saw, and I hope Amila can shed some light on this. At sundown, Mathugama town is filled with literally tens of thousands of these tiny birds (a friend of mine suspects they could be 'Vee kurullo'), fluttering around like tiny moths near a lightbulb. They were on every visible tree and lamp-post, and I had never seen anything like that before. O_o

Like 'Meruu', but bigger o_O

Oh, and here's a video of Tommy and his friend Achcharu being idiots. :D

Wednesday, December 21, 2011

Blogger facepalm

How a human being likes to see an RSS feed:

Jerry's comment feed (Wordpress)

How a monkey generates an RSS feed:

Mein feeden (Blogger)

The reaction of the hapless programmer who's trying to parse comments:



I know, I know, parsers don't care about whitespace. But uuuugh, that fugly feed makes.me.want.to.tear.my.eyes.out.

Thursday, December 15, 2011

The perfect social network

...is not Google+. Har Har. ;P

Years after the party ended, and everybody had left, I joined Last.fm back in March. It's pretty neat. It stores records of all the music that you listen to quietly in the background and gives a running commentary on your profile page. Everything is neatly categorized, and every artist (even the more obscure ones) have an artist page. It's kinda a wiki, in that it allows users to tag artists and put up descriptions. And for old time music fans, it's a place for you to discover that the kid with a nice voice you're listening to from back in '66 just died a few months ago. :/ (I personally found of about Gerry Rafferty and Alex Chilton through Last.fm comments)

But seriously, for such a small time social network, the programmers have paid enormous attention to detail. Every little stat or arrangement you can imagine is available. It's a geek's dream. For someone who's trying to build a social network of sorts, it's an eye-opener about how creative you can get with a few more lines of code. For example, you can look at someone's library, go to an artist, and go to a particular album by that artist and look at their listening trends on that, like so:

The title track is amazing. And too short. :/

And Last.fm doesn't pretend to be something it's not. It's not Facebook pretending to be Twitter, or Google pretending to be social (don't kick me off G+, Sergey and Larry!). It's always been about the music. And they say the best way to discover good music is to look through someone else's library, and Last.fm allows you to do that in every way you can think of, without being an annoying babysitter. Power to the people, yo! :)

Saturday, December 3, 2011

Not-so-lilac skies, and the beginning of December

A sequel of sorts to Lilac skies and the end of November

(Two years later...)

:P

I took a look at the blog archive and noticed that November is usually a very busy month around these parts. Not so this year, COZ SAI IS BACK! Woohoo! :D So we've been on all sorts of trips around the place, including a secret Negombo beach trip that my parents know nothing about. ;) Yes, I'm aware that I'm writing this under MY OWN NAME and that my (pretty internet savvy) mom could be reading this. So let's just call it Schrödinger's trip. Since nobody observed it, it simultaneously could have and could have NOT happened. :P

But here's a panorama from Rathnapura, where we stayed at my place all by ourselves for two nights. Fun story: We almost lost Sai to the angry waterfall. Good times. :')


In other news, things have been ORSUM. And I mean that. I think my life is finally getting back in order (knock wood) and things will hopefully get orsumer and orsumer now that Makuluwo is back on holiday! :D

Going to finish off on a random music-y note, and no, I'm not going to post Oasis here like I've been spamming my Google+ with. But seriously, Noel ILY!!! We owe you big time for making guitar bands cool again. Like I said once, I quite like SoKo, and I love Cornershop, and two days ago in Kandy (in a moment of total randomness) I discovered 'The School of Soul E.P.'. What a gem! :D


On a side note: Is it just me, or does the original 'Brimful of Asha' not have a bassline? :O

Wednesday, November 2, 2011

Open Source: Why it matters to you

Computers have crept up on us on an impressive scale in the last 30 years or so. They were once behemoths stuck in large rooms, but with the advent of the microchip things have gotten a lot more exciting. First came devices like the personal computer that took computing to the masses, but today computers are virtually everywhere - even if you don't know about it. From your mp3 player, to your microwave, to the chip that controls the fuel injectors in your car - embedded devices and smartphones are everywhere.

This places an extraordinary amount of responsibility on those people - the programmers, the electronics engineers and the quality assurance engineers - who create and programme these devices. One little conversion error on your car's ABS system might cost you your life (remember the Mars Polar Lander?), and a mis-scoped variable in a stock market system could even bring the global financial system down. Therefore it is in everybody's interest that knowledge on how these highly critical systems work is not limited to a privileged (or is it powerful?) few, and that it is shared by all. Think of it as science, or law. If only the judge knew how the law works - and the law is something that affects all of us - there would be chaos. (Similarly, in science, people not knowing how magnets work has led to issues hilarity in the past)

So that is the situation - computers are becoming indispensable in the modern world, and the knowledge on how critical systems work is at risk of falling into the hands of a few selected individuals. This cannot end well, right?

Open Source to the rescue

This is where initiatives like the Free Software Foundation (and their awesome General Public License) come into play. Under the terms of this license, the source code - the knowledge, the step-by-step instructions of how software works, is released to be viewed by all. Not only can you view it, you can modify it to meet your requirements (or to fix bugs) and share it freely. Just like law and science are taught freely, and is accessible to all with the relevant domain knowledge, the knowledge of how software systems work can also be shared freely.

This is not just a great theory - it has proven results. It is what makes Linux a great kernel (which powers most of the servers and embedded systems that are critical for the survival of the modern world), and Firefox an excellent browser, and all your servers run on Apache, and your smartphones on Android. It gives the power to harness the great infrastructure we've built back to the users, the masses, the community. It makes sure that one select group doesn't get to hold the world for ransom. It makes sure that the your brakes won't fail - because half the world's programmers have had a look at that code and have certified it as bug-free. It lets you sleep soundly at night, knowing that the future of the world is securely in the hands of a community of global programmers - who are just as concerned as you are about the reliability of the software.

"Given enough eyeballs, all bugs are shallow" - Linus' Law


Note: I know that 'open source' does not necessarily mean 'free' as in free speech, but I thought including all the different licenses in the post would be confusing for casual readers.

Saturday, October 22, 2011

Romancing the Stone

Yes, that Michael Douglas movie. The one which involves a lot of walking around Colombia. And my post today is about a lot of walking around in Colombo. See what I did there? Yeah Raisa, I didn't expect you to get the joke. *ka-ching* ;P

Aaaaanyway, this morning I got a haircut and walked all the way from Pannipitiya to home because I was too cheap to take the bus it reminded me of all the long walks I had taken. Good times.

And since I've run out of things to blog about I wanted to share all of them with you, here they are, the top 8 walks through the city I've taken. Nowhere as epic as Himal's, I'm sure, but yeah.

#8

The walk that started it all. Earlier in the day I had taken the bus ride that had started it all. What's "it all"? Why, my rastiyadufying of course. :D

I had gone to watch the Royal Thomian regatta of 2009. And after it finished, I was hungry. Walked all the way to Burgers' King to grab a bite. Got stopped by an Air Force serviceman and got my ID checked and was told to walk on the other side of the road. Oops.


Distance: ~ 915 meters
Epicness: 5/5 (coz it was all new to me)


#7

This one is here because I'm a Fort noob. There was another walk through Manning Market (Pettah) that I once took, but the landmarks on this one looked better. Got told off by the Presidential Security Division because I was going through a high security zone. There's this cool old police mess or something behind the World Trade Centre that they're renovating, and my walk took me right through that area. :D




Distance: ~ 975 meters
Epicness: 3/5


#6

We had a Reach Out presentation at St. Peter's College, at some ungodly hour in the morning. Got down from a 138 at Redimola Junction and took the small gravel road near the canal. Apparently the canal usually stinks, but the night before it had rained very hard and it didn't stink at all. I even thought it might be a good place for a picnic. Erm.


Distance: ~ 1.2 km
Epicness: 3/5


#5

This one happened last Sunday. :D I finished my exams a bit early, and visited a friend who lives close to uni. Afterwards, I was on the way back, and just when I was about to turn towards Indra traders (to take the backlane and get to Public Library to catch a bus), I saw a lecturer from uni. Not just ANY lecturer. A lecture who should be avoided at all costs. Did a quick 90 degree turn and was off to Slave Island. Indecision causes death.

This route is quite a frequent one I take. One night, some months back, after watching a movie with the gang at the aforementioned friend's place, I was walking towards Slave Island when a Maruti driven by a lady was almost rammed into by a police jeep. O_O The policemen shouted at her in filth, dragged her off to the back of the jeep and were off. Another policemen drove away in the car. Later I saw them checking a bunch of files in the car near the Slave Island traffic lights. Scary shit.



Distance: ~ 2.0 km
Epicness: It wasn't epic, it was just creepy


#4

This. Was. A. Fail. Makuluwo wanted us to come for cupcakes at Galle Face, and my mom wanted me to pick up a birthday card for my cousin. So I get down at Town Hall, go around looking for birthday cards and find that all the shops are closed. On a Sunday. Of course as a matter of principle I don't shop at ODEL (I prefer soaking up their A/C and looking at books with faux-interest), and so I ended up walking the entire length of Union Place looking for a place that was open. Found none, ended up walking to Galle Face. At least the cupcakes were good. :)


Distance: ~ 2.5 km
Epicness: 2/5


#3

This happened after exams. Meshak, Ino and I went to Pilawoos, but it was closed for prayers. So we loitered around Marine Drive, came back to Pilawoos, had some lunch, loitered around Bamba a bit more and finally went to Galle Face. I think there was something wrong with the food and Meshak threw up on the way home. :D Good times though.


Distance: ~ 2.6 km (sans walking around in Galle Face, but we took the bus)
Epicness: 4/5


#2

This. This was epic. Bo, Tulie and I were supposed to write a script for a forum theatre. Tulie couldn't make it, so Bo and I were eating ice creams at McDonalds and trying to figure out something to write, but to no avail. So knowing this wasn't going to work, we went down Nimalka Gardens, hoping to get to Marine Drive, but we found an old beggar in a vacant lot instead. Basically ran back to Galle Road, took the next lane, loitered around Marine Drive for hours watching the ships and talking about suicide (haha) and walked all the way to Royal Skills Centre, where there was a BB/RO meeting. The whole thing involved a lot of walking but it was fun. :D


Distance: ~ 2.4 km
Epicness: 4/5


#1

I rate this as probably the most fun outing ever. Makuluwo, Middle Child, Himal and I went to, wait for it, A POETRY JAM. It wasn't as bad as it sounds, I guess. So anyway, afterwards, we walked all the way from Green Path (where the poetry thing was) to Galle Face and flew 2 kites. The one I flew failed though. I blame Himal for this. He's bad at putting together those Chinese kites.


Distance: ~ 2.9 km
Epicness: 6/5

I was going through pics from that day, and I found this and couldn't resist sharing. :D Good times, yo.

Hamster-fu :D

Wednesday, October 19, 2011

Escape

Komari Beach. Picture by my friend the hiker

Exams will be over tomorrow. I've been waiting for this day for a long time. And my legs are itching to run fast and run far. I need to get away from this city. It no longer feels like home. I know, I know, I used to profess my undying love for her back in the day, but all of that feels like another lifetime now.

I've even been toying with this strange idea of just leaving for somewhere else (Trincomalee? IDK) and starting anew. Strange because it's so out of character, but I don't really know who I am any more. I blame deleting my Facebook account for this. :)

Other things I really need to do include learning some Haskell and polishing up on my driving, because I have a major urge to do something like this, soon:




Since I forgot to mention this: the footage is from a real early morning drive through Paris, in which the driver actually ran red lights and all. It's from a cult film called C'était un rendez-vous

Friday, October 14, 2011

Happiiibaaarthday, @thejester100! :D

My last two posts were (sadly) about dead people. Today's one is about a guy whom I hope lives to be 94: The funny man in the blogosphere is turning 22 today! :D w00t w00t!

Oh, and while the king was looking down
The jester stole his thorny crown
The courtroom was adjourned, no verdict was returned
We all have our fair share of crazy Jerry stories. My favourite second-hand Jerry story is, I believe, the one where he ran away from an elephant. I have a tendency to wear t-shirts with elephants on them, a fashion choice he always questions. Now I think I know why. ;)

Favourite Jerry story of my own: I think the one where he slapped Aruna hard on the cheek, said "Don't question me bitch", and ran for his life. It takes BALLS (and luck) to do that to the Dayanandanati and get away with it alive.

Since the thing he loves most is getting comments on his blog *cough*bloghoe*cough*, I'm going to link to a random post on his blog here.

Happy 22nd Jerry!!! We vuv ya, and demand cake. ;)

Thursday, October 13, 2011

For dmr

Logo I designed for Kottu, in tribute to dmr
Is October the month of tech's heroes dying, or something?

C was the very first language I learned at university. I had dabbled in bits and pieces of code before, with VB6 (ugh), a bit of C++ (utter failure) and maybe JavaScript. But C was my first proper language, and I fell in love. And I've seen many languages since, but none that were as easy to grasp, yet as useful as C. Today's languages are much fancier, but there's something about it that you can't beat.

Dennis MacAlistair Ritchie can be described in many words, but I would call him a true genius. In his own words: "Unix is simple. It just takes a genius to understand its simplicity". He, and the rest of the Bell labs team, took a very pragmatic approach to programming. They kept things simple, and put power in the hands of the user, with merely the warning to use it wisely. The theoreticians can say what they will, but in practical terms UNIX (and the C language it was written in - becoming one of the first major operating systems to be implemented in a high-level language) has responded by being one of the most successful operating systems in history. Today, a major part of the world's IT infrastructure runs on UNIX-derivatives and UNIX-clones. BSD (and its child Mac OSX) is wildly popular, and so is GNU/Linux. Even though the original UNIX code is not used in these implementations, the features, the layout of the file-system, the shell, the common utilities... the basic concepts and most of all the awesome little language that all of it is written in pretty much owe their existence to the work of the original Bell labs team.

Imagine what it must've been like to walk with giants? I would give everything I own to go back and work at circa-1970 Bell labs. :)

Rest in peace, Dr. Ritchie. Future generations will continue to read K&R, appreciate your genius and your contributions (and your humility about it all) and hopefully your life will be celebrated much more in the coming years. You deserved a much better send-off than that which you received today.

P.S. There was a quote of either Thompson's or Ritchie's that I've read and was trying to track down all day (if any of you guys know where it is, please send me the link) about how they never usually duplicated work while writing code, but once accidentally wrote the same utility in assembly code. They then went through the code, to find that they had implemented it almost identically - line for line. That story just blew my mind away. :)

Edit: Adding this cool Japan Prize video that I found today. The Japan Prize 2011 was awarded to Dennis and Ken.

Tuesday, October 11, 2011

On Kottu development, and oxygen for ideas

Kottu, after the 8.0 redesign

The thing with designing a software system you have no idea about is that you don't know how deep the water is, and you never will, until you jump right in. When Indi contacted me back in July with the proposal to join him at Kottu, I was stunned. It was truly a dream come true. I loved Kottu, Kottu was every young blogger's best friend. And it was where people could find good content, and sometimes even love

Coming back to the jumping in the water business: there is no way you can get something as complex and dynamic as Kottu right first time around. And I jumped right in, rewrote the whole code base from scratch. Every software best practice that I learned went flying out the window, and I cobbled up the least complicated thing that worked. No OOP, no comments, no nothing. Getting a working system out (no matter how ugly the code looked) was first priority. And only after going public with that did everything else flow along: documentation (still partial), code refactoring (check out the Posts class, which is basically what the whole back-end of Kottu looks like now) and more features.

When Kottu 7.8 beta first launched, we had no thumbnails, no categories and a bunch of those buggy Javascript social widgets that made loading the home page take ages. Only user feedback and time fixed those issues, and I don't think it is humanly possible for it to have happened any other way. Good systems don't just happen. Of course, there was UNIX, but let's not try to pretend we're Richie and Thompson, shall we? ;)

Right, then. The back-end of Kottu hit version 8.0 with some nice little refactoring (basically a revamped utils folder.) There are some development goals that I hope to achieve before we hit version 8.0 officially. (Note: These are not long-term goals like Indi has described here, but more of short-term, little, code-based goals)

  • Refactoring the front end

    There is a lot of code that gets duplicated in index.php and search.php and elsewhere in the front end. I hope to unify everything into a PageGen class to make generating pages easier and the code much cleaner.

  • Caching

    Kottu stupidly generates every page dynamically... every.single.time. I plan to put an end to this madness and store cached copies of several frequently accessed pages (or options within Kottu, say for example "Sinhala + Popular Today"). This would make me feel less guilty about running long and costly queries to give users a bit more of the beautiful data we have at Kottu. Don't tell anyone, but there will be graphs! ;) Shh!




  • Better documentation

    If you ask people why many open source projects fail, they would say that the two primary factors are developers losing interest, and lax user documentation. I've been a typical programmer, and been slacking off when I was supposed to be writing the f@#%ing manual (couldn't resist, sorry!) :D Yeah, there is a nice little markdown file on our Github, but we need more, including better on site documentation (not about the code, obviously, but think of a better About Us page).

  • Not-so-active blogs, what is?

    Okay, so there are active bloggers, and there are not-so-active bloggers. Thing about Kottu is we're dealing with limited resources, servers that might melt sooner or later, and other real world problems. We currently have 907 blogs listed on Kottu (wait, I'm sure that number was higher... dafuq?). What does FeedGet.php do? It takes 50 blogs (least recently polled), goes to each of those RSS feeds and adds any new posts to our database. Now, FeedGet.php is cronjob'd to run every 5 (!!!) minutes, the minimum limit allowed by our hosting provider, but still it takes approximately 1 hour 30 minutes to repoll a feed. So, if we polled your feed just before you posted a blog post, then sorry.com, bro. You will have to wait for one and a half hours for your blogpost to appear on Kottu. (We can't poll more that 50 feeds at a time due to the fact that PHP is a freaking crack addict that gobbles up insane amounts of memory without de-allocating any)

    What do we do now? What do we do now that doesn't get me banned from the next blogger meetup? Maybe we should poll not-so-active blogs less frequently, giving priority to active blogs - which are more likely to have new posts. And as soon as a less-than-active blogger makes his comeback, his blog is made active again, and gets polled in the usual way. It's sort of evil, yes, but necessary if we're to increase the response time of Kottu. And it also encourages bloggers to be more active. Whaddaya think?

So, finally, don't let the version numbering and jibber jabber fool you. Kottu is pretty much a work in progress, and Indi and I will continue to tinker and attempt to make it better and faster and cuter. And hopefully, I will realise my dream of a happier, friendlier, active little Blogosphere, like we had back when I first started in February 2009. Those were the days, maaan! :')

P.S. The title of the post is from an awesome awesome article by the guy behind Wordpress. READ IT! It totally changed the way I view software, and contributed to numerous bugs on Kottu, and I highly recommend it for anybody, geek or Greek. :D

Thursday, October 6, 2011

A quick note on Steve Jobs

Our philosophies about software freedom and user choice were worlds apart, but I was an admirer of Steve, and the company that he built - basically out of his garage. He was the epitome of the American dream, a self made tycoon who (unlike most people) only sold products he was genuinely passionate about. There are stories of him getting a prototype matte black MacBook Pro (or Air, I don't exactly remember) and rejecting it because the coating attracted finger prints and body oils, and was hard to clean up. A design that would've sold millions and millions of units, but was rejected because Steve only released products that he was passionate about - products he himself would want to use. As developers, techies, designers or whatever other field we're in, there's a lot we can take from that.

Here are some interesting titbits of what I've seen written about him:


Many entrepreneurs idolize Steve Jobs. He’s such a perfectionist, they say. Nothing leaves the doors of 1 Infinite Loop in Cupertino without a polish and finish that makes geeks everywhere drool. No compromise!

I like Apple for the opposite reason: they’re not afraid of getting a rudimentary 1.0 out into the world. [...]

Now, the crazy thing about that release is when the original iPhone went public, flaws and all, you know that in a secret room somewhere on Apple’s campus they had a working prototype of the 3GS with a faster processor, better battery life, normal headphone jack… a perfect everything. Steve Jobs was probably already carrying around one in his pocket. How painful it must have been to have everyone criticizing them for all the flaws they had already fixed but couldn’t release yet because they were waiting for component prices to come down or for some bugs to be worked out of the app store.
- Matt Mullenweg, 1.0 Is the Loneliest Number


I laughed nervously. After all, while it was customary for Steve to call during the week upset about something, it was unusual for him to call me on Sunday and ask me to call his home. I wondered what was so important?

"So Vic, we have an urgent issue, one that I need addressed right away. I've already assigned someone from my team to help you, and I hope you can fix this tomorrow" said Steve.

"I've been looking at the Google logo on the iPhone and I'm not happy with the icon. The second O in Google doesn't have the right yellow gradient. It's just wrong and I'm going to have Greg fix it tomorrow. Is that okay with you?" [...]

But in the end, when I think about leadership, passion and attention to detail, I think back to the call I received from Steve Jobs on a Sunday morning in January. It was a lesson I'll never forget. CEOs should care about details. Even shades of yellow. On a Sunday.
- Vic Gundotra, Icon Ambulance


It's just the biggest loss that Silicon Valley has ever faced. And nothing will replace this visionary figure who made a company mocked for its small market share the most profitable business in the world, not by taking shortcuts and marketing bullshit to people, but by making actual awesome goodies that anyone would want to buy.

Design is not just what it looks like and feels like. Design is how it works.
- Steve Jobs (more quotes here)


Rest in peace, Steve. You will be missed.

Tuesday, October 4, 2011

How to track down the @himalkk

Himalinga

Today on Chavie's nature hour, we're going to track the elusive (and endemic) Himalus Kotelawalus, a distant cousin of the Melursus ursinus inornatus (The Sri Lankan sloth bear) and also of Foxus Houndus, but my editor told me to take that bit off

There is only one confirmed specimen of this species, which would put it somewhere between Extinct in the Wild (EW) and Critically Endangered (CR) in the IUCN Red List, a category I personally like to call "ZOMG Almost Gone WTFBBQ!!11 (ZAGW)"

While naturally found wandering aimlessly around MC and Marine Drive, habitat and climatic changes have forced Himalus Kotelawalus to move into other areas. While there is no guarantee that you might spot him, conservationists scored a massive victory by introducing a smartphone to the specimen, which has made tracking using foursquare a trivial process. Though sightings in the wild have been rare, some lucky trackers and conservationists have had the privilege of capuring the specimen on film, often in quite unexpected places:


...

Yeah, I'm that jobless. :P

Edit: Here are some more and a link to the PNG file, if anyone wants. ;)



Friday, September 30, 2011

Farewell, Colombo 03


I'm sitting here alone in the 15th floor lab, near a window looking out on Dharmapala Mawatha. A view I've taken for granted since the initial wonder of being on a high-rise bulding passed. It's been two years, and the memories have been good. Good friends, good times and of course, pretty pretty code. :) The first great memory I had was seeing the central mountains from the windows, barely a month after first coming here. It was so beautiful that I kinda became obsessed with seeing them again. I have, twice, and once actually managed to snap a pic. :)


Other good memories from the first year include finishing off weekly programming exams super early in the evening, so I could go hang with Meshak and the others at Galle Face (he's got quite a few pictures of us ronde-ing around here and also, our national past-time of drinking Nescafe and plain tea in the canteen here)

All in all, a good two years, under the wing of some lecturers who really cared for us. Especially Miss A (our awesome junior lecturer on programming and algorithm-based subjects), who came to our lecture hall today and wished us all the best for our next year(s) spent in Malabe, to keep up the good work, and to make sacrifices now for a better future. It was pretty emotional, and it's sad that we won't be seeing some of the great lecturers who taught us in Malabe next year (but I'm hoping against hope that Miss A will get a transfer there or something!) :D

And now, without boring you any further: Chavie out, one last time. :)

Wednesday, September 28, 2011

Tales of the Purple wonder-van

I think this blog will be going into nostalgia mode shortly. The impending end of our happy days at Kollupitiya campus will warrant another post, but I'm going to go way back with this one. Back to 2003-06, in fact.


I was about thirteen when my parents put me in a school van to get me home. Not just any school van, this one could be spotted from miles away because it was painted purple!

There were a couple of kids from our school and a friend of ours from Mahanama in the first-row seat and the makeshift backward-facing seat that was right behind the driver's seat. The rest of the van was full of women. There was never much interaction between the boys and the girls, which I put down to some sort of ultra-awkward incident that happened before I joined. The van had gone through various interesting 'incidents' before I joined, the most famous (known throughout the school, in fact) being when it almost got blown up by a bomb aimed at the prime minister Ratnasiri Wickremanayake.

The memories I had of the van are mostly of being stuck in traffic, getting home two and a half hours after the end of school, wonderful. There was a pecking order, or rather a seating order that was strictly followed. The front row was taken by veterans, so I had to wait till somewhere like Nugegoda to jump into that one. C used to tell us about what happened last night on his favourite show: Angili Salakuna. Ni and S were WWE fans, so their stories usually revolved around whatshisname the Undertaker. They even had a pack of WWE cards that we used to play. Na was into music and smoking. A was the guy who was an year older than us, who used to chase me around and poke my (non-existent) tummy. Yes, I'm aware of how wrong that sounds. :D

One of the funniest things happened once during big match time. We had a College flag out one window, and we were passing out of Flower Road in moderate traffic when suddenly a guy came running onto the road, grabbed our flag and threw a rotten egg into the van. The egg was thrown at the back of the van (it hit the rear glass, and I believe it stayed there for a week till someone cleaned it up, LOL) and the girls were basically threatening us with bloody murder. But the funny bit is that as he ran back, someone was waiting for him: a stern-looking policeman! Good luck, dude! :D

Water fights were a common occurrence when the last day of school rolled by. This was when the animosity among the guys and the girls just bubbled and everyone threw a good bottle of water to make up for everything the others had done throughout the last three months. One such day, after much water being thrown, the guy who drove the van (our Uncle! oh how we drove him nuts as he drove us home) bought us all yoghurt. We ate the yoghurt, but as we were nearing the bottom of the cups, we found out that the yoghurt could be used for other purposes. When my bag started stinking badly a week after end of term, I realised that I had been hit. Oh well.

And finally, of course, the music. The van had a cassette player and radio. One day, uncle was bored and switched on the radio, much to the displeasure of everyone sitting in the van. The girls, cunning as always, exploited this moment of weakness by bringing two cassettes the next day: Ranidu's debut album and some BnS songs. Despite many failed attempts by the boys, these two continued playing on loop till we finally left the van 3 years later. And now, whenever I hear those songs, I remember the van days. :D



Saturday, September 10, 2011

How Laura Marling broke Charlie Fink's heart, and other stories

When I first heard 'Blue Skies' on PseudoRandom's blog, I had no idea that this was one of the few uplifting songs in an album about a breakup. I listened to that live version a million times, fell in love with it, but didn't do much follow up with the band. I didn't even discover 5 Years Time, their big hit from the debut album. Oh the shame.

That first album, that big hit, has backing vocals by Laura Marling, whose own debut album was produced by Charlie. A great load has been written about their break up, but nothing more powerful than their second album, "The First Days of Spring". An album written and recorded when the pain of heartbreak was so raw, that Charlie apparently broke down the first time he heard the album in full.

Two years after the release of TFDoS, Noah and the Whale are back with "Last Night on Earth". I first heard "Life is Life", but didn't like it much. But then I heard L.I.F.E.G.O.E.S.O.N., a song that reminded me of Get Back by the Beatles and Oh! Sweet Nuthin' by the Velvet Underground, and I so began the listening on loop.


And then, I listened to a couple of more songs and decided to download the entire album, something I seldom do. But ukulele fans be warned, Noah explores new sound in this record, and electronic music does creep in. But it has been used with discretion, and class. Seriously, this record is awesome. Favourites include "Tonight's the Kind of Night", "Give It All Back" and "Waiting for My Chance to Come". But my pick of the lot? This absolute beauty:



Well I've always had a wild imagination,
And a see-through heart,
Which I know can be, a wild combination,
Like a flame forms from a spark,
But don't be shy, be brave little champion,
It's better to live than to hide...

Wednesday, September 7, 2011

It's the What Ifs that kill me

Two IF conditions, in Allman style

I consider myself a fairly rational person, and hopefully others do too. But I am very control freakish about the world, to the point of obsession. If things don't neatly go the way I want them to, I take great offence. This is not to say I go around imposing my will on people. I do take suggestions and I do change my mind. But when things happen, and it seems very illogical, and nobody offers me a proper explanation as to why it is so, I try to fix it. Like a mad web designer screwing with Firebug, I hack away. Slowly but steadily, while you are sound asleep, I am awake, plotting away. Social engineering. Researching. Waiting for the perfect moment to launch a blitzkrieg... I know, creepy right?

And then, I fail. Because other people's problems aren't mine to "fix" (the polite way of saying I should sod off and mind my own business). And then, without letting go of obsessions, I let go of people. Ah, the greatest gift and the greatest curse of being an only child - the ability to be completely by yourself and yet have a good time. A great time. (Ok, a pretty much awesome time... People are meh.) ;P

So anyway, point of this post is to remind myself that I've tried 4 times to "save" someone, and four times I've failed, because if anyone wants salvation, they'd just ask for it. And probably ask someone else, coz I'm creepy. ;)

And before I go, I'd like to share the words of the great I from uni: "Anith unge prashna oluwata daagena api mokatada nahenne" or "Why do we bother with other people's problems to the point of killing ourselves".

Dedicated to G1, who is happy; to G2, who is confused; to G3, who I'm confused about; and to G4, who will see the light someday - I will make sure she does. Muhahahaha. :/ *facepalm*

Tuesday, September 6, 2011

Chavie who?

Soooooohhhhh, it took a complete GUI redesign at Blogger to bring me back to these parts huh? :D

Welp, I have been a biiit busy, ostensibly working on Kottu (a hora sneak peek at a new feature I'm working on here), but actually just doing nothing or catching up with Sai, WHO'S FLYING DOWN FOR GOOD THIS MONTH! Yaaaaayayayaya!!! :D

There are so many things to tell, so much to blog about, but ugh, goddammit this blogger interface is too shiny and distracting... I wonder what this button does...

ZZAAAAPPPP! :O

Ok, lame jokes aside, I came here to write about how signatures are crap. I mean, I had the misfortune of going to the bank today, and the poor lady in front of me had put her signature a bit too longer than what was on her book thingy. I mean, wtf man?! How do people manage to keep their signatures looking the same? Mine changes like a gazillion times a day (anyone looking at the uni class register would understand) and I actually practice before going to the bank, and still mess up horribly. I mean, in an age where retina scanners and fingerprint readers are freely available, ugh nevermind... -_______-

So, anyways, good to be back. Will hang around this time, I guess, since working with Kottu means I get to visit your blogs quite a bit these days. We're rolling out a few new features in the next few days, so stay tuned to Indi's blog! :D

Wednesday, August 24, 2011

The new Kottu beta

Kottu is the Sri Lankan feed aggregator we all know and love. Kottu currently has more than 1000 Sri Lankan blogs in all three languages (and one Dhivehi blog too!) listed, and it's safe to say that without the community and traffic built up around Kottu, most of us would never have continued blogging. Indi, who basically set up and ran Kottu from scratch with his own money, contacted me last month to see if we can spice it up a bit, and add some new features to the site.

Introducing the new Kottu beta

Screenshot

One of the most popular features of Kottu, that sort of got hijacked and removed, was the popular posts widget in the sidebar. We wanted to re-implement it, without relying too much on clicks and relying more on social media (something that wasn't that huge when Kottu first launched). So now, you can basically click on the popular posts (categorised by time - today, this week, this month) in the sidebar and it shows the most popular posts in that time period. (Note: Don't be angry if your popular posts don't show up, we just set the system up and stats are only being counted from yesterday). Another feature is language based filtering, which makes it easier to find what you're looking for. 

The technology 

There isn't much behind the interface, really. We use SimplePie to read the feeds and get new posts, the Twitter and Facebook APIs (the latter through the Facebook PHP SDK) to get stats, and combine them using a very simple formula:

Post Buzz =
(No. of tweets / Max tweets for a single post in the last 24 hours) + (No. of FB likes and shares / Max) + (No. of clicks / Total no. of clicks)
(with appropriate weight given to each metric) 

So basically: The more tweets / Facebook likes or shares your posts get, the higher ranked it will be.

We also use something called Fizzling to reduce buzz as a post gets older. This follows the logic that the older a post is, the more tweets / FB likes or shares it should get (if it's good) and therefore, to give newer posts a chance, we counteract this with the negative influence of age on the post buzz.  

So, finally

Use it. It's at kottu.org/beta. Let Indi and I know about what you think. Our hope is that this will help in some small way to rejuvenate the local blogging scene, which is nowhere near the glory days of 2006-08. And we can hopefully iron out the issues and take this out of beta in the next few weeks. :)

Thursday, July 21, 2011

Bus Route Finder

A month and a half back, I made a map of bus routes in Colombo that became a surprise hit. This, coupled with the number of calls Himal was getting asking which bus to take, made me think that a website that tells you which buses to take from location A to location B would be pretty useful. With my beginner-level knowledge of SQL, JavaScript and PHP, I was able to cobble together a website that helps you find the bus route to your destination.

The system is far from perfect (it has only 25 or so bus routes, from the 70 odd listed in the Colombo bus routes Wikipedia article), and so it could do with some improvement, which is why I'm releasing the source code and the database SQL under the GNU GPL. :) So, I hope someone who's better with buses and code can take this to the next level. So, do feel free to modify, change, and host as you please, and please excuse the n00bish code, I'm kinda new to this! :D

A better algorithm for finding buses would be really nice, since all buses are not created equal. Waiting for a 135 that never came on a Sunday afternoon in Narahenpita, or getting late for an appointment because some fool recommended you take a 255 (worst bus ever!!!) from Kottawa to Mount Lavinia, is uncool. A better system with some sort of ranking algorithm would solve this problem, me thinks. :)

Hope you guys find the system useful. There is a mobile version of the site, but my stupid web host won't let me automatically redirect users to it using htaccess. :( A special Thank You to all my friends who helped me with this, and especially Mr. Inosh Perera, who helped me with the 187 bus route and also suggested I add Google Maps geolocations to bus halts. :)

Update: Bus Route Finder on GitHub (Thanks, John!) :D

Sunday, July 3, 2011

I Know What You Did Last Summer

So, a couple of months have passed since finals and the university student inside me has been awoken from the long slumber that he took during the vacation months. Our fourth semester at SLIIT promises to be filled with challenges, the most important of which is the infamous "Second Year Project". We have been blessed with a great client, and it's now up to the group to deliver. This project offers us a chance to get our hands dirty with all aspects of the development process, from requirement gathering and analysis, to designing the system, to making databases, writing documentation, keeping the client and the lecturers happy with progress reports, as well as my favourite part - getting down and dirty with some mean code. ;)

The holiday months, alas, were not spent being entirely useless. :P I helped my friends at The Pooch Foundation by designing a website for them. When you're short on development time, bad code and design tends to seep through, and the website went through some horrid n00b html versions before coming out with the current iteration, which I quite like. The great thing about it is that it uses jQuery to look very, very good. ;) And the sad thing about it is that it uses jQuery, which tends not to run in some machines (like at uni), even if JavaScript is enabled. :/ But the project, as a whole, was brilliant. I learned PHP and jQuery on the job, and the intricacies of writing code for other people. ;) This new found love for PHP, coupled with something else has resulted in me working on a small project of mine, which I'll update you on within the week. :D Needless to say I am terribly excited about this, and it's something which -with enough user input- can grow into something that I hope a lot of people will find useful.

So, with the promise of blogging again in the not-too-distant future, I bid you adieu.

Saturday, June 4, 2011

Colombo Bus Map v0.2.4

I love the London Tube map and thought of making a map of Colombo's bus routes using the same principle, i.e. topology over geography.


Sources:
http://en.wikipedia.org/wiki/Colombo_Bus_Routes
http://www.oocities.org/waidyah/SRILANKA/COLOMBO/BUSROUTEMAP.HTM

Excel file I used to draw the map:
http://chavs.000a.biz/bus4.xls

Bus routes:
  • 100 Panadura - Pettah
  • 101 Moratuwa - Pettah
  • 120 Horana/Kesbewa - Pettah
  • 141 Wellawatta - Narahenpita
  • 177 Kollupitiya - Kaduwela
  • 154 Angulana - Kiribathgoda / Bambalapitiya - Kadawatha
  • 138 Homagama/Athurugiriya/Rukmalgama/Matthegoda/Kottawa/Maharagama - Pettah
  • 122 Rathnapura/Awissawella - Pettah
  • 125 Meepe/Padukka - Pettah
  • 103 Narahenpita/Borella - Pettah
  • 175 Kollupitiya - Kohilawatta
  • 135 Kohuwala - Kelaniya
  • 140 Kollupitiya - Wellampitiya

Notes:
  • Variants may exist. A 154 might stop in Bambalapitiya, or a 103 might stop in Borella. Be aware of the stop names on the big yellow board.
  • The hollow lines follow the route of the filled lines unless otherwise specified.

Thursday, June 2, 2011

May, I ♥ You!

Thank you for being a great month to me.

April was horrible to me, with exams and assignments effectively ending my social life. Gahness galore. But we finished off uni, got two months of vacation time and the past two weeks have been insanely awesome and very very productive.

Stuff I've been involved with:

Reach Out

The fact that a woman can't travel in a bus without being groped, or walk a street without having to face catcalls and leering is a serious issue in our society. Reach Out's project focuses on educating school children to be aware of the consequences of harassment and intervene in situations where a girl is being harassed. The end goal is to create a strong social movement against sexual harassment and to make public spaces safe again. We're doing presentations at schools (our first, at Amal International School, was held today) these coming weeks. And the best part is that I get to hang out with a load of bloggers, since a lot of them are involved in Reach Out. :)


Pooch Foundation

There are currently 4 million stray dogs on the streets, without food, shelter, vaccines, and most importantly: love. Pooch Foundation aims to find homes for these innocents, and also change society's attitude about stray dogs. I have been helping them out with their website (I'm learning PHP and jQuery on the job, baby! ohhhyeah!) and stuff. Pooch also publishes a weekly column on the Funday Times called "Pooch Times". :)


After feeling all caged in and socially isolated for almost two months, the last two weeks have felt like dying and going to heaven. I hope the good times keep on rollin', and that I don't suddenly fall off a bus and die! ;) (That'd be epic though. LULZ!)

Monday, May 9, 2011

Love is messy business

Platonic love is underrated. This is what I told a friend of mine who had just broken up, to comfort her. Don't we always struggle with that special person whom we really really love, but don't know if we're meant to be friends or lovers? What is it with being lovers that is so attractive anyway?

It's rarely ever the physical intimacy.
Is it the whole social girlfriend/boyfriend thing?
Maybe it's attention. Or respect.

Friendships are so often taken for granted. You crave attention and respect, but you never get it because, hell, "We're just friends, right?". This leads to a logical fork. Do you put up with these limitations and re-adjust your expectations, or do you make it more than just a friendship?

Is it worth it?

I don't think it is. I don't get why rational people do this to themselves, put themselves through the pain of romance. And it almost never works out. Romance crashes more often than Windows ME.

And yet people keep falling into this same old trap. Girl and boy. Share interests. Find each other charming. Carefully build up friendship for months. Move on up to Stage II. Crash. Unable to look each other in the eye again.

And you do this over and over again. I've seen some beautiful friendships fall apart because, apparently, whatever they had going for them wasn't enough.

Part of life? Self-destructive behaviour? I really don't know.

Friday, May 6, 2011

A farcical end to a farcical semester

Why do lecturers insist on doing this to us? Giving us assignments that fall so out of our scope of knowledge that we're left with no option but to steal shamelessly. Maybe this is about shame. Maybe this is to condition us, to make us understand the grim reality that we'll probably never write an original block of code in our lives.

Meh. I know the world turns regardless. Life goes on without so much as a second glance. We're the lucky ones. We have the luxury of pecking down a few words in protest before having some lunch and, if you're lucky like me, pudding.

Sunday, April 24, 2011

Crickexams

So, good old SLIIT is going through exam season these days. The common rooms are crowded, and the staircases are full of last minute crammers with books and papers lying all around. :) My exams so far have had mixed results, PS was a miss and SPD was a definite hit.

So, remember me saying we might have World Cup coverage around these parts? :D Yeah. Well, the closest I got to the World Cup is when I went to watch the Kenya vs. Sri Lanka match on March 1 with my mates. But fear not, this post is sort of related to cricket.

I helped out a friend of mine studying in Australia with his programming assignment. It was a neat little C program that read from a file, did some basic data manipulation and graphed the results. After being stuck for so long doing non-programming things at uni (Ugh, I thought this degree was about learning to code. How wrong I was...) it was a treat to write some good code and it inspired me to write this follow up program. It's a tiny piece of code that graphs runs against overs, like those Manhattans that they show during cricket matches. The code can be found here.

Here's what the output looks like:

Friday, April 15, 2011

Crashing in 3... 2... 1...

The sheer volume of stuff we have to memorise for this final is astounding. From obscure statistical formulae to the intricacies of various routing protocols to the exact code needed to write certain Java applets (which even the lecturer admits is an outdated technology) to godforsaken Bash scripts.

It's all too much. And I'm more concerned right now about how good the ocarina sounds on Wild Thing.

:/

5 days to go and right royally screwed.

Thursday, April 7, 2011

Date a girl who Codes

This (Facebook note) was inspired by the Tumblr post Date A Girl Who Reads (by Rosemarie Urquico) which GG had posted on Facebook. :) Disclaimer: I'm NOT an Emacs user. ;)

Date a girl who codes. Date a girl who spends her time on Stack Overflow and not TMZ. Her computer's fucked because she messed with the kernel too much, not because she downloaded "Free Smileys". Date a girl who knows a couple of languages, compiled her first program when she was 11.

Find a girl who codes. You’ll know that she does because she'll always have Emacs open. (What do you mean vi? Are you crazy to even look at the devil's spawn?) She lovingly looks through the Java API, and quietly cries out when she finds that one interface that's been giving her a hard time. You see the weird chick staring at her laptop with her hands on her head? That’s the coder. They can never resist the urge to code, even in public.

She’s the girl coding while waiting in that coffee shop down the street. If you take a peek at her mug, the non-dairy creamer is floating on top because she’s kind of engrossed already. Lost in a world of inheritance and multiple threads. Sit down. She might not notice you, as most coders don't like to be interrupted. Ask her what's up with her indentation.

Get ready to have a cup of coffee thrown on you.

Let her know what you really think of Stallman. See if she can code Lisp. Understand that if she's a fan of Bash scripting, she’s just saying that to sound intelligent. Ask her if she loves Canonical or she would like to work there.

It’s easy to date a girl who codes. Leave her alone when she's coding, but never for too long. Tell her to look out the window from time to time. Giving your eyes rest is important for coders, lest you want her to go blind. Buy her Knuth's "The Art of Computer Programming". Let her know that you understand that code is love. That every opened curly bracket is a commitment. Understand that she knows the difference between how code works and reality but by god, she’s going to try to make her life a little binary. It will never be your fault if she does.

She has to give it a shot somehow.

[Can't be fucked writing any further. I've got more important things to do.]

:P

P.S. If you meet the aforementioned girl, please give me a ring! O_O

Sunday, April 3, 2011

Guilt tripping the cricket fans

This post is not really about cricket. But for the record I'll just state that I enjoyed the match and as one of my friends said, "It was a game befitting of a final, unlike 2007". How very true.

But I have to instead talk about a duller and murkier topic than run rates, field placements and Poonam Pandey's knickers. There are a few people who've been suggesting that supporting the Sri Lankan cricket team equals supporting the Government of Sri Lanka and its policies. (The word 'genocide' is thrown around liberally by these people.) While its not untrue to say that a majority of Sri Lanka's 20 million people support the regime, the support for the cricket team transcends any petty political, ethnic or religious lines. They were watching the match in the south, in the north, the west, the east and up in the hills. Cricket is the glue that held us together during the most difficult periods of our history.

For me, I support the team because they represent me, and my 20 million countrymen. Not because of politics, not because waving a lion flag (something I've never done, to be honest) gives me a feeling of superiority or whatever the critics say it's supposed to do.

To all the haters, I say: Go fly a kite. We love our boys, and nothing is ever going to change that.

Sunday, March 27, 2011

O Bradman, God of Cricket

Let Dilly make balls evade the stumps, as easily as he did today
Let Upul flirt with the ball, batting as gracefully as a Left-hander ever could
Let Sanga be the rock of the innings, while everything around him burns
Let Mahela continue to make me wish I batted Right-handed ;)
Let Thilan miss no more sitters!
Tell Angie to lay off the lasses, for he seems to be missing practices
Let Mali find Kenya again
And let Murali be fit, two last times!

Let the island of so many,
of so little,
plenty,
nothing,
beautiful people,
blood spilt in vain,
of the finest tea,
and the finest kasippu too,
of beaches,
and landfills,
of smiling assassins,
and frowning salesmen...

LIFT THIS CUP!

Let us be at peace with the world,
at peace with our past,
and at peace with the rocky journey ahead...

"Looking ahead with hope"
Image © Getty Images

Tuesday, March 22, 2011

Linux: Making the jump to Free Software

I was reading an article about introducing your better half to Linux. It's something every geek goes through: having to pick between their girlfriend and their favourite operating system (good thing most of us are hopelessly single! :P ). But in all seriousness, weaning off Windows isn't that hard.

My Desktop at the moment

There are obvious categories of people that this post is not meant for: Hardcore gamers (let's face it, gaming options on Linux are seriously limited), People who live on Visual Studio/Photoshop and Microsoft employees. For everyone else, there's Linux. ;)

I started using Fedora as my primary OS last year, when I got my own laptop (I have since switched to Ubuntu due to the whole 'ease of finding and installing software' (PPAs) thing). Using it on the desktop was never an option. For one, I had a USB modem (unsupported by Linux) and my mom was constantly on Excel, and retraining her to use Linux would've been a lot of work (not that difficult, but I tend to cut corners when it comes to my parents).

Anyhoo, I was never a serious gamer, nor used Office obsessively. Most of my work is done on Google Docs (or in text files. I'm using gedit to write this post) and most of the time I'm stuck on a browser (Firefox 4 there, which coincidentally is leaving the testing phase and being released today!). Banshee is much better a music player than either Windows Media Player or Songbird, and GIMP works really well if you're not really into photoshop but want to mess around with some images or something (there are a load of extensions for it that make so many things possible). Emesene is an awesome Windows Live Messenger clone, and Pidgin is the best chat client that money can't buy.

And for those pesky tasks that can only be done on Windows, I have installed Windows XP inside a Sun VM VirtualBox (but seriously, FUCK ORACLE!). I've run MS Office 2003 and SPSS 13 (a statistical package by IBM) without issue in the virtual box.

I've used Linux exclusively for over 6 months now, and save a few occasions when newly installed kernel images refused to boot (rebooting always fixed the issue), I have faced no major issues with the OS. No blue screens, no security threats, no OS crashes and little or no unstable software. This in spite of me using Alpha or Beta quality software (Hotot and Firefox).

So, my friendly advice to all of you looking for a change is: Think about it. Find out about it. Run a live CD, experience it. Discover that Linux is not all typing complex commands into the console (in fact, the themes coming out these days can pwn Windows sideways!).

Also, for the latest updates on Ubuntu and free software, check out OMG! Ubuntu! :)