My Life; Updates

Tuesday, December 23, 2008

Howdy! It's been a long time I wrote anything here. The usual excuses apply: Life caught up too fast, broke records on how busy I could be & lots of happiness and sadness mixed together to create wonderful memories that I'll retell and relish often in the years to come.

Since I last wrote, I've twice thought about quitting MobME and going for higher studies. I got an admit into two UK universities but finally accepted one at UCL where I'll be starting an SSE course this September. Naturally, I'm quite excited about that! London itself would be quite an experience.

MobME has been astoundingly happening these past few months. When 7 of us sat around on my bed and talked about Torque, I never could have imagined it growing this big and vibrant. From working on Mobshare, to fixing problems with our bulk SMS solution FastAlerts and our voice solution based on Asterisk, it's been a hectic but fun ride. I've also slowly evolved from a programmer to a manager-cum-coder (the SSE degree makes sense in this context). It's a different ballgame altogether managing people and assigning work, talking to other technical guys to make things work and everything. Combining that with coding makes for interesting work. I've also decided that it's probably in my genes to work for a startup. Startups value good, hard work and do not care about my other eccentricities. Of course, I've had to tone down a lot of that. I sit with my leg up on the table still, but Scrum can't happen with a Scrum-master, so late-night work takes a back seat.

When I think back though, it's only the blogging that has suffered. Reading? I still read a lot of books (I'm probably the only person who's got a membership in Eloor Trivandrum, Kochi, and Delhi), and I buy at least a book a week online (either through Fictionwise or Webscription), and my taste in reading is still eclectic although it tends nowadays to Fantasy and Scifi more than the norm. Obama's Dreams from My Father was a good read though. So was Randy Pausch's Last Lecture (the video is a must-watch for anybody). Karan Bajaj's Keep off the Grass was interesting at first but the ending totally let the book down - it tries to do to MBA life what Chetan Bhagat did for the IITs, but sadly fails miserably.

Watching movies? Regularly, with discipline and a lot of focus. From electic ones (Swedish Let the Right One In - awesome) to all the usual masala flicks (RNBDJ), I've kept on top of the scene.

Coding too hasn't suffered much. There's work of course, but there's the bits I've managed to extract from it to be generally useful - the S3 asset cacher comes to mind. I also recently updated my portfolio and I'm more active on Twitter than usual.

I've made lots of new friends too at MobME, but I've found it hard to keep in touch with old ones largely due to me being pinned to Kochi & busy to boot. I'm right now in Delhi and I did visit Uzanto again after a long time, that was fun!

So that's it for an update, I'll probably blog more often from now on. There are some things I do want to do about this site - refresh the look for one - and more I want to write about (Love and Life doth come to mind), but that's it for now. Adios!

Comments (1) | Permalink

Rails-like ActiveRecord for PHP 5.3

Saturday, September 13, 2008

I've worked on a small project that makes Rails-like AciveRecord available for PHP 5.3. It's unimaginatively enough called active-record-php. I think an approach of this nature would make a really viable competitor to the likes of Propel and Doctrine and I'll tell you why!

It works exactly like Rails' ActiveRecord. There are two features in PHP 5 which makes this possible (the magic function __call - equivalent to method_missing in Ruby) and something called late-static binding which is only available in PHP 5.3. __call allows dynamic method invocation and late-static binding (along with a few tricks) simulates class and instance methods in Ruby. Let's see some code!


user.php:
<?php
	
require_once 'base.php';
	
class User extends ActiveRecord::Base {
  protected static $class = __CLASS__;
	
  public static $associations = array(
    'has_many' => array(
      'photos'
    )
  );
};
	
?>
	
photo.php:
<?php
	
require_once 'base.php';
	
class Photo extends ActiveRecord::Base {
  protected static $class = __CLASS__;
	
};
?>

That's a basic has_many relationship. Include the base.php class (which lives in its own namespace), and that's it. No more configuring schema.xml, regenerating boilerplate get/setter code, etc. It's all in there.

How do you use it? Again, intuitive:


<?php
	
require_once 'user.php';
require_once 'photo.php';
	
ActiveRecord::Base::establish_connection(array(
  'host' => 'localhost',
  'database' => 'test',
  'username' => 'root',
  'password' => 'root'
));
	
$users = User::find_all();
$user = $users[0];
$user->user_name_set(\"Love\");
$user->save();
print_r($user->photos());
print_r($user);

That's all there to it. And less than 150 lines of code too!

Of course, this is more like a POC. The only stuff implemented are attribute getters and setters, a simple save(), a has_many relationship etc. No validation, the rest of the relationships, eager loading, et. al. But it's easily doable. If somebody wants access to the github project do let me know! It does require PHP 5.3 though (which is currently alpha 2) but do give it a try: a siege benchmark showed 5.3 to be around 30% faster than 5.2.6 for a simple caffeine (note: that's a link to my fork: the original is here) application, so 5.3 would be good!

Comments are welcome!

Comments (4) | Permalink

View Vishnu Gopal's profile on LinkedIn

Twitter

Tuesday, November 18, 2008

git-svn-clone-externals at master from andrep's git-svn-clone-externals — GitHub

git-svn-clone-externals at master from andrep's git-svn-clone-externals — GitHub

Rating: ★ ★ ★ ★ ★

(0) #

Sunday, November 16, 2008

reglib - Google Code

reglib - Google Code

Rating: ★ ★ ★ ★ ★

thoughtbot's suspenders at master — GitHub

thoughtbot's suspenders at master — GitHub

Rating: ★ ★ ★ ★ ★

(0) #

Friday, November 14, 2008

Welcome! - The Apache Portable Runtime Project

Welcome! - The Apache Portable Runtime Project

Rating: ★ ★ ★ ★ ★

µstr - Micro String API - for C

µstr - Micro String API - for C

Rating: ★ ★ ★ ★ ★

(0) #

Tuesday, November 11, 2008

What to tune in MySQL Server after installation | MySQL Performance Blog

What to tune in MySQL Server after installation | MySQL Performance Blog

Rating: ★ ★ ★ ★ ★

(0) #

Sunday, November 9, 2008

BlueTripCSS Framework - Blueprint meets Tripoli | Capsize Designs

BlueTripCSS Framework - Blueprint meets Tripoli | Capsize Designs

CSS Frameworks have been a hot topic the past few months. Although they've been getting a lot of heat from semantic freaks and minimalists (for adding

Rating: ★ ★ ★ ★ ★

(0) #

Saturday, November 8, 2008

Nokia Sports Tracker Beta

Nokia Sports Tracker Beta

Like Ipod+Nike

Rating: ★ ★ ★ ★ ★

aztecwickedsun's deviantART gallery

aztecwickedsun's deviantART gallery

Art - community of artists and those devoted to art. Digital art, skin art, themes, wallpaper art, traditional art, photography, poetry / prose. Art prints.

Rating: ★ ★ ★ ★ ★

(1) #

Friday, November 7, 2008

Bizspark At a Glance

Bizspark At a Glance

Rating: ★ ★ ★ ★ ★

The Pragmatic Bookshelf | Programming Clojure

The Pragmatic Bookshelf | Programming Clojure

Programming Clojure, , by Stuart Halloway, 978-1-9343563-3-3, Mar 2009

Rating: ★ ★ ★ ★ ★

(0) #

Thursday, November 6, 2008

He Said/She Said: 20 Boy/Girl Duets for the Ages | JamsBio Magazine

He Said/She Said: 20 Boy/Girl Duets for the Ages | JamsBio Magazine

He Said/She Said: 20 Boy/Girl Duets for the Ages: I'm a sucker for male/female duets. There's something about the contrast of voices that really connects with me.

Rating: ★ ★ ★ ★ ★

(1) #

Wednesday, November 5, 2008

MobShare: Controlled and Immediate Sharing of Mobile Images - CiteSeerX

MobShare: Controlled and Immediate Sharing of Mobile Images - CiteSeerX

Document details from CiteSeerX (Isaac Councill, Lee Giles): In this paper we describe the design and implementation of a mobile phone picture sharing system MobShare that enables immediate, controlled, and organized sharing of mobile pictures, and the browsing, combining, and discussion of the shared pictures. The design combines research on photography, personal image management, mobile phone camera use, mobile picture publishing, and an interview study we conducted on mobile phone camera users. The system is based on a client-server architecture and uses current mobile phone and web technology. The implementation describes novel solutions in immediate sharing of mobile images to an organized web album, and in providing full control over with whom the images are shared. Also, we describe new ways of promoting discussion in sharing images and enabling the combination and comparison of personal and shared pictures. The system proves that the designed solutions can be implemented with current technology and provides novel approaches to general issues in sharing digital images. Categories and Subject Descriptors H.5.1 [Information interfaces and presentation (e.g., HCI)]:

Rating: ★ ★ ★ ★ ★

(3) #

Monday, November 3, 2008

CS193P - Cocoa Programming | Announcements

CS193P - Cocoa Programming | Announcements

Rating: ★ ★ ★ ★ ★

List of data structures - Wikipedia, the free encyclopedia

List of data structures - Wikipedia, the free encyclopedia

Rating: ★ ★ ★ ★ ★

(0) #

Friday, October 31, 2008

Symfony SOAP

Symfony SOAP

Rating: ★ ★ ★ ★ ★

(0) #

Wednesday, October 29, 2008

Lost Garden: The Princess Rescuing Application: Slides

Lost Garden: The Princess Rescuing Application: Slides

Rating: ★ ★ ★ ★ ★

MacCallGrind

MacCallGrind

Rating: ★ ★ ★ ★ ★

Common fonts to all versions of Windows & Mac equivalents (Browser safe fonts) - Web design tips & tricks

Common fonts to all versions of Windows & Mac equivalents (Browser safe fonts) - Web design tips & tricks

A list with the common fonts to all versions of Windows and their Mac equivalents, useful when creating websites.

Rating: ★ ★ ★ ★ ★

Gmail Modes

Gmail Modes

Rating: ★ ★ ★ ★ ★

(0) #

Tuesday, October 28, 2008

a Practical Theory of Programming

a Practical Theory of Programming

Rating: ★ ★ ★ ★ ★

(0) #

Monday, October 27, 2008

sqlmap: automatic SQL injection tool

sqlmap: automatic SQL injection tool

sqlmap: automatic SQL injection tool

Rating: ★ ★ ★ ★ ★

Human Computer Interaction in Science Fiction Movies

Human Computer Interaction in Science Fiction Movies

Rating: ★ ★ ★ ★ ★

(0) #

Thursday, October 23, 2008

iPhone Developer News, Interviews and Links — Mobile Orchard

iPhone Developer News, Interviews and Links — Mobile Orchard

iPhone Developer News, Interviews and Links

Rating: ★ ★ ★ ★ ★

Distributed Logging: Syslog-ng & Splunk - igvita.com

Distributed Logging: Syslog-ng & Splunk - igvita.com

Rating: ★ ★ ★ ★ ★

(0) #

Saturday, October 18, 2008

vCard PHP

vCard PHP

vcard processing in PHP

Rating: ★ ★ ★ ★ ★

(0) #

Thursday, October 16, 2008

Exceptional | Exception tracking and managing for Rails folks and their apps

Exceptional | Exception tracking and managing for Rails folks and their apps

Rating: ★ ★ ★ ★ ★

Tags: , , ,

(0) #

Monday, October 13, 2008

Ignite Realtime: Openfire Server

Ignite Realtime: Openfire Server

Rating: ★ ★ ★ ★ ★

Tags: , ,

(0) #

Thursday, October 2, 2008

Load Testing With Log Replay - igvita.com

Load Testing With Log Replay - igvita.com

Rating: ★ ★ ★ ★ ★

(0) #

Thursday, September 25, 2008

Automatic Rails at Slicehost

Automatic Rails at Slicehost

The Ruby on Rails blog for Rails application performance and monitoring. Rails tutorials, troubleshooting tips, error fixes, podcasts, examples and other Rails development resources.

Rating: ★ ★ ★ ★ ★

(0) #

Wednesday, September 24, 2008

Dan Manges's Blog - Rails: Performance Tuning Workflow

Dan Manges's Blog - Rails: Performance Tuning Workflow

Pretty amazing workflow

Rating: ★ ★ ★ ★ ★

Tags: , ,

memagent - Google Code

memagent - Google Code

Memagent is pretty cool! I was thinking about writing something like this but more like a memcached-http connector thingy.

Rating: ★ ★ ★ ★ ★

Tags: , , , ,

(0) #

Sunday, September 21, 2008

Amazon.com: King of Bollywood: Shah Rukh Khan and the Seductive World of Indian Cinema: Anupama Chopra: Books

Amazon.com: King of Bollywood: Shah Rukh Khan and the Seductive World of Indian Cinema: Anupama Chopra: Books

Amazon.com: King of Bollywood: Shah Rukh Khan and the Seductive World of Indian Cinema: Anupama Chopra: Books

Rating: ★ ★ ★ ★ ★

Tags: ,

(0) #

Friday, September 19, 2008

The Pragmatic Bookshelf | Cocoa Programming

The Pragmatic Bookshelf | Cocoa Programming

Cocoa Programming: A Quick-Start Guide for Developers, , by Daniel H Steinberg, 978-1-9343563-0-2, Mar 2009

Rating: ★ ★ ★ ★ ★

Tags: , ,

Panda - Open source video platform

Panda - Open source video platform

Panda could make web server streaming easy. No support for 3gp hmm.

Rating: ★ ★ ★ ★ ★

Tags: , , , ,

(0) #

Wednesday, September 17, 2008

Cmockery

Cmockery

Unit testing for C! :)

Rating: ★ ★ ★ ★ ★

(0) #

Friday, September 12, 2008

Simple Easy Parallel Processing in PHP | PHP Everywhere

Simple Easy Parallel Processing in PHP | PHP Everywhere

Useful for FA

Rating: ★ ★ ★ ★ ★

(0) #

Thursday, September 11, 2008

Anybody who's having problems with a Nokia 6300, try a firmware upgrade!

(0) #

y

y

30128

Rating: ★ ★ ★ ★ ★

(0) #

Wednesday, September 10, 2008

caffeine-php - Google Code

caffeine-php - Google Code

Rating: ★ ★ ★ ★ ★

Tags: ,

Bort - A Base Rails Application | Ruby on Rails

Bort - A Base Rails Application | Ruby on Rails

An Introduction When I set up a new rails app, I generally do the same things every time. Set up a config file, install RESTful authentication, add password

Rating: ★ ★ ★ ★ ★

Digg - Throw out the Kindle, Plastic Logic has something better

Digg - Throw out the Kindle, Plastic Logic has something better

Get ready to finally chuck all those newspapers and books that you’ve been carrying because Plastic Logic has introduced a full-page sized ebook reader that doesn’t suck.

Rating: ★ ★ ★ ★ ★

PURE Unobtrusive Rendering Engine for HTML

PURE Unobtrusive Rendering Engine for HTML

PURE is an Open Source and Unobtrusive JavaScript Template Engine for HTML

Rating: ★ ★ ★ ★ ★

Web Application on Erlang: So Far, So Good, … | BeeBuzz

Web Application on Erlang: So Far, So Good, … | BeeBuzz

We are building our web application BeeLit (SaaS) on Erlang and so far, the adventure runs smoothly.

Rating: ★ ★ ★ ★ ★

Tags: , ,

(0) #

Tuesday, September 9, 2008

Ubuntu and Debian AMIs for Amazon EC2 - Alestic.com

Ubuntu and Debian AMIs for Amazon EC2 - Alestic.com

Rating: ★ ★ ★ ★ ★

Tags: , , , ,

Cocoamug Software / CosmoPod

Cocoamug Software / CosmoPod

Rating: ★ ★ ★ ★ ★

Tags: , , , , ,

caffeine-php - Google Code

caffeine-php - Google Code

Rating: ★ ★ ★ ★ ★

Tags: ,

(0) #

Tuesday, July 29, 2008

(0) #

Friday, July 25, 2008

(0) #

Thursday, July 24, 2008

(0) #

Saturday, July 19, 2008

Had to make an Nginx startup script for CentOS today. It's here, adapted from other scripts found on the net. Move it to /etc/init.d/, chmod +x, and /sbin/chkconfig --add nginx

(0) #

Sunday, July 13, 2008

(0) #

Friday, June 27, 2008

(0) #

Thursday, June 26, 2008

(0) #

Wednesday, June 25, 2008

(0) #