## 2014-09-24

### Retreat

Time to chronicle the events of the past 50 days before I forget. I was brought into a company, with a content and product listings page, to be a "senior programmer". The interview was not very technical, we simply discussed some Erlang code I had posted on Github during my year of full-time study, frameworks, and code editor preferences - that was with the CTO. It was a Rails shop. Everyone involved was aware that I hadn't worked in the Ruby language or the Rails framework, before this. The CEO had experience in technology companies, but had played a more operational role. The CTO had a background in outsourced software development.

The CEO was introduced to me a couple of years earlier, by a mutual friend, and I had kept track of his progress over time. He seemed to have had trouble hiring programmers, and I thought it might be mutually beneficial for us to work together on the company's software requirements. I was presented with a six month contract, which seemed like a ray of clarity following the two jobs I had exited over the past year and a half.

For my first project, I was tasked with building a new website. I was introduced to the head of marketing communications activities, and to a graphic designer. The former was said to have been involved in earlier discussions regarding the sitemap, links, and certain aspects of the user-interface design - but he later faded from any active role in managing the site's delivery. The latter had no experience in designing websites, nor in building them.The CEO requested meetings to be weekly, and not daily. I understand he had a lot on his plate. I was asked by the comms head (in email) how I would recommend the project to proceed, whereupon I detailed a reasonably firm agile method in an email... which got no response. I suggested a proper technically advised design of user interface elements, to enable cascading styles, but was gently told that designs had been agreed upon, and that we would proceed with those. I asked if it would be possible for me to report back and advise alternatives if any drawings were technically ill advised, and I was told this would be acceptable. I was asked at this time if it would be possible to have the new site up in a month, and I said there was at that time, no reason to expect otherwise.

The CTO suggested that instead of merely changing the client-side layers, we should rewrite the server side layers of the application as well, as the existing app was an amalgam of mediocrely curated freelance contributions, and then some. We discussed various architectural concerns, such as the choice of libraries ("gems") and datastores. At various points, when queried for direction, his directive was that I should pick a path and handle it by myself. I spent a week or two studying the existing application and its data. The data was highly denormalised, with many itemised descriptions scoured from product marketing collateral stuffed into a single "miscellaneous" text field in each product's row. I ended up proposing a single table for all products, with a tree of models to enable shared code for grouped types of products. Each product row would have a hash of keys and values, easily amended to allow analysis of currently blobbed fields. (Due to portability concerns, the CTO preferred that I use a Text type column, instead of a Hstore or Json type column, for storage of the hashed data for each product. The opportunity cost: sorting and filtering of data would be conducted in the app, as a Text column did not appear to support operated queries of JSON inside, whereas a Hstore or Json column would have enabled keys and values to be queried by Postgres, using special built-in operators). A similar approach would be taken to implement all tickets submitted by users. In the long run, I argued, a fully normalised analysis of the data into stark relations would allow us to revert to a strict RDBMS, but we needed to buy flexibility in the short time that we had. During this time, I also commented on the opportunity cost of responsive websites, and was told that no alternative would be considered in the foreseeable future. We discussed the use of the Bootstrap framework, which I had been familiarised with from a previous job.

In week three, I struggled with the customisation of RailsAdmin, a third-party library, as it seemed to have been architectured somewhat differently from the Rails framework itself. This was figured out, and I requested an expected extension of the target delivery date into the first week of month two. In week four, I began developing the client-side application layers. I was instructed by the designer to implement a fixed (omnipresent despite scrolling) horizontal navigation bar, with a vertical navigation bar obscured by a sideways sliding drawer. This was not achieved easily within the conventions of Bootstrap, without looking unpolished, but by week's end I had a debugged layout that achieved this without squashing content during animations. I was quite proud of this, and showed it to everyone. Later, I was to discover that this was a mistake. I had also been unable that week, to get the designer to provide detailed measurements of any sort for his drawings, so I raised a flag saying that working from non-quantified drawings would likely require an extension of half a week. On the Friday of the fourth week, I was shown by the CTO a draft of the navigation widgets and home page which he had been instructed to prepare by the CEO. It was immediately clear that a benchmarking exercise had been underway for the past two days.

So then I had four merge problems: non-technical drawings, the Bootstrap conventions, my implementation that hacked around the Bootstrap conventions, and the CTO's unpolished implementation. My implementation on that Friday was stark and structural, while the CTO's alternative contained a fair representation of the entire homepage as it had been drawn. But then I had a three day weekend, over Independence Day, so I made a commitment to give all factors due consideration. On the third day, I'd completed the structural prototypes for a few form inputs, identified the non-Bootstrap compliant aspects of the drawings, and was ready for a Tuesday morning presentation on the way forward, which would involve minimal input from the designer until we had developed the entire front end in its right place. So I went on a splurge and joined the first available acquaintances for a brief dinner at some pub.

At the meeting on Tuesday, I was curtly told to revert to implementing the non-technical drawings as closely as possible, to the pixel. Without consideration of my presentation, I duely complied and demonstrated by the end of the day, with the homepage, that this was not hard to do, at the expense of code clarity. Bootstrap compliance was the first thing out the window. Undefined behaviour at various screen-widths was next. Many hours were spent polishing these undefined behaviours in the weeks to come. I also received hints that my termination had been considered.

For the rest of the fifth week, I was asked to deliver on a KPI of "pages". By Thursday this was getting incomprehensible, as the most pressing developmental concerns were special input widgets and responsive table behaviours that were non-standard HTML. I was asked for an estimate of time to completion for the rest of the client-side code, and decided that at this point a spectacular failure would communicate more than a waffling timeline, so I said I'd try to work through the night and get it done by Friday morning. I shot off an email around 7am on Friday morning announcing that I had given up, and that I would rather work the second month free of charge, if that would help to ease anyone's pain. On Friday evening, I was offered a 50% reduction in salary. I responded by saying the money was not important, and they should really get their money's worth, so my earlier offer still stood. I also underscored commitment to completion of the project before moving away from this company - I was quite frank in saying, I was too tired to think about options, and I just wanted to have the project end nicely. Management started heavily canvassing for outsourcing of the client-side code.

By Monday, the stakeholders were more optimistic, as I had done some stitching over the weekend. The sixth week was spent on building several static pages and forms, to the pixel, most of which were drawn differently from each other. The SASS file stood at about 3400 lines, at this point. The overall details received enough polish, for the CTO to announce a rapid improvement. Outsourcing was postponed.

By the middle of the seventh week, the stakeholders were agitated once more, and I again expressed that decision makers were not locking down the spec, leading to unnecesary reiteration. To his credit, the CEO jumped in and was a detailed project manager for the rest of the week, greatly helping to mop up loose ends. He expressed that this was unnecessary hand holding, to which I responded, that it was precisely the sort of work I had done in other jobs, which collectively we would have to do - I just happened to have my hands full with code, and to some degree, managing upwards unsuccessfully. The next weekend was then spent beginning to develop full functionality for main product pages.

On Monday of the eigth week, the CTO called into question the compliance of the database structures I was working with, in the light of Rails compliance, which they lacked. We had certainly discussed this previously, but now it was beginning to scare him. I argued that the optimisation roadmap had always been clear, but likewise encouraged him to form an executive opinion as a chief - encouraging him to act for the organisation, and not to yield his better judgment to me as a line-coder (as in line-chef). So on Tuesday morning, it was decided that the new backend would be shelved indefinitely, and that we would revert to vanilla Rails, saving time by stitching the old backend to the new frontend.

I tendered my resignation, as there really wasn't much to look forward to after that. That was ealier today. We still have work to do for a few more weeks. There is no doubt in my mind that I could have been a better project manager, if I had manhandled process control from day one. That was my main failing - overestimating the experience of my peers; they certainly feel that they had overestimated mine. We should have begun client side code implementation immediately, modifying only the old app, and leaving data structural developments to the future. No doubt, we lost certain venture opportunities over the missed timelines.

A good soldier shoots, where the officer directs. Ruthlessly, shamelessly, and unrepentently. It doesn't make you a good person in some abstract sense; it means you do jobs. Sometimes you get to be nice to people. Sometimes you take shit for other people's takes. Stick to the plan. There's operations, and there's fun. And sometime you only want to get the job done. Clean up your messes, and politely excuse yourself.

Time for a swim. If I can remember how to do that...

The next weekend, code cleaning. A fortnight to survive, without tripping the gag reflex, on myself or anyone else around me. Hurgh. 0.1% of the rest of my life, assuming a 70-year total. I'm gonna let this pass. It's been less than two years since gradschool, so I shouldn't complain. Moreover the strategy was to start careering without leverage on past achievements, in order to make it more challenging. However messy these 10 weeks will be, I have to admit the long game is going fairly well. Ups and downs in right balance.

At the end of the second month, I get a total of 1.5 months' pay. About $2290. On the drive home, between shifts. I did the math and figured that getting paid about$4/hr to learn Rails isn't such a bad deal in the grand scheme of things. But having it drawn out over two months, with a questionable working environment, and difficult people... ah, win some, lose some.

Aside, a thought that seems Confucian / Rationalist / Vulcan, of sorts: One should do what is right, regardless of personal convictions. This is how we establish society. Until of course, the day we expect society to die.

Week 9 or so: data entry done. For now. It's like that huge sigh of relief you feel at the end of a really long funeral service.