Thursday, July 31, 2008

Weather Bonk

So I want to drive from Seattle to NYC. No really I want to do that once. Coast to coast.
Well I'll leave that dream to come true in another blog. It's a different topic I wanna talk about right now.

So I wanna start at 6 PM from Seattle, let Google Maps (or some other maps) decide the way for me, AND, AND tell me hows the weather gonna be all the along the way.

Now look at this rad site: http://weatherbonk.com/weather/routeWeather.jsp?
Start from Seattle, at 6 PM today, and reach NYC in 3 days. And it tells me how the weather's gonna be along the way. Isn't that cool?

And there are loads of other options! Cool. Now check out their home page: http://weatherbonk.com
I know all this is there in weather.com too but, this is like, presenting all the relevant data in the relevant manner!

Wednesday, July 30, 2008

Burma Shave Slogans

Don't stick
Your elbow
Out so far
It might go home
In another car.

This is a Burma Shave Slogan. So it this:

Passing cars,
When you can't see,
May get you,
A glimpse,
Of eternity.

I was reading Head First HTML and CSS - I really like the presentation style of Head First books. It's fun and their way really works (with me at the least).

And I came across these interesting things called Burma Shave Signs. Very interesting...

Burma Shave was a company that made brushless shaving cream in the 1920s and 30s. They used to advertise their products with roadside signs and that turned out to be very popular. There would be a group of 4-6 signs one after the other on the roadside, each with just one line from a slogan. The last sign would almost always be the name of their product, Burma Shave.

At one point, they had 7,000 of these signs on the roads throughout the US. Now most are gone, but the book says there are still a few left. Maybe I can see one before I leave the US...

Now, I had seen these kinda signs in ads on TV, in skits in school etc. But never knew that they originated from this Burma Shave cream! :-)

It's funny right? And to read this stuff in a technical book is even more fun (the book even explains in a note what these signs are)

Anyway, do explore more. They have funny ones there:

Wikipedia on Burma Shave: http://en.wikipedia.org/wiki/Burma-Shave
Another page that shows how it looks like: http://www.fiftiesweb.com/burma.htm

Monday, July 28, 2008

Got API

I used the Sun Java API Docs online when I used to code in Java: http://java.sun.com/javase/6/docs/api/

And the for Ruby, Ruby Brain is a nice place - http://www.rubybrain.com/ and http://www.railsbrain.com/

Even for DB, the MySQL API docs are good: http://dev.mysql.com/doc/refman/5.1/en/index.html

But today I was introduced to Got API!
You get most of the stuff you are looking for, all in one place. They have CSS/XML/Javascript, even the famous AJAX libraries, C++, Java, Ruby/Rails... you name it! And a nice interface too.

Check it out: http://www.gotapi.com

Infra Recorder

Infra Recorder is a free, open-source (GPL) CD/DVD burning app (sadly, only on Windows).
http://infrarecorder.sourceforge.net

I haven’t tried burning DVDs but CDs work just fine.

(BTW, I came across this while I was downloading the Ubuntu live disk)

Friday, July 18, 2008

Ruby private class method

The follwing is just so I can remember it... You need not read all this.

In Java, if you need a class whose constructor is private - so you can’t instantiate it from anywhere else (.but not a Singleton too) , you'd do:

public class AClass {
private int a;
private AClass(int a){
super();
this.a = a;
}
}

In Ruby, it's a bit different. The why will come later (dynamism of Ruby), but just hiding the initialize method is not enough. You can still create an object coz you are actually calling the new method:
irb(main):001:0> class AClass
irb(main):002:1> attr_reader :a
irb(main):003:1> private
irb(main):004:1> def initialize(a)
irb(main):005:2> @a = a
irb(main):006:2> end
irb(main):007:1> def some_other_method
irb(main):008:2> "ha"
irb(main):009:2> end
irb(main):010:1> end
=> nil
irb(main):011:0> obj = AClass.new(100)
=> #
irb(main):012:0> obj.a
=> 100
irb(main):013:0> obj.some_other_method
NoMethodError: private method `some_other_method' called for #
from (irb):13
from :0
irb(main):014:0>


You'd have to hide the new method:

class AClass
attr_reader :a
def initialize(a)
@a = a
end
def self.test
"test"
end
private_class_method :test
end

puts AClass.test


that shows:
test.rb:12: private method `test' called for AClass:Class (NoMethodError)

Thursday, July 17, 2008

zembly super!!!

Ok Ok Ok... I've not been posting regularly. Mostly a fault of companies like BMW, Nintendo and Amazon...

Yeah, so since my last blog, I got a BMW 3-series, an Amazon Kindle (as a gift, that too!) and a Wii. So life's been busy... driving, reading new stuff and playing fun games! Oh and the introduction of a new person... who keeps me, let's say, engaged? :-)

So all that and stuff like what-I'm-going-to-write-about now is basically what is keeping me from writing more blogs... Believe me, I hardly get to stop a think a moment nowadays... Time's just flying... what with nice increase in office work too. Thank God I like it - I would have stopped coming to office otherwise. No, really!

So I have turned to micro-blogging... Don't get me worng, I love to write here... but where's the time? So I turned to twitter recently. If you haven't seen that yet - try it out - it's the latest fad. Like sms-ing and blogging... It's called Twitting! I mean it - go to twitter right now and see the demo video. It's cool... and as most people believe, it's the future... of smsing/blogging/mailing all-in-one.

So if you still wanna see my updates - whatever handful you are anyway - get on to twitter and find me (arnab_deka) and follow me. I'll still continue to write blogs, but they will be rare - like this.

So today I came across this new shiny thing called zembly.

I think I blogged about : http://heroku.com/ The first online IDE I saw... but that won't interest most of you as it was only for RubyOnRails.

Look at the new zembly: http://zembly.com/

Visual-coding in Javascript in a nice IDE (read Visual Studio, but much nicer, AJAXy and with lots less errors. AND FREE!).

and the IDE is online! Get APIs for free (like, from, Yahoo, Google, Amazon, Flickr etc.) and publish your WebService/idget/app for free! Quick and easy...

Here's a Hello-world type WebService I created (I should say it created for me - it was so damn easy):
http://zembly.com/things/a7085d0638fb4ec799379ab499eefe71;exec?

and put your name in and see:
http://zembly.com/things/a7085d0638fb4ec799379ab499eefe71;exec?name=[your%20name%20here]

Never thought it would be so easy to craete a web-service! :-)

BTW, they are open for beta users now - check it out, it's nice...