on
Coding Challenges
While different roles and responsibilities will dictate the amount of time I will spend coding, it is still an integral part of the craft. In every role I’ve had over the past ten years, the amount of coding has varied as I’ve needed to delegate more and distribute work to other teams and team members. At the same time, when working in a smaller team or smaller company, coding naturally becomes far more hands-on and I’ve needed to execute on tasks in higher volume. Regardless, whether it is for a SPIKE, helping to get a project to the finish line, or even for my personal projects, I do spend a lot of time coding.
I have a couple of other public repositories where I have stored some solutions to coding challenges on CodeWars and Project Euler, but I’ve started to migrate them over to a general repo.
I generally do code challenges both for fun and to keep my skills sharp. I love having a wide array of tools in my “engineering toolbox,” which is why I enjoy doing the challenges in a variety of languages. Just like I keep current on new technologies and services to ensure I can identify ways that new tools can provide improvements or optimize our day-to-day engineering tasks, I like to keep up on a variety of languages and stacks.
When it comes to using any programming language, there are really two pieces to keep in mind: syntax and the standard library. Syntax will vary a little bit, but the fundamental concepts are mostly the same, e.g. loops or recursion, control flow, types, etc. Otherwise, the concepts mostly vary between imperative and functional languages.
For high-productivity and web applications, interpreted languages like Python and Ruby are both very powerful and I’ve used both extensively over the past fifteen years or so. For scientific computing, Python (with NumPy) is a clear winner, however I also love to work with Julia since it’s significantly faster than Python and takes a more functional programming approach. It also has built-in Linear Algebra support, a la Matlab, which makes it really nice for scientific computing and a host of other compute problems.
When I need extra speed, I’ve historically leaned on C, C++, and Java. These languages are all fast, strongly-typed, and compiled. I’ve also worked with Go and Rust which take a more modern approach of C.
While I love working with functional languages like Haskell, Elixir, and OCaml, I haven’t found nearly as many companies using these tools actively. However, I do feel like there’s a huge benefit for engineers to think about things functionally – data as mathematical sets and performing operations using the map/filter/reduce paradigm. In each of these, an operation (function) is defined which transforms the set in some way. This is a very mathematical way of thinking about data manipulation and is extremely powerful.
The last language I’ll speak on is JavaScript, represented through NodeJS, as this is the language which tends to generate the most critical opinions. It’s heavily integrated into every browser and the standard for front-end development, so we’re kind of stuck with JavaScript for now. There are numerous wrapper languages which “transpile” into JS and web assembly (WASM) has been in the works for years, but for the time being it looks like JS is here to stay. With the rise of NodeJS, we have been given the opportunity to share a language for the front-end and back-end of web applications, and when we use TypeScript we can avoid some of the gotchas commonly associated with JavaScript code.
I have always loved languages in general, both linguistic and programmatic, and I do love to code. There’s something beautiful about being able to create complex systems using keywords and abstract ideas expressed through code. As analytical as we engineers are, this is a place where our love of the creative shines.