Friday, December 28, 2007
Everybody needs to wear sunscreen
Wednesday, December 12, 2007
Social Graph for the Enterprise
IT always catches up a little later with the management and organization practices. Organizations have been experimenting and implementing matrix organizational structures for over 20 years. However, every employee table that I've ever seen has only one column for Manager. I wonder what could be the reason for that?
Most transnational organizations, prefer matrix structures to promote autonomy and to focus on regional strategies. Furthermore, the advances in IT in the enterprise has enabled managers to have a much wider span and has resulted in considerable reduction in the height of the organizations. When I say height, I mean the number of hierarchical levels in an organization. Organizations in business which demand creativity like software development or advertising, generally are much flatter than the older manufacturing firms following the organizational models created during the Industrial revolution. So the flatter organizations would have culture/values which promote interaction, entrepreneurship and transparency. Unfortunately, today's enterprises do not have the requisite IT infrastructure to foster such a knowledge community. Majority of the organizations do not yet have internal blogs or wikis. Even if they do, the level of awareness and the participation is abysmally low.
Let us assume a case of project management in a matrix organization. Every project has a project owner and each project creates a wealth of knowledge for the organization. Most of this information lies as word documents or excel files in a file share. Every developer/engineer working on the project could potentially be reporting to two/more people, his line manager and his functional manager, who would usually be the project sponsor. Further, if the organization employs a 360 degree feedback and appraisal system, we would need to identify his peers in every project that he had ever participated in. The current X.500 based directory servers like Active Directory or NDS provide the tools and infrastructure for a hierarchical organization. This necessitates that the project management system holds information about projects, its members, its sponsor and so on and this system is usually a closed system. Of course, it could provide certain integration possibilities using BAPIs, RFCs or web services but the information about the relationships is essentially in the system.
Let us see how the system evolves, if we have the Social Graph as an underlying infrastructure component. The social graph contains information about users, networks and groups. It has restful APIs to perform CRUD operations on each of these. Users can belong to multiple groups but can belong only to one network at a time. The network can be seen as an SBU/LoB or a division providing shared services. All the changes are timestamped and can be undone. This is essential for the integrity of the system. In addition to users, networks and groups, the social graph infrastructure could allow applications to park objects, permissions and authorization information along with the same. Let us visualize how a project management system can be built using this infrastructure alongside couple of other applications.
We could have weblog and wiki applications. Weblog application can provide permissions to comment or edit/create a blog to particular user or group. It can even restrict the visibility of the blog to some networks or groups. It can use the ATOM publishing protocol to enable RSS readers and third party authoring applications to integrate. We can do the same for Wiki pages. In fact, the comments module can be a separate application which can be mashed up with both blog objects and wiki page objects. We can then have a profile application, which provides profile pages to users, groups and applications. Profile can have the appropriate information about the group including the details such as the Blogs, Wikis and their corresponding RSS feeds that the user/group would like to expose. We could have RESTful web services exposed on each of these applications.
Now the project management system can create groups for each of the project and can add the appropriate members. It can setup a project wiki with the appropriate permission set and setup a project blog and create a profile page of the project. The project management system can now improve collaboration by assigning and tracking work packages.
You can observe that you develop small focussed functional modules which can be mashed up easily using the social graphs as the underlying infrastructure. I don't mean to say that the social graph is the silver bullet for organization's knowledge management issues. But it is about time that we acknowledge that we are trying to shoe-horn a tree when the problem actually mandates a graph.
This was supposed to be a mail to Ajith. But I thought it would be better off as a blog entry. Just a way of saving keystrokes. :-)
Tuesday, November 27, 2007
A Java that doesn't suck
In short, it is a Java that doesn't suck.
Here are some of the resources that would help you get started with Scala.
Scala Home - http://www.scala-lang.org
Scala for Java Programmers - part 1 - http://blogs.sun.com/sundararajan/entry/scala_for_java_programmers
Scala for Java Programmers - part 2 - http://blogs.sun.com/sundararajan/entry/scala_for_java_programmers
This is a nice video by the creator of Scala about building component systems and how scala is relevant in this context.
Tuesday, November 20, 2007
Sunday, October 14, 2007
How I started off with Haskell and wound up with Lisp
I then came across this tutorial, which teaches you to write a Scheme interpreter in Haskell in 48 hours. Really Cool. I fell in love with Lisp immediately. I googled for Lisp and I discovered that there are many dialects of Lisp. The most popular ones are Common Lisp and Scheme. I decided to go with Common Lisp for some unknown reason. I guess because it had Lisp in its name :-). I then had to find the right implementation for my platform. Being a GNU fan, I picked the GNU CLISP. As it turns out, it is a horrible implementation which does not support threading and is painfully slow. But it was fine for the small programs that I use for learning. I have Ubuntu Feisty on my "home" laptop but I spend most of my time on the office laptop which as you all might have guessed, runs "Windows". There are many good commercial implementations for Windows but I was looking only for open source software. GNU CLISP seems to be the only fully functional Common Lisp implementation. I've worked with SBCL and found that okay too. I did not run into any major issues but their website has an yellow status for SBCL on Windows and a big bold notice saying that it is an experimental implementation. But for learning purposes, I guess it is just fine.
I followed a really cool Lisp tutorial, which is actually a book by a guy called Peter Seibel named Practical Common Lisp. It is a free online resource.
One of my biggest barriers to entry was my text editor. I was a 'vi' guy. As I browsed for help on Lisp, I kept finding these cool emacs extensions for lisp programming. I then took the dive and started using Emacs. It was very painful in the beginning. My fingers automatically pressed the
So this is your startup kit for learning Lisp.
- Common Lisp implementation - CLISP or SBCL
- Lisp Tutorial
Emacs Slime
Friday, October 05, 2007
Really achieving your childhood dreams
Sunday, September 23, 2007
Lisp Tutorial
Update: Made the post title a link and point it to the book.
Friday, September 14, 2007
I nuked my windows partition
Wednesday, August 29, 2007
Building Websites
One of my co-workers asked me today that he would like to build a website. A freewheeling discussion started from Google Calendar, software as a service, dynamic languages, web frameworks, open source and so on. But finally he asked me to send some material on building a dynamic website which is also cost effective. I hunted on Google and could not find a single resource that kind of captured the essence of our discussion and that results in this blog entry.
His idea was that he had a dance studio that wanted to get on the web. Basic stuff like events management, feedback, news and so on. A bit of e-commerce involving selling some salsa dance related goodies like dancing shoes and so on. So there it goes.
Domain Registration and Basic Hosting
If your site is a bunch of blog posts and set of static content, then you can get away with paying only for the domain. It would cost you about $10/year. Choose your domain registrar carefully and make sure that the registrar supports a good control panel to change your DNS entries as you wish. Some domain registrars require you to send a mail to them to change your CNAME records. And frankly, that sucks. NearlyFreeSpeech.Net supports a nice and elegant control panel to manage your domain entries.
Most blogging sites like Blogger allow you to host a blog on your own domain. One other thing that you have to do is to get Google Apps for your domain. That makes setting up email and calendar on custom domains really easy. Google Apps for your domain comes with Google Pages which are static HTML pages. Their page construction tools are not very helpful but some space is better than no space at all.
Cranking out your Web App
The next thing to do would be to crank out your web application. There are several choices you have. In fact, down right daunting. Since my good friend is a enterprisey kind of guy, let me place this advice right at the beginning.
Don't even try building a serious website with ASP.NET or J2EE. It would take forever and you are tying yourself down to a track facing an oncoming train. Chances of your survival are nearly zero. One of the hassle free solutions which would quickly get messy is to use some Content Management System like PHP Nuke or Post Nuke. This would help you get started very quickly but you cannot do much one you get started.
Alternatively you can crank your own PHP app with the Ruby on Rails wanna be frameworks like Cake or Symfony. I only suggest this because PHP hosting is well supported and easy to setup with a shared hosting partner. NSFN has some pretty cool plans. Check them out.
Alternatively, if you are ready to do some hard work, you can create a Ruby on Rails or a Django based web application. Both these frameworks are pretty good. I am not attempting to start a Ruby or Python war here. I have not hosted Ruby on Rails applications. But the word on the street is that Ruby on Rails deployment is a little more difficult than Python with mod_python. There are camps on either side throwing spit balls at each other. But I would like to refrain from commenting either ways. Look at it this way. Frameworks like RoR, Django, TurboGears (or is it Pylons??) help you achieve tremendous productivity. You will just have to swallow the pill and deal with deployment. Even though I love python and Django, I would have to commend the Ruby on Rails community for keeping change management in mind while designing the framework. You have stuff like Migrations and Capastrino to save several hours of upgrade headaches. I give two thumbs up for Ruby on Rails. :-)
If you are impressed by Django's admin interface capabilities. I would strongly suggest you to look at Streamlined. The amount of code you write to create a fully functional application would be considerably reduced by using these tools with prudence.
For static content, you must seriously consider Amazon's Simple Storage Service. It lets you park your static content for a very low fee. You would save tonnes of hassles if your hosting provider pulls you down for exceeding your bandwidth capacity.
If your target audience is small, I reckon that you might get away with paying about $10-$15 monthly and about $7-$10 yearly for the domain registration.
Suggestions for the Dance School
Now that I have scared you with the options and have left you dazed and confused, let me tell you how I would go about getting the dance studio on the web.
- Calendar - Google Calendar (no doubts about it). It has simple and clear API to integrate it with your application.
- Feedback - If the feedback is on particular articles, then you can simply use feedback articles on your blog. Google Calendar also supports comments.
- Static Content - Use google pages or Nearly FreeSpeech.NET's hosting. Its pretty cheap and is pay as you use.
- ECommerce - Now you are talking web-apps. I would strongly recommend Ruby on Rails. Throw the hosting question to the community. You will get tonnes of replies. Evaluate them and choose the best. Make sure that you ask the hosting provider about a reference customer so that you could validate your evaluations.
All the best to you all.
Friday, June 22, 2007
Getting fked by OO write
Do you guys know a PowerPoint equivalent on Linux? I don't want to use stupid flaky open office and nor do I want to run Wine. If you guys have any other suggestions it would be great. BTW, Google! When are you building the offline stuff into your docs and spreadsheets. Are you going to have a presentation software?
Wednesday, June 06, 2007
Google Gears - Woohoo!
There are other projects that are coming up on Google Code hosting related to Google gears. One of the more interesting ones is gears-dblib. You have other pointless projects like Tuiki. Nevertheless, it is good to get you up and running with Gears. Have fun coding. :-)
Tuesday, February 27, 2007
Not so angry response to "Eight Years Later...and Linux Still Sucks"
I understand the frustration that you experienced. And I can totally relate to that. But it is really not the fault of Linux. You faced exactly 3 problems
1) Monitor detection and configuration
2) Unable to play proprietary file formats
3) And problems with uninstallation which was due to the proprietary file formats issue. A problem nevertheless.
I agree that 1 and 3 are problems. Although the 3rd one does not qualify completely. Have you used synaptic? I always found the Ubuntu's Add/Remove should be replaced with Synaptic Package Manager. But telling that "Linux" totally sucks is very misleading. Your comment should instead have been "Ubuntu sucks for me.". I have been using Linux for the past few years and it has its fair share of annoyances. But guess what nothing beats the annoyance of a virus/worm/spyware on a Windows machine.
Let me share the incident which prompted me to switch to Linux. Note that I was always an open source fan for its economic reasons and I was okay doing open source on Windows. I am not one of the raving fanboy type of guys. I am not an illiterate computer user either. I've been working on these things since my school days. I always used to log on as restricted user in Windows for the fear that Windows might catch a virus. I diligently updated my antivirus periodically. I keep changing my passwords. I make sure that my Run/Runonce/Startup menu items are clean. I was kind of paranoid about it. But this one day, I got a media player with my korean DVD drive which required administrative access to run. Not to install... just run. So I used to run that in the adminstrative mode using the RunAs command. Safe - I would presume as this is the only application that runs with the elevated privileges. The player software when closed used to open an instance of IE to check for some stuff.. (for updates I guess) and close it in the background. Unknown to me, IE had somehow got infected and through that my whole system had been compromised. It affected all my executables on my drive. Some of my programs started behaving in a funny manner. I did not notice this until I ran python. The infected executable when run would actually run the virus and would create the actual executable image with a file name of extension .hwd and create a new process. I would have two processes running for each infected executable. The module names for the processes were executable.exe and executable.hwd. Before I knew it, the virus had completely blown away my windows installation. Not one of my executables were sane now. I tried cleaning them but PandaAV was not much help and it got infected. I forgot the name of the virus. :-( Thats when I decided that I would switch to Linux.
My initial experience with Fedora Core 4 was horrible. I had to do everything myself. RPM this. RPM that. Broken dependencies and what not. But I had been through hell with Windows which made this a cakewalk. But I ultimately got frustrated with Fedora and decided to try Ubuntu 5.04. I guess it was called Hoary Hedgehog. The installation was very pleasant and synaptic and apt-get was really cool. I upgraded to breezy after that and haven't looked back. So my statement would be "Fedora sucked for me" but "Ubuntu is great for me." I had no problem connecting to the universe and multiverse repositories to get the ugly plugins. The folks in the community are quite helpful unlike other communities that I have interacted with. You should probably try a linux distribution like Linspire. It is lot more polished than Ubuntu and would definitely solve your virus and worms problem. Linspire has legal codecs to play proprietary formats. You even get the benefit of real customer support. Before dismissing Linux of completely, I would suggest that you have a look at the existing distros, give it a spin and give a fair assessment.
I guess, I am really in the mood of ranting this evening.
Is piracy good for Microsoft?
I was watching this video on Cranky Geeks and they were talking about Romania and piracy. The story is covered here.
"Software piracy has many negative economic consequences, such as local software industries being crippled by competition with pirated software from abroad, and lost tax revenues and jobs from the lack of a legitimate market," said the BSA report.
"These costs reverberate up and down the supply and distribution chains."
I was not surprised. I find this it was extremely immature and stupid on the part of the government. I am from India and I can relate to this. The government and people here are equally immature and stupid. I believe that we are painting ourselves into a corner. What appalls me is the ease in which we can get pirated software vis-a-vis their open source counterparts. We can get pirated software from friends, or a walk on SP Road or any of the PC assemblers. But to get the latest versions of open source software and its documentation in terms of books is an extremely costly affair. If you don't believe me visit Gangarams or Sapna Book house and look at the price of linux distros there. I do not believe that technical superiority is responsible for the liberal presence of Windows operating system in Indian homes. It is due to its easy availability of pirated software. System assemblers know Windows better than Linux. The people who get it buy computers for browsing, surfing, watching movies and playing games. And not to mention the uncles and aunties fiddling with worthless astrology software that runs only on DOS (yes! you heard me. DOS!!!) and Windows. Probably we must make such astrology software for Linux and make it available on Live CDs for all these maamas and maamis to try it out.
I have some friends who are Indians living in India and yet buy Windows XP Home licenses. Can you believe that? They definitely are the minority. They are statistically insignificant. And some of them do have a Ubuntu installation safely tucked into one of their partitions. They were actually sold on the fact that Microsoft can actually track you down and sue you for using pirated versions of their software. But when that does happen, then the whole country has to be worried. IRCTC's website does not work well with Firefox. I book my tickets most of the time with IRCTC. Indian airlines' website does not work well with firefox. ICICI's website has just started working with Firefox. We are actually glued on to windows. I cannot find a single indian music site which works on flash audio like www.odeo.com or www.pandora.com. My favorite is www.musicindiaonline.com, which hosts an ActiveX control. I am not against Microsoft but I believe that it is not an economically viable alternative for us as a nation. I strongly believe that India is better off with open source software. Wine is not the solution. It will only worsen the situation. What we need is cross platform applications.
Microsoft will not bother about piracy in India as it is generating a huge talent pool and establishing a base of future customers. These customers are already trained on Microsoft software. So the organizations that hire them run Windows. Even the Java schools have a starter program for the computer illiterates and they start of with Microsoft Office, Internet Explorer and Outlook Express. Why don't they start of with Ubuntu or Linspire? Why dont they teach them the Google life. I am not against Microsoft or Windows. I am against the fact that we think it is smart on our part to pirate software and use it while all we are doing is increasing the liability on our employers and India Inc., as a whole. Open source software can solve most of these problems. With increased broadband penetration and web increasingly becoming a platform, we must get away from IE and ActiveX as far as possible have cross platform technology solutions.
Both Windows and Linux have their advantages and disadvantages depending on the kind of applications that you try to run. I feel Linux is better for me. It has been over 2 years since I switched to Linux as my primary operating system and I have never looked back. I wish others could see this in the same light as I do.
Sunday, January 28, 2007
Single no more
I am going drop off the web for a couple of weeks now. Bye Bye web. Cya later.
Thursday, January 18, 2007
6006l3 4 h4x0r
Sunday, January 14, 2007
The Observer Pattern using Ruby Meta- Voodoo
require 'observerext'
class Person
include Observer #include the observer related methods
observable :name,:address # the metavoodoo to create the accessor methods and fire events
end
admin=Person.new
admin.name='vagmi'
admin.address='admin@somesite.com'
# first observer
admin.observe :name do |old,newvalue|
puts %{The administrator changed from #{old} to #{newvalue}}
end
# the second observer
admin.observe :name do |old,newvalue|
puts 'there can be multiple observers'
end
admin.name='root'
#this prints the following statements
# > The administrator has changed from vagmi to root
# > there can be multiple observers
You can find the code for observerext.rb here. What I have basically done is to extend the Module class, which defines the observable method. The observable method injects the attributes' getters and setters. The setter method notifies the observers if there are any. The Observer module does the leg work of registering and unregistering the blocks and the notifyobservers method.
Update: Forgot to credit Greg Houston for explaining some of the ruby voodoo.
Monday, January 08, 2007
Moving back to blogger
Most people like me are living the g-life. I use almost all the services that google exposes. Search, Calendar, Blogger, CodeHosting, Adsense, Docs and Spreadsheets, Picasa web, Youtube (although not technically a google service yet) and maps to name a few. Google has long since become the synonym for the word search. It is now pioneering in the applications space. Google Apps for your domain will give products like M$ Exchange and Lotus Domino a run for their money. It makes perfect business sense for SMEs to base their groupware on Google's infrastructure than maintain their own. This is of course given that you must have the kind of bandwidth and the infrastructure to remain connected and ensure that the business is not affected. But I do not see this as a huge problem. GMail exposes your inbox via POP3 and hence it is possible to have your mails both offline and online. Google Calendar can be used to sync up appointments. What is missing from Google right now is a Wiki. That would make it a complete groupware solution. Google would probably integrate its docs and spreadsheets application when they are mature with your domain. Google is taking web to the next level. And it is way more than Web 2.0. But let us refrain from naming it Web 3.0. Just imagine if we have enough bandwidth and google lets us host our databases on its infrastructure. I am sure google would like it. :-)
We are now using the Web as its creator Tim Berners Lee envisioned it to be. A readable and a writable medium. Web is no more a place for companies to advertise their business. It is now a formidable platform on which they conduct business.
Its midnight and I am very tired. Its about time I hit the sack. Good night world.