University coding
We went to do some university recruitment recently and pairing with some of the students reminded me of some things that I’ve started doing better since I started working professionally.
I wanted to note them down so that I’m more aware that these might be common areas to improve on for university graduates that I work with in the future.
Naming of things
I don’t remember there being that much focus on naming variables/methods/classes in any of the programming courses that I studied.
It seemed the same for the students I paired with and I therefore found it quite difficult to understand some of the code that they’d written.
A typical example would be a method which had variables 'x', 'y', 'num' and 'a' and was named in a way which suggested it was a command when in fact it was a query.
A couple of colleagues I paired with at the end of 2007/beginning of 2008 showed me the value of naming things expressively in terms of how much easier it makes a program to read.
Sometimes there’s a bit of a tendency to try and shorten variable names which tends not to work that well from my experience.
If we can use the same language in our code as we do when speaking about a problem then we’re doing reasonably well.
Solving problems in one go
This is something that I’m still sometimes guilty off although I think I’m getting better at spotting when I’m doing it.
At university on the other hand I had the tendency to try and write the whole solution to a problem in one go without ever actually running it until I thought I’d finished.
As you might imagine those programs never worked first time around and resulted in hours of debugging to try and work out what had gone wrong.
Incremental development certainly seems to work out much better for me these days.
Using Google
One thing I noticed was that the searches being done on Google were written in natural language which meant that the results weren’t particularly helpful.
Google seems to work well if you’ve narrowed in a bit on what it is you want to know how to do.
I think the development of that 'skill' comes through practice but it’s certainly something that I used to struggle with a few years ago as well.
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.