Articles

Waiting for gg.google.com

When I was working on Google Maps API , I was getting error of “waiting for gg.google.com” on status bar.
Later on I found out that if script debugging is diabled, this problem can not raise.
So just disable script debugging from the firebug.

Double Shot #513

Spent too much time yesterday fighting with code. Hope to spend more time writing it instead today.

GPolygon in Gmaps

By using Gpolygon we can display a path on gmap. You need to just define order of locations(latitude,longitude) in this.
But you have to know How to generate Gmaps in ruby on rails
Create a polygone array #From Sri Lanka to Afghanistan

polyline=GPolyline.new([[7.880794,80.507813],
[22.792388,79.497070],
[29.874945, 69.345703],
[33.757228,65.522461]],
"#ff0000",1,5.0)

Add into your map

@map.overlay_init(polyline)

You will get following output.

Faking startup and shutdown with ActiveSupport::TestCase

Time-was we didn't just have setup and teardown in our Tests (which are run for every single test case)... we could also have a startup/shutdown pair that ran once per proper Test-case class (ie once at the beginning of all tests in a set).

This was a perfect place to put run-once-only things - especially useful if, say, you wanted to run ruby-prof over your tests.

Google Maps in Ruby on Rails

To generate google maps in ruby on rails is so easy and simple. I had recently generated a few maps in my projects by  YM4R/GM plugin.
There are few steps that you need to follow to generate simple gmap.
1. Install YM4R/GM plugin in your rails app.
ruby script/plugin install svn://rubyforge.org/var/svn/ym4r/Plugins/GM/trunk/ym4r_gm
2. Copy  the javascripts files from YM4R/GM plugin [...]

Patterns Are Not Scary: Method Missing Proxy

In which I show how to create a method missing proxy and provide some example uses in the wild.

Method missing proxy? Ooooh! Sounds scary, right? I got news for you Walter Cronkite, it’s not. Lets start with the definition of proxy, according to Wikipedia.

Definition

A proxy, in its most general form, is a class functioning as an interface to something else.

Continuous Integration Spring Cleaning

Continuous Integration is a fancy term for “run your project’s tests after someone pushes to the repository and notify interested parties if they fail.”

We’re currently in the process of revamping our test suite (which we’ll blog about in the future) and moving servers, so I thought it’d be a good time to re-evaluate our options.

Bowline: An MVC Framework for GUI Apps in Ruby

bowlineBowline is a new MVC GUI framework for developing cross-platform desktop applications using Ruby, HTML, CSS and Javascript. The author, Alex MacCaw, aims to make building a desktop app as simple as creating a Rails site.

JavaScript Performance Rocks UPDATE!

Just a quick note for those of you who have bought our JavaScript Performance Rocks! ebook & DOM Monster package:

Check your inboxes!

You should have received an email with a pre-final copy of the book. It's pretty much content-complete -- but still has a few editor's notes, and needs a couple minor updates (to cover Safari 4 final, for example), and I plan to add a few more infographics.

Basically, there's just a little bit of polishing left. And I didn't want to keep you waiting any longer!

The DB2 adapter now supports Django 1.1

I’m glad to announce that the API team has just released version 1.0.2 of the adapter for Django. And on my birthday to boot, what a nice present. This version extends its support to the recently released Django 1.1, as well as incorporating the feedback that was received earlier on.

Painless Knowledge Management | Rails Fire

Painless Knowledge Management

At the weekend, my company launched a new version of its web application, Swirrl. (This explains why I’ve been so quiet on this blog – I’ve been up to my eye-balls in code and server configurations).

The main purpose of Swirrl remains the same: to help organizations share and re-use their knowledge more effectively, but we’ve made some major changes which we think will make it both easier to use and more powerful.

Over the next few days we’ll publish a few articles over on the SwirrlSpeak blog with further details on the changes and improvements.

We’ve followed the lead from companies like Helicoid by making Swirrl into a simpler app (see Deadline, IsThisDownForYou, etc). So, you can now do less stuff in Swirrl, but hopefully the stuff you can do is simpler and more intuitive (and therefore ultimately more useful). It was actually quite liberating to throw away lots of complicated code.

Images: