Skip to main content
 

Advent Calendar (Day Eighteen)

30 min read

This is a story about running out of ideas...

Let there be light

That's a light box. It's supposed to be a way of treating Seasonal Affective Disorder (SAD). It's the final thing I thought I could try, as a natural remedy for depression. The regimen that I have followed for 6 months is:

  • Varied diet, including plenty of fruit & veg
  • Sleep hygiene: strict bedtime and getting up after 7 or 8 hours, even on weekends
  • No caffeine
  • No alcohol (actually only 3 months)
  • No medication
  • No drugs
  • No legal highs
  • Amino acids
  • Vitamins
  • Minerals
  • Exercise
  • Making new friends
  • Trying to have a stable place to live
  • Trying to have a job
  • Reconnecting with old friends
  • Getting some professional help (only had a whole week in hospital)
  • Being disciplined and self controlled
  • Wearing blue-light filtering glasses after 4pm (for the last few months)
  • Using the light box for at least an hour every morning (for the last month)

Guess what happened? My mood was able to react to things, and I reacted to my mood. There was no stability. In fact there was no coping mechanism. Everything I used to do to regulate my mood was removed, so I did other things that were detrimental to my overall wellbeing.

Being hung over or drunk at work is quite good if you hate your job and think that the management are idiots. Because I was sober, I told the HSBC management team that their project didn't stand a chance in hell of being delivered, because it was being run by people who are terrible at Agile Project Management, and seem to be completely lacking any relevant software development experience. I said I didn't want to be any part of it unless some big changes were made. I said I wasn't comfortable doing the wrong thing.

Being hopped up on coffee is good if you want to rescue a project. I recoded Barclays entire Corporate Pingit system, in 30 hours, with no sleep. I kept the existing public API, but everything else was thrown away. Instead of spaghetti code, full of copy & paste, and buggy as hell, poor error handling, poor logging - unsupportable - I just rewrote nice clean code. Lots of coffee, 30 hour hackathon, all the bugs solved, code reduced by 80%, production grade error handling and logging. The team leader felt important because the old system barely worked, so he spent a lot of time understanding the spaghetti. There wasn't really anything for either me or him to do after I wrote a decent system. My boss was happy, the team leader wasn't, I got my contract terminated, Barclays customers were happy, I was happy that I'd delivered the software that meant I no longer had any work to do.

Corporate software is boring. The projects I'm asked to do are child's play. 48 million customer's metadata? That's only 48 terabytes, if we store a megabyte per customer. A low res scan of their passport and maybe a utility bill, plus a few thousand characters for their name, address, phone number etc. etc. At JPMorgan we stored about 3 petabytes of document scans. That's about the same amount of data in the entire Library of Congress.

AI, games, simulation, data analysis, physics & cosmology modelling, codebreaking... those are the hard problems. I remember I wrote a program that calculated every single possible checkmate. Then I wrote a program that found all the moves that led to those positions. It ran out of memory before it got back to the early moves. Then I wrote a program that could take the position of the pieces on the board, and find the moves to checkmate, where there is no opportunity for your opponent to win. Most of the time the program couldn't find a path where the opponent had no chance. In theory, with enough processing power and storage space, chess could be solved by a program. However there are 10 to the power 80 (10 + 80 zeros) atoms in the universe, and there are 10 to the power 123 (10 + 123 zeros) moves in the chess game tree. We should probably concentrate on modelling the cosmos at subatomic scale before wasting our time on a silly game.

So, that's my quandary. I'm not very challenged or interested by anything in the corporate world, and my solution of just being drunk all the time can't have been doing my liver much good. However, without alcohol/benzodiazepines I think too much, and without caffeine/bupropion/stimulants, I can't get motivated to keep solving the same easy problems that don't even need solving.

In fact, when I think about it, I must have made a lot of people redundant. I've automated a lot of stuff that people used to be employed to do. I've made corporations very rich, by allowing them to lay off loads of their workforce, but increase their productivity and profitability. My main specialism is Straight Through Processing (STP). I know how to get $1.16qn processed with just a few programmers, database administrators, infrastructure engineers, network specialists and system administrators. You don't need project managers, because they just put the lies you tell them into a spreadsheet and tell everybody that everything is going really well. You don't need testers, because good programmers write good automation tests, and they don't write bugs. There's no difficult logic or calculations in a corporate system. I do get spooked out when my code works first time, but it's quicker to do it that way.

Human workflow and user experience. Here's a better use of your time and money. Fill out paper forms and then set fire to them. Nobody gives a shit about having to go through your life story just to become a customer or get a government service. If I want broadband, just send somebody to install it and set up a direct debit. If I want to rent a flat, I'm going to pay you 6 weeks deposit plus a month's rent in advance, plus letting agent fees. Just give me the keys as soon as I've put the money in your account. Don't even bother with the contract. Burn it. The contract is simple: I pay you rent, I live in the flat.

You send a person to read the electricity meter. They can take my card payment for whatever I owe when they are in my home. You send a person to read the gas meter. They can work out my bill and I'll pay it on the spot. You send armies of traffic wardens. They can spend less time hiding in bushes and more time knocking on doors taking card payments for the rubbish collection, street lighting, police, fire service, libraries, schools and other things that I quite like rather than hovering near cars whose meter payment is about to expire.

My bank sends me a letter saying that they've paid a bill for me, but I didn't have quite enough money, so they're going to charge me even more money. My bank's only function, so far as I can see, is to make my problems worse. Rather than ringing me up and saying "Hello, Mr. Grant. We can see your income has suddenly stopped. We're not going to charge you any interest until you start earning again, because otherwise we are going to stress you out and make you bankrupt, and then we won't get our money back"

You see, everything trundles along fine when you play along with the game. Keep working doing that job you hate, at a company run by imbeciles, on a project that just needs 5 decent full stack developers to get on with what they do best, for 2 weeks, with no project managers who couldn't organise a piss up in a bar, and no 'architects' who just draw on whiteboards and produce documents that nobody reads, because they were rubbish at actually producing real working software.

