Archive

Archive for the ‘Conferences’ Category

Scottish Ruby Conference 2010 roundup-1

March 29, 2010 7 comments

Following some inspirational talks with some great folks at Scottish Ruby Conference, I am going to apply the pomodoro technique for this blog post – 25 minutes of writing on this post!

These are just some of the things you get to learn at this no-nonsense conference, which is full of geeks, innovators and innovative geeks. This time, the renamed conference (earlier called Scotland on Rails) had a very good mix of talks on Ruby, Rails, good practices and even philosophy. I could get into details of each talk but they have all been recorded and will be out soon – it would be so much better to listen in on them instead of reading about them here !

What I intend to do here  is to put forth some views of the talks, the styles, the key take-home points and what I learnt.

Jim Wreich started with an excellent keynote and also give an awesome theatrical performance in the closing key-note! He was very clear in getting into my head that the key values of a good programmer:

– thinking out of the box. (Try to innovate!)

– accept duality (code & objects are the same things from different points of view!)

– abstractions are good. (Write generic, re-usable code!)

In the closing key-note, along with Joe O’Brian, it was made clear about why we should explain the benefits (and not features) of Ruby to the decision making management – no point in talking about Ruby features like blocks, iterators and TDD/BBD instead of business aspects about how the maintenance cycle of product can be reduced drastically by using Ruby and how Ruby seamlessly integrates with legacy systems.

People had come from all over the globe – from US, Europe, Australia, New Zealand and us from India. If this wasn’t good enough for diversity, the enormous variety of food at lunch made up for it. The venue, Royal College of Physicians was ‘unbelievable’. I sat in the ‘Great Hall’ admiring the ceiling and in the library admiring the expanse of the books lined in the racks beside and the so beautifully architected Amphi-theater.

The talks were well distributed in 3 tracks and each talk had a sizable crowd. There were 3 talks which discussed how to write good code (‘write bad code’ by Gwyn Morfey, ’10 most errors in Rails’ by Exceptional and ‘Your doing it wrong’ by Tammer Saleh). Each had a different style – my personal favourite being Tammer’s talk – it seems straight from the heart. Gwyen’s talk was very well staged to show how to ‘really’ work and it was really funny.

Tyler McMullen’s talk on distributed rack applications was amazing and new way to look at things. Imagine different sections on a web-page being serviced by different application servers — no! Not using ajax requests but genuine HTTP distributed requests for rendering a single page! He demonstrated it really well and there were some of us in the audience who installed the distributed_demo gem from gemcutter to see it all in action!

Joesph Wilk’s talk was precision perfect on scaling cucumber test cases – there is indeed a lot of potential here. Scott Chacon ‘showed off’ the git internal plumbing with an excellent and very cool presentation – I am inspired now and do plan to use a single git repository for distributed deployment on different machines with different roles.

Lightening talks were really good !! I shall be using RedCar (the Ruby IDE) and Showoff, the Rails presentation gem from now on. Ryan’s talk of 2500 words (speed reading) was an awesome insight into the life-cycle of a software programmer who found the worth of testing his code!

Keeping in line with the pomodoro technique, I shall stop now and write another detailed post on the conference soon 😉 I stretched this post to 35 minutes — hell nobody’s perfect!

Pune Rails Meetup#3 ideas?

February 1, 2010 16 comments
At Josh, We did some brainstorming and came up with some ideas that our team suggested would be good learning topics at Rails meetup.
To put that into effect, we hope to raise the bar for Pune Rails Meetup#3 and take some technical sessions ( basic and advanced). People are expected to come with their laptops configured with Rails.
Please add comments to this post with a list of topics if you are interested in learning about something in Ruby or in Rails! We need to shortlist these topics and we need feedback. We then need to finalize the comprehensive topic list – maybe get some voting on the topics from Rubyists.

Ruby

1. Ruby meta-programing (advanced)
2. Regular Expressions in Ruby (basic)
3. forking using spork (advanced)
4. Ruby threads (basic)

