grok grack
β on: 19 Jan 2012
Recently I was trying to host git repository from an already existing(non-bare) repository. I
was looking for a solution that does not force me to create a bare repository and does not
require me to install apache or some such webserver on my machine.
I found a wonderful tool written by Scott Chacon called grack. grack is a git server on top of rack. Its elegance is in its design. It consists of few hundred lines of a rack middleware(awesome!) and a 6-8 line config file that allows you to host any repository over http. Setting it up on a local
machine was really easy. Even hosting multiple repositories is trivial.
I discovered one quirk when my server was not accessible, was due to binding it specifically to 127.0.0.1.
Avoid this and bind to the hostname instead.
Many thanks to Scott Chacon, Github, Rack and Ruby for keeping it so simple.
Tags : ruby, rack, git, unix, github, chacon
Simple Dashboard with Tab Slideshow
β on: 07 Dec 2011
I had almost forgotten about Tab Slideshow for Firefox but an appropriate application of it jogged my memory. We wanted to show a few build reports on the dashboard and also wanted them to be big and visible. Also the reports do not change as rapidly as the build and can afford to be little delayed(since mostly we are showing long running build results). So we just opened up those reports in a tab each and started ‘Tab Slideshow’. Worked like a charm. We now have the simplest dashboard.
Note: Tab Slideshow for Chrome does not seem to refresh the tabs where as the Firefox version does what is expected.
Tags : dashboard, firefox, chrome, agile, big visible, feedback
Airport Express as Remote Speakers for Airplay - Also with Linux
β on: 30 Sep 2011
I have an airport express that I used to use as my wireless router when I travel. Very convenient and useful when hotels do not provide a wireless.(Yes I am looking at you Marriott.) Airport Express thanks to apple technology also supports airplay to play music over the air, and/or printer sharing via a USB connection.
I was hoping to connect my desktop and my laptop to my music system which is located in another room than these machines. Apparently airport express can connect with your existing wireless router as a client(yes they have thought of everything) allowing you to do exactly that.
Here is a list of quirks you need to remember when you try to set it up as a wireless client.
- Prerequisites – Note down the channel number your current wireless router is transmitting on – anywhere between 1-11. (numbers higher than 11 are not supported in the US.)
- Plug in the airport express and connect it to your mac using the ethernet cable.
- Start airport utility – which will try to detect any airport devices but will not find any.
- Hard reset by pressing the reset button with a paper clip for atleast 10 seconds. The light blinks rapidly when you are holding the pin and then in 30 seconds becomes steady – this means that airport express is restarting.
- Now rescan on the airport utility – it should find one device with name ‘Base station xxxxxx’ – with last 6 digits from the mac address. It should have a yellow icon next to it – indicating that it has not connected to the internet.
- Perform a Manual Setup – DO NOT hit continue.
- Change the channel number that is automatically set on the airport express to the one from your wireless router.
- In ‘Wireless’ connect the airport express as a client – select ‘Join an existing wireless network’ – select appropriate SSID of the wireless router.
- Browse through other tabs if you are interested in the details – else click ‘Update’.
- The airport express should restart and reappear on the Airport Utility. This usually takes over a minute. When it reappears it should appear with the new name you chose and with a green light next to it – indicating it was able to connect to your wireless router.
- If everything was successful and airport express liked the ‘Enable for Airplay’ selection you made – you will see a red light in the stereo socket light up. Connect your speakers to airport express and you should be able to airplay your music using iTunes.
Notes:
- You may encounter “AirPort Utility was unable to find your AirPort wireless device after restarting.” One of the reasons for this is that Airport express cannot connect to your router with WPA2 or any other security.(Look at Airport Express Amber Light for more details.)
- To ensure security I disabled ‘SSID broadcast’ and enabled MAC filtering on my router. I added the MAC addresses of my Airport Express(Airport Admin Utility will show those addresses when it detects Airport Express.)
To allow your linux machine to connect and airplay to the airport express you need install pulseaudio’s drivers and support for remote audio protocol by running airtunes with Linux
1 sudo apt-get install pulseaudio-module-raop paprefs
2
3 # (I am not making this up- The protocol is Remote Audio Output Protocol - raop)
Setup pulseaudio to enable remote speakers as described in PulseAudio settings.
Once it is installed you may need to restart your Linux machine. On restarting you should see your newly available remote speakers in your Sound Preferences. Now you should be able to stream from your Linux machine too.
And you are done.
Enjoy remote streaming.
Tags : osx, linux, ubuntu, itunes, airport, express, pulseaudio, remote, streaming, airplay
Why I use Firefox over Chrome?
β on: 18 Dec 2010
For development I choose to use tools which make the code transparent. Hence I prefer to use simple text editors over IDEs(although I like IntelliJ for Java code), or browsers that have good builtin support for debugging over closed/magical ones(hence Firefox/Chrome/Safari over IE).
Recently I switched to Chrome as my primary browser since it promised to have all the add-ons to make it comparable to Firefox. On the contrary, in fact it still lacks the power and the flexibility of Firefox for development. Here are a few reasons why Firefox is still better at supporting development:
- greasemonkey for Firefox works with XMLHTTPRequests for different origin – greasemetal (now userscripts) for Google Chrome has still not been able to fix this issue.
“GM_xmlhttpRequest is same-origin only.” – User Scripts .
- A number of add-ons on Firefox show useful information on the status bar – I use DCurrency, CruiseControl Monitor.
- Selenium IDE is available for Firefox – a big plus when I am trying to record and play while I am trying to debug some apps.
- In the minimal view my frequently used bookmarks always show in Firefox -Google Chrome shows them when I open a new tab only. Maybe a minor annoyance but I cannot reuse the current tab with a single click access to my bookmarks.
- Minor annoyance – when I maximize the window on OSX Google Chrome expands only vertically. Firefox does not have this problem.
- Even with proxy switchers Chrome depends/modifies system proxy settings(diabolical). When using on Windows changing the proxy on IE will affect Chrome and vice-versa.
“Chrome uses system’s proxy settings (IE proxy settings on Wndows) because it
doesn’t have its own proxy settings yet (see http://crbug.com/266).
Therefore, changing Chrome’s proxy settings using Switchy will also affect the
system proxy settings.” – quote from Proxy Switchy! extension.
That means when I use Chrome as a browser with tools like Sahi, it will affect how other things work.
In conclusion, for now Firefox is the best browser for development.
Tags : firefox, mozilla, chrome, addons, firebug, proxy, greasemonkey
Boost your BASH - and never again work with a plain shell
β on: 25 Oct 2010
Over the past few months I have been using a community version of bash_profile, bash_login, emacs settings and such. It started when Muness shared his bash_vcs(which was pimped command prompt) and I was hooked. I noticed a few projects that were sharing similar shell settings and enhancements. Forking from Toby’s dotfiles I started enhancing my experience on every machine I worked. This not only lead me to have a better understanding how different flavours of Unix work and also helped me automate a lot of my day to day activities.
Allow me to introduce the dotfiles project which comes with all those enhancements – stolen and tweaked from many sources – and with valuable help from Patrick Turley .
Recent additions include bash_boost and what could be called the beginnings of a javavm(inspired by rvm for ruby.)
Now with more brainpower behind dotfiles we hope to add more features fast. Next steps include adding support for zsh.
Give it a try, fork it or point us to more stuff we can steal to improve it for you.
Tags : bash, dotfiles, unix, shell, vcs, git, svn
Software KVM that works on linux, OSX and Windows
β on: 12 Sep 2010
I was using Teleport for Mac as my KVM. But I could only control a mac mini and my laptop with it. I was looking for something that would work with Ubuntu and MacOSX switching the keyboard and mouse between them.
I found Synergy Plus that was exactly the software KVM for my purpose. (There is also an older project called Synergy, but Synergy Plus is the latest copy being managed on google code.)
Setting up my Ubuntu machine as the server and my OSX laptop as a client was facilitated by
Configure Synergy in six steps
Use synergy between OSX and linux
One issue I had was using a PC keyboard with OSX. I was not able to map the Super key to be the Command key. Tried various options with keymapping on Ubuntu without much success. Resolutions welcome.
Tags : kvm, osx, linux, windows, software, synergy
Ruby Kaigi 2010 - Report
β on: 12 Sep 2010
Returned from Ruby Kaigi last weekend. The conference was held in Tsukuba International Convention Center and attended much of the enthusiastic ruby community(including Matz, Chad Fowler, Charles Nutter, Yehuda Katz et al). Had a blast presenting ‘Rocking the Enterprise with Ruby’.
Of all the sessions I could attend I liked Matz keynote focusing on the direction of Ruby 2.0. Especially the focus on mix-ins, issues with module mixins and list of ancestors. Class-boxes also looked a very interesting concept. Makes me want to use ruby 2.0 now. Based on the timeline discussed it is on track to be released sometime in 2011. (Ruby 2.0)
I also liked the treatment of metaprogramming handed out by Paolo ‘Nusco’ Perrotta. A delightful presenter who can draw great illustrations as well as explain the issues in ruby programming very well. His message ‘Look at source code from projects to learn what they are doing’. Also, he concluded that what works in Ruby works because of its design(metaprogramming, mixins) may not work in Java/C#. So when you come to ruby you may have to change the way you think.
Very enthusiastic response to lightning talks(in fact entries to lightning talks were closed even before the start of the conference).
Youngest ruby programmer(Shota Fukumori @sora_h) who wants to change ruby internals with his gem ‘few’ and babushka by Ben Hoskings were my favourites.(Lightning Talks)
The conference was organised very well, with an unofficial and official party on Friday and Saturday. Thanks to everyone who worked to make this a success.

(RubyKaigi 2010 Staff (by Naoto Takai))
Tags : speaker, ruby, rubykaigi, rubykaigi 2010, japan, rocking the enterprise
Ruby Kaigi 2010 - Rocking the Enterprise with Ruby
β on: 28 Aug 2010
Uploading the beta version of the presentation for today’s ruby kaigi talk.
Rocking the Enterprise with Ruby(Keynote)
Rocking the Enterprise with Ruby(PowerPoint)
Be virtually there!
Tags : speaker, ruby, rubykaigi, rubykaigi 2010, japan, rocking the enterprise
Streaming Media from Ubuntu to Bravia
β on: 04 Aug 2010
Over this weekend I set out to connect my Ubuntu machine with my Sony Bravia TV.( With inspiration from Sachin Dharmapurikar and DLNA.)
Googling yielded a number of techniques to stream media from linux over the home network. Some that did suit Bravia and some that did not. The easiest one to work with was minidlna server. Snappy install and my Bravia recognised it like any other streaming website. I am running the minidlna server for my music and photos and all the content that is in DVD/mpeg2 format.(How to install on linux)
I do have some videos that came to me as avi and minidlna does not support transcoding. (There are some that describe how to do it with Windows but no out of the box solution with linux yet.) Google for PS3 Media servers I stumbled upon a PS3 Media Server for Linux – which is a java application that streams and transcodes nicely.
To get the video to be non-jittery and avoid ffmpeg/tsmuxer crashing I had to tone the transcoding down to Lowest Quality. Even with that the video is pleasing albeit a bit grainy in some cases. Documentation suggests allocating more memory or CPU might help.
To support all this I also installed a bunch of libraries described by many to help
transcode, mux and display thumbnails.. The instructions are for mediatomb but these libraries work with other dlna servers.
Next stop Getting mediatomb to work on linux and bravia
Tags : bravia, ubuntu, streaming, dlna, ps3, minidlna, mediatomb
Setting up wireless usb card on Ubuntu - Lucid Lynx
β on: 25 Jun 2010
I have faced the same problems with Wireless Networking as mentioned by many on the web.
I tried Hardware Compatibility List for Linux and many links on that list. In an attempt to install custom drivers I would always end up with a network card that would detect wireless but never would communicate over wireless. After going through a number of cards and uninstalling and installing drivers I found one that worked really well without resorting to the ndiswrapper solution(dealing with anything windows just feels unclean). Finally I found a card that worked and also provided native linux drivers.The wireless usb card that worked was – D-Link DWA-125 with Ubuntu Lucid Lynx.It also helped that D-Link in fact published a linux driver for their wireless usb card
Tags : linux, unix, ubuntu, wireless usb, wireless, drivers, dwa-125
ActiveResource is an oxymoron?
β on: 07 Jun 2010
One of the projects I worked on recently consisted of a number of applications interacting with each other over REST. These applications were written with an intention to obtain loose-coupling between them.
While writing more controller actions I noticed something that we were doing repeatedly – anytime one particular model changed in the domain it caused a ripple effect of making us change all the consumers in the application suite. These models were all exposed across applications by using ActiveResource. ActiveResource forced us to change every one of the model/model manifestations in the application.
The main intent of the decoupling effort was to help us change these applications almost independently of each other. These applications were supposed to only depend on the exposed interfaces. What ActiveResource did was forced us to tightly-couple them and a single change caused a ripple effect.
So my question is ‘Is ActiveResource an oxymoron?’ – Especially considering the fact that Active means really simple but strong coupling. Active does apply nicely to a database record and eases development by getting out of the way. But in case of lightly or ideally decoupled applications does the Active make sense? – Probably not. So if you want to expose objects and their behaviours over the wire maybe ActiveResource is not such a good idea.
Tags : ruby, rails, activeresource, misuse, decoupling, REST
Preparing the Training Venue
β on: 15 Mar 2010
The venue and the setting in which the training is conducted forms a very important part of how the training is received. When selecting the venue ensure a few things beforehand:
- Venue is accessible – by suitable means of transportation – by walk would be the optimum
- Venue has ample space – to be rearranged and suited for all kinds of training sessions.[#seating]
- Venue has a high ceiling and is mostly soundproof – this ensures that there is enough air circulation and privacy when the training is in session.
- Consider custom lighting arrangement to be used during facilitation. Most of our sessions did run with full lighting as well as the projector running all the time. Activities during training do need sufficient lighting.
- Venue has the facility to provide for the meals for the day – coffee/breakfast, lunch, high tea – which is why hotels with restaurant service are preferable. This can help cater to trainees with special food requirements.
- Venue has ample electricity outlets to support the training crew as well as the trainees. We did carry some of our own extension cords to ensure availability of power near the trainee tables.
- Venue has decent internet connectivity – Now I have seen and heard about venues that mostly suck at providing decent internet connectivity for anything over 10 users. If that is the case with your venue arrange for some way to get to the internet. Most importantly arrange for some way of sharing the computers over a network – this helps in distributing material, assignments, solutions. We arranged for our own wireless router which allowed to share the internet as well as create a private network. Not to mention we did have plenty of USB keys available for quick transfer of large files.
- Ensure that the venue has a person to be the point of contact when the training is in session. This will help resolve last minute issues/hiccups. Treat this person with respect – when you do this you are sure to get better service.
- Have the venue arrange for a projector on site. Alternatively also carry your own projector in case the projector at the venue dies or you need to project multiple things at the same time.
- Transportation
- Space
- Food and drinks availability
- Electric outlets and Wireless Internet/Shared network
- Projectors
Tags : trainer, speaking, prepare, thoughtworks university, sessions
Preparing to be a trainer
β on: 12 Mar 2010
Preparing to be a trainer is more of a mental activity than physical. To be one you would want to observe one and learn how they do it. I had the opportunity of being trained by a set of great trainers/speakers and also working them to understand how they prepared to be a trainer. Mostly it is about being aware of the responsibility. It takes time to get a feel for the amount of work that goes into being a trainer. To facilitate this we started by studying the course material that was already available(In a sense I was lucky that there was so much refined course material available that I did not need to invest any time in design the course. Designing a course is a major undertaking and can be done only after much experience [#feedback]).
Another thing you must do is actually be a co-trainer/teaching assistant at a training session to get a feel of the mechanics of it all.(What gets overlooked is the fact that managing time/schedule and training content is harder than it appears.) To prepare to be such a person one needs to know the complete training course. To be a developer trainer I went through the exercise of reading all the material and also solving and reasoning all the examples for the course. At times it also helps to have multiple solutions at hand. In collaboration with other trainers and trainees we have managed to have a repository of such sample solutions that we are prepared with to hand out to trainees.
Once you have a grip on the course content you need to plan and replay the plan of how the content will be presented. Pairing on course content tremendously helps. In case of vast curriculum it helps to divide responsibility between the pair to deliver certain topics based on experience, enthusiasm and freshness of the trainer. Making a plan of the day for every half hour slot helps get a feel of timeliness as well as helps focus on delivering the most important message of the session effectively. Rehearsing all this with a pair is greatly useful. We had the opportunity to rehearse this training with the smaller group to time ourselves as well as refine delivery of content. Understanding what messages are to be delivering during the session and what content is to be learnt after class/further exercise helps divide the content and reduce course load.
There is a lot of physical activity involved too. To enhance retention and recollection it may be a good idea to prepare homework/extra work problems. Some students really gain a lot from working on these in their spare time. A trick that also helps retention is ‘rinse and repeat’ – We provided handouts of the most important messages of the session and reviewed sessions at the end and few days later.
Preparing also needs to consider the amount of stationary required, hardware required, accessories such as timers, props and power availability at the venue.[#venue]
Training is a lot of hard work. Do not jump in if you don’t thing 12 hour days + dinner + a night out are not something you can take. Not to mention activities that require you to be available on a weekend.
- Prepare course content
- Plan out each day
- Rehearse
- Ensure retention by way of handouts or reviews
- Prepare the venue to suit the training
Tags : trainer, speaking, prepare, thoughtworks university, sessions
no such file to load --rubygems
β on: 12 Mar 2010
While working on my mac and trying to use giternal I ran into ‘no such file to load —rubygems’. While I had been using ruby apps on the machine for a while, without any issues and with all the installed gems, this seemed weird.
I tried using the irb and check if
irb> require ‘rubygems’
would work. But I got the same error. I was using the default mac version of the ruby installation that is installed at ‘/System/Library/Frameworks/Ruby.framework…..’ and did verify that rubygems was installed and that rubygems.rb was also present.
On further investigation I found that the default ruby that was run on the command line was 1.8.7 when I expected 1.8.6.
It appears that my path contained ‘/opt/local/bin’ before ‘/usr/bin’ which made the 1.8.7 version of ruby default and thus clobbered all by 1.8.6 settings and lost rubygems.
To fix this I moved ‘opt/local/bin’ to be after ‘/usr/bin’ in my $PATH and voila everything works again.
I have also been meaning to try RVM – maybe its time to give it a shot since my personal projects are on 1.8.7 and I have jruby as well as 1.8.6 installed on my mac.
Tags : ruby, rubygems, irb, giternal, git, rvm, jruby, paths
Why should you be a trainer?
β on: 11 Mar 2010
After being thoroughly impressed by the training that I received when I joined ThoughtWorks I was driven to become a trainer myself. I did that in 2008 (yes it’s already been that long) and am a different person professionally since then.
I am documenting my experiences for future reference as a mulitpost on Training. As I continue posting the topics on the list here will become active. Maybe as you read it will excite you to be a trainer too.
- Preparation
- Preparing to be a trainer
- Preparing the Venue
- Training to be a Trainer
- Science of Learning
- Cognition
- Psychology of a trainee/student/learner
- Training tools
- Imaginative use of training tools to suit trainee/trainer/class
- Studying the material
- Suiting the training material to your style and needs
- Dry runs
- Delivering as a Trainer
- Preparing for the session
- Seating
- Be ready with the accessories for the session
- Prepare the material
- How to present yourself and still be yourself
- Finishing up the day
- Coaching/Mentoring/One-on-one training
- Feedback – Desiging training
- Updating session content
- Updating training style
- Updating training schedule
- Updating training theme
- Adding new content
- Applying what you learnt as a trainer to your profession
Tags : trainer, speaking, prepare, thoughtworks university, sessions
CruiseControl Monitors - Graphs and Configuration
β on: 11 Dec 2009
cc_monitor now has graphs with the success and failure showing as below

Not only that it is now configurable with a config file to set variables at
startup. And now it is also armed with activerecord mgirations. So if you want
to look at a working example of activerecord migrations outside of rails you
can use this code.
Tags : continuous integration, ci, cruisecontrol, big visible monitors, cc_monitor, github, opensource
CruiseControl Monitors - Gotchas and repost
β on: 04 Oct 2009
When trying to use cc_monitor on my current project(which is completely ruby) I hit the known snag of making it work with cruisecontrol.rb. For the umpteenth time I was not able to find any documentation on making it publish cc_tray compatible xml, which would make cc_monitor work with cc.rb.
After some googling and mucking around I downloaded latest cruisecontrol.rb and looked at its routes. I found a route “XmlServerReport.aspx” which does publish in ‘cctray’ format. I plugged it in to cc_monitor and it works like a charm.
So now I can announce that cc_monitor works with any java/ruby versions of cruisecontrol. If you would like to use cc_monitor with a continuous integration tool make sure it publishes a cc_tray compatible xml and you are all set.
Recently I successfully added ‘bacon’ to test my ramaze code for cc_monitor. The repository has been updated so check it out.
I was also suggested to check out cc_board which is a build monitor written in sinatra by David Vollbracht. Another app to make big visible charts for your team!
Tags : continuous integration, ci, cruisecontrol, big visible monitors, cc_monitor, github, opensource, cc_board
Flash on Linux
β on: 18 Sep 2009
Last night when struggling to get Firefox to play with Ubuntu and Flash I found this
forum.
The instructions that worked for me are as follows
1. Remove all installations of flash (9, 10.. )
2. Remove all installations of gnash
3. Remove all installations of swfdec
4. (Basically remove everything that conflicts with flash player – some of these things come bundled with Ubuntu)
5. Remove any file in “/usr/lib/firefox/plugins” with the word flash in its name.
eg. libflashplayer.so or in my case alternate-flashplugin.so.
6. Once you have verified that all this has gone (You could use about:plugins url in your firefox to see all the plugins you have along with their associated file types) – reinstall the latest version of flash player from adobe website.
7. You should have Hulu.com working.
Hope this helps someone who is trying to do the same.
“Now when someone asks – Do you have Flash working on Linux – you know what to say”
Tags : flash, ubuntu, linux, unix, howto, tutorial, hulu.com
Learn Git
β on: 16 Sep 2009
One big repository and one big repository on learning it all about git.
Now you can’t say you do not know enough not to try it.
“May the Git be with you!”
Tags : git, tutorial, vcs, distributed vcs
Agile Conference 2009 - TDD with Iphone
β on: 30 Aug 2009
On the last day I had just enough time to listen to Eric Smith and Eric Meyer from 8th light where they talked about TDD with IPhone.
What was interesting was even while working with this difficult technology (Objective C is not hard but Xcode is nothing but cryptic – XIB files really?) they were able to build iPhone apps without giving up of basic principles of TDD.
They demonstrated their struggle before any tools were available for Unit testing with iPhone.
Couple of tools they mentioned were
1. Google Toolbox for the Mac
2. OCUnit
Something to make life less miserable when building better applications with iPhone.
Tags : speaker, agile, conference, chicago, mock objects, paulo caroli, sumeet moghe, thoughtworks, 2009, tdd, iphone, ocunit, 8th light, google toolbox, tdd, objective c
Agile Conference 2009 - day 1
β on: 24 Aug 2009
Very busy even though I started at 11:00am.
Met a number of ThoughtWorkers, ex-ThoughtWorkers(talking about Aslak, Liz, h, Foemmel, Glenn Bernsohn, Naresh Jain) and many people I did not know before.
ThoughtWorks booth is a hit – atleast 25 entries for the free ipod touch.
Met people from Moscow, Israel, Brazil, India, UK.
Met people from different Agile organizations. So wonderful to see so much activity in the agile space. Just proves that ThoughtWorks has been right all along and we can say “We told you so”.
Went to interesting session from Mary Poppendieck – impressed by her speaking
skills. (Hope I can come close to those skills during my talk with Paulo).
Hope to see many more at the Agile Open office at the ThoughtWorks Chicago office tomorrow.
Tags : speaker, agile, conference, chicago, mock objects, paulo caroli, sumeet moghe, thoughtworks, 2009
Speaking at Agile Conf 2009 in Chicago
β on: 06 Aug 2009
I will be speaking at Agile Conference 2009 in Chicago between August 24-28. You will find all the other speakers from ThoughtWorks on ThoughtWorks website.
My colleague and compadre from my TWU trainer stint Paulo Caroli and Sumeet Moghe will be there too.
See you there.
After Print: Want to attend my session … there is an app for that(Agile 2009 Conference Connection at the AppStore – written by ThoughtWorks)
Tags : speaker, agile, conference, chicago, mock objects, paulo caroli, sumeet moghe, thoughtworks, 2009
top ten reasons why maven sucks
β on: 01 Jun 2009
10. maven corrupts – software, people.
9. maven uses an archetype(appfuse) and expects that all your projects look like the apache projects – even those that are not webservers.
8. maven has only four build stages – compile, test, install, package – if you have a requirement to automate performance testing you are out of luck
7. maven requires you to have a standard directory structure that is 5 subdirectories deep – regardless of the fact that your project only has 10 java files.
6. tasks that are not implemented in maven have to be implemented in ant and need to be integrated with maven – a big nightmare.
5. maven encourages you to integrate via binaries – thus making continuous integration difficult
4. every time maven builds it connects to the internet (to verify/update dependencies) – building your project without the internet is extremely hard.
3. maven manages the projects and subprojects implicitly (since there is convention and then there are overrides) – it makes debugging your build impossible.
2. maven manages the project dependencies in its own repository – called the .m2 repository – which is not part of your application folder – thus making it impossible to track and package development environments.
1. maven always downloads the whole internet – to keep its dependencies up to date – even though you don’t want to.
Tags : maven, ant, rake, agile, team, people, apache, nsfw
iTunes settings
β on: 28 May 2009
If you are using iTunes to play your music be careful when adding music to the library. iTunes tries to be smart and by default it makes a copy of the music you have as well as tries to organise it the way it likes. So if you do not like your music organised by artist/album and so on it will render your music unsearchable. (This is true for me since I do not organise my music by the artist album and such.)
To save the whole lot of mess it creates set the following in your iTunes preferences
.
This way iTunes will make a list of songs but not process them the way it likes. You can have your own organisation of music and save a lot of trouble for yourself.
Tags :
javascript testing with seacucumber
β on: 21 May 2009
Seacucumber was a project that was a tool we used on a previous rails project. My friends Mike Ward and <a href= “http://www.peterryan.net/”>Peter Ryan opensourced it some time back. It was dormant for awhile since it worked great with prototype. Another thing was that it looked and behaved very similar to Dr. Nic’s javascript testing that you can download for rails. Recently I was on a project where we used jquery and we did not have anything to run javascript tests and break the build on failure.
So I revived seacucumber development and added jquery support to it. I had to modify jquery test runner to postback results as prototype does. So if you need a tool to automate your javascript testing you should use seacucumber. It has been moved to github. Feel free to download it, fork it and use it. Let me know what you would like added to this tool.
Tags : javascript, testing, seacucumber, jquery, prototype, rails, ruby
MySQL Triggers
β on: 05 Apr 2009
MySQL added triggers to its portfolio in version 5.0. I am thinking this was a lot of database gurus have been wanting for so long. A little primer on how to use MySQL trigger follows : Trigger 101 follows – so detune if you are a guru already.
Your database can perform a decent number of arithmetic and logical operations on your data. All this can be done by using the features of your database engine and without writing any code. One of the features I used in a recent write up is triggers.
I have some tables – models with relationships. When these models change I want to effect some calculations and update relevant tables.This can all be done through triggers.
Lets take it up with an example
1 create table voters(name varchar(30), id integer, ward varchar(30), gender integer);
2 create table voter_ward(ward varchar(30), male integer, female integer);
3
4 -- adding trigger to update voter count by gender automatically
5 create trigger TOTAL AFTER UPDATE on voters for each row
6 BEGIN
7 update voter_ward set male = (select sum(voters.gender)
8 from voters where ward = new.ward) where ward = new.ward;
9
10 update voter_ward set female = (select sum(voters.gender)
11 from voters where ward = new.ward) where ward = new.ward;
12 END;
13 //
14 delimiter ;
This will add a trigger to your voters table and update the voter_ward table with the genderwise count. As you can imagine you can add a lot of simple logic into these triggers to build simple and efficient update based on such events. Another thing that should be apparent is being cautious about using these triggers every chance you get to use it – They will bring the database performance down with these frequent queries.
Tags : mysql, triggers, databases, SQL
accordion.js that is simple and works with prototype1.6
β on: 16 Jan 2009
Released accordion.js on github. We were quite frustrated with the way accordion v2.0 behaved with prototype1.6. Upgrading that from prototype1.5 broke the accordion when using with images. Our simple version does not have any effects yet but work beautifully and is completely tested.
Try it out!!
Tags : javascript, prototype, accordion, opensource
Moved my blog to github pages, and how I did it
β on: 11 Jan 2009
I have moved my personal blog from blogspot to github pages. Dr. Nic and Mojombo helped me do it with Jekyll.
Tags : github, pages, blog, blogspot, blogger, jekyll, ruby
Moved my blog to github pages
β on: 10 Jan 2009
My old blog on blogger will still be available with all the posts and comments.
http://betarelease.blogspot.com
Tags : github, pages, blog, blogspot, blogger, jekyll, ruby