The worst code I ever wrote was my first iPhone game. Games are awful as a single indie dev. You have to do all the graphics, sound effects, music, plus design the user interface, and then there's the game itself which has to run at at least 30 frames per second. The calculations are hard. Doing it in Objective-C was a nightmare. I've never know a language with such whacky syntax. I can probably write code in about 20 languages (BASIC, Pascal, Assembler, C, ADA, C++, Java, Javascript, C-shell, Korn-shell, Bash, Perl, PHP, C#, SQL, AWK, Batch, Google Apps Script, Logo, VBA, XSLT) and there's a bunch more I know enough of the syntax of to read and edit.

I can glance at some data and tell you if it's XML, JSON, Base-64, HEX, key-value pairs, fixed position, CSV. I can probably guess how the programmers of your favourite game store the high score table, and insert myself as the number one player with an unassailable score.

Yes, playing the games that everybody else does, competing... it seems a bit pointless when you know the game is rigged, and if I really wanted to, I could tweak my bank balance. Fraud is not hard, and banks make so much money they don't even go after the small fraudsters. It's easier to charge honest hard working people exorbitant rates of interest and fees rather than doing their actual legal & moral duty to Know Your Customer (KYC). I could buy a digital identity for about $100, open a bank account, get some loans, use the money to buy a real passport from a European country that's a bit more relaxed about staff members making identity documents in return for a cash bonus.

Once you're in Europe you can just keep heading east until you find a country where people don't read too many newspapers and watch too much TV. You can find somewhere you can afford to eat and sleep for a couple of years, while you wait out the storm. You can take some time out from the rat race, because you deserve it.

My iPhone app business was a hit, my first IT contracting company made loads of money, my electrician business was profitable, but the building trade is hard, my enterprise mobile apps business was too ahead of its time and never made much money, my Bitcoin trading and mining was hugely profitable, my second IT contracting company made loads of money. I don't really want to sell out and get another contract just yet. I've got some cool software ideas.  Instead of doing what I normally do and start with a profitable business model, I want to do something I'm passionate about.

I don't work at MIT or Stanford. I don't work at CERN or the UK Atomic Energy Authority, but I can tell you that the strong nuclear force is the energy that's released when a heavy element is split into two lighter elements. But what does "heavy" even mean when we haven't managed to get the Standard Model of Particle Physics to be unified with Special and General Relativity. Special Relativity tells us that energy and mass are two sides of the same coin, and General Relativity tells us how mass stretches the fabric of spacetime. Gravitational lensing has proven the theories predictions. The Standard Model had it's wartime and industrial applications. The transistor radio and faster computers. Every experiment discovers new weirdness though, rather than proving the model is complete. The particle zoo grows and grows, every time we smash protons together at higher and higher energies.

What does Quanta mean? It means "how much". A photon - a packet of light - comes in a specific frequency, which tells you how much energy it has. Let's imagine that a red photon is 2, green is 4 and blue is 6. We can also imagine that an X-ray might be 20 and a gamma ray 50. Do you notice that all the numbers are even? That's because you can't see anything odd numbered. A photon with the wrong energy won't interact with an atom that needs a higher energy to absorb it, and then emit a new photon. The only way you know anything exists is because of the photons that are emitted from atoms.

So we can only work with things we can see, and those things will only tell us about the photons that have the right energy. We can build a machine that measures microwaves, but what material should we use to listen to the frequencies that no known material interacts with. How would we even find elements that our eyes and our radios and our photographic chemicals can't detect?

Well, cosmologists reckon there's loads of it, whatever it is. They call it Dark Matter and Dark Energy. Nobody can see it, but they've done the math, and there just isn't enough visible matter to glue the galaxies together. Imagine if Dark Photons came in frequency 1, 3, 5, 7 etc. but our visible universe is governed by the Planck Constant, which means multiples of 2, in this  simplified example. If you can only see 2, 4, 6, 8, 10 etc. then you can't see the Dark Photons and the Dark Matter that can only be seen with the materials that we only hypothesise to exist.

General Relativity is normally right, and GR isn't fussy about the matter that it accelerates. It doesn't deal in packets of energy. GR doesn't do probabilities. Quantum Mechanics says that if we stop observing something it loses certainty and spreads out into a probability cloud. If you know the location of something, you can't know it's momentum. If you know something's momentum, you don't know where it's located. It's like saying that if everybody stops looking at the moon, it won't be where you predicted it to be when you look back. But GR doesn't care about that. GR has predicted the moon's orbit with incredible accuracy, and the moon always obeys the law of gravity.

If you ignore gravity in your subatomic world, you permit matter to behave unpredictably. If you ignore special relativity, you permit massive particles to fly around faster than the speed of light, in order to uphold the uncertainty principle.

If we think about the duality of light. Both a particle and a wave. We think of photons as massless, but they have energy and finite speed so General Relativity applies. The speed of light is too fast to get caught in orbit but light will bend around massive objects. Let's use the Pilot Wave Theory instead of all that Quantum weirdness. Imagine our photon being carried along by the gravitational waves that it's making. Gravity waves can travel as fast as they like and can even escape black holes. You can't detect them, because your ruler will stretch and compress as a wave passes. You can't take a timing of how long it takes for something to travel from A to B because time and space are different for different observers. Just by carrying my atomic clock to my fellow experimenter, to compare the time I measured and the time they measured, my clock will run slower because I'm moving in space. Time is not distance divided by speed.

Time measures how much slower you're moving than the speed of light. If you could travel at the speed of light, and tried to shine a torch forwards, no light would come out and your watch would be stopped. You wouldn't even be conscious, because you'd be frozen in time. If you slowed down to 99% of the speed of light and shone your torch, you'd see it beaming off just as fast as normal. That's because time is passing more slowly, so you don't notice that your light is moving at 1% of its normal speed. When you get back home, you'll probably find that everybody is dead, because time didn't slow down for them. Your clock is right, but so is theirs.

So what's going on at the subatomic scale then? Well, you can't really detect a single particle. When a photon hits the Charged Couple Device in your digital camera, it's absorbed. Enough photons have to be absorbed to trigger the discharge of a capacitor. Only the amplified signal is strong enough to be measured. The thing about amplification is that you get noise. You're trying to measure a signal, but a percentage of what you measure is noise. That's the signal to noise ratio. It gets worse. Because instruments are digital, they have limited precision. If you measure colour with 8 bits, you can only pick the closest of 256 colours. A CD can only store 16 bits of air pressure: 65,535 possible values. It does this 44,100 times a second. Pretty good, but only an approximation.

Because all digital equipment depends on an effect called Quantum Tunnelling, it's hard to know if the Quantum phenomena are being observed, or whether it's the instrument's noise that is being amplified. Early computers sent signals in parallel, but sometimes the data got 'skewed', with some bits arriving later than others. Now data is sent in serial, with very fast modulators and demodulators, but that means that a lot of buffering has to occur. If you imagine the time it takes for a detected signal to be amplified, that amplified value to be measured, the value stored in a buffer, a modulator to turn the value into electrical pulses, the time to travel down the wire, a demodulator to measure the pulses and store a value in another buffer, a memory controller to load that value into the computer processor's register, the processing instruction has to be loaded from the cache, and then the calculation is performed, the result is copied from the result register to memory, the I/O controller sends the result to the storage device.

Then, ages and ages and ages later, a scientist comes and looks at the values. According to Quantum Physics, every piece of measuring equipment, power source, data transmission cable, the computer and it's storage device, are all part of a quantum superposition, and the value is not determined until the scientist observes it, at which point the wavefunction collapses. Computers are great at doing calculations and for sharing research, but by their very nature as machines that exploit strange subatomic behaviour - semiconductors - they are also not very reliable when measuring the very properties of physics that they themself are built on.

It's useful to think of the Pilot Wave theory, because it explains observations like the double-slit experiment, in a nice deterministic way. Photons don't travel through both slits, but the wave does, and then the two waves interfere. Interference disappears as soon as you polarise the particle, because the peaks and troughs are no longer in phase. We really don't need to mess around with probability waves.

Yes I really hate probabilistic theories. Because subatomic things are smaller than the wavelength of light, we can only make statistical measurements. The size of the atomic nucleus was estimated by hammering a sheet of gold really thin and then firing electrons at it. Based on the number of electrons that bounced back and got detected, an estimate was made of how much empty space there is in an atom. However, you might know the weight of the gold, and the surface area, but you don't know how thick it is. It might be 5 atoms thick, it might be 50. Where did you get your measurement for the weight of a gold atom? How you know its density? How do you know how tightly packed the atoms are together?

At some point you're going to have to rely on some old science. The periodic table gives us the atomic weight, based on a presumed number of protons, neutrons and electrons. But what about the strong nuclear force that's holding the nucleus together? What about the energy of the electrons in the biggest orbits? Does a 1g diamond have as many atoms as 1g of Carbon dust? Prove it.

So we know that heavier elements are unstable, radioactive, and decay into lighter elements. We know what amount of what element, in a certain isotope, will give a self-sustaining fission reaction. We guess that fusion in stars creates all the elements up to iron, and all the elements after that we guess are created in supernovae. We haven't done much apart from a bunch of chemical reactions and some atom smashing yet though. We've done pretty well with electromagnetism and radio waves. Semiconductors and transistors are completely ubiquitous. It's all useless junk if the Van Allen belt blows away in a coronal mass ejection and we're all bombarded by cosmic rays and the radio waves are filled with static noise.

I can tell you something that's fairly easy to observe. Hotter air takes up more volume than colder air. Also, there's an altitude where Earth's gravity can no longer hang onto its Nitrogen, Oxygen, CO2 and noble gasses. Also, if you suck up dense polycarbons from deep underground, where they have been heavily compressed, and then set fire to them, the result is less Oxygen, more heat, and the expansion of liquid into a big volume of gas that's heavy, so it lies close to the ground, while the useful Oxygen is pushed into the upper atmosphere, where it thins out and drifts off into space.

If you have more CO2, you should plant more trees. However, we're doing the opposite. Deserts are spreading, rainforest is being cut down and fire sweeps through vegetation in California, Australia and Borneo.

So many people work in banking, insurance, accountancy, financial services, paper pushing jobs of such woeful uselessness that probably the bulk of humanity's job description is: sit at desk in front of computer, wear telephone headset, read the script on the screen to people on the phone and type their answers on the keyboard, drink tea & coffee, go home.

Why can't I do something to help feed some people, spread the wealth, speed up the conversion to clean energy, get more computers doing more useful calculations and modelling, rather than just massaging sales figures and marketing crap that nobody needs?

I'm going to risk running out of money for another few weeks at least, and that means I definitely will run out of money, because it's usually 60 days until I get paid. For the amount of money I'd get selling my depreciating electronics, and the time and hassle involved, I might as well get a job stacking shelves in a supermarket.

I'm just going to do the type of work that I'm passionate about and good at for a few weeks. I know HSBC are going to need a Customer Due Diligence system before February. I like my ex-colleagues, but my god nobody had the balls to just bin the junk and start again. It doesn't scale, it's not maintainable, it's so hard to roll out in-country, the pilot was a disaster, all the good people are leaving, and 85% of the work still has to be done.

I remember getting really angry at an all-day meeting with about 40 people. I didn't know at the time, but the CIO was there, and head honchos from Retail Bank & Wealth Management and Corporate Banking, plus the best in the software business trying to save Europe's biggest bank, on their number one project, money no object. It maddened me that we spent 2 and a half days estimating how much work there was to do in 3 weeks, but nobody knew what our productivity was. Nobody knew what the backlog was. Nobody knew what Minimum Viable Product was. Nobody was bothered about Continuous Deployment. Nobody had thought about the godforsaken task of pumping thousands of questions and rules and logic into a spreadsheet that you needed to know 3 programming languages to even make a stab in the dark.

I said I'd do half the questions on my own. I then had to spend an absolute age reprogramming the core system so that it would spit out meaningful syntax errors. There were about 500 things wrong before I even started. Then the architect admitted that he hadn't even thought about some fairly fundamental things and his solution took days to get right, while my suggestion was roundly ignored. Then the data architect started changing everything, even though it was tightly coupled throughout the entire system. I had to give loads of people lessons on Git and Maven artefact versioning. It was madness, and I had to call time out: I asked for a code freeze while we got everything stable. To everyone's credit, they listened to me, trusted me and supported me. I think it was only 5 straight days of midnight finishes. The work wasn't hard, but there were major bugs in every single component of the system. The pressure of knowing that hundreds of people are effectively twiddling their thumbs, and if you don't get it all working, you've damaged a huge amount of productivity.

A little cheer went up when everything integrated and the screens went green for the first time in weeks. It was also just in time for the CIO to announce that we'd achieved a significant milestone at the Town Hall. It was false optimism though. I had unearthed an absolute mountain of buggy code and dodgy config. My worst fears about performance were confirmed too. It took 5 minutes for the homepage to load.

I found a Scrum Master I liked and gave him a list of names that I wanted to work on a new version of the application. We picked good tech, designed a simple system and had something to demo in a week. They sacked my scrum master, me, and the longest serving member of the development team. People were getting jumpy and we were making management look pretty incompetent. I was also leaving a paper trail that was inconvenient. I was quite explicit about the urgency of the situation and what the simple remedies were. I didn't sugar coat it, because I'd been giving the same advice for 5 months.

I had plenty of warnings to keep my head down, and toe the line. I knew my days were numbered, and when I found out my old scrum master wanted me back because everything was tanking, I fired my parting shot. I knew I'd get terminated. Quicker than having to work a notice period. No need to lie about your reasons for leaving. No 4 weeks of hell working for a micromanaging idiot.

There's no challenge for me in corporate software. I ran the IT for a nice medium sized company. The board asked me for a data warehouse and a new phone system. Instead I gave them a new card payments processing system and an accurate set of accounts, with the correct ledger for all their customers. It's the only reason why the Office of Fair Trading didn't shut them down when they sent their forensic accountants to see why the books didn't really balance. Oh, and they were in breach of card data protection and were going to have a data theft until I tokenised all the card numbers. I had such a hard time in convincing the CEO of the right technology strategy that when he said "fit in or fuck off" I was more than happy to leave that rudderless captain.

When JPMorgan needed somebody to figure out why their FX system was running like a dog and they were going to cause a market liquidity disaster on International Money Markets Day, they'd had 10 Oracle consultants and none of them could find anything wrong. I found a DBA I liked in London, who didn't even work in my department, and we went through everything with a fine tooth comb. I also harassed the sysadmins until they got my disk I/O up to scratch and tweaked every kernel configuration value, applied every patch and generally wrung every bit of speed we could muster out of the hardware. I then had to take the vendor's code to bits and tell them where they had multithreading issues. They didn't believe me, but I kept sending them the measurements I'd made and pretty graphs, until they put a dev on the phone to me, and we talked through the code, and found a bug. Then the marvellous DBA found the setting that was causing the latency. With the new code and the much faster database, I could hardly believe the timings from the performance tests. When IMM day came, we blitzed it. We absolutely wiped the floor. Fastest FX platform in the world. There wasn't much appetite for developing our own in-house system anymore, I really didn't want to sit around looking busy. I liked my friends and the culture, but I still need interesting work.

And that's how it goes. Hire me to fix your technology problems, and I will, but then I'll want to leave if new challenges don't come along. I hate just keeping a seat warm. I guess that's Bipolar. I work like a son of a bitch for 3 or 4 months, then I'm really struggling to stay motivated for another month or two, and then I'll just stop coming to work.

I could try and pace myself, but invariably I find myself drawn to the impossible challenges. Normally you hire somebody who turns out to be rubbish, but refuses to leave. They literally stick to their chair like glue, because their main motivation is job security, not being good at their job. When you hire somebody who's really good, you can't let them know what a hideous stinking mess everything is in, and that they're going to be under relentless pressure to do horrible work. People who are really good will just go and find somewhere better to work.

I'm an idiot. I want to finish the job I've started and leave feeling proud of delivering stuff. I never ask for the poor performers to be fired. Most of the time I'm able to calmly filter out the new guy I'm training, when they're trying to impress me, but they don't know what they're talking about, and I've got an absolute bitch of a schedule to keep. I had to keep just saying "no" when 3 people were shadowing me, and they were all saying you forgot this or that, or you did that wrong... then I press a button and it all works first time and I can start to be more amenable again.

I'm absolutely not perfect. The first implementation is normally a dog. An ugly dog. But it works, and then the pressure is off so I can refactor for elegance. It's a bit of a thankless task though. When you start refactoring you then start looking at other code, and you end up having to change more and more and more and all the tests break because everything is so fragile, and then people start complaining that they can't find their bit of code anymore, and they have to merge their bit of work into an unrecognisable new world, because people don't pull, commit and push often enough.

I don't even write much code. Ask me for a bit of code that does something, and I'll give you a little bundle that you can plug in wherever you want it. When everybody is developing features but the application doesn't work, I'll concentrate on bug fixing and stabilising the build. When everybody is trampling on each other's toes, I'll concentrate on release management and versioning. When an important demo is coming up but people are committing code that doesn't work, I'll roll it back and tell them to put it on a branch until it integrates. When code starts getting promoted from DEV, to UAT, QA and PROD, somebody has to make sure the database is created with the latest schema, test data is loaded, Business Process Management tasks are cleared down, and all the little microservices are up to the right versions. That can take 3 hours on a bad day.

Software is not hard. Managing a huge team is hard. I haven't had a management role since 2013. However, I know that every untalented email forwarder who thinks they can manage a big project says "features, features, features, we're late, features, features, oh my god we are so late, let's just get it working, get it working, oh my god so many bugs, performance is terrible, let's try and go live anyway, oh my god it's hard doing a production rollout, and the users hate it even more than the testers, what do we do? what do we do? everybody panic, work 25 hours a day 8 days a week, 366 days a year, what do you mean we don't have any metrics? what do you mean we don't have any reporting? what do you mean it's not multilingual? why are all the good people leaving? why do things seem to get done a lot slower now we're supporting 3 or 4 more environments, instead of just one? who could have predicted such a thing? why didn't any highly paid consultants tell me? oh, they did? get me the mail server administrator immediately, there's some junk mail I don't seem to be able to delete permanently. Just get it done before the regulators come asking why we've failed to meet our timetable commitment".

And that's why I hate corporate bullshit.

It's the engineer's curse: we want to just solve problems, to make stuff that works, to make things better. I don't care that it hurts your feelings when I say your idea's rubbish. Your job is to listen to the experts, motivate people and sign the paychecks. My job is to come up with the ideas and make them a reality for you.

I don't really think I'm cut out for having a boss. I don't really think I'm employable anymore. I just completely ignore all the management, then they love me, then I tell them I'm not doing it again unless things change, then they hate me, then I get fired, then they get fired.

I probably need to figure out a way to get paid for more than 5 or 6 months of shouting and swearing at everybody and just doing whatever the hell I want. But it's so soul destroying to go to work and think that you made absolutely no difference. In fact you were complicit. Your day rate bought your silence. You were more worried about losing the stream of big invoices than your ethics. You put financial benefit ahead of professional, moral and legal obligations.

A bunch of white collars have got to get prosecuted soon.

Bankers have had their hand in the till for far too long.

 

Tags: