Burak Köken

A veteran developer's honest ledger.

The world before the handhelds

The World Before

I worked as an IT person in a logistics company, as in package delivery. Me “the IT person” in this context handled everything on the software side, including, but not limited to, design, planning, development, administration, backend, frontend, reporting and anything peripheral, inside and outside of this ecosystem. Later, people management piled onto this and most of the fun went out of the window. There is not much technology in that story and I will write it for you when I have some free time.

So, being in IT but not in Operations, I indirectly helped people send and receive packages by helping people carry those packages. I inherited a “system” with front-facing applications written in COBOL and using ISAM files on Novell file servers as, kind of, a database. I developed my “system” using Delphi with a Microsoft SQL Server as the DB backend in a client-server model where standalone executables accessed the backend individually but almost all business logic was defined inside stored procedures. In 1999, on the 16th of February, the first piece of the system I designed and coded in Delphi went live and scanned the first 1D barcode on a package. The auto-increment counter in the database started from 1. It was int, 32 bits wide. The thought back then was I’d retire before it overflowed and it would be an inherited problem for someone else. I did not think far enough ahead. Little did I know. Around 1.5 billion scans, I had to draw up a plan to change all fields linked to the counting table to bigint. While also migrating the servers to new HW and upgrading the SQL Servers. My own Y2K operation. No disaster story there. Everything went smoothly, it was a great team effort. All these fields were bigint. Overflow that! Just had a chat with a former colleague from the company, I kindly asked for a select max() on the table and the field, it is at 5.22 billion and counting.

To give you a perspective on the volume: The first month my system handled 30k packages. The “int” field was looking perfectly normal. When I retired, on a slow Saturday, the system handled 150k packages. Obviously, there were multiple barcode scans per package so the count of records was higher than 150k and for fast reporting purposes, 13 months’ worth of records were “hot”, online. I am very proud that the schema for that counting and last scan status table changed only for that single auto-inc field in 20+ years, from int to bigint. Nothing else.

Back to how I feel about my job: You probably ordered online, sent gifts to loved ones in other parts of the world, etc. Here pride becomes two-fold. The “system” worked and I like to think I helped someone, somewhere, smile a little or feel a little relief by getting something they needed at that moment and so on. Many times, billions of times. That really felt good and still does.

This piece is about one part of the complex operations that made this possible and I wrote the code for this part alone. Here is how things were back then.

The Call-Center

Yes, you call the center. To tell us (from now on us is everything: the development and operations teams, the company, the delivery guy, all; you, the customer, are on the other side of the fence) that you want to send a package and can we please come and pick it up. With pleasure. The lady on the phone takes your call, and makes notes on a small piece of paper. Details: address, phone number in case we cannot find you, who will give us the package, when you want us to drop by, all kinds of little details. The paper is put on top of others piling up on one corner of the desk, then the next call arrives. Four ladies with headsets and mics, during office hours, answering you.

The next order of business is to tell the driver in the field that he has to do something, go some place, pick up something. This is the Dispatcher’s job. Capital D. He is in the same room, has his own desk. Every now and then, he walks around, picks up the piles of notes from the corners of the desks and sits down again. Oh, he uses technology: he has a wireless CB (private trunk) on the desk. He can reach and command all the drivers on the streets. He knows which driver serves which area, he glances at the address, announces the driver on the CB, the driver pulls over, takes note of the “assignment” and the piece of paper moves from one pile to the other on D-guy’s desk.

The driver uses technology, too. He also has the CB and on top of that, he drives! Unfortunately, that’s where it ends. Nothing more. He asks for signatures on paper, he “determines” where the packages will go while loading up his van in the morning.

Are you with me so far? Good. This is the lay of the land.

The Room

Today, you have all kinds of division of labor in software development. I will not name names. You know or have heard the full list. The developer (me) is not at the beginning nor at the end of the chain. Somewhere in between. Just a piece. Me then, not quite so: I spent, if I remember correctly, more than four months in that room. With four ladies and D-guy. Rumors ran high, people assumed an ulterior motive. Disclosure: I was not known for my social skills. I usually lived in my “cave” and typed away, churning out code. I consider myself blue collar by definition. I sit in front of the screen in the morning, do stuff, actually “produce” stuff like a factory worker, keyboard instead of a wrench and by evening, there is something new there, sometimes half finished but it will surely help somebody do her job better, quicker, easier the next morning. If this is not producing, creating, then I don’t know what it is. But those four months, I was not in my cave, I was in the room. Observing, taking notes, sometimes coding then and there. Capturing, drinking it in, absorbing.

The Brand Inside the Brand

My ulterior motive was stamping “Creathink” on every app I wrote. Of course I wanted to be there in the room, in person. I thought “I am a genius” when one day the word “Creathink” dawned on me. We adopted it immediately. We, my dear friend from high school and I, worked together in that company. Nobody objected. Maybe nobody noticed or even cared. We were the Creathink. The ones who think and then create. Brand inside brand. We got by.

The Problem and the Solution

Don’t get me wrong. I put the problem in front of the solution, to sell you what I built. They were happy with the volume they handled, not a major issue there. They were hard working people and good at what they did, too. They were veterans, knew the city inside out, worked it like magic and the customers were happy, too. But I had other things in mind. I was the developer. I was the creator. Of course I could do better, help them and lift them. I am a humble person, this is not bragging or a God complex, I just wanted to help people the only way I knew: With code. There were long discussions with the higher-ups. The handheld device was already invented and used on the road by many other companies. Not the mobile phone, mind you. We picked Symbol PDT8056, it suited our operations. It had GPRS communications (a SIM card inside), a 1D barcode scanner. Numeric-only physical keys and soft keyboard on the vertical touch screen, used with a stylus. OS was Windows Pocket PC 2002. The critical thing was that the tool I knew best, Delphi, was useless creating applications for the device. I thought (Creathink) I would figure it out.

The device covered so much. Scanning, so packages would be tracked by barcode, realtime if I could manage it, communications stepped up from CB and could become async. Back then there was no GPS on this device but the driver left breadcrumbs as he picked up and delivered packages. It was lagging but somehow provided some location data. On top of everything I thought: I would be giving a computer to all the drivers. Do you agree that even today not many people think about their mobile phone that way? You are carrying a computer, 24x7, it just has a “phone” function on the side! But for me the possibilities of computing “wild” in the field were wow! Fingers itching.

Here is the solution I am pitching to you: I develop the pipeline end to end, starting from your call to the center and ending with your package delivered to your dear one. Complete package (pun intended).

The Seed

The earliest folder in the development tree was called SDA1. What the acronym meant is lost in the fog of history. S(omething) Delivery Application? Anyway… Creathink thought and decided to use C# with the newly released Compact Framework 1.0 to develop a native app for Pocket PC 2002, running on a Symbol PDT8056.

The “New…” wizard gave me one Visual Studio solution, one form, 1.2 kilobytes. It is the wizard’s default form, untouched. The comment still reads “TODO: Add any constructor code after InitializeComponent call”. (SDA1\SDA1\Form1.cs)

Every line that came after that comment is the rest of this story.

But, don’t go. You will like this.

Anders Hejlsberg, the creator of Turbo Pascal, the language I learned decent programming in, was the chief architect of Delphi, on which I developed 500+ standalone executables, countless more reports, endpoints, etc. during my work in that company. In 1996, he left Borland (Delphi) and joined Microsoft and, wait for it, later became the chief architect of the team developing C#.

The Series

This story continues. The call that started it all became Your call is important for us, the first piece of the cycle: the call, the dispatch, the driver.