Dec 312009


A customary post on my blog, I make it a point to jot down the crazy stuff I did over the year that was…  Nothing huge, but yes, its a pointer to remind myself of how bad I still am and how “badd-er” (I know thats not a word! :-P ) I can get!

The post is also a very cheeky means to get one more post up on my blog… and make up for the lack of writing more and to please myself that I can write. You guys can definitely identify with the IT-manager-performance-biscuit part right??? ;-)

So here goes, a quick round up of the worth mention stuff from 2009:

  1. New years eve was awesome… Had a wonderful evening at @reinventin_self‘ s place. Played darts, bored holes through his wall :-)
  2. Gifted dad a shirt on his birthday… Usually, mom does the honours, this time around, it was me! Glad he liked it!
  3. Got finally assigned on a project at Nokia.  Dream come true for a die hard nokia fan!  This has perhaps been the biggest highlight of the year.  Got to see the whole OS as it functions… Have been working there as a build and process engineer ever since…  Lovely life, got to learn some amazing things… phenomenally awesome team to work with everyday… lovely life overall…  This one point goes out to all those guys who I work with and have made my job something I just love! Thanx machan’s!
  4. Got punctual… Personal best so far this year! I’m in office at 8.30 in the morning. DOT. Learnt to prioritize things and work smarter!  I think this was in the list a couple of years back!  Glad to mention I’m doing a good job at it now…
  5. Was part of the team that put together BCB8 at Yahoo! campus in bangalore.  Awesome fun! Loads of stuff learnt… Worked with GOD level guys while putting together the BCB8 website… Interesting ride overall!
  6. Moved into my own haunt at JP Nagar… Most of you guys know this already, we’ve had a couple of #technights here so far…
  7. Got my own domain!  If you hit the website at http://thecruisemaniac.com, you’ve been redirected here to http://cruisemaniac.com. The new place where I hang out. Freaky shot at it, but hey, I AM CRUISEMANIAC! B-). Do read the interesting story behind the domain purchase…
  8. Went on a nice long trip to Chikmaglur and got a sneakpeek behind how CCD works… credits to Swaroop!
  9. Got myself a new LCD monitor! 22″ samsung glory on my computer table B-)
  10. As you are reading this point, I’m at Goa enjoying the beaches and the new year :-P After a hectic one year of a lot of work, this is intense respite!

Well, there does it! A nice, action-filled year has come to an end…  Quite a few ups and hence, the downs for the year have not been mentioned explicitly!

So… Here’s wishing you a wonderful year in 2010!  Have fun! And give it all you got!

Posted by Cruisemaniac
Nov 062009

As developers, we tend to keep writing a particular piece of code time and again… Not because, we want to, but because we have to… Called boilerplate code, this chunk is unavoidable, repetitive and kinda grows on you over time!

I was recently coding up a web app using PHP and MySql and, I set out to find a wrapper class that provides good and fast CRUD functionality for MySql.



What I found, I ought to share! This post is tribute to an amazing PHP, MySql wrapper class that I have come to use and love over sometime now. The code is by a developer on a website called ricocheting.  The php mysql wrapper code can be downloaded from here.

I really appreciate that the code is fully documented in terms of functionality provided and also has strict type checking (strip slashes, escaping data, et. al.) and error reporting on sql queries. A nice addon to the script is that it allows to force open multiple database connections to the same database from the same source.

I am not going to take time into rewriting all that wonderful help documentation the developer has produced on his website. So, go ahead and check it out there.

The code has been released under the GPL license so, all you code-monks are free to tweak and boost it! Do let me know if someone comes up with a similar / updated / more functional code-chunk for this purpose.

Chao…

Posted by Cruisemaniac
Oct 062009

A lot of us have blogs, websites and web applications. A good number of us use private hosting providers like bluehost / dreamhost / mediatemple as opposed to hosted services such as wordpress / blogger / gmail, etc.

When you’re with a private hosting provider migrating between providers is a common scenario that occurs on reasons of cost, reliability, performance, demand and so on…  Moving files across these providers is a breeze… FTP from one place to another…

The question that arises is, how do you move that huge mysql database??? I’ll walk you through two regular techniques that are generally used to move databases… And then the third technique that uses the BigDump tool…

All the three techniques require you to take a dump of the mysql database of your application(s) using phpmydmin / mysql CLI. Download the resultant .sql or .sql.gz (Compressed zip file) and keep it ready to move…

1. phpMyAdmin: Everyone knows this… and everyone that uses a private host has used it atleast one time…  Once you’ve created your new database at the new host, open up phpMyAdmin and navigate to the newly created database.  Click on the SQL link and click browse in the window that pops up.  Select the .sql or .sql.gz file and select Import.  The job is done!  The problem with this technique however is that it is limited by the memory limit imposed on PHP by the server.  Most cases, this is around 7-8MB.

2. mySQL CLI: This is the next advanced method of sql import.  This is from the commandline (SSH) on the server.  It is extremely simple and ready to go if you have shell access to your space on your server. The technique goes like this.  Upload the .gz file via ftp onto your new site and login to your server via SSH using putty or equivalent tools and navigate to the location.

  1. Unzip the .gz file if you’ve used compression.
    you@host~ tar -xvf database.sql.gz
  2. Dump the sql into your preselected database like so:
    you@host~ mysql -h mysqlhosturl.com -u yourmysqlusername -p yourmysqlpasswd -p yourdbname < databasedump.sql

3. The BigDump technique: The first technique works, as mentioned, works for very small database backups and restores. The second technique works when you’ve got shell access to your hosting space. The third technique works when your sql file is too large for phpMyAdmin and you do not have Shell access to your hosting space.

BigDump works by what is called staggered import of SQL. It breaks down and batches SQL imports into the database, thus maintaining the memory limits of PHP and also getting the job done via a simple web interface.

Getting it to work is very simple.  The script has only 4 parameters you need to configure: the mysql host, username, password and database name.  Once the info is keyed in, upload the BigDump.php (download) to the folder where your big sql file is. Chances are that its already in a .gz file.

Using your browser, open up www.yourserverpath.com/bigdump.php.  It automatically detects sql and .gz files placed in the current directory.  Just hit start import and you’re good to go…
A screenshot is attached below:
Bigdump

There. That does the post… I felt the need to post about the tool as it helped me out of a very cheeky solution yesterday.  And for the beta the developer calls it to be (Version 0.30 beta), the tool is amzingly stable. And it works like an absolute charm.

The developer website is here.

Till the next post…

Chao…

Posted by Cruisemaniac Tagged with: , , , , ,
Oct 032009

DISCLAIMER: This post is a Shameless self-plug!

On thursday morning, @Gauravonomics posted on twitter saying that he had added my twitter username to the list of must-follow Indian Twitter users and posted a link -http://bit.ly/ktjhS.

@Gauravonomics' tweet

This came as quite a surprise for me. Its the first time I’ve appeared on a list anywhere… let alone a list of “Must Follow Indians” See dad!!! All that twittering works!!! :-D  I’m there in that list, right at the bottom…  But hey, someone out there feels I’m worth the trouble and that matters a lot :-D

One amazing thing this linking has caused me is a huge surge in the number of followers! And the best part being all of them being human :-) I hope I do justice to all you people and keep you entertained!

Anyways, I wrote this post here for stating two reasons:

  1. I’m in no way a celebrity!!! And by no means a big shot… There are a hundred other big shots in that list and I’m virtually a nobody!
  2. And, I love you guys for having chatted up with me all this while on twitter… and more so now-a-days on facebook and posterous also!

Do check the link posted in the first para.  There are a huge bunch of really amazing and wonderful people that are worth catching up with!!!

And, You guys are the real celebrities!!! And Twitter Rocks!!! :-D And oh! I’m @cruismaniac on twitter.

Chao…

Posted by Cruisemaniac Tagged with: , , ,
Sep 302009

I was out yesterday to meet a couple of friends and as is customary, we were clicking photos with our cameras AND not to forget mention, our mobiles.  At this point, my friend Hrish (@dhempe, for all those who would not identify with the name ;-) ) raised an interesting point!

Thus spake Dhempe and here I quote:

Many of us have cameras on our phones, and we click photos! But, its a very messy job to put them in a place where others can see it and also to share with friends. The mobile phone is a blackhole for its own content!

And that statement is filled with such profound truth!

Many of us, or if I may, a whole LOT of us have phones that are quite capable of generating content (Images, videos, voice recordings, etc) and we definitely do generate enough content to fill storehouses with our happy / romantic / funny / cheesey/ whatever memories for lifetimes together. Heck, this is what the mobile phone revolution is coming around to do…

For us geeks, connectivity, socializing and sharing is as basic and habitual an act as is having food.  We feel the necessity to share and connect and as a result, find and utilize services to enable this! Photos go on twitpic / flickr, Videos go on Qik / youtube, Shouts / screams go on blogs / facebook / twitter… we have no end to destinations!

But, a lot of content does not make it online / publicly (atleast within friends) available.  Infact, most of this content doesnt even make it outside of the mobile devices!  And, mind you, the memory on the mobile is limited.  And the main use of this memory, again mind you, is Ringtones and MP3 music!  The photos and videos captured thus take a backseat and much of this content is to true sadness, deleted to make way for more MP3 and ringtones! And hence the reference to a black hole in the title of my post!

  • In reasoning as to why people don’t share their photos or videos, the first answer that pops up is: “They dont have a computer!” And this is a very valid point across the lengtrh and breadth of this nation.  Access to a computer is not everyone’s daily possibility.  But with cost of mobiles going down, they do have access to multimedia devices!
  • Another reason, a lot of people do not have GPRS active on their devices. Reason, it doesnt make sense…  No, GPRS doesnt yet make sense for a guy working as a driver.  A mobile phone with a camera does. Why? 1. He can afford it. 2. He can flaunt it! Simple!
  • The third reason I can think of is the software problems that is associated with sharing content.  Getting your Nokia phone (Cited Nokia because its the most common / prevalent brand in INDIA) connected to the PC with PC suite isnt really an easy job.  Sometimes, you need to make use of imaginary numbers like eleventeen and the likes!!!  For the blindfolded usability and seamlessness nokia gives its phones, the software it bundles with it is not quite the works!!!
  • The fourth and final reason I can think of: There is only so much of sharing you can do via bluetooth with your friends and there’s only so much of showing it to friends that you can do…. Believe me, give it a try, you’ll know!

So, four reasons why content doesnt get out of the mobile!

What if a user could as and when he / she could and wanted, move and materialize the media he / she created to make place for more memories to be stored? This, my friends, is a very interesting challenge and hence an interesting prospect for a service!

We are over 400 million mobile users in India alone.  I am really in a fix in figuring out a solution to get this content out of their mobiles and shared across with their friends and with the world!

The way out:

  • One solution I can think of is the Kiosk model.  A shop / vending machine where people could go and get their photos printed / and mailed for cheap using Bluetooth to transfer their content. Or better, transfer the photo, punch in the address where it needs to be delivered and presto, the photo + address travels via IP to the centre closest to the destination and gets printed and posted from there! :-)
  • Another amazing service I can think of with the kiosk model is one where the videos captured using the mobile can be transferred to CD’s. Come to talk of it, a CD costs you 8 Rs.

These are two solutions off the top of my mind…

The whole idea that I’m trying to propagate here is to take the complexity of the software / sharing service bit of the scenario away from the hands of the user.  This effectively reduces complexity for the layman with the multimedia mobile :-) and effectively encourages him to share the content he / she creates on the mobile with friends and hence further encourage him to generate more content and so on and so forth!

I’d really love to hear more from you all on how the black hole scenario can be averted! Sharing services are many and aplenty!

The success of a service is, in our Indian scenario, not just in holding existing users to itself, but in getting those new users from outside the regular spectrum to come in, take a look, get enthusiastic and get enabled!

Would love to have comments and discussions on this topic!

Chao!

Posted by Cruisemaniac Tagged with: , , , , ,
Get Adobe Flash playerPlugin by wpburn.com wordpress themes