Live data from Hacker News

What I wish I knew when I became CTO

medium.com

61–70 of 258 posts

Re: What I wish I knew when I became CTO

#61

> I’ve found it a real struggle to get our team to adopt writing tests. I find this hard to believe. Do others CTOs / team leads find this to be the case? I've been a CTO of two small startups with 3-7 developers. We've had resistance to tests at some points (myself included). We've solved it fairly simply. All pull requests (PRs) require tests. PRs are rejected immediately without tests. If a PR doesn't have tests a…

Getting a team to write tests is change management 101:

People are resistant to change when they don't know how it benefits them directly and immediately.

My suggestions have been:

- By giving developers slight nudges every time they get frustrated with developing when tests aren't present is a good way to help them see the benefit. "Imagine how much easier it would be to write this piece of code if you had tests in places where this function calls other things".

- Enforcing it during commits (as you suggest, using PRs)

- Reminding your whole organization that while you migrate to implementing more testing that velocity of development will be impacted. This is really important, because it means people outside of the dev team also need to see the benefit.

- Eliminating "deadline cultures" first and then implementing unit testing

Re: What I wish I knew when I became CTO

#62

> "I appreciate now that technologies have a surprisingly short lifespan" This fact alone makes me so glad that I stuck with older tech that has withstood the test of time for our own SaaS. I know that we have users from bleeding edge tech companies sign up for our service, then run away when they glean the 'ancient' tech that it runs on - but then again, I think we have outlasted many other new tech frameworks/langu…

What was the stack?

Re: What I wish I knew when I became CTO

#63
post #57
post #15

If your engineers don‘t write tests you hired the wrong people. Testing is vital. Make a rule: Every change needs to be tested (you can even set up a pre-commit hook for this. If a class has no test, one has to be written. If tests can not be written easily for a class, it has to be refactored.

> If tests can not be written easily for a class, it has to be refactored. How do you make sure that the refactored class does the same thing as the old one? Rewriting old code that you don't have test coverage for is way riskier than whatever small change you were going to make to it. I write a lot of code without tests because a lot of legacy codebases aren't set up to be testable, but they work , and it's importan…

Characterization tests - Michael Feathers writes about strategies to build tests in "Working Effectively with Legacy Code".

If I wanted to be a consultant or contractor again, it would be walking into these situations and essentially building test systems for legacy code.

(And if anyone wants to pay me 8,000 a week for a few months...)

Re: What I wish I knew when I became CTO

#64

> "I appreciate now that technologies have a surprisingly short lifespan" This fact alone makes me so glad that I stuck with older tech that has withstood the test of time for our own SaaS. I know that we have users from bleeding edge tech companies sign up for our service, then run away when they glean the 'ancient' tech that it runs on - but then again, I think we have outlasted many other new tech frameworks/langu…

What was the stack?

Front end is basically Bootstrap + jQuery (o_O) Back end is Ruby, but built using Padrino, based on the Sinatra framework instead of Rails. Not exactly 'old' tech there, but not nearly as cool or fast moving as Rails, Go, Rust etc.

Re: What I wish I knew when I became CTO

#65
> I’ve found it a real struggle to get our team to adopt writing tests.

If you're struggling to judge the engineering culture of a company that you're considering joining, consider this indicative of a poor one. It isn't definitive, but it's something you should ask about and probe further. Ask to see their CI dashboard and PR comments over the last few days. When they talk about Agile, ask what _engineering_ techniques (not process!) they leverage. These things will tell you if you're joining a GM or a Toyota; a company that sees quality and efficiency as opposing forces, or one that sees them as inseparable.

When it comes to tests, there are two types of people: those who know how to write tests, and those who think they're inefficient. If I had to guess what happened here, I'd say: the company had a lack of people who knew how to write effective tests combined with a lack of mentoring.

That's why you ask to see recent PR comments and find out if they do pair programming. Because these two things are decisive factors in a good engineering culture.

Re: What I wish I knew when I became CTO

#66
Much of this is summed up to be:

CTO positions are much more about technology vision (e.g. choosing frameworks/technologies that can last + serve your needs today and tomorrow) and hiring/retaining talent. Everything else is gravy.

Re: What I wish I knew when I became CTO

#67

Earlier quoted context omitted.

If you don't know how to do something yourself, you wont even be able to identify someone who is better than you in that field. I've seen people who don't know how to market their product go out and try to hire a marketing guy. You might luck out and get someone perfect for you, but I've never seen it. Usually they just end up wasting a lot of money and learning some hard lessons.

So how do you hire effectively as a CEO? There are too many areas for you to be knowledgeable, yet you need to be able to hire top talent across a variety of areas.

The method I've found is to ask people I respect a lot, "Who is the best X that you know?" Then call/email them, saying, "I'm the CEO of Y, and I'm trying to find out what a good X looks like. So and so said you're the best she knows. Can I have 30 minutes of your time?"

Do 5 of these, and you'll have a good idea of what someone good looks like. (And those 5 may give you some candidates)

This is very difficult though because things like "organizes the team to hit quota every quarter" can come in many different manners.

Re: What I wish I knew when I became CTO

#68
As time goes on, the CTO becomes a pretty flexible position, somewhat analogous to that of a COO. This article was useful for me to figure out the kind of options I had as a CTO, in terms of specializing, as the company got progressively bigger: https://www.linkedin.com/pulse/five-flavors-being-cto-matt-t...

Early on, like OP discovered, you pretty much have to do it all, but you slowly remove yourself away from a lot of those tasks as you find better people to replace you in those areas.

Re: What I wish I knew when I became CTO

#69
post #4

Yo, why are you doing BI queries on MySQL?

Curious to hear if they were running SQL queries using some sort of ORM layer, or if they had people who were knowledgeable with SQL itself writing queries or creating Views to extract the data they needed, as well as tune the database and ensure proper INDEXES were in place.

In my past experience, the two methods above can produce wildly different impacts on database performance.

Re: What I wish I knew when I became CTO

#70
post #8

> Don’t hire someone to do something you’ve not yet figured out Hum. I would say the reverse. Bring people that are smarter and know more than you.

Didn't Steve Jobs say something about B players should only be hiring A players? Cause we all know if you start hiring C players they will just start hiring D players and so forth. The Bozo Explosion he called it.
Post reply on HN