Archive for the ‘Programming’ Category

  1. Tr.im is dead but Twitnews is still alive

    As you may have probably known that Tr.im, the URL shortener that I have been using with Twitnews – an applescript that helps to share news items from NetNewsWire to Twitter has been shut down. It is too bad that they had to take this decision for reasons I don’t understand. Anyways, if you are wondering whats next, don’t worry, there is this script by @sean808080 who has improved it to work with Bit.ly URL shortener, which is by far the de-facto standard for URL shortening on Twitter. So, you should probably use it and abandon the original script.

    I look forward to use Sean’s changes on the next updates to the script.


  2. Nifty Gem: Awesome Print

    Just discovered this pretty nifty gem that works very much like pretty_print but is awsomer. It works right out of the box as a gem in your rails console and is very handy while checking on objects.

    Here is what it simply does:

    $ ruby script/console
    Loading development environment (Rails 2.3.4)
    >> require 'ap'
    => []
    >> ap User.first
    #<user:0x10498f648> {
    :id         => 1,
    :first_name => "Tinu",
    :last_name  => "Cleatus",
    :address    => "123 ABC Rd",
    :city       => "Cochin",
    :state      => "Kerala",
    :zip_code   => "123456",
    :country    => "India"
    }
    => nil

    Basically pretty prints the object in a very clean way with pretty colors (in the Terminal).

    Moreover, it supports a lot of other custom options. Head over to the GitHub page for more info.


  3. RubyConf India 2010 Experience

    rubyconf-logo.png

    The first ever Ruby conference in India happened last weekend in Bangalore and I’m glad to have attended it. It would have been a big loss if I had not. There were a few good speakers who gave some very interesting talks and I think the whole crowd was amusing too. Every time a session ended, there were many sensible discussions that happened between the audience and the speaker. Me and my friends reached Bangalore early morning on the day of the conf and we reached very late, apparently we missed the first talk by Ola Bini. So, my day one of the conference started with Obie’s “Blood, Sweat and Rails 2010″ session. It was quite knowledgeable how Hashrocket as a company works. Some pretty good tips there on entrepreneurship and how better startups can work using the right tools.

    Next notable session was Rails vs. Django by Shreyank Gupta, pretty interesting stuff he discussed there on what and how different Django is from Rails. I’ve been eager to know about Django since I started on Rails and this quite gave me a hint. Interestingly, the final word from Shreyank was “Rails is better”. *happy me* *crowd applauses*

    We then hurried to the next hall where Matz was about to start his video conf call. As opposed to my expectations, this session turned out to be very fun and amusing. Matz spoke about the future of Ruby mainly and he also announced that Ruby 1.9.2 will be released in August and the community will start working on 2.0 after that.

    Another interesting session was about the Rhodes mobile app development framework. This was something I was looking forward to. The talk was interesting but I was disappointed that using this framework does not really produce a really “native” iPhone app. It is more like a web app that works locally on the phone and uses sqlite to store data locally. We could then use libraries like jQTouch to make it feel native. I’m yet to give this a real try though.

    Overall, RubyConf was a great success, enjoyed every minute and was great pleasure meeting a few great Rubyists and some fellow developers. I think there were a lot of developers who mostly did not work with Rails but worked with Ruby in some way, which is amazing. I see great future for Ruby in India, and look forward to more similar conferences in and around.

    Here’s what people still talk about the conf.


  4. When should you store serialized objects in the database?

    A while back Friendfeed posted a blog post explaining how they changed from storing data in MySQL columns to serializing data and just storing it inside TEXT/BLOB columns. It seems that since then, the technique has gotten more popular with Ruby gems now around to do this for you automatically.

    So when is it a good idea to use this technique?

    If the application really is schema-less and has a lot of optional parameters that do not appear in every record, serializing the …

    Continue reading at MySQL Performance Blog.

    (Via The Ruby Reflector)


  5. Tumblr Dropzone

    Screen shot 2010-01-17 at 2.27.04 PM.png

    If anyone of you is using Dropzone app, I’ve made a small script to post images to the fun blogging platform – Tumblr. If you haven’t used Dropzone, it is a very useful mac app that lets you easily drag and drop files to perform customizable actions on them. For example, to upload the file to remote destinations, like your own FTP servers, Flickr, Posterous, Twitpic to name a few. But it is not just limited to file uploads, other uses include zipping and emailing the files you drop on it, install mac apps easily, share code on Github Gist or Pastie etc. Smoking Apples has a good review on the app.

    I mainly use it to quickly share screenshots I take while on work, and also to quickly share a file with someone else on my FTP server.

    The very good point with Dropzone is that the developers have made it very easy to extend the app with its API. If you are fine doing away with Ruby, then you can build your own destination scripts. I’ve just tried my hand on it, with a simple script that uploads the dropped image to Tumblr. I tried both the Net::HTTP method and also using Curl. However, using Curl seems to be quite faster.

    The code is at my fork of Aptonic’s user contributed scripts at Github.

    I believe that this app has got great potential and hope to see more extended scripts in the future and also will try creating my own if I get the time.