Tuesday, October 09, 2007

My Yahoo! Hackday hack..

Had a wonderful time at the yahoo hackday this weekend. Akshay and i ended up trying to get Flickr work offline using Google gears and Greasemonkey.

Gears is an excellent extension for firefox that lets web developers provide offline capabilities to their web applications. It comes with a sqlite3 databases to retain files and data in offline mode. The latter is script accessible on a same origin policy.

Gears does not work out-of-the-box using greasemonkey. The first problem is that gears does not get initialized for lack of permissions. The gears folder inside .mozilla/firefox folders has a permissions.db file - essentially a sqlite3 database. This has a table called Access, which contains permissions for websites. We manually inserted a row for flickr.com and gears initialization problem was solved.

There were also numerous other problems, some of which i have no clue yet. Firefox kept crashing when we tried to save resources using the LocalStore. We could also not get WorkerProcess working when using greasemonkey. The flickr webpage served from multiple domains - different farms for the images, different other yahoo domains to serve css, scripts etc - did not help us either.

We did end up with getting flickr to work offline, though without a lot of non-photo images and css. I plan to continue trying out gears and greasemonkey, will post an update when i learn more.

Labels: ,

Friday, September 21, 2007

on smartness and dumbness

It just occurred to me why smart people hate talking to dumb people and and vice-versa. It is not at all because of their smartness/dumbness, it is basically because it takes a hell of an effort for smart folks to try and explain things to dumb folks. You need to go to a much lower plain to explain stuff. And it is very much true when you are talking to smarter folks. Your brain will hurt just trying to understand what they say. Yet another reason why i think laziness is perfectly natural.

Labels:

Wednesday, June 20, 2007

In the midst of chaos...

I think orderliness and organizedness is probably a little highly overrated. I have constantly been reminded about its importance right from a very young age. Our education system emphasizes it a lot, so do our parents, same with our offices. People who are a orderly are highly appreciated. But more importantly people who thrive in chaos are looked down. Perhaps it is time to start recognizing the C-Society of folks like the recently formed B-Society for late risers. I have been noticing in the last few years that it is probably not so bad to live in the midst of chaos.
I am not talking about chaos in all things that you do, i am talking specifically about disorderliness in things that are not really that important. Whether it is the wires, my personal belongings, all those miscellaneous downloads in your laptop, i think it actually makes sense to live in chaos. I see a couple of problems with being organized. First is the cost associated with orderliness. It is a lot of overhead to keep oneself organized. You need to constantly keep doing it. The moment you stop doing it, you are starting to create chaos. And what do you get by being organized? You probably save a couple of minutes in finding things, or answering folks, or in general, making progress. I think we should start appreciating chaos, and learn to cope with it. As long as the lack of order does not really affect you, it is perfectly ok to have it as is, and when it is causing trouble, all you need to do is just bring in enough order into the system to make it less painful.

Labels:

Thursday, June 14, 2007

some reflections...

after posting the previous entry, i re-read norvig's article on learning programming. This is how i think i fare on his advice:

>Get interested in programming, and do some because it is fun. Make sure that it keeps being enough fun so that you will be willing to put in ten years.
Yes, I am very much interested. And i guess i sure can put in another 10 years.

> Talk to other programmers; read other programs. This is more important than any book or training course.
Yes, i do this regularly. Probably even more than is necessary.

> Program. The best kind of learning is learning by doing.
Yes, i still love doing this. But i don't do enough of this. Probably because of the previous point.

> If you want, put in four years at a college (or more at a graduate school).
Sadly, i didn't do this. I did my bachelor's in Electrical and Electronics engineering. And I miss this sometimes.

> Work on projects with other programmers.
Don't do much of this outside my work. This is certainly something i hope to work on in the next few months/years. I should probably start reading less, stop getting distracted by the next thing that comes across my way and concentrate on sticking on to finishing some of my projects.

> Work on projects after other programmers.
It is nice that i get to do this regularly at work. And i also get a chance to work on projects after other smart programmers left the project. It gives some nice insights into some rarely mentioned aspects of programming. That is topic for another post.

> Learn at least a half dozen programming languages.
Languages that i definitely can claim that i know well: Java, C, Ruby, Javascript
Language that i am currently picking up: Erlang
Languages that i briefly tried: Prolog, Scheme

Verdict: Too bad, guess i need to work on this.

> Remember that there is a "computer" in "computer science". Know how long it takes your computer to execute an instruction, fetch a word from memory (with and without a cache miss), read consecutive words from disk, and seek to a new location on disk.
Total zero on this. But i am not sure if i want to spend some time on this in the near future. And i haven't really had a need for knowing this yet. This can probably wait.

> Get involved in a language standardization effort. It could be the ANSI C++ committee, or it could be deciding if your local coding style will have 2 or 4 space indentation levels. Either way, you learn about what other people like in a language, how deeply they feel so, and perhaps even a little about why they feel so.
Am not sure about this either. If he is referring to learning what people feel about different coding styles, probably i am doing it.

> Have the good sense to get off the language standardization effort as quickly as possible.
Don't need it if i don't even participate.

Overall my scorecard reads bad. But hey, i still have 3 years to learn programming.

Labels:

3 more years left to teach myself programming

Incidentally i remembered today that on this day in 2000 i joined my first company as a software professional. That leaves me 3 more years to myself how to program. Guess its time for some reflection.

Labels:

Wednesday, January 31, 2007

i dont have strong opinions about most things...

If someone were to ask me what i feel about rails/spring/whatever, i almost always don't have a good answer. And i think this is actually a good thing as well as a bad thing.
Good because i am not really biased towards any of these technologies/tools, and i think there are always intelligent ways to use them.
It is bad because when it comes to making a decision to pick any of these, i have problems making up my mind.

Labels: ,

Saturday, April 29, 2006

This is pretty cool...

check this out.

Labels:

Friday, April 28, 2006

Times are changing...

an ad on radio for an anti-virus software.
sigh.

Labels: