Archive for the ‘It calls for a blog…’ Category

Proto.in July 08 Edition

July 21st, 2008

The atmosphere was electrifying at Proto4 - and the talks were doing everything to make the conference even more interesting!

The presenting startups didn’t got much time to attend the conference talks - we were quickly rushed for the rehersals which were to prepare us for the upcoming showcase on 2nd day of the event. Helping us all along was the great team of Proto - which made sure that we had everything we needed to be ready for those 6 minutes of showcase - a big thanks to the Proto Team.

A quick presentation from ApnaBill kicked off the rehearsals - we fumbled alot, were mixed up alot - and the feedback was all worth it. Just a quick work of advice - never go to a presentation unprepared. ANY preparation is better than NO preparation ;)

After the day of reharsals, we mutually decided that Sameer would head our pack onstage. He did a nice job with the presentation and I guess our point got communicated across to the audience pretty well.


ApnaBill.com Presentation


Sameer presenting ApnaBill.com to a hall packed of audience


ApnaBill.com team (Sameer in front (second from start), Me and Sandy)

Before the day ended, each startup demo’d their products on the stalls. Checking out the stalls were potential users and investors alike.


Me posing with ApnaBill.com (ghosh! that right click…)

Here are some goodblog articles which described the event pretty well.
Rishabh from Mutiny.in - Proto.in goes North
Amit Ranjan from Webyantra - Proto IV at New Delhi: Impressive show for startups, entrepreneurship & technology
Slideshare - A list of startups showcasing at Proto4, Proto4 pictures
AlooTechie - Proto 4- A Winner’s Showcase

* More pictures and videos to follow…
**Pictures courtesy Amit from Slideshare.

Posted in ApnaBill, It calls for a blog..., Proto.in, Startups, Web 2.0 | Comments (5)

Static call graphs for Ruby code

May 27th, 2008

Ever since my bug list for ApnaBill.com started to go down, I was worried that what am I going to do in all the free time which will suddenly be created. So much so, I was even creating unnecessary tasks and them scratching them out upon realizing that they are just not needed - sure shot symptoms of working too lately!

While working on ApnaBill, I felt a huge urge to document my code - specially the libraries I wrote and some of the complex controllers. Surely enough the code is very well documented - infact, at times makes pun and even tells stories - but I was always missing a call graph generation tool, which when given my Rails project, can graph out all the calls each of the actions make. I am not talking about profile time graphs - but something pretty static, which just looks at your ruby code and draws a graph.

…And just why is it needed? Documentation - ofcourse! A colored and connected graph, which can take you directly to the source code is alot easier to digest than just the code - specially for those who have not written that piece of code. This can be real useful in many scenarios.

Ok, so I started my search two days ago, on Saturday night - and for all night, I was crawling web pages like a googlebot - trying to find the relevant pieces of information. I did came across some fantastic projects like RailRoad, RCov and ruby-prof - but there was nothing that could satisfy my need. I even tried Doxygen (which is still to support Ruby), rdoc and almost all the other doc tools mentioned at “Other tools” seciton on Doxygen’s website.

Continuing my {re}search, I came across ParseTree. Its a C extension which churns out Sexp representation of Ruby code. You can parse ruby code in classes or methods or strings format. The library (apart from other stuff) - basically gives you a callback like access to various parts of the Ruby language. So “process_defn” would be invoked when any “def my_method()” is encountered.

There isn’t much on the internet about how to use ParseTree but the code samples and RDoc included in the gem are a good start. And then there’s the code installed by the gem - which you can always read at leisure. Another document worth checking out is Ryan’s Dependency Analyzer - where he does a bit of explaining as well.

Okay, back to the problem in hand - How can I draw a call graph of my code without actually executing it. I don’t want to execute it because it cannot guarantee 100% path coverage. Further, my objective is to document the code rather than profile it.

After my initial attempts, I was finally able to create a hierarchical structure of the code (which is utterly basic as of now).

  1.  
  2. # Target code which is to be graphed
  3. # Save as "mini.rb" in your current directory
  4. module Junk
  5.  
  6.   class Maku
  7.  
  8.     def say_hello(str)
  9.       puts "hello #{str}"
  10.       a = 1+1
  11.       if a == 2
  12.         if a == 1
  13.           puts "Yahoo"
  14.           if a == 10
  15.             puts "Microsoft"
  16.           else
  17.             puts "Google"
  18.           end
  19.         end
  20.         pp a
  21.       else
  22.         puts "bye"
  23.       end
  24.     end
  25.   end
  26.  
  27. end

Introducing RAKA

  1.  
  2. #!/usr/bin/env ruby
  3. # RAKA - A Ruby Kode Analyzer
  4. # Save in same directory as mini.rb
  5.  
  6. require "pp"
  7. require ‘rubygems’
  8. require ‘parse_tree’
  9. require ’sexp_processor’
  10.  
  11. class Raka < SexpProcessor
  12.  
  13.   attr_accessor :tabber
  14.  
  15.   def initialize
  16.     super
  17.     @tabber = 0
  18.     self.strict = false
  19.     self.auto_shift_type = true
  20.   end
  21.  
  22.   # Just a wrapper for s method.
  23.   # Usefull in decrementing tabbing structure once processing is done.
  24.   def s(*args)
  25.     result = super(*args)
  26.     @tabber -= 1
  27.     return result
  28.   end
  29.  
  30.   def process_fcall(exp)
  31.     @tabber += 1
  32.     name = exp.shift
  33.     display "CALL #{name}"
  34.     return s(:fcall, exp.shift)
  35.   end
  36.  
  37.   def process_if(exp)
  38.     @tabber += 1
  39.     display "IF"
  40.     test = exp.shift
  41.     process(test)
  42.     left = exp.shift
  43.     process(left)
  44.     display "ELSE"
  45.     right = exp.shift
  46.     process(right)
  47.     display "END"
  48.     return s(:if, test, left, right)
  49.   end
  50.  
  51.   def process_defn(exp)
  52.     @tabber += 1
  53.     name = exp.shift
  54.     display "DEF #{name}"
  55.     args = process exp.shift
  56.     body = process exp.shift
  57.     display "END"
  58.     return s(:defn, name, args, body)
  59.   end
  60.  
  61.   private
  62.  
  63.   def display(str)
  64.     @tabber.times{ print "\t" }
  65.     puts "#{str}"
  66.   end
  67.  
  68. end
  69.  
  70. require "mini"
  71. puts "============Junk::Maku============"
  72. Raka.new.process(*ParseTree.new.parse_tree(Junk::Maku))

The result

call graph for mini.rb

Woha! As you can see, I am able to relate the code structure with the calls and if statements. If I can output this into a format which Graphviz can understand, we’ll have exactly what we want!

Too bad, its almost 6am - and I have to catch up on some sleep :( I’ll have to stop here - more on the project as things with RAKA proceed.

Comments and suggestions are more than welcome :)

Posted in It calls for a blog..., Ruby | Comments (2)

Running IE6 on Linux

October 17th, 2007

I had to run an IE only app in office today but didnt wanted to boot into Windows!
Two reasons for that

  1. I hate Windows
  2. I have forgotten my login password from past 3 weeks :D :D

Ask google on what can be done for the situation & it’ll redirect you to a script called ies4linux. This is one helluva job! It downloads all the required components and installs them too. Only prerequisites to run it are cabextract and wine. Check out this nice tutorial. IE6 was up and running on my Ubuntu box in less than 2 minutes (I am sitting on a fat pipe :D )

MTNL’s customer care website is known for its ugliness… this is how it rendered on my FF 2.0.0.6 and the IE6 running on Ubuntu Gutsy Gibbon RC


Firefox 2.0.0.6


IE6 on Ubuntu

