Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

Thursday, December 25, 2008

Missing the spam from me?

I love feeding on bits of information. The world is full of interesting things and the Internet has a thousand ways of feeding you all that.

If you are not this type of a person - and like to live in your own shell (nothing bad with that) - you can stop reading now - and use your time well doing something else. Like living in your own shell.

Back to the topic - I do skim most of the info dished out at me. Some I keep in my "hmmm" folder of my brain (you guessed it - doesn't stick long), some I delicious-mark. The rest are the really interesting ones - I find it hard to not share with people I know.

Like this - http://bit.ly/17q25 written by @zen_habits
(this article is on how to use twitter well - I have a truckload, or maybe a trainload of people I know, who tell me - "What is twitter anyway? Just another Social Media Platform? Why would I want to go to yet another site? Is Facebook/Orkut/MySpace/insert-your-fav-social-media-network not enough already?" This is an
excellent article on why and how twitter.)

How can I not make my friends read this? :-)

Now if it was 3 months ago, I would have snapped the link up in an e-mail and sent it to all of you, hoping that you'll also read it and like it and apply it. This group of people would include at least all interesting folks I know in India, NY and Seattle - that's a lot of people right? And most probably won't even read it (yeah I know - it's ok)

No more - I just twit it now - with the knowledge that whoever wants to eat info-blurbs like I do will follow me and read it.

That's why I urge you my friends/social-beings/netizens, give the article above a read - here it is again for effect -
http://bit.ly/17q25

If you do get convinced that twitter is a big idea, can be useful to you and actually help in reducing spam, get an account fast.

You can follow me if you like -
http://twitter.com/arnab_deka
Or check out the people I follow - there are some interesting folks - and follow them instead.

And finally, here are some interesting/info on why/how etc. of twitter: http://delicious.com/arnab.deka/twitter

If you are still not convinced and take nothing else from this blog, take this back - you can rest assured that you'll get spam from one less person now on.

Friday, September 12, 2008

iPhone 2.1 upgrade crashes!


Now I seriously didn't expect this from Apple. I was so-waiting for the 2.1 update to iPhone - and iTunes couldn't install it or me! :-)

and look at the awesome error message!

Go Apple!


Update after fighting for 20 min or so:
I did a restart of Windows and iTunes - still got the same error.

iTunes documentation says I might need to upgrade my iTunes. So I go and click Check for latest version - and hey I am already on the latest one (iTunes 8).

Then I tried to upgrade iPhone to 2.1 again - and this time it worked. I have to agree to one of my colleagues - is Apple going the Microsoft way???

Saturday, August 23, 2008

iPhone 3G!!!

yay! yay! yay!

My T-mobile contract got over end of July and I finally gave in to the temptation - I got the iPhone 3G today!!! :-) (yes in spite of all the bad things ppl are saying about the battery and Exchange integration). I get 14 days to return it so why not try it!

Only two problems till now:

1) Yahoo mail won't sync! I figured it was the non alphanumeric characters in my password! So apple could not figure out this advanced piece o technology - people do have passwords with non-alphanumeric characters in them. Well it's only been, umm, 20 years since this "technology" started! :-)

2) While setting up the phone, it crashed my OS twice. A-ha - Windows XP. So it's a classic case of Microsoft v. Apple :-) And apple slam-dunked you twice Windows! :-)

But other than that, I love the phone!

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!

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...

Tuesday, April 1, 2008

Awesome gmail!

Now you'll really know why love gmail so much - send mails from your past! What a rad concept!
Check it out here.


And hey this is my first post in April'08!

Monday, March 31, 2008

Xobni

You guys know my love for gmail - I just love the cool features it gives me - shortcuts, awesome search features and the like - I love doing things fast and without ever touching the mouse. But I do use Outlook in office, let's say for the lack of a better or maybe more popular e-mail client? I tried some Linux clients for some time but I am so used to Outlook that I will have to wait for Gmail's corporate adoption before I switch.

I agree outlook is an awesome app and very popular at that, but like most Microsoft products, it is intended for the layman, not the developer. Just as Firefox (with it's addons and the hundreds of GreaseMonkey free scripts) compares to IE! You just can't do things fast enough without these things. And Dialog Boxes (with questions like "Do you REALLY want to exit?" I mean, come on!) or views to navigate which you must use the mouse are common.

But to come to the topic of this post, Xobni does not add these things to Outlook (and so these things still remain on my wish-list for Outlook). It does something else - Just check out the awesome demo video the Xobni folks have created.

I bet you'll love it. Yeah it probably does not make Outlook anymore developer friendly (and that probably will never happen anyway) - but it does make it cool! It brings the elements of social networking to Outlook (among other things). And when you get to work/play with fun/cool things you are happier (and so more productive).

The whole point is, it looks like it can make Outlook fun. Oh wait, that's not the whole point, wait, wait, wait!

I usual have good motivating factors for writing blogs, and most of the time they are selfless. You agree? So once in a blue moon I am allowed to do something for myself? Right, read on.

Xobni is in beta right now and is invite-only. You can sign up and you will _eventually_ (you know how eventually usually goes with free, cool and fun?) get it. Or you can advertise it and if enough (that you figure out) people use your advertising to get to Xobni you get it faster.

Yeah that's the whole deal - So go ahead. I have put a Xobni widget right there on the right side of my blog (and that too on top of "About me") . Please click it and add yourself to the beta list. "Show me some love", as they say :-)

The faster you do it, the faster I get to try it - so help me out. And remember if you get onto the Xobni beta list any other way (other than clicking my idget and signing up) I get nada! So please, guys.

And that's the whole point of this blog :-)

And yeah in case you still have not figured it out, Xobni is... you guessed it now, Inbox reversed!

Thursday, March 20, 2008

An interesting talk I attended today - Consensus in distributed systems

Went to an incredible talk today and was so damn impressed with the presentation and the concepts behind. So wanted to share it with you...

Basically the talk was on Consensus among Distributed Systems. So if you have a Master DB and two Slaves - and if the master dies, how do you choose which Slave to promote, automatically?

Or consider you have some sort of a pool of managers who decide what to do and a bigger pool of workers who do what the managers say. Let's say a manager dies - how do you choose which worker to promote to a manager? Because all of them might be equally eligible to get promoted (we are talking about systems here not humans).

The simple way is - go for the majority. So every worker votes and one of them is elected. But then take in some factors such as message losses, network disturbance and partial network failure - now your vote might not have been so accurate after all ha?

Good Robust systems built to be successful must be fault-tolerant and self-healing. It has to take care of its own - if some process fails, it has to figure out a way to fix it by itself - no human intervention - coz that takes time and money - which is not always easy or affordable. Now if it's just one system you could somehow make it think of these situations. But make a distributed system where each worker has its own mind! The group (distributed system) has to come to _correct_ decision somehow right?

To build such (distributed) systems we need to be able to solve this problem of consensus. A few people have started or already have implemented this (including Google Chubby, Microsoft Autopilot, Amazon S3 etc.)


So this talk was about all this - must say it was done in a very lively manner - with a skit showing the different parts of the system, the network (where volunteers passed messages and took parts of the system - some _crashed_ too ). Was fun!


The idea stems from ancient ages and has been modeled to meet the requirements we have today. It's called Paxos Protocol. Do read up on it - very interesting... You will definitely have nothing but appreciation for the great minds that created the mathematical model in those ancient times and the other great minds who translated it to modern day distributed systems and the other minds who have/are implementing these ideas!

Here are some links:

Wednesday, March 12, 2008

Clipboard diary

Typing something in an e-mail and you need to copy some site's link. What's the big deal? Select, Ctrl+C.
Whoops, just lost the all important 100-line-complicated query that you had made 2 minutes ago? Or maybe something as important that you given to the windows clipboard to keep?

I used to find myself in this situation a lot - then I found ClipBoard Diary! http://softvoile.com/clipdiary

A very convenient and non-intrusive way to remember all the clipboard entries. (Just Ctrl+Shift+Up/Down to see all your clipboard entries). And it remembers the entries even after a reboot (or a crash - we are talking about Windows here remember?) - how? uses a Database.

Enjoy!

Wednesday, February 20, 2008

night-outs : my take on it

"Practice what you preach"

So here I am - writing a blog about night-outs at 5:30 AM after an interesting night-out.

The night started with a late work-day. It was a very interesting day at work and I got that that feel-good thing that I did something today. You know the feeling of achieving what you aimed for at the start of the day? and doing a bit more?

I got introduced to Ruby and Rails recently. I was a skeptic first - never having tasted a dynamic language and also being under the heavy influence of Java.

But like so many other developers - and I have to say that - I am loving Ruby and Rails more and more each passing day. It's fun! And you are at your best when work is fun!

Anyway so the aim of the night was to read on Ruby and Rails (with dinner/music and TV all side by side!) and sleep by around 2 AM. BTW, The Cult is coming to Seattle in March and so I am kinda deciding if I should go for it - so listening to their sound all the time to see if I like them. You can preview them here.

So anyway, I got engrossed in the music a bit too much - and someone reminded me about some Aerosmith stuff - and I realized that I don't have some albums from them. How could I not have "Pump", "Get a Grip" from the band that grew up with? So I bought them!

And some TV - let's forget what - that's not important ;-)

And then I caught and got caught by a few good friends on gtalk... (I have to note this new friend that I made - I am surprised by the amount of strikingly similar traits that I share - I am really startled sometimes). So anyway it was 1 AM already...

So the thought of a night out started lingering on my mind. Specially I have a lot of work today (today -> it's already morning, duh!)

Still I thought, ok let's sleep by 2 (try actually) so started off again on Rails. I got so involved that now it's 5:30 AM!!! That's how a night can go if you find your passion! No pun intended. The question is - most of you will be divided in answering this question - "so is this a good sign that I spent a night reading something - and more importantly that became the passion of the night?" I leave that to you to decide... Maybe you'd think I have gone mad, maybe I am turning into a geek. But remember I respect all sorts of people - you don't have to - AND I GIVE A RAT'S A$$ ABOUT THAT!

So it's morning now... And I am not gonna sleep tonight anyway... But I loved it. So here I am ending it with something I love doing more nowadays - a blog.

Now that we are through with the boring part (about how I spent the night) lemme try to analyze a night out - so that you can take something from my experience.

The following is purely based on my experience, your mileage may vary. However, note that this encapsulates a lot of night-outs - since my college days. A ballpark figure would be probably 35 nights in the last 8 years. "Ballpark". Oh, is that nothing? Then why the hell are you reading my blog? Go write your own analysis on a night-out.

A typical night-out goes like:

1. The decision period: You decide it's a night out. It can happen anywhere from a week in advance to the wee hours of the morning (before point #2, below) Lemme advice you here - you better a have a good reason - that's where the passion comes in. Whether it's -

catching up with some old friends (like so many times in my last few days @ NYC - 2007 end, catching up my school friends in Delhi and college folks at Bangalore - Jan 2008),

finding something passionate to do (project work with my class mate Nitin in college - 2003-04 and tonight with Ruby and Rails),

just bakkar (so many times in college and in NYC)

or maybe just driving the whole night :-) (Cape Cod trip - Apr'2007)

Maybe you'll have something passionately being thrust into you the whole night (no pun intended again, seriously) like in so many movies - you know what I mean. So why am I quoting movies and don't I have an example from my life on this? Heh heh, Smarty pants, I am not gonna let you in on that!

You've got an exam and you dont know what the hell to do. I've been in this situation a lot of times but I am too un-motivated (when it comes to exams, or is it over-confidence?) to give up sleep over this. However you'll see this often in hostels.

You've got an exam and you DO know what the hell to do, and you have already prepared thrice. But you can't sleep - you need to revise at least 2 times more. I can not imagine why people do this - but I can understand (more like I understand an empirical formula) that they do! Maybe it's striving for perfrection? My friends Dutta (and Debarshi and so many others from college) can explain this very well - what say Dutta? ;-)

The point is, you have to find something interesting to do. Or something bad enough (like a Moral Science paper in your engineering Course) Else it's not worth it. Take my word for that. Anyway, the point is, you just gotta find "it".

2. The smooth period: Upto your normal bed-time (between 1-3 for me) you'll enjoy like hell. Knowing that you don't have to sleep allows you to do what "it" is you are doing in a relaxed planned manner. As always, knowing how much time you have always helps in any activity right?

3. The dangerous period: This usually starts around 15-20 min after your normal sleep time. You feel more and more weary and wonder whether it's worth staying up all night. This is the worst part of the night - but as you have more and more night-outs you start to enjoy this period too - knowing that if you overcome this one - you are done! It's like a challenge.

Like tonight, it was 5 AM already - so I didn't bother to sleep - One of the golden rules of a night out is that if you decide to have one, you cannot falter. If you do - the next day is hell. You feel weary the whole day.

However, there is a sort of cut-off time for this decision too - you will figure it out with experience. For me, the cut-off time to effect this decision (whether to give up and sleep) is around 330-4 AM.

If I sleep before this time , although I am already in the "Danger Zone" it's likely that the next day will still turn out okay. However if you sleep past this point it's highly unlikely that you'll wake up in time or will be at even half your peak. I have seen people miss exams because they fell asleep in this period - so beware - this is really the most dangerous time of the night.

Then comes the best part:

4. The sunrise: The human body is tuned to feel less weary and fresher as soon as they see sunlight (okay things like "global-working-hours" and call-centers are striving hard to alter this. And they are successful to an extent too, right? But remember they are fighting against nature here. So let's see).

Anyway this is the best part - look at the morning light outside and realize that you have done it! You feel much better now - a bit weary maybe. Take a shower and some nice breakfast - you are off man!

I sometimes feel more at my peak when I take a night out and I am feeling like today is one of them! So a blog to finish it off!

Post note: You know how everyone (from your Grand-Ma to your Vet) advices you eat regularly? 3 times a day, on time? And the same sort of people also advocate "fasting" - A day (or part of it, or maybe multiples of it) when you don't eat anything. It's supposed to help the body right? Why Islam advocates a month of fasting!

So why not a night out? The same folks advocate "regular sleep". So why not break the routine once in a while and see if that works for you? Isn't that the point of a "fast"?

For me it definitely works - nowadays I have a night out on an average every 45 days. Lets see - maybe I'll have to tweak the frequency - but I do get the feeling that I am onto something here. Initially I used to feel weary - but with time I am getting better. Now I actually have better days just after a night out rather than a normal sleep day. (Maybe it's like those instant shots of energy - but we do need them once in a while ha? And not sleeping is much better than taking those energy shots)

Maybe some day these people will see the benefits and start advocating "night-outs" :-)

So here's to my supposedly wonderfully productive day at work! And potentially some of yours too!!!

Thursday, January 24, 2008

Pluggable Storage Engines of MySQL

Came across a very nice feature of MySQL - thought to share it with you.
Well actually, it is one of the main reasons why MySQL is succeeding - so not really an obscure nice feature at all!!! In fact, very well known and appreciated by the community...

(MySQL is a GNU Public licensed Database - and FREEly available. You can go for enterprise option and get support too. Recently Sun bought MySQL!!!)

Anyway, coming back to the point - it has a concept of a Pluggable Storages Engine. So when you write the DDL for creating the table, you specify which engine should be used to store the table - like so:

CREATE TABLE IF NOT EXISTS MY_FUNKLY_TABLE (
MY_FUNKY_ID CHAR(4) NOT NULL,
FUNKY_DESCRIPTION VARCHAR(10) NOT NULL,
IS_IT_REALLY_FUNKY ENUM('Y', 'N') DEFAULT 'Y',

PRIMARY KEY (MY_FUNKY_ID)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin
;

So what's the deal? Well you can specify whether you want the table to be stored in memory or actually in storage; you can kinda tell what it's used for - Archiving? Have BDB (BerkleyDB) type features!!! Different types of engines are MyISAM, InnoDB, BDB, Memory, Merge, Archive, Federated, Cluster/NDB, Other - read more about each type in the links given below...

Moreover, you can implement any engine (MyOwnEngine) and plug that into MySQL - cool ha?

The best part is a story I heard from someone recently - a table was taking up around 1.5 GB - after converting it to Archive engine, it became 47MB!!!
A 32 times reduction in space!!!

Yeah yeah yeah - I agree it depends on what sorta data was there in the first place - but still 32 times (3200% to put it differently :-)) is a lot man!!!

Read more at:
Wikipedia
An article about this from MySQL

Thursday, January 17, 2008

Betting on weather


There was the Amazon Developer Conference last 2 days (Jan 16th and 17th ' 2008) - it's yearly event... Among others was Tim O'Reilly presenting "The O'Reilly Radar" - basically talking about the new things in the internet/tech space!!!

I hope to write more about it and the other talks... but before that I have to tell you about this idea that I loved a lot: www.weatherbill.com

This thing startled me... It's like an insurance on weather... on top of that... you can bet on the weather and if you win they pay you!!!
Go to the site and try the quoting thing. You put a condition (like I am saying it's going to snow above 5 inches each day between 1/27 and 1/29 at Zip Code 07310 - if that happens you pay me $10 a day!!!)

Now it takes your details and uses its own weather predicting algorithm (at the minimum I would assume it to be very very complicated) and gives you a quote - you buy that quote and if it really snows above 5 inches each day in that period you get paid)... I am sure you got the analogy - it's like an Option - but on weather!!!

That and much more - go to the site and read blogs about it!!!

BTW: Started by an ex-google guy... :-)

More to come - watch this space...