Monday, 13 October 2014

Down On The Street

With Benjamin gone I suddenly had twice the workload.

First thing I had to do was work out how to publish the monthly updates. Tthere were more than twenty steps that had to be executed correctly and in the correct order to get everything to happen. An engineer had to run the screen-scraper, prepare the database migration, apply digital signatures, update the versions in the source tree, build everything, update two separate install scripts, update third party binaries in two different trees, branch, tag, deliver to QA and the web team... it was easily a half-day's work, if you knew what you were doing and if everything went right the first time.

Benjamin had attempted to write an interface from which you could trigger some of the steps. This was entirely because he wanted to do something in C# so he could put that on his resume, but I was grateful nonetheless. I spent a week cleaning everything up and I managed to rationalize the process down to twelve steps. It still took half a day to execute them all, but it required less fiddling and was more reliable than it had been. I wanted to do more, but to go any deeper would have been a lot more difficult, and Elvis wasn't going to shift the deadline for the next major release and I had to do all of it myself.

Meanwhile the office had started moving across to the new building in waves. I think I was in the second group to move over. All of development first, followed by QA. Admin, sales and tech-support would remain in the old building next door for the time being. My new cubicle was two meters wide and spacious. I had a Window on my right and an aisle on my left, with two or three meters of space separating me from the engineer behind me. Luxury!

I was seated in the same area as the cool team. Ralf and Dennis and the Enterprise team that Benjamin had refused to lead were set up on the far side of the floor, in a suite of offices that had not been fully fitted out yet. They were packed in three or more to a room: for once I was glad to have a cube. 

As I set to work on the scheduled release of my product I found that things were actually moving faster without Benjamin. I wasn't sure when exactly he'd become an obstruction but I think it was about the time I showed myself competent with threading... because, looking at the Threadmaster's vaunted code, I found that it was full of unsecured critical sections, race conditions, wasted threads and unsafe data access. The slowest operation ran in series, despite being interleaved for parallelism. By removing code and by tightening up a few key problem areas I had the new product running faster and more stably than ever. This was in addition to a slate of new features. It might have been an ugly baby, but finally it was starting to walk and talk.

All of this happened fast. It was the first and only time in my career that I delivered a product to QA early. I beat the deadline by two weeks... and was left to twiddle my thumbs. QA were still bringing on a new manager--a florid ex-NASA shitkicker--and there was nobody available to test my product. Worse yet, nobody seemed to care. Nobody thanked me or congratulated me. Nobody even acknowledged that I had come through except for Freddy.

Suddenly I had time on my hands and I decided I would have some fun. I started a prototype of a new version of the app. A multi-tiered client server architecture. Any kind of architecture would have been a novelty. A business layer, data abstraction, object-relational modelling, the works. I had built parts of this for the database administration tools and had been looking for an opportunity to leverage into the main product, but Benjamin was suspicious of any classes that did not derive from Microsoft's hierarchy and there had never been time to do more with it.

I even figured out how to get a Windows Forms GUI written in C# to inter-operate with the rest of the app, which was all written in native code.I was immediately impressed by how easy it was. For UI development, Windows Forms was much easier and faster than the old MFC/ Win32 user interfaces I'd been building. I felt a moment of zen: I had found a justification for the new language I had been taught to despise, and it could coexist alongside everything I thought was good and holy.

I didn't build a full scale prototype of my new project, but I did get to the stage where I could all of the layers working together end-to-end on the server box. I hadn't thought about how to do remote comms... that was another new frontier... but I just wanted to prove that it would work.

I wrote a manifesto outlining my glorious future vision for my craptacular product and sent it to Freddy. I showed him what I had built. He liked it and he passed on the document. I heard Elvis and the CEO chuckling about it. This was mainly because I had actually used the word 'manifesto'.

I knew these plans were overkill for my little product but I had nothing else to do. If nothing else I wanted to show them that I wasn't just Benjamin's schmuck; I was a capable engineer with vision and undemonstrated abilities. I believed they might even care.

The following week Freddy received a communique from the defense contractor who made the engine that the product was based on, requesting a meeting. ATB gave us a car rental voucher and we drove across the state to sit down with them and see what they wanted. We got as far as the carpark before we discovered that we were at a secure campus. I was not a US citizen, or even a permanent resident: they wouldn't let me out of the car.

The team eventually came out of the building and we drove to a nearby Japanese restaurant, where we had lunch. We then drove across town to a less secure campus where there was a spare meeting room. Freddy and I sat down to listen to a shpiel about where the company was planning to take their product and how it would effect our licensing deal with them.

About five minutes into the talk Freddy turned at me with eyes wide. Their new product was very much like the one I had started prototyping--except mine was a skeleton of a prototype, and theirs was almost ready to ship.

I took the new product back to the office to start playing with it. Once I had installed it, they said that I would be able to communicate with their service via SOAP. They provided me with a WSDL file with I shouldould be able to automatically generate all of the code needed to achieve this.

I didn't know what any of that meant so I went off to read about it. Turned out it was a little like CORBA, which I had learned a tiny bit about in my Honours year at university from an exchange professor who was visiting from Italy. Mainly I remembered that he'd held the assessment in one of our normal lectures, not during a formal examination, and he had allowed us to talk amongst ourselves through it "so long as nobody cheats".

I spent a week playing around with the SOAP interface, trying to get my prototype to talk to their service. It just didn't work. There was an open source tool for building web service proxies for C++ called GSOAP, but no matter what I did it failed at runtime every time I called it. I spent most of the week trying to hack it into submission before I thought of trying to talk to it directly from my GUI, which was written in C#, int he hope of finding some new error message that might tell me what the real problem was. 

It just worked. I ran the tool to generate the proxies, added the new modules to my module, and it behaved exactly as documented. Once again, I was shocked. All the time and effort I'd spent trying to make the C++ version work... all the cryptic tools and the ugly generated code and custom build steps...

I complained to my new contact at the defense contractor. "Why do you want to use C++, anyway?" he said. His tone of voice said: "What are you, a savage?"

Because that was my core skill. I had built my career on C++. I believed it was the most powerful and expressive language extant and I was proud of my mastery of it. I was angry that somebody should dismiss it for what I thought of as a fad language. C# Microsoft's sour-grapes alternative to Java. Microsoft's attempt to control software development; to keep every engineer who worked on their operating system existing inside yet another bubble of lard. I didn't care that it removed the difficulties or memory management. What kind of developer couldn't handle a few pointers? And what about performance? .NET would never, could never perform as well! Ha!

I was angry,  but I felt righteous, too. Sooner or later my peers would see through Microsoft's lies and force the giant to restore C++ to its pedestal.

My product went into QA. They found two bugs, which I promptly fixed in a single afternoon, and the product shipped. 

Elvis and Judd called me into a meeting. Wilhelm, the new manager of the the Cool Team, was there as well. My product was mature enough to stand for a while; there was no point continuing development until the new engine was at market. Meanwhile, it was clear from the beta Wilhelm had just shipped that his product was nowhere near where it needed to be.

I was on the Cool Team, effective immediately.

The company took the Cool Team out for coffee to celebrate the Beta, and that was where Wilhelm announced the news. A free cup of coffee and t-shirt commemorating the beta, which I had had no part in developing

So much for my manifesto. So much for being a 'team lead'. So much for C++. I was now one of the Cool Kids, and that meant C# all day, every day.

No comments:

Post a Comment