Wine has considerably improved over the time. Just last weekend I was trying to install the UT3 Demo Win32 version on my Ubuntu box (after successfully installing DirectX 9) but couldn’t go through as I ran out of disk space. I am all praise for Wine atm!

Posted in It calls for a blog... | Comments (0)

Whats up with GPRS speeds in Delhi?

June 24th, 2007

No, I am not connected to any Wifi access point - its a plain old GPRS connection from Idea Cellular!!!

I took this screenshot a few days ago when I managed to stream a full 12 MB video off the GPRS connection! The speeds I was getting were mind boggling - averaging 15K per second, touching even 20K!!!

Is Idea Cellular in Delhi poviding EDGE services? I’m curious because I get pathetic 1-3KBps speeds in Pune :(

Good, I have a flat rental plan - downloads can be unlimited for me :D

Posted in It calls for a blog... | Comments (1)

Page 3! Yay!

May 15th, 2007

Being on the day’s Page 3 brings a different feeling all together! :D

Check out the Reader’s Speak coloumn!

Direct link to access the Epaper & this is what I had said - I had thought that everyone would have a same thinking - but oddly enough, the others had a different opinion to sound. Hmm!

Posted in Blog, It calls for a blog... | Comments (6)

First signs of E61i in India

May 10th, 2007

I’ve been searching like mad - all across the Mobile showrooms in Pune for any signs of E61i - but without any luck.

Until just now, out of nowhere, thought of checking a hit on EBay.in & to my surprise, this dude is selling it for 24k, which seems like a 2k more than what i’ve thought about it.

Maybe i should wait more ;-)

PS: it seems as if shopkeepers here are so blissfully ignorant of whats happening or they are complete duds! Thats not the way businesses are run… thats not even the copy-book style!

Posted in It calls for a blog... | Comments (4)

A true Hero

April 7th, 2007

Just spoke to Gaurav & found out that he’s enterpreneur’d http://www.hostcurry.com with a friend. & truly speaking, I’m really impressed. It takes more than just a business plan to start something like this - courage, time & ability to face an eventuality of heavy losses (personal & financial). I’ve been planning to start something but probably I’m not being able to chanelize my energies in this direction - or maybe my objective is far too cloudy to clearly look at it. Or maybe my prior commitments are too much for me to spend time on thinking about this.

Gaurav & Honey

So my advice to all those students out there - do it when you are not comitted to anyone - when you dont have to loose anything & risking things for a annual turnover is more gainworthy than sitting back & enjoying monthly perks!

So Gaurav, I’m interested to know that how are you going to keep the revenue stream inbound & whats different in your offering that people will come to you - maybe think about it & write something on your blog :)

Posted in It calls for a blog..., Technology | Comments (8)

Managed to beat them all!

February 27th, 2007

10-Jul-2005 - when I had registered MAKUCHAKU.INFO domain (infact it was a sponsored domain), I always dreamt of being on top of google search when “Mayank Jain” was searched. But MAYANKJAIN.{COM,FI} were already taken & since they were a direct hit for the search term, they always occupied a place above my website - & infact many Mayank’s were above me! It was *then*!

But have a look at this *today* - google for “Mayank Jain” & you’ll come across this…


Wow! makuchaku.info is right there - on the top!

& since google has indexed it with the Gnome Foundation post, this must have happened pretty recently - nice! :)

Posted in A strong urge to blog..., It calls for a blog..., Life, Technology | Comments (5)

Now a member of The GNOME Foundation

February 15th, 2007

Dear Mayank Jain,
We are pleased to inform you that you are now part of the GNOME
Foundation Membership. You are now eligible to become a candidate
for election and to vote in the annual Board of Directors elections
held each November…

All the hard work - bugs, patches & keymaps I’ve been contributing to upstream (Gnome majorly) have not gone waste… & I was paid in gold this morning when I got an email from the GNOME Foundation Membership Committee confirming my membership.

Also, part of this credit goes to Red Hat - where everyday, my efforts get streamlined into measureable outputs.

Thanks everyone :)

Posted in A strong urge to blog..., Fedora-i18n, It calls for a blog..., Life @ RedHat | Comments (5)

Expected - E90 announcement at 3GSM World Congress later today

February 12th, 2007

I just saw on Mobile Gazette that Nokia might be announcing the Nokia E90 Communicator later today at the 3GSM World Congress. Wow - it can be a definite successor to my E61.

I have not seen much of E90 (its yet to be announced & Nokia was keeping its release under tight security), but what I saw & read at RingNokia, this little device would be the next hot gizmo I’ll be after! & this time, its even got a 2.0/3.2 MP camera (which incidently I miss dearly in my E61).

RingNokia says…

The E90 Communicator, one of the three devices Nokia is unveiling, is an update to a Nokia line that has achieved a kind of cult status among the geekier business set. It looks like a typical candy-bar- shaped phone, but flips open horizontally to reveal what is essentially a miniature laptop computer.David Petts, senior vice president of sales, marketing and services for Nokia’s enterprise solutions group, said the phone had all of the latest wireless technology, including Wi-Fi and what is currently the fastest form of 3G data networking, HSDPA, or high- speed download packet access. The screen on the new phone is wide enough to view full Web pages without having to scroll to the left and right, he said. The Communicator also has a 3.2 megapixel camera, and a video camera for teleconferencing that faces the user when the phone is flipped open. The device will be available in the third quarter of the year for about €750 to €800, or $975 to $1,040, without a contract, Petts said.

Boy… I just cannot wait to see how it looks like! But the price range might be a bit too high! :(

Posted in It calls for a blog..., Technology | Comments (0)

When a line of text means utter joy!

February 6th, 2007

I just received a response from Sunil Uncle that…

Dear Mayank,
Yes, I have it. Got it yesterday.

My N800 is ready to be delivered from US (Sunil Uncle) to India (you know to whome :P)

Boy o boy! I just cannot wait for anyone to come from US… I wonder when’s Rahul Sundaram is coming back from Fudcon ‘07

…heading straight to mail him!

Posted in A strong urge to blog..., It calls for a blog... | Comments (3)

Downloading VMWare image for Bora…

February 5th, 2007


Download the image

Thanks to Wahlau for the information :)

Posted in It calls for a blog..., Technology | Comments (0)

It couldn’t have been smoother!

January 25th, 2007

If you can guess, I just upgraded to Wordpress 2.1 & the transition couldnt have been smoother!

Wordpress managed to import al the entries & comments & categories & everything else from my Textpattern blog! Oh, btw this showed me that I had managed to make 219 blog entries & had about 712 comments - yay :)

Kudos to the WP developers & specially to the TP->WP transition script developers!

You rock!

Posted in It calls for a blog... | Comments (1)

Aww…

January 25th, 2007

Just saw at Planet Floss - India that what Kartik has done to his blog! This is exactly the thing I was looking for my blog… had my blog not been textpattern based, I would have installed the same theme RIGHT NOW!!!

I know, this would bring down the readership of my blog down to its knees… but I can live with that!

Nice find Kartik :)

Posted in A strong urge to blog..., It calls for a blog... | Comments (2)

Drupalizing makuchaku.info

January 13th, 2007

Static pages are passe… Besides my blog, almost everything here is static. Hence, I’m giving adding Drupal a serious thought - just waiting for version 5 to be released. I’ve had some prior experiences with drupal, all of which were very charming.

Just one catch - Should I be moving my blog to Drupal or let Textpattern handle it? If I decide to make a move, I need to write a script which will feed the new Drupal blog my blog entries from Textpattern. In no case - whatsoever, I’m loosing these blogs!

Lets see, what & when I decide for this shift…

For now… just drifting across the internet :)

Posted in A strong urge to blog..., It calls for a blog... | Comments (3)