Overclock.net banner
1 - 1 of 1 Posts

· Read Only
10,834 Posts
I feel like there's 3 parts to it: how good they are at designing algorithms, how proficient they are at the language or environment, and how good of a collaborator they are.

1. They're constantly thinking about things in terms of runtime complexities. There's a lot of people who will just slap together some poorly written code in terms of runtime complexity and just hand it off to you without trying to fix it. Usually people should just take some time, sit back, and unravel the problem to think of the more general sequence of operations they need to be doing. If they aren't doing this (unless it's for a really textbook case), there's a good chance they might miss very efficient approaches to tackling the problem.

2. This one just comes from experience in working with the language. I think this is far less important than 1 but there are certain optimizations or shorthands you can do to perform certain operations more efficiently. Things like list comprehensions in Python, ternary operators, bit shifting on integers for dividing or multiplying by a power of 2, using certain fill constructors instead of manually looping through to fill, etc. It's not strictly necessary but can greatly save time, increase readability, and potentially add some performance.

3. Good comments and clear communication! Unless the code you're writing is never going to be seen by anybody except yourself, other people who take up the torch down the road will probably have a hard time understanding it. We don't work in isolated vacuums and it's pretty inefficient to do so for medium to large scale codebases. It's especially useful for helping onboard people new to the language who may not be aware of some of the shorthands or optimizations a certain programming language can make (like the ones mentioned in 2).

For 1, sometimes you will accept slower runtime complexities just because even if it's efficient in terms of Big O, it might actually be slower than another algorithm with a less efficient Big O complexity in smaller inputs. There's a lot of sorting algorithms that are like this.
1 - 1 of 1 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.