Michael de Silva Hi, I'm Michael and welcome to my blog.

My interests are rather wide and varied, from reading to writing with fountain pens as well as enjoying great food with even greater company.

Consider having a look at my Flickr photostream, if photography interests you. I have also authored some texts on Mathematics, Physics, and Engineering. Last but not least, my Curriculum Vitae.

Mike's burogu

Navigation

Moved to http://www.mwdesilva.com

I’ve completed setting up my new blog at

http://www.mwdesilva.com

I will maintain this for about a year and look to decommission this and the domain will be set to redirect to mwdesilva.com.

Shifting meh-blog to Linode…

Been pondering this one over as WordPress is definitely not cutting it for me anymore, so I’m hoping to shift the blog to a rails powered one my linode sometime this weekend — only if I get around to it. If not, I’ll probably continue paying for the second hosting plan (just the blog) and ponder this transition during the following year.

Of course, I’m currently debating the merits of going with a full blown Rails app (and all the overhead that entails) to perhaps going with something simpler, say Jekyll or Octopress. There’s a reason that most professional Rubyists seem to prefer the minimalist-approach, not to mention the pure awesomeness of ‘blogging’ via Git.

In short, it’ll happen, when it happens. Until then, don’t hold your breath!

Nature Taking a Byte Out of Technology

This is the second time in 2011, when nature has reminded us of its divine power. The Fukushima Daiichi nuclear incident in Japan earlier this year, affected much of the NAND RAM supplies in the region impacting the likes of Sony and even Apple.

Right now, we learn about the flooding in Thailand and its potential effects on HDD supplies. Prices are being pushed upwards as a result.

I wonder, although sincerely hope not, if the next global crisis will be a result of multi-regional devastation in Asia. Oh, I hope not…

Rails 3.1: Starting the Week on Sunday, as in the Middle East

Was rather interesting to find out that ‘Monday’ is hardcoded into Rails as the start of the week, so working around this involved creating a custom initialiser that reopened two classes as follows:

…and here’s the proof

1
2
3
4
5
6
7
8
pry(main)> Time.now.traditional_beginning_of_week
=> 2011-10-16 00:00:00 +0300
pry(main)> Time.now.traditional_end_of_week
=> 2011-10-22 23:59:59 +0300
pry(main)> Time.now.traditional_beginning_of_week.strftime('%e %A, %B %Y')
=> "16 Sunday, October 2011"
pry(main)> Time.now.traditional_end_of_week.strftime('%e %A, %B %Y')
=> "22 Saturday, October 2011"

URI Obfuscation in Rails

Was toying with my local yarddoc server and was perusing Paperclip’s rdoc and happend across an interesting note on URI obfuscation. John has indeed taken a very interesting approach and I’m looking forward to applying this to my custom S3 to API tool.

Projects

  • Nexus One

Yaay...!