Workplace question

I haven’t seen any workplace related questions, but I really enjoyed some of @zedshaw 's insights in LMPTHW, so I figured I’d give this a shot here.

I’m new to the developer scene. I managed to score a job by a small startup some months back. I’m part of a team that’s me, a dev, and I guess what we’d call the CTO and on co-founder who has something to do with us. (There are other teams.) I’m like way new to all this, great. Other dev cannot communicate. He doesn’t use git, and if I write code, he doesn’t incorporate it. He gets work done, but his code is hard to read for me (very cryptic variables, not good spacing, etc.). If I ever correct something directly, he denies it.

I’ve found that I can get by not writing code at all. If I want to write something, I research it, write up a little writeup, and then he’ll Slack something like ‘oh, that gives me some ideas’, and go do it more or less. This isn’t really what I want though. I am in the middle of my first development position, and I am not developing. I find other things to do for the company that are useful, but this is not what I expected.

Co-founder does get what’s going on, I’ve mentioned it and had conversations. Still, I suspect they can’t get rid of him, because for sure I can’t handle the heat alone. I worry if his code is buggy and breaks stuff in production or worse, but I can’t do better by myself.

Is this situation as weird as I think? What ideas might you have?

So, you’ll most likely never fix this other developer without firing him. Not sure why programmers are like this, but most likely he’s insecure about his code or just arrogant or most likely both. Without the CTO threatening to fire him if he doesn’t start writing better code and let you help he’ll just keep doing it. In the end, this will most likely tank the company as nobody will be able to work on this code base later and they’ll have wasted their money.

Which means, you have to find somewhere else to apply your time and to work on your coding skills. The best place to do that is in testing this guy’s code from the outside. I’m assuming this is a web app, but this will work with any kind of application where you can automate pretending to be a user:

  1. Get Selenium or a similar automated web testing suite.
  2. Pick whatever language Selenium supports that is easiest to write tests in.
  3. Now, start writing a full test suite, with really great code, that goes through the application and pretends to be a user, but pretends to be a real jerk of a user.
  4. Start off slow, and test something simple, like login. Slowly increase what you test and try to cover as much as possible, politely. Nothing fancy. When he asks just mildly smile and say you’re just going to help with testing. Ultimately try to keep this a secret as long as possible.
  5. Once you have the test suite working, start adding in tests that exercise common bugs. Hit OWASP for common security holes. Put in random garbage into fields. Thrash it with tons of connections per second trying to collapse it. You may need to tread lightly here since, if the CTO doesn’t know about it then this guy can claim you are “hacking” the site, so maybe tell the CTO you’re going to test the site’s reliability using your totally innocent test suite.

Your goal is to have an very solid, very well written, test suite that exposes bugs in this dude’s code, and don’t back down when he comes screaming that you’re hurting his work or something. The things that might happen are:

  1. He’ll demand you be fired or he’ll quit. Be ready to calmly show the CTO all your very nice clear code, and let him watch Selenium click around and test the app. It’s the watching it click around that gets people excited.
  2. He’ll claim your code is garbage. Be ready to show very nice clear code, and then say you’d be willing to have a 3rd party consultant come in and review everyone’s code for quality.
  3. He’ll claim it destroys speed, security, or usability or some other such nonsense. Tell him you’d be willing to setup a testing and staging server if he’d show you how to get the code running on new machines. Propose making a Docker installer for it.

What you want to do is make it so, if this guy quits, you can take over. Having a test suite is worth SO MUCH in this situation because you can fix things if you know that you’re keeping everything working, and more importantly, you can replace his entire code base if you have a full test suite. Simply start the rewrite and keep the tests working on the new rewrite. The place he’ll get you though is in the system administration and management side, so that’s why you try to get a Docker that can set it all up.

Ultimately though, this is a bad job so start looking for a new one unless you like the challenge of writing this test suite. I actually love doing this, and it’s really hard to argue against it (although people do).

2 Likes

@zedshaw Thank you very much for reply. This at least gives me a good idea of what I can try doing. Testing is a weak point of mine, this should be a real learning experience.

AAAA!!! Other dev just went and altered whole code base.

Welp, start over then. Also, if you test through the User Interface then you reduce the impact of code changes.