Retail Store Systems 101

I gave a talk recently at the Groupon office in Palo Alto, on “Retail from the Other Side: Learning from Working with POS Systems”, and wanted to share the slides for the same.

Retail Systems are a complex bunch. If retail is all about detail, their systems are all about variety, and the variety that I have seen in retail systems over the last few years is mind boggling. If you want to build anything for these systems, you have to take into account the store layout and architecture, whether they are on a POS system, a regular PC, or a thin client, or even on a virtualized environment like Citrix. You have to deal with antiquated system configurations, low memory, challenging connectivity issues.

Perhaps some of the biggest challenges are human related – in adoption and training – retail being a very geographically distributed operation, it becomes very difficult to retrain and ensure the associates are best positioned to use complex systems, but in a simple and efficient manner. You have to deal with language issues, remote connectivity, and busy store hours.

No wonder building store system, and building for store systems is not for the faint hearted.

The Kitchen Computer : If she can only cook as well as Honeywell can compute…

Chanced upon this very interesting trivia in the Wired article on the new book by Chris Anderson (FREE):

Honeywell Kitchen Computer Advertisement

Honeywell Kitchen Computer Advertisement

“Honeywell Kitchen Computer, priced at $10,600”

“the Kitchen Computer was aimed at housewives and featured integrated counter space. Those housewives would, however, require a programming course (included in the price), since the only way to enter data was with binary toggle switches, and the machine’s only display was binary lights. Needless to say, not a single Kitchen Computer is recorded as having sold.”

The text of the advertisement read (source: Wikipedia):

“Her souffles are supreme, her meal planning a challenge? She’s what the Honeywell people had in mind when they devised our Kitchen Computer. She’ll learn to program it with a cross-reference to her favorite recipes by N-M’s own Helen Corbitt. Then by simply pushing a few buttons obtain a complete menu organized around the entree. And if she pales at reckoning her lunch tabs, she can program it to balance the family checkbook. 84A 10,600.00 complete with two week programming course. 84B Fed with Corbitt data: the original Helen Corbitt cookbook with over 1,000 recipes $100 (.75) 84C Her Potluck, 375 of our famed Zodiac restaurant’s best kept secret recipes 3.95 (.75) Corbitt Epicure 84D Her Labaird Apron, one-size, ours alone by Clairdon House, multi-pastel provencial cotton 26.00 (.90) Trophy Room”

Hmmmm …

Fatherly Advice to Programmers by Chuck Jazdzewski

Chuck Jazdzewski gives very topical advice to programmers in a post on his blog [link].

The main bullet points:

  • Keep Learning
  • Learn to communicate
  • Be Predictable
  • Own up to Your Mistakes
  • Never let Bad Code off your Desk
  • Programming is Fun but Shipping is your Job

Needless to say, the last one is my favourite :-)

Three Men in a Conference Room

What’s worse than Three Men in a Boat? Three Men in a Conference Room [This could have been made into a MTV quiz question]. Full points for guessing that correct.

However, that’s not quite the best answer. It’s ‘Three Men who claim to do research in Computer Science but having many other varied interests sitting huddled together in a Conference Room when nobody’s watching and working on the giant problem of figuring out what it means to do a single unit of work’. That’s not very succinct. So, let’s just stick with ‘Three Men in a Conference Room’ (which pretty much describes it anyway). So, if you have been using your brains on steroids, you must have already guessed the protagonists of the story. Let’s call them – M, G and K.

When you are discussing extremely esoteric abstruse concepts like what it means do so some work, the conversation can take many turns, meandering around with flippant frequency, confusing everybody involved. Sometimes, verse gets thrown in:

K: So, we have to keep track of everything – the job, the task, the assignment, the activity, the process, the worker, the employer, the system, and (of course) the gig. Check the thesaurus — are their any others that we need to consider?

M: But, you forgot the solution. What are we doing the whole exercise for?

G: (non-chalantly) Job Kar beta, Solution ki chinta mat kar [Do the Job, don’t worry about the solution — an oft (mis)-quoted verse of the Bhagwad Gita]

M: And the activity is the meta-level concept and lives on

G: The tasks keep coming and going for each activity.

K: (Reminiscing) As Tennyson had said: For Jobs may come and Jobs may go, Activities go on forever.

M: (ExasperatedMinutes to write before I sleep, Minutes to go before I sleep

As you can very well imagine, this does not bode very well for human sanity.

The conversation meandered to outsourcing. We are such hypocrites because we teach children to do everything themselves, and when they grow up they are taught words like outsourcing and core-competency (Child: Mommy, hygiene really is not my core-competency. Maybe I can just outsource bathing to you)  — and we concluded with err… (ah, yes!) the conclusion that an extreme form of outsourcing would be when Apple Computer is stripped down to one person — Steve Jobs.

Finally, a technical blog!

I have done it! I finally fought off all my languor to start a technical blog, something I have been thinking of for quite some time. The blog has been born out of my desire to see better analysis on technology rather than technical news reporting (or which TechMeme is the best place). The content of the blog will obviously be limited by the knowledge of the author — any field of technology today is so deep and there are so many open questions that it is impossible to do justice to writing about it without spending a year or two working in it.

As I said, I plan to write few posts, but hopefully those which have more meaning and more technical depth. I will not talk about new products or services, fads and fashions but rather try to give commentary on more fundamental aspects of technology. I do not work in the Internet domain, and hence, I may be out of date, out of context, out of sync or all of the above, but hopefully the blog will be of use to some :)

So, to kick off the new bog, there is a rather long post on Identity (the best topic I could think of), the laws thereof, and a discussion about some of the newer federated identity management systems. Here’s presenting to you:

kpowerinfinity on technology

[Almost a week of reading has gone into it. Wanted not to underline this point, but well, had to :) A kind spattering of comments will be helpful for both the motivation of the author as well as in deciding future direction.]

The Cafe at Alliance Francaise de Bangalore and the number 13

I saw Let’s Have Sex by Vladimir Krasnogorov performed by Workshop Productions today at Alliance Francaise de Bangalore. While the play will not find its way into my spaces blog, it was my first visit to af Bangalore, and I liked the place. What really piqued me was the cafe. There was a strange mathematical irony (or perhaps creativity!) because almost everything seemed to be priced at Rs. 13. Obviously, Nobody there suffers from triskaidekaphobia. However, looks like the architect of the place was cut short of using his math-creativity fully. The samosa stood out as an eye-sore at Rs. 8 and tea (2 cups) was disappointingly priced at Rs. 14 (how could they break the symmetry?!).

Gave me an idea. Imagine, a row of gourmet items all priced at Rs. 13. Of course, there are 13 items. The cafe-owner could very conveniently hang a large board with multiplication tables of 13 to aid the customers (the clincher!).

Cafe 13, or perhaps to make it even more mathematically esoteric, Cafe E.

[I am not the lone lover of symmetry. Looks like very much a geek thing. People have done it with far more disastrous consequences. Damn, if I knew how to draw cartoons!]

Lines of Code

A quick way to find the lines of code under a subdirectory:

find | grep “.cs$” | awk ‘//{print “\””$0″\””;}’| xargs wc

It recursively finds all the files under a directory, passes through a grep filter (which you would have to update based on your preferred language of development), awks it to enclose it with quotes and then passes to wc using xargs. Neat!

My current project now has about 31k lines of code, out of which about 9.5k is mine. Messy!

[Thanks to Robin for help with the commands]

What would you like to Read today?

Minekey was a wonderous experience. It all started off about a year and a half back, when Delip came to IIT Kharagpur with a vision to solve the world’s information overload problem. The aim was simple — let content consumers get access to the information they are interested in.

If we look at the world today, most content producers and aggregators produce content for the general audience. That means that the news will be of all flavors, all topics and categories. However, it also means that if you wish to track news on a particular topic from a plethora of sources (and there is no dearth of them!), it is like finding a needle in a haystack, or a key in an information mine – which is incidentally where Minekey got its name from (if you couldn’t guess it already ;-).

As it goes, a handful of super charged students from IITKGP got together with Delip and Prof. Sudeshna Sarkar, and started working on this new project with a new model for incubation. The company was based in Santa Clara, and we were doing the R&D and the initial bootstrapping from Kharagpur.

Ideas flew — personalization, networking, recommendation, search, social connections, groups, communities, feedback, ranking, clustering, collaborative clustering, geo-personalization — you name it. Lots of ideas, debates, deliberations, re-iterations, progress spreadsheets, throwaway code, reusing old code, search, open source services, days and months later, we had a strategy in place. We created a news portal for the world at large (which was still an Alpha), we had strong customer leads, a model seemed to be emerging.

A lot of water has since flowed in the Ganges. There is a definite strategy, the company is well funded, there are people who have left plum jobs to work at Minekey, the business model has been refined and Minekey is staring at an immense opportunity. Kudos to the current team to take a prototype and build a real product.

Minekey has now launched recommendations for blogs! You get a sweet looking widget on your sidebar in a matter of minutes, and your friends would be able to get recommendations. Minekey monitors their clicks and as the users click from the widget, the personalization kicks in, to recommend more and more stories according to the users taste. (Sadly, WordPress doesn’t support JavaScript, otherwise you would have seen one right here. I need to work on a workaround).

Go get it now!

Serial Writers on the Loose

Serialization is the process of writing data out in a storage medium in a pre-defined format so that it can be read back programmatically. Even though there can be many forms of Serialization (even usage of databases is Serialization in some sense), in most cases, serialization is used to persist the program state onto a file and read it back so that computation can proceed from an intermediate state.

I remember at one point of time, I used to fret and worry about having to decide a format to write my data in, and then write procedures for writing them out into a file and then reading them back. And then look for minute bugs which crop up in this process. Developer productivity goes for a six while the manager manages a sinister laugh in the sidelines as the employee sweats it out with printf and scanf.

No more! Thankfully there is something called object serialization that comes to our rescue. With the dawn of languages such as Java and the .NET platform, serialization was made very simple, in fact so simple that little cherubs (in their garden playing harps or rather System.IO.Harp) could just add a single attribute to the class name and all the perspiration is taken care of by the framework.

In the .NET framework, serialization can be very simply implemented by adding the [Serializable] attribute to the class. Any fields that one doesn’t want to be serialized can be marked with a [NonSerialized] attribute. Thereafter, you just use a BinaryFormatter to format data into a suitable binary format, open a FileStream to write it out to a file, and bingo, you’re done!

However, I was not convinced it could be so easy. The objects typically form a graph structure and might be cyclical. Would the automatic implementation of .NET Serialization be able to handle this cyclical structure, or would I need to fish DFS and BFS from my old dusty textbooks, parse them in an acyclic manner and write them in a suitable order. All my worries were misplaced! It just works… it’s magical. You can be a dork and use the object serialization in .NET!

There is a small catch though. Static fields of a class are not serialized automatically (among some other gotchas). And you need to implement the ISerializable interface and provide custom implementations of the GetObjectData method and a constructor of the class which takes SerializationInfo as a parameter (See some examples here) in order to deal with these special cases. In my simple case, I had an identifier for every object which I allocated based on a idCount variable which was a static integer. Hence, in the custom constructor, I set the value of the idCount to the highest id value I had seen so far during deserialization so that I don’t generate old id values gain.

id = info.GetInt32(“id”);
if (( + 1) > idCount)
idCount = ( + 1);

But still, object serialization is a great boon for most of us developers who don’t wish to tear their hair out trying to write code that is not even important for their work!

Ok. So, I discovered that in case you override the Serialization using the ISerializable interface, you need to override it for all the derived classes. A lot of hard work I am not willing to do. Another trick could be that in case of the base class, instead of implementing the ISerializable interface, implement the IDeserializationCallback, which essentially lets you override the OnDeserialization method which is called after the deserialization is done, and you can write custom logic there to populate the static or the Non-Serialized fields.

Vint Cerf

Vinton Cerf, best known for having written the Internet Protocol, which is the substrate of the internet, gave a talk today in Bangalore at Ambedkar Bhavan. He is an ACM Turing award winner, the highest civilian honour in Computer Science and currently serves as the VP and Chief Internet Evangelist at Google. One thing I found surprising was that even though Google organized the talk, I could not find any references to the talk anywhere on the Internet (searched on Google of course), except for this blog. I had expected Google to put up a searchable page online at least regarding its much advertised “Google Speaker Series”. I saw the advert in the papers and later wanted to find more details, but alas! it seems they dont have a good PR person.

Anyway, coming back to the talk. I felt that the talk was a little too high level. That is mostly what happens in such talks where the speaker has to cover a lot of ground in a small space of time (Spacetime?). I felt Raghu Ramakrishnan handled it better — he elaborated on a specific application (DB Life). A few takeaways from the talk were:

  1. During the design of the IP Protocol he decided to keep the design independant of both the applicaiton (it just works on bytes) as well as the infrastructure (IP works on all concievable connection system from telephone lines, ethernet, ATM, VPN) and it has stood IP in good stead since. This independence ensured that lots of new applications (some of which even surprised Vint, such as a internet-enabled surf board) as well as new tele-infrastructure.
  2. Mobile users in India are about 200m as compared to 40m or so internet users. What is the medium of choice for connectivity in the future?
  3. Of about 1b internet users, around 400m are in Asia with China and Japan accounting for around 150m each. North America is only third after Europe. And we thought internet is in English.
  4. As more and more devices get online, there will be many more applications.
  5. Hardware has improved substantially thanks to Moore’s law, but software has not kept pace. Higher level languages such as Python have not helped much. Perhaps they should all shift to Lisp :). He also seemed to believe Ajax is a high level language. I am not sure how — perhaps my understanding is flawed, but I used to think it is only a mechanism for ensuring asynchronous call backs on web pages with very few language level features (which would definitely be desirable).
  6. He seemed to make a strong point for Formal Methods in Software Analysis to find out bugs in Software and be able to give guarantees.
  7. He seemed to believe that our current infrastructure needs to incorporate security as a first class design parameter. Concepts such as VPN sit atop traditional networks like a veil, but with increasing mobility, the need for security being fundamentally encoded in our design is a requirement.
  8. Similarly, prediction of internet usage (similar to Erlang in Telecom) and QoS are perhaps desirable but have technical difficulties and these make them important problems in Computer Science.
  9. The QnA was mostly irrelevant — What will Google do in future? What does Google use apart from PageRank? How can internet be made more accessible in India? With (mostly) even more irrelevant answers.

It would have been nice to hear more about his experiences in the actual design of IP.

%d bloggers like this: