open formats

Open formats are cool. They’re cool for reasons I should not have to explain.

The new US Administration, in their stimulus implementation guidelines, has indicated that government agencies use feeds (Atom or RSS) to disclose how funds are being allocated.

It’s neat not only because the data is available, but also because people can do things with this data. People can chart and graph things, or create watch dog websites, or approval rating websites (on each allocation) etc. Open data allows people to do things. This is a good thing.

When throwing together demand a stance, I couldn’t find any open formats for contact information on members of parliament. The government does have this website, which returns MP information based on a postal code. Which is great, because it was exactly what I was looking for, except that the information is not in an open format (or an easily machine readable format).

So I wrote a scraper that extracted the information that was required. We threw the site up in PHP, I hacked together some pages, Fathima made it look pretty. We also threw in a whole bunch of javascripty goodness, for smooth flowing and what not.

But that doesn’t solve the open format issue. I decided to rebuild the site in Ruby on Rails. So as a starting step I’m extracting the information from the government website and presenting it in nicer HTML and also in JSON. So people can easily do what they want.

The test site is: http://das.nashahai.com/. Yeah, the page needs work. But it describes how to use the thing.

HTML: http://das.nashahai.com/mp/find/by_postal_code.html?postal_code=m1s5b2

You can view source on that and see the HTML layout. I think all the elements should be accessible via css, and can be manipulated using javascript.

JSON: http://das.nashahai.com/mp/find/by_postal_code.js?postal_code=m1s5b2

This returns a JSON object containing all the data.

You can find the code here: http://github.com/adnanali/das2/tree/master

I’m assuming that if I needed something like this then someone else will too. If you find any issues, let me know.

those of old

I just wanted to plug a couple of blogs. They are of those of old, though not the aged. They’re bloggers from the old days, circa 2002/2003. Like so many of us do from time to time, they had taken somewhat a break from the blogging world. Now they’re somewhat back.

You can find Uzer at Wistful Negligence. And Nadia at spinning here. Incidentally both are somewhere along their doctoring processes, although in different parts of the globe.

In either case, their blogs have that adnanist stamp of approval.

Yes.

up the hill

“You wanna switch?”, asked Jack, genuinely concerned. It had been a few hours since Jill had started driving, “You seem a bit sleepy.”

“Nah, I’m fine”, replied Jill.

“You know, I saw a sign a few miles back and the word ‘universe’ stood out”, said Jack, the wrinkled map in his hands. “We’re just trying to get from point A to point B, and that word, ‘universe’, makes me want to look up at the sky. I see the stars. They’re like dots to connect, you can find so many patterns and shapes, dippers and the like. It’s fascinating, thousands of people through out time have used these same stars to navigate their way across cities, continents, and oceans around the world. ‘Universe’, you… neeeee… verse. Separate the ‘u’ into ‘you’, reverse the ‘ni’ to ‘in’ attach it to the ‘verse’ and you get ‘you inverse’. ‘Inverse’, black to white and white to black, up to down and down to up. It’s like the universe is telling us something. We’re heading towards point B, but do you feel we should really be heading towards point A?”

“What? What in… what did… what exactly are you trying to say?”

“I think, my dear, that I misread the directions. We weren’t supposed to take that right turn an hour ago, we’re headed in the wrong direction.”

Both, Jack and Jill, burst into laughter followed by a sudden silence.

“Like I had said, we should have gotten the GPS. Oh, and by the way, I am feeling sleepy”, said Jill as she found a spot to pull over the car.

couchdb

My, oh my, has it already been over a year? Unbelievable.

I did play with CouchDB a little back then, and it was very rough. It has come a long long way since then. The potential was there then, and it is being realized now with a lot more potential left in storage.

CouchDB is a database engine, it is a very exciting database engine. It is, if I may describe it in this manner, beautiful. It is beautiful in the very sense of the word. Not simply for what it is, but for what it allows you to do and for it’s pure potential, the possibilities.

Most databases are relational, they consist of tables and tables consist of rows of data. It can be likened to an Excel spreadsheet. You can have multiple sheets in an Excel file, each sheet can be viewed as a table. Each sheet also consists of rows of data, and the columns represent attributes. Say in a schooling system, you can have classes, students, and teachers. So you would have a sheet to represent each of these. The students sheet would contain a row per student, and the classes sheet would contain a row per class and so on. A classes sheet would have attributes like: name, # of credits, schedule, teacher, semester, etc. All the rows in the sheet have the same attributes, so if an attribute were not to apply to a particular row, it would be left empty.

CouchDB has no tables, there is no schema. It stores documents. The documents can be of a certain type, like teacher or student, but unlike a table, not all the documents of a certain type need to contain the same attributes. So if an attribute does not apply to a particular document it simply does not exist in that document. This allows documents to be of the same type and yet be unique (kinda like humans). It is this flexibility and freedom from constraints that makes CouchDB so beautiful.

Developers are very used to the rigid way of relational databases, it is ingrained into the way we are taught to think. The freedom of CouchDB is awesome. But not all is hunky dory, there are still ways to go and there are things that can be easily done in relational databases that take more effort with CouchDB. However, in my mind, it’s worth it. The freedom and flexibility allow your mind to run in so many directions and consider so many possibilities (if you let it). You don’t have to have everything planned out before you start, you can just go with the flow and not worry about being locked in. Did I mention how beautiful this thing is?

CouchDB uses javascript to query information instead of the traditional SQL. The sweetness of this goes beyond the syntactic sugar. Once again, it changes the way in which you think about information.

This is quite the database engine. Sexy, if you will. =D

on the way home

might i make you laugh a little?
might i make you cry?
might just spread your wings a little,
catch a glimpse of you in the sky.


a penny for your thoughts?
though a penny’s not a lot.
not in all the world is copper mint
to match the way in which you think.


tell me where you are,
tell me where you’ve been
to take my mind off
the mess that i am in.


they have yet to make a pill
that betters all that ails us,
and for all the things we think to do
it’s our lack of thought that fails us.


this is not the poem,
not the one you sought.
just scattered words here,
a conversation with thought.

on thinking and doing

teetering on the edge I am,
teeter teeter

I have a headache. I need to wrap my head around it, but it seems to have me wrapped. I suspect that it is a symptom of thought, or of desire, or some combination thereof. But it is there. I can feel it.

I remember simpler times, when I just did things. It wasn’t as if I wasn’t thinking, I was, but that thinking happened in the process of doing. A shift occurred somewhere along the lines. The process of thinking overtook the process of doing. Maybe I was just done with doing, seeing as how I had already done it. Maybe not.

On the commute to and from work I started to read tech books (back in 04/05) even when I didn’t have any immediate use to draw from them. Some of them were on the deep tech aspects and others on the design aspects. It was basically a knowledge store, I wasn’t using this information for anything, I was just collecting it. At lot of it came in handy, when something was crashing or breaking, or when someone asked me a question a window would open up in the brain and I’d either know the answer, or know where to find it. Better yet, being able to combine two separate ideas to devise a possible new use. All this is good, but at some point all this thought collected and got to a point where I couldn’t implement the ideas I was holding (or maybe I felt I couldn’t). This was/is problematic.

It’s not like I didn’t try doing things. I’d load up the machine and get ready to string together ideas in code, and then I’d feel a thousand pulls from a thousand ideas, leaving me in a state of paralysis. Overload, crash and retreat. I would think things and not do things. So I’d leave things incomplete. This incompleteness is not particularly new, I can’t remember a personal project that I’ve “completed” to completion even when I was doing things. But now I would barely get started and get stuck. What is this state of “completeness” anyway? Maybe I started to believe there was such a thing as “complete”, and knowing I could not get there prevented me from doing anything?

I found myself going through this cycle with magic as well. First I learnt and did, then I read and read and read. When you read volumes of books with titles like “The Structural Conception of Magic” you tend to place more thought into magic. How can you not? And it’s great, I love that aspect of magic as well, it’s fascinatingly fantastic. But if you’re like me, to a large degree it prevents you from doing. Oh and there’ll be no false modesty here, I am very good at this magic thing.

I can see an effect and like it for what it is, but you can’t see an effect the same way after you’ve changed your frame of thinking on it. This has nothing to do with the secret of the effect or “how it is done”, far from it (anyone who really has a feel for magic should know that the secret is far from the Most Important Thing). So while I did magic the last couple of years, I wasn’t really there, I wasn’t in the magic, not as much. Hah, and I’ve only been doing this for 3 years now. All of this, of course, is going on in my mind alone, not like anyone else sees it or cares, nor should they.

But of late I’ve started to get that feel back, that feeling of raw excitement, an inexplicable trembling passion. I was watching a couple of my favourite magicians, stuff I’ve seen before, stuff I’ve done before, and l was very moved by the magic. It was exciting and fun. What I feel magic should be like, the flow and the feel. So awesome, so fluid. It occurred to me, how do they do it? These are people who have done magic for decades, thought and thunk, written books, performed thousands and thousands of times professionally and otherwise, they have forgotten more about magic than I will ever know in my lifetime. How do they do it? This applies to all the software monkeys too, they’ve designed and redesigned, built and torn, they have more knowledge in their left pinky nail than I will ever scratch. How do they balance this thought and action?

What should be my approach in comparison? Why am I in paralysis? Why am I not in a state of doing what I love?

It’s foolishness.

totter totter

your eyes

eyes?
what of them?
what about them?
they are objects for a romantic lover’s rhymes,
but not mine.

no,
i did not see or look into your eyes before
i was taken by the aura of your presence,
the rhythm of your actions,
and your raging imperfections.

your eyes?
i have already forgotten your eyes.

might I make you laugh a little?

I don’t have too much time on my hands nowadays, but this post will prove otherwise.

The following are my renditions of “your nose”.

“Normal”: [audio:http://www.jaaduhai.com/bol/nose.mp3] [direct mp3 link]

Then, for some odd God-forsaken reason I thought I’d play a little. And this isn’t going to fool anyone, it’s as phony as a very phony thing. I hope it makes you laugh, but if you cringe I know I did my job right.

[audio:http://www.jaaduhai.com/bol/noseeng.mp3] [direct mp3 link]

And I didn’t stop there, oh no. I went ahead and did this:

[audio:http://www.jaaduhai.com/bol/naak.mp3] [direct mp3 link]

And now I have no time on my hands.