Anything Else

Friday, June 29, 2007

Google Desktop For Linux: The Developer Angle

Lots of stories have been written on recent release of Google Desktop for Linux. A good news for Linux users, but what this really is about is gadgets. Their developer's site says:

The Google Gadgets API is a simple way to create little applications that run on multiple sites, including iGoogle, Google Desktop, Google Page Creator, and thousands of sites all over the web that use Google Gadgets for Your Webpage.

Google won't jump as much, but they sure are wooing the developers right now. Ajax Feed API, Google Gears, and now this. They are even offering money for developing gadgets.

Developers are a big part of what made Microsoft what they are. Google is making some quite strong silent moves to woo them.

Labels: Programming Google


Tuesday, June 26, 2007

Random Links


Monday, June 25, 2007

Insightful Commentry On iPhone

Since two years I have been waiting for an iPhone. Despite that I did not really follow various iPhone news too much, partly because of my aversion to the fanboy/hateboy extreme of emotions that Apple product attracts. vim vs emacs, linux vs windows and django vs the rest of them are sufficient to keep my plate full :-). Anyways, this article, talks about a lot of subtle news and side stories I missed. Good read.


Sunday, June 24, 2007

Brave Move By Google In Germany

Commendable.

According to information from Heise, Google warned that they might disable Gmail in Germany as last fallback should the German government maintain its position in regards to a newly passed law on record-keeping and supervision of internet traffic. According to this law, email services here will be forced to maintain personally identifiable records attached to email accounts.

Lets see how it unfolds.

Labels: Google India Calling Security n Privacy


Saturday, June 23, 2007

wikidBASE = Wiki X Database

Came across this interesting project, wikidBASE.

Wikidbase is a powerful and highly-flexible combination of two structural extremes of data management systems: a wiki and a database. As such, wikidbase has:

  • all of the flexibility of a wiki (e.g. any kind of unstructured data can be stored)
  • and the structural data capabilities of a database (e.g. data may be modelled similarly to database fields, tables and relations such that structural reports can me made of that data).

The functionality of a wiki and a database is combined in such a way that this general-purpose data management system may be shaped easily (without the need of expensive database experts) into a custom data management application (e.g. a contact relation management (CRM) system, a knowledge base, a shared calendar system, a project management system, etc.)

Read the overview for further details.

I have always been a fan of keynote, for my personal note taking, but there are times I wanted to have some way to store structural data. Things like "personal movie/book log" are rather structural, title of the book/movie, date-time I watched/read it, my notes about the book/movie if any, rating? etc. I am still not willing to give up Keyonote's trees and tabs and easy formatting abilities to move to a web based wiki, but this tool has made me think about it.

Labels: Programming Django


I Love Legal Drama

Here is the latest I came across.

Label: Humor


Friday, June 22, 2007

Online HTTP Page Load Analyzer

Came across this handy tool to analyze page load times online. It gives you nice colored display of all the components of a page, and the time it took to load them. So far I used to rely on a firefox extension for the same, which is probably more accurate, but this sure is convenient.

Labels: Programming Tips n Tricks


M4: Getting Started

According to m4's official online documentation:

m4 is a macro processor, in the sense that it copies its input to the output, expanding macros as it goes. Macros are either builtin or user-defined, and can take any number of arguments. Besides just doing macro expansion, m4 has builtin functions for including named files, running shell commands, doing integer arithmetic, manipulating text in various ways, performing recursion, etc.... m4 can be used either as a front-end to a compiler, or as a macro processor in its own right.

Linux would have it installed by default, windows binaries can be obtained here.

So seriously what is it?

Command Prompt: > m4
define(NAME, Amit)

NAME
Amit
define(AGE, 24 years)

My age is AGE.
My age is 24 years.
format('result is %d', eval(2*10))
'result is 20'
define(full_name, NAME upadhyay)

full_name
amit upadhyay
syscmd(dir *dbg)
 Volume in drive C has no label.
 Volume Serial Number is 7C69-CA73

 Directory of C:\Documents and Settings\amitu

06/22/2007  03:29 PM    <DIR>          bin-dbg
               0 File(s)              0 bytes
               1 Dir(s)   1,825,427,456 bytes free

define(`foo', `Macro `foo'.')dnl things after dnl are comments.
foo
Macro foo.

Things in purple are input, rest is output.

Why not your fav programming language? For most simple cases, m4 is much easier to read and understand, and you don't have to write and store scripts everywhere. Think of it as a simple templating language.

A disclaimer:

Some people find m4 to be fairly addictive. They first use m4 for simple problems, then take bigger and bigger challenges, learning how to write complex sets of m4 macros along the way. Once really addicted, users pursue writing of sophisticated m4 applications even to solve simple problems, devoting more time debugging their m4 scripts than doing real work. Beware that m4 may be dangerous for the health of compulsive programmers.

:-)

Labels: Programming Tips n Tricks


Thursday, June 21, 2007

Super Nostrildumbass

I predict Scott Adams is going to run for President sometime in the future.

Context.

Label: India Calling


I Was Right About Black Holes

I did not realize but looks like I solved the black hole information paradox when I posted about black holes a few days back.

Real scientists have come to the same conclusion. Via /.

Label: Science


Firefox Tip: Open New Tabs In Background

A handy tip from lifehacker:

Google Reader seems pretty neat, but it's always bugged me that using the "v" key to view a link opens that link in a new tab. I usually like to browse all feed items, open interesting links in the background, and then view the opened links [all at once].

In order to force all links that open in a new window to load in a background tab, type about:config in the URL bar and change browser.tabs.loadDivertedInBackground to true. While you're at it, be sure to grab some other Firefox tweaks, too. Thanks, J! — Kyle Pott

First thing I needed after installing a fresh firefox. Firefox 3 Alpha seems stable enough for my purpose, and uses lesser RAM than Firefox 2.

Label: Tips n Tricks


Tuesday, June 19, 2007

Django Data-Browse

Data browse was recently added to django. Databrowse is an application that creates browse user interface for your database. You don't have to write any code, just have to register the models/tables you want to allow browsing for. It was not obvious to me how it would look like, so I enabled it on my blog, you can browse this blog's post and categories etc here. As you can see it is pretty comprehensive view of your database. What about django's admin application? Admin is not very suitable for browsing purpose, and is primarily meant for administration only.

Label: Django


PP on Product Management

An excellent post about the role of product management.

A gem of an idea in that post includes the concept of "strong opinions weakly held". [RG points to the source]:

to deal with an uncertain future and still move forward – they advise people to have “strong opinions, which are weakly held.” ... weak opinions are problematic because people aren’t inspired to develop the best arguments possible for them, or to put forth the energy required to test them. ... it is just as important, however, to not be too attached to what you believe because, otherwise, it undermines your ability to “see” and “hear” evidence that clashes with your opinions.


Sunday, June 17, 2007

Universe, Black Hole Etc

A para from The Physics of Star Trek.

... the only black holes we have any evidence for in the universe today result from the collapse of stars much more massive than the Sun. These collapsed objects are so dense that a teaspoon of material inside would weigh many tons. However, it is another remarkable property of black holes that the more massive they are, the less dense they need be when they form. For example, the density of the black hole formed by the collapse of an object 100 million times as massive as our Sun need only be equal to the density of water. An object of larger mass will collapse to form a black hole at a point when it is even less dense. If you keep on extrapolating, you will find that the density required to form a black hole with a mass equal to the mass of the observable universe would be roughly the same as the average density of matter in the universe! We may be living inside a black hole.

Wow! Interesting if true. Another para about blackholes:

You may notice that I referred to a black hole as "hiding" a singularity at its center. The reason is that at the outskirts of a black hole is a mathematically defined surface we call the "event horizon," which shields our view of what happens to objects that fall into the hole. Inside the event horizon, everything must eventually hit the ominous singularity. Outside the event horizon, objects can escape. While an observer unlucky enough to fall into a black hole will notice nothing special at all as he or she (soon to be "it") crosses the event horizon, an observer watching the process from far away sees something very different. Time slows down for the observer freely falling in the vicinity of the event horizon, relative to an observer located far away. As a result, the falling observer appears from the outside to slow down as he or she nears the event horizon. The closer the falling observer gets to the event horizon, the slower is his or her clock relative to the outside observer's. While it may take the falling observer a few moments (local time) to cross the event horizon—where, I repeat, nothing special happens and nothing special sits—it will take an eternity as observed by someone on the outside. The infalling object appears to become frozen in time.

Emphasis mine. What it means is nothing can fall in a black hole in any finite amount of time, so nothing can be inside event horizon that was not already there.

UPDATED: Last paragraph actually stated a solution for black hole information paradox. More.

Label: Science


Saturday, June 16, 2007

Women in Tech

Came across this interesting article about whys of women not enough interested in tech story. If you can tolerate the numerous I-s and me-s in the first four paragraph, there are interesting things in it. Its a long article but the gist of it is:

Men are generally very good at ignoring bad behavior.

This is both a blessing and a curse. In my most recent office environment, we had situations where a male colleague’s behavior was abrasive in one of these three ways mentioned. “That sucks, doesn’t it?” I asked another male colleague. “Yeah, but I just ignore it. That’s just the way he is. He is always like that” He responded. This is what I’ve seen as the general male way of coping with this poor communication style.

It’s a blessing that many men can ignore it, in the sense that most men do not get caught up in deep analysis of why this person said a specific thing, and what this person could have really meant, etc. When almost everything is taken at face value, and not over analyzed, the ability to ignore communication issues makes it is easier to resolve the simple issues, and move on. I have seen some women in office environments do the over analysis, and take offense when there never was one given. I don’t see men do this very often, and it makes communication quicker and easier.

Ignoring communication issues is also a curse because one obnoxious person is allowed complete freedom to make excessive noise, be rude and disruptive, or explicitly offensive. Most men, online or in the office, will ignore it. Most women will notice it but not say or do anything about it, for a variety of reasons which are tangential to this article. The offender often thrives on the fact that no one told them to stop, so they continue. Sometimes the offender is not socially adept enough to pick up on the fact that ignoring implies intolerance at some level. They somehow missed the message most three year olds learn: “I’m ignoring you because I don’t like your behavior”, so they continue the intolerable behavior.

This is so prevalent in online tech communities that it is the primary reason why many women do not participate. The poor communication and behavior of even one boorish, ego-driven, elitist, socially inept geek is just simply intolerable for most women. Women generally tend to assume that everyone will be conscious of and annoyed by this behavior. Men tend to assume that everyone will ignore it. This causes problems in offices as well as in online communities, where women will complain about such behavior, and men will issue responses such as “toughen-up”, or “what’s the big deal?”, because this is how they cope with the problem. A female-friendly group addresses and tries to resolve these issues, while the average group ignores it until/unless the person does something heinous.

Well said. I have only this thing to add, if you see a guy cracks a joke on you and people are smiling, it has got little with you and more with the smartness/dumbness of what has been said. You can say he was insensitive, or others should have help, but in this situation, you are only the context. Also every time you say/think the words I/me/my, imagine a virtual beep, and try to avoid it, as it can only be either of boasting, or of over analysis.

In the article:

Apparently there are males online, in tech communities, who still believe that, like the cigar rooms of the Victorian Era, tech rooms should be male-only. Back then, the predominant purpose of smoking cigars in a common room was to have male-only space, and similarly today, the purpose of the demeaning and fight-provoking attempts is to maintain the male-only presence of some online tech spaces. I know for a fact this happens with intent in some online chat rooms and message boards. It is not simply an act of oblivion, but a concentrated, misogynistic effort between like-minded men to keep women out.

This can not be further from truth. Its just I-me-over analysis speaking.

Bottom line is this: technical field is all about technical correctness. Computers/electrical circuits/engines/airplanes dont' understand tone, they understand correctness. If you want to succeed in technical field, you will have to learn to ignore what does not matter(emotions), and focus on what does(technology and correctness). Think if they are right or wrong, not of the manner in which they communicated.

Emotion is the way to the dark side, blind you it will.

Label: Programming


Wednesday, June 13, 2007

Blog Recommendation: Jon Swift

I randomly came across his blog, and have been reading it for a while. Start with this post. Warning: Some posts are difficult to understand, as the context is lost in sarcasm.

Label: Humor


Monday, June 11, 2007

Django Image Bundle

One of the most important factor in a users percieved performance of a website is the initial page load time. Initial load time depends on backend performance, time it took for the backend to generate the HTML page, and front end performance, the time it takes for the browser to download and render the HTML and all its dependencies. And it turns out that browsers typically take much longer to download dependencies than the original HTML page, due to browser pipelining. Look at the chart below:

As one can see, most of the time is spent in downloading the images, especially problematic for image heavy sites. Read Yahoo! UI Blog's entries on this topic for futher details.

Google recently released GWT 1.4, and one of the features introduced in this release is ImageBundle. The basic idea is to bundle all the images into one at the server side, and use CSS sprite technique to render them. Inspired by it, I just finished an implementation of "Image Bundling" for Django. Here is a demo of the same. The original template to generate the page is here. Look at the bundled image. And the image bundle template tag library can be downloaded from djangosnippets.com. As an added bonus the size of bundled image is about 70% of the total size of individual images, so one can save both total bandwidth, and number of http requests.

This is still the first cut solution. Both this and Google's ImageBundle face an issue when dealing with images with padding, google suggests to avoid padding, or put a wrapper div around the image and put the padding on it. Another issue is images in CSS. They are to be handled slightly differently, but to still keep the output image count to one, some kind of bundle naming is to be done. Google's approach here is creating bundles and using them as two separate steps, I have tried to combine the two together for greater flexibility.

Labels: Python Programming Google Invented Here Django Tips n Tricks


Sunday, June 10, 2007

labelr: Closure

This is a very old news for all directly affected. About a year and a half back, I started this project to allow category support to blogger hosted blogs. It went well in intial testing, and near the end I had about 300 blogs using it. It was a django powered website, and hosted on dreamhost, and for some reason dreamhost was just not reliable enough for this service. One of the specialty of this service was if it goes down, it takes down all those 300 blogs with it. After a series or reported incidents I was forced to shut it down, for lack of any technical solution, as I did not have time and money to get a new hosting service. So here is an apology for all the people using labelr, for its shutting down abruptly.

The culprit here was my stern requirements, "not a minute downtime", especially difficult for shared hosting services. Dreamhost should not really be faulted, as they do not officially support django, and are ideally suited for PHP based and static websites. They are still my favorite for running mediawiki and keeping backups [they give huge amount of space] and are really cheap. There support staff is usually good, so please do not look at this take down as to indicate too badly on them.

Off late I am using webfaction for hosting my blog, and other django applications. They are really seamless to start, I had the website running in less than 20 minutes since I got the account activated, including all learning, configuration etc. They give you your own instance of http, which is really cool. Trac is much easier to install with webfaction than dreamhost for example. If you are looking for a place to host django website, I highly recomment webfaction, for mediawiki, enormous amount of disk to archieve all your mails, or for running wordpress/mediawiki, go for dreamhost [they have the best backup solution I have seen implemented, snapshots].

I intend to release the source code of labelr, but its right now in terrible shape, may be I will write a few articles about the specific things worth taking away from that work.

So dear labelr users, sorry for the shutdown, and thanks for the enormous amount of support and interest I recieved from you guys, I still have more than thousand unread labelr beta request in my mail box.

And comments are not working as of now, so please mail as of now.

Labels: labelr Invented Here Django


Friday, June 8, 2007

Blog Recommendation: The Atom Smashers

If you have time, check out this blog, the atom smashers, by a documentary film maker. About making of a file and higgs bosons, and race to find them.

Label: Science


Google Book Search: Some Facts

Latest blog from Lessig:

Remember (and I did a 30 minute preso here to explain it) Google Books proposed to scan 18,000,000 books. Of those, 16% were in the public domain, and 9% were in copyright, and in print. That means, 75% of the books Google would scan are out of print but presumptively under copyright.

The publishers and Google already have deals for the 9%. And being in the public domain, no one needs a deal for the 16%. So the only thing the publishers might be complaining about is the 75% which are out of print and presumptively under copyright.

With respect to these, Google intends to index the books, and make them searchable. If a hit comes through the search engine, Google offers snippets of the text relevant to the search. The page includes links to libraries where the book might be borrowed; it includes links to book stores where the book might be purchased. And, I take it, if the “publishers” were to choose to publish the book again, it would also include a link to that publisher.

Finally, any author who wants to be removed from this index can be removed. As with Google on the net, anyone can opt out.

Context.

Label: Google


Thursday, June 7, 2007

Blog Reborn

After using Blogger for years, finally moved to home brewed blogging system in django. The biggest challenge was to make sure all links keep on working, and data migration. BeautifulSoup is your friend, if you are thinking of getting data from arbitrary services.

Lots left to do, archive page is giving some problems, comments are not there yet, feed is not working still; but am glad to be back to blogging.

Label: Django