March 29th, 2010
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.
Tags: rails, ruby, rubyconfindia
Posted in Programming, Web Development | No Comments »
February 22nd, 2010
Recently while working on a client project, we had a requirement to enhance the existing fraud detection techniques already in place on the application. That is when, I came across Maxmind’s minFraud service which is basically a service for online fraud detection along with their already famous GeoIP service.
Merchants can use the minFraud service to speed up manual order verification, automate order process by using our risk scores, or develop their own customized scoring system with the information that we provide.
minFraud is a centrally hosted service where all business solutions networked with it connect to it, and the feedback and results received is apparently shared within the network. It uses Maxmind’s GeoIP service to find the user’s location through IP, and hence it helps in a great way to detect fraud. The best part is that it has a simple API where you send the customer’s details (only the non-confidential part) and you receive back a ‘risk score’ which is based out of 100. This risk score depends on various factors how minFraud detects the transaction as fraudulent. You could work up on a strategy so that if the risk score goes up a threshold, the transaction could be put on hold and manually verified.
Trying to find more about minFraud, I luckily came across this ruby gem called maxmind which was exactly what I needed. Only little problem was that it was written to work with HTTParty. HTTParty while being a good alternative over Net::HTTP, I wanted something simpler and similar to what we already have in the existing project. Thanks to Github, forking and making changes to the existing gem was a breeze. I also added a attributes method so if you need all the attributes of the response object for convenience.
So, if you are looking to enhance fraud detection on the transactions on your ruby app, checkout minFraud, and have a look at the original gem if you like to Httparty, or if you need a simple solution with NetHttp, have a look at my forked gem.
To install
gem install hackedunit-maxmind --source=http://rubygems.org
Rubygems URL
Ta.
Tags: maxmind, minfraud, ruby
Posted in Web Development | No Comments »
January 23rd, 2010
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)
Tags: mysql, ruby, serialize
Posted in Programming, Web Development | No Comments »
November 1st, 2009
I’m finding it a bit difficult to memorize the correct procedure to create a new remote branch in git and start tracking it locally. This is a basic shell script that does it so that you don’t have to go through the procedure every time you want to create a new git branch.
Script
#!/bin/sh
# git-create-branch <branch_name>
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
exit 127
fi
branch_name=$1
git push origin master:refs/heads/$branch_name
echo "git push origin master:refs/heads/$branch_name"
git fetch origin
git checkout --track -b $branch_name origin/$branch_name
git pull
Installation
Put this somewhere on your system and make it executable and create a symbolic link. I have it like this on my mac.
sudo ln -s /Users/Tinu/.bash_scripts/git-create-branch.sh /usr/local/bin/git-create-branch
Usage
As said in the script itself, use the script by git-create-branch <branch_name> inside a git repo in your system. Oh, you may want to create a bash alias too if you are that lazy like me.
Tags: bash, git
Posted in Quick Tips, Web Development | 2 Comments »
July 7th, 2009
Tags: iphone, safari
Posted in Web Development | No Comments »