Archive for the ‘Design’ Category

Code Runway

Thursday, December 28th, 2006

What if there was a Project Runway or even an American Chopper show for programming… what would be the (minimal set of) qualities to judge on?

  • Elegance (of algorithm, of code)
  • Simple flow
  • Attention to detail (corner cases)
  • Efficiency
  • Scalability
  • “It Just Works”
  • … hmm, what else?

REBIEX

Monday, November 21st, 2005

Parshu (a colleague in Y! Bangalore) is presenting a session on REBIEX: Record Boundary Identification and Extraction Through Pattern Mining at the 6th International Conference on Web Information Systems Engineering, New York.

Concepts

Tuesday, November 8th, 2005

I finally got around to reading Stroustrup’s “The design of C++0x”, and was impressed by Stroustrup’s sense of language design, especially the clarity of thought with which he presents the topics.

I still haven’t understood the part about “concepts” though. I wonder how it is different from interfaces (in Java).

Logical art

Thursday, October 6th, 2005
  • Rands in Repose has written a thoughtful article “Signs of Art” where he asks “Is software art”?

I think I’ll answer “Hell yeah”.

The most important thing in software development is motivation. Motivation is local — if you aren’t motivated by what you are working on right now then chances are it’s not going to be anywhere near as good as it could be. In fact, it’s probably going to suck.

Food for thought, eh?

  • Jason’s talk about the lessons learnt while building Basecamp is a must-hear, especially the part about the four main tenets - reducing mass, embracing constraints, getting real in the process of development and managing debt.

Insightful books about Computing

Friday, July 29th, 2005

Banker asked me whether “you know of any good IT bios, or books related to gaming or animation or coding that are interesting enough to a layperson”.

So, I came up with:

Any other recommendations?

Note to self: I should read all the essays in these books as well.

Tiger Dictionary

Wednesday, July 20th, 2005

Just discovered a new shortcut for the Dictionary in Mac OS X Tiger - Press Cmd-Ctrl-D and voila, it shows the meanings of the selected word in my browser!

Shortcut to see dictionary meanings

P.S. In case you are wondering, I’m reading the RSS feed for Sepia Mutiny.

Update: The shortcut works everywhere, not just the browser.

Update: Premshree has written a Greasemonkey script that does the same for you on Firefox, although I don’t know if it’s okay by OneLook’s TOS since it does site-scraping.

SQL and XML are not that different

Monday, May 9th, 2005

About a year ago, I had presented my 8th semester presentation on Xen, now called C Omega. It is a language that combines SQL, XML and OOP into one tight language. The paper that proposed this language was named Programming with Circles, Triangles and Rectangles. The circle represents the encapsulation behavior of objects and OOP, the triangle represents the tree structure of the XML and the rectangle represents the tabular structure of databases.

Video of Anders Hejlsberg talking about C# 3.0

I recently came across Anders Hejlsberg’s interview on Channel 9 regarding programming data in C# 3.0 and it looks like C-Omega is going to be ‘merged’ into 3.0. Its amazing that MS has taken this concept (which seemed totally radical to me when I first read about it) to production quality and is actually going to make this a core part of their platform.

Let us consider an example of using C-Omega. Suppose you want to handle books in a program used to manage libraries. Then you could write a book class using C-Omega as

[code] public class book { sequence { string title; choice { sequence{ editor editor; }+; sequence{ author author; }+; } string publisher; int price; } attribute int year; } [/code]

The cool part is that the above same class can be used to store the data either as XML or in a relational database. You can also instantiate an object using XML syntax:

[code] book b = SwaroopC H www.byteofpython.info 250 ; [/code]

Note that this syntax is still static typing. Needless to say, the C-Omega compiler must be one heck of a monster.

The Python connection is that the C-Omega-ish method of access will probably be included into IronPython at some stage. Even if that doesn’t happen, we already have Pythonic ways of doing XML as pointed out long ago by wspace.

If you have ever written a program that uses databases, I highly recommend reading the Circles, Triangles and Rectangles paper. It just might change the way you think about databases and SQL, or even XML for that matter.

You can also download that old presentation of mine on Xen.

G4Swaroop

Wednesday, April 27th, 2005

A close friend of mine had been to the US for work in his company’s headquarters. I had asked him to get me a laptop and I’ve been playing with it since the night before yesterday.

What kind of laptop? It is a 12-inch Apple Powerbook with Mac OS X 10.3.9. It has a 1.5 GHz RISC processor (apparently, equivalent to a 3GHz CISC processor such as Intel/AMD ones) with 512 MB DDR RAM, 60 GB hard disk, Combo drive which can read DVDs and write CDs, a GeForce video card with 64 MB dedicated video RAM, Airport Extreme for wireless networking, Bluetooth built-in, very clear speakers, keyboard with big keys (really like that keyboard), and much more. I haven’t been able to grok all the features, let alone explore all of them…

My new PowerBook

I have never used Mac OS before in my life, so, it’s difficult exploring the computer. My previous experience with computers is not helping and the keyboard shortcuts are a bit different and they depend on the special Apple key (which they call ‘Command’ key).

The first thing I tried was to get online. After 20 min of exploring, I finally figured out how to change the IP address, netmask, etc. I think I am getting the hang of using the menus.

The graphics in Mac OS, needless to say, are very appealing. The rollover effects for the tray (or whatever they call it in Mac), the genie effect when minimizing a button, etc. are nice. Pressing F9 causes all the windows to be rearranged such that you can see all of them, click on the window you want to see and it comes up in front. Very nifty; after all, there is no taskbar.

The software installed is amazing as well. I hope to get used to Garage Band soon so I can make starting songs again (I had made one song using FruityLoops a long time ago). The DVD player immediately popped up when I inserted the Yahoo! 10th Birthday Videos DVD (I was so inspired when seeing those videos but that’s another story). All the interpreted languages like Python, Perl, Ruby, PHP were already present. That reminds me that Mac OS X is built on top of Darwin, an open source core based on BSD. iTunes provides a one-click import interface for my Audio CDs. It was a breeze to transfer the songs to my iPod.

If you are still wondering about the “g4swaroop”, my friend joked that I should change my handle from g2swaroop to g4swaroop (because of the G4 processor of the PowerBook) - I thought that was an appropriate title for this post since this is the first post using the PowerBook :)

I still have a lot to explore. I hope to get the hang of it before my copy of Mac OS X 10.4 Tiger arrives. I also have to figure how to “install” software - I have to figure out what the .sit, .dmg and .mpkg extensions mean… that means time to explore the Help (Command-?).

W.r.t. Powerbook and Mac OS X, I would appreciate any words of advice from the Mac veterans :)

Mark down my email

Thursday, April 7th, 2005

Here’s my weird-but-yet-interesting idea of the day…

In most mailing lists (including non-geeky ones), HTML mail is usually discouraged but the newbies still want to make use of bold and italics and the rest.

So, here’s my simple solution:

Allow the user to use a rich text box to get all their HTML-coolness but instead of sending raw HTML, send across the text formatted in Markdown syntax.

The advantage is that the recipient actually has a choice of seeing a plain text view or a HTML fancy view. This also encourages “clean mails”. Power-users will like this feature as well.

P.S. Of course, Markdown is not the only choice of semantic text styles, there are many choices such as reST, Textile and the plethora of wiki syntaxes. I just find Markdown to be the simplest and most readable of the ones I’ve used.

I write all my posts using Markdown and it has never gotten in my way of writing and yet works well. That says a lot about its good design.

The Apple bites back

Wednesday, March 30th, 2005

The webosphere is all about design and aesthetics these days, which is of course, just what the doctor ordered and mainly thanks to Google and Apple (yes, I know you were waiting for me to say that).

And when Paul Graham says we are now witnessing the return of the Mac, people sit up and take notice (my iPod agrees with me too).

I especially liked this part:

So what, the business world may say. Who cares if hackers like Apple again? How big is the hacker market, after all?

Quite small, but important out of proportion to its size. When it comes to computers, what hackers are doing now, everyone will be doing in ten years. Almost all technology, from Unix to bitmapped displays to the Web, became popular first within CS departments and research labs, and gradually spread to the rest of the world.

That reminds me of the Shufflephones hack that my friend Jim has made. Now, that is something really designer-ish but very usable at the same time:

Shufflephones

He even has a whole blog dedicated to shuffle hacks.

I try to always keep in mind that ‘Usability and Simplicity’ are the two most important factors for anything to succeed. It almost feels like Apple invented that concept.

This also means that I’m getting a Powerbook soon. I can’t wait.