Rails

1. polymorphic associations & STI (basic)
2. writing a rails plugin (advanced)
3. Social networking connects – authentication & sharing via openIDs (basic)
4. DelayedJob  (basic)
5. Ruby event machine / nanite / RabbitMQ (advanced)
6. Deployment in the cloud (advanced)

Hosting the event

1. We can pool in some funds (or get some sponsors) and host this event at PYC, deccan. If there is some company or venue that can host this event, please contact us.

PHPcamp – CakePHP Vs Ruby On Rails

January 10, 2010 32 comments

On 9th Jan, ’10,  I presented my topic “CakePHP Vs Rails” at PHPCamp. It was well received and it felt nice to have been able to present such a topic to PHP devs. I was expecting a ‘fight’ (infact quite a few people did too) but I did keep the tempo low and to a discussion and not a debate – expect the unexpected !

Having said this, the controversy started long before my talk though – right from the choice of the title. My opinion is that almost 90% of PHP development is web-development, so the topic – ‘PHP Vs Ruby On Rails’ was on the button. However, Amit Singh, Dhananjay Nene disagreed – they felt it was comparing apples to oranges. I complied to their request and changed the title – Fair enough. BUT how do you explain that there were 2 hands raised in a room of about 80, who said that they used PHP earlier for non web-development ;). All in all, I did finally compare Ruby with PHP and CakePHP with Rails.

PHPcamp had 2000+ registrants and the venue was ‘packed’ – it was very exciting to go a PHPcamp as a rubyist. I wondered if people sensed a wolf among the sheep (couldn’t resist that taunt, 😉 my apologies ) and when I went up to the wikiwall to note my topic, I did get a few curt nods and some smiles and a Ah-you-are-the-rails-guy looks!

I kept my talk after Aditya’s talk on ‘Introduction to CakePHP’ because it would help my cause for people to know more about CakePHP when I compared it with Rails. The talk was really good — and I could see a lot of my effort reducing in explaining MVC, RESTfulness, relationships etc. the rails way. The slides are posted here.

Before I did a deep-dive, I wanted to grasp the type of audience I was dealing with and realized a decent mix of professionals, students and even a few entrepreneurs. I decided to keep my talk a little less-technical, should people sleep off ;).

I started with a brief comparison of PHP and Ruby. The Pure OO Ruby, mention of blocks and meta-programing. The idea of blocks of code being sent as parameters to methods and the idea of defining a method on an object seemed to have intrigued the crowd — however, given that I had to keep the talk basic and not too technical, I am sure it did go a little over the top. Never mind – at least I had got everyone’s attention. In a lighter moment, I did mention the use of throwing shoes as opposed to rotten tomatoes if required. I did not have the pleasure of getting as famous as famous presidents as nobody lost any shoes !

I then gave a brief comparison of CakePHP and Rails which brought me to the main discussion. CakePHP has a directory structure similar to rails and I believe it has been modeled around Rails (at least in the beginning). The model based relationships are similar to Rails, except for HasAndBelongsToMany. In Rails it has been changed to has_many :through =>  relationship. I particularly liked the ‘on the fly’ binding in CakePHP – its pretty cool. In rails this is achieved by a little bit of meta-programing and adding class methods to the model to load new functionality.

Both frameworks preach being model-heavy which is excellent. However I was a little surprised with Aditya mentioning that scaffolding should not be used extensively. I do believe that the RESTful code generators in Rails are excellent and scaffolding should be used extensively to get a jump-start.

RESTfulness was skimmed through the CakePHP talk but I re-iterated in my talk the importance of inherent RESTfulness that helps in interoperability. I could see a heads nodding when I used an example of user account creation URL — got plenty of answers, /add_user, /create_users, etc. and the look of enlightenment when I explained how HTTP verbs are used to ensure that /users (with GET) will get the list of users and /users (with POST) will create a user.

There was finally a person who raised the question of speed and performance in pure PHP code Vs Ruby Code. Now, it is indeed undeniable that PHP code interprets faster then Ruby, in fact as the gentleman said – “The 10 lines of PHP code will run faster than the 3 line of similar Ruby code”.  Agreed!

I was filled with pride that he mentioned the really cool part of Ruby coding — LESS CODE, which in turn means less bugs. (Yes – I know there will be a lot of PHP enthusiasts who will flame me for this — but it is a fact!). Ok – back to the speed and performance issue — in my opinion, CakePHP would run much slower than Rails (courtesy internal caching). However, pure PHP code would run a tad faster than Rails. This is definitely debatable but I would forgo some performance and speed in favour of lesser lines of code. In addition to this, the ruby interpreters (MRI and Jruby) are reaching epic proportions of speed in interpreting.

I then moved onto what I found missing (or lacking) in CakePHP as opposed to Rails.

  • The one thing that stands out is the use of migrations. I was shocked to see event the examples on the dev site, showing SQL file for creating and updating the database.
  • The lack of deployment information was understandable (standard Apache with mod_php I guess) but I think this is lacking. Capistrano is something I did not mention in the talk but its things like this that make deployment simple! I was talking to some of the experts later, Amit, Aditya and Shardul after the talk and they told me that most still rely on scp and ftp for production deployment! I hope that is incorrect, but was a little taken aback never-the-less.
  • There does not seem to be much information about the use of caching in CakePHP — it seemed to be more out of the do-it-yourself manual via memcached. Rails internal caching is superb – object caching, query caching and fragment caching really get things going. Though I found information about caching in CakePHP, I wonder how much people use it.
  • The Rails magic of instance variables in controllers directly being accessible in views is cool. CakePHP requires the use of set() to ensure this. Decent enough though lot of scope of mistakes, IMO.
  • Routing and RESTful routing seemed a little behind compared to rails. Aditya did mention that default RESTful routes are now available in CakePHP but from the documentation and usage it seemed lacking. I love the following routing in Rails which gives me all the RESTful CRUD automagically.
  • map.resources :users
  • Polymorphic associations were missing (but I may be wrong here — I am sure its supported).

To conclude, the fact is that CakePHP makes life unbelievably happier for PHP web development – I would call it a boon! I personally do see a lot of similarity between CakePHP and Rails – in fact I did tweet that that what Rails does, CakePHP follows. However, surprisingly, Larry E. Masters disagreed with me. His opinion is very important in the context as he is the Co-founder of CakePHP! Check out his interesting replies to my tweet here and here Now, that is spunk and attitude ideal for competitive development – Its highly appreciated as it will make things better! I would like to ‘twibate’ on it sometime, but I think that would digress from this topic 🙂

All in all, I say to PHP devs, — Try the real thing!

January 10, 2010 1 comment

Pune Rails Meetup #2

December 20, 2009 21 comments

It was great to be a part of the Pune Rails Meetup which was held yesterday (19th December, 2009) at ThoughtWorks, Pune. It was an idea initiated by Anthony Hsiao of Sapna Solutions which has got the Pune Rails community up on their feet. Helping him organize was a pleasure!

It was great to see almost 35 people for this meet — it was a probably more than what we expected. It was also heartening to see a good mix in the crowd – professionals in rails, students working in rails and students interested in rails – not to forget entrepreneurs who were very helpful.

Proceedings began with Vincent and Anup from ThinkDRY gave an excellent presentation on BlankApplication – a CMS++ that they are developing. I say CMS++ because its not just another CMS but has quite a lot of ready-to-use features that gets developers jump-started. There were interesting discussions regarding how ‘workspaces’ are managed and how its indeed easier to manage websites.

After this technical talk, I spoke next on my experience at the Lone Star Ruby Conference in Texas. I tried to keep the session interactive with the intention of telling everyone how important it is to know and use Ruby effectively while working in Rails. Dave Thomas’s references to the ‘glorious imperfection’ of Ruby did create quite a buzz. To quote a little from Dave’s talk:

name {}

This is a method which takes a block as a parameter but the following line is a method which takes a has as a parameter! A simple curly parenthesis makes all the difference!

name ( {} )

Similarly, the following line is a method m() whose result is divided by ‘n’ whose result is divided by ‘o’

m/n/o

but add a space between this and its a method m() which takes a regular expression as a parameter!

m /n/o

It was nice to see everyone get involved in these interactive sessions. More details about my experience at LSRC is here.

After this there was another technical talk about a multi-app architecture  that has been developed by Sapna Solutions. Anthony and Hari gave a talk on this and it was very interesting to see it work. Using opensource applications like shopify, CMS and other social networking apps to work with a shared-plugin and a single database, its possible to create a mammoth application which is easily customizable and scalable.

Hari did mention a few problems like complexity in migrations and custom routes which they currently ‘work-around’ but prefer a cleaner approach. Some good suggestions were provided by Scot from ThoughtWorks regarding databases. I suggested some meta-programing to align models. Working with git submodules and ensuring rake scripts to sync up data, this indeed seems to have a lot of potential.

There were some new entrepreneurs from VectorBrook who have already developed a live application in Merb which they discussed and explained details of. It was good to hear about how they managed performance and scalability testing. The Q&A forum which was the next event was extremely interactive. Some of the discussions were:

Which are really great CMS in Rails?

There were some intense discussions regarding RadiantCMS, Adva and even BlankApp. The general consensus was a ‘programmable CMS’ Vs WYSIWYG. Those who prefer more of the content management prefer CMS’s like Drupal, Joomla. Those who prefer more customization via programing and code, prefer Radiant. This topic could not close and is still open for discussion.. Do comment in your views – I am a radiant fan 😉

What about testing? Cucumber, Rspec, others?

Usually its still adhoc – testing is expensive for smaller firms — so adhoc blackbox testing is what is done. I opined that cucumber and rspec ROCK! Cucumber is great for scenario testing and testing controller logic and views. Rspec is great for Direct Model Access and Cucumber can make great use of Webrat for browser testing.

In Rpsec, when do we use mocks and stubs?

It was suggested that mocks and stubs should be used when there are no ready model and code. If the code is ready, its probably just enough not to use mocks and stubs directly. Comments welcome on this!

How do you do stress testing?

Stress testing, concurrency testing and performance testing can be done using http-perf. It was interesting to note that ____ have actually done their own implementation for stress and concurrency testing. I recommended they open source it.

How are events, scheduled job and delayed jobs handled?

This was my domain 🙂 Using delayed_job is the way to go. Following the leaders (github) and using Redis and resque would be great too but definitely not backgrounDrb or direct cron!

What project management tools do you use? Pivotal Tracker, Trac, Mingle?

Pivotal tracker suits startup needs. Mingle rocks but becomes expensive. Scott ? 😉 Dhaval from TW mentioned how easy it was to co-ordinate an ‘mingle’ with their 200 strong team over distributed geographies.

Which SCM do you use? git, svn, cvs?

People have been very comfortable with git and more and more are migrating from svn to git.  It was heartening to see that nobody uses CVS 🙂 Jaju (I have have misspelt) gave an excellent brief about how code and diffs can be squished and ‘diff’ed with another repository before the final merge and push to the master. Dhaval gave an idea about how they effectively used git for managing their 1GB source code (wow!)

Some pending questions – probably in next meet-up

  1. Which hosting service do you use and why?
  2. TDD or BDD?

Suggestions are welcome!

My experience at Lone Star Ruby Conference

September 1, 2009 6 comments

I finally made it to LSRC  !! After some initial registration hiccups I was finally on the way (All thanks to Jim  Freeze and Satish Talim).

Talks ranged from casual ruby talks to code examples, coding on stage to herding tigers, Avionics to Japan !! It was great to see totally different styles of presentations – some very carefully prepared and perfected like that of Joseph Wilk to those with about 420 slides by Correy Donahoe. The pace of talks and the varied ideas ensured that there was always some excitement in the air. The atmosphere was casual, refreshments were frequent and tasty, people were very approachable and almost anybody got talking to anybody – exactly like how a ruby community should meet. Being the first conference I attended, not only did I gain in knowledge but also got to meet different people from different walks of life, from different states and countries.

Meeting Matz was a pleasure – he is a modest individual who finds it embarrassing to be called a ruby rock-star :). He is a very cool guy and calls himself a simple programmer. It was particularly interesting to see how much he was interested in helping spread ruby awareness in India and was keen to even come down to India to meet the community here. James Edward Grey II is a maverick who gave us a taste of Japan (Tokyokiagi) along with a technical dose of module mixins. Dave Thomas spoke of the messiness in Ruby and various nuances of the imperfect language which makes the language human!  Glenn Vanderburg showed the harmony between programming and music, which I could relate to (even though knowledge of music is rock bottom). He was able to give a rational reasoning about why programmers lose track of time (a must read for my wife, who keep complaining about my time management skills) and how programming is an art – something that we can smell, taste and feel. Evan Light was great at showing how TDD works and with his flair is probably the only one who can run through a live demo with ideas from the audience at run time! Joseph Wilk had probably the perfect presentation – but it was the way he prepared it. As a core team member of Cucumber, apart from being called the Cucumber Man, his British-styled humor, meticulous planning for this presentation and his delivery made it one of the best technical sessions I have ever attended. Chat Pytel of Thought Works gave a talk of ‘succeeding in rails’ and this was the one I could connect to the most. At Josh Software, it felt we are at exactly the same stage they were 3 years ago – I had a frank talk with him after the presentation and that was when the humility and the passion for ruby was evident. He is very emphatic in his endeavor to ‘give back to the ruby community’ and its one of the things I intend to incorporate in my company. Jeremy Hinegardner was very enterprising and forthcoming in tools that help between language integration. I had one of those intellectual discussions with him about data analysis and the energy in him about looking into something challenging was soon evident. Larry Diehl of Engine Yard gave a technical session on Dataflow,which left me thinking whether I was living in the past – imagine poping elements from a queue which does exist yet ! Danny Blitz was unbelievable – he came as a war tiger, explained what it was to have a military style software core commando team and what it takes to succeed in the software industry as a leader – its his book that I do plan on purchasing soon! Bruce Tate and Wynn Netherland gave talks on SEO in rails and Compass – the simple ‘take for granted’ things which can make or break your rails application. I am not much in css and html (its high time I did something about it) but with haml and sass, it seems the progression to them may indeed be painless! Did Correy Donohoe gave a presentation?, I wonder! It was 421 slides in 45 minutes, which amounts to about 10 slides per minute! It was one of the most entertaining presentations – a mix of right practices – XP, pair programming, testing and what he does at Engine Yard. Rich Kilmer delivered the keynote and took us through a tour of the defence industry and Ruby. Encoding domains was something I had never heard earlier which I will never forget now ! Among the lightenting talks Eleanor McHugh spoke on how to manage a segmentation violation in ruby and Jared Ning touched everyones heart with his experience in Tanzania building a rails app for the community (wow!). Yahuda Katz gave a great talk on bundling gems which is going to be extremely useful.

Meeting other people like Dallas PoolCoby Randquist, Gerald Bailey, Dan Mayer, Tim Harper was awesome – they are experts in their own field and gave me plenty to think about! My apologies to some people I met but did not mention.

2 days of intense technical discussions, learning and fun IS what I had hoped for and its exactly what I got. I got a warm welcome from people who were surprised pleasantly that I had flown in only for this conference — well, to be honest, it was totally worth it and I would do this again every year !!

Cheers to Austin!