How Can I Take My Coding Skills from Intermediate to Expert?

25 points by JoHawth31 6 years ago

I started coding about 4 years ago but I feel like I'm in a bit of a rut lately. I understand the basic building blocks perfectly, but higher level concepts, for example, abstracting the database away through an interface layer so that we may achieve proper unit testing in Go, are much harder for me to figure out. I understand WHY I need to do this, and I understand what is going on on a high level, but I get a bit lost when it comes time to implement. All the unit testing examples out there show examples of how to unit test a function that squares an integer. That has zero real world benefit to me. How would I unit test an http handler func that is the entry point for a RESTful API? I need to do authentication, database access, and return some JSON data. How do I keep the test as one "unit" when I need to do all of these things?

I feel like there are some intermediary steps or knowledge that I am lacking, where a more senior engineer would be able to figure out how to do unit testing in a real world app based on the squaring function alone. Again, this is just a singular example, but the theme is pretty consistent across any higher level programming challenge I come across.

There are plenty of tutorials out there about how to learn PHP (yuck) or JavaScript for newbies, but there are surprisingly few resources for people interested in becoming experts. I'm the only technical person at my job currently, so asking senior engineers for help really isn't an option. Where do I go to fill these gaps in my knowledge? Are there other engineers out there that felt the existence of a "skills chasm" that they had to cross? How did you do it?

hluska 6 years ago

First, I find the inclusion of "PHP (yuck)" to be in extremely poor taste. You would be surprised by what you could learn from that community that would apply to every other problem you would face in whatever language you like more. If your goal is expertise (whatever that is), don't close yourself off to other languages or their learning resources. In general, don't close yourself off to any opportunity to learn anything.

Second, expertise in our field comes from years and years of practice. Mentorship helps to an extent, but you'll still have to put in the time.

Third, read as much code as you can.

  • wasd884 6 years ago

    I agree.

    OP, when you stop saying things like "PHP (yuck)" and start to appreciate each language for the one (or more) things it got right, you'll be well on the way to taking your coding skills to expert.

  • matt_the_bass 6 years ago

    I agree too about your response to the OP’s php comment.

    It sounds like the OP is comfortable with the syntax for unit tests in their language of preference and that they need help learning the logic of “what they should be testing” to test the cases they mentioned. IMO this type of question is 99.9% syntax agnostic. In this case, they should look to an ecosystem where similar questions are asked to find examples of testing similar logics.

    In this case, though the OP prefers a different language, I would guess tha there have been _many, many, many_ examples of php based projects which have unit tests and need to test interfaces to DBs and REST apis. Php is a relatively old ecosystem in terms of internet application programming and has a HUGE user base. So probably there are many good informal examples in larger Open source projects.

    Like the parents last comment “read as much code as you can”!

gt2 6 years ago

Build many things.

While you are building them, do it however you can make it work (you may learn some things noone else has done).

But look up things you get stuck on.

Use the things you build. So build things you want to see happen.

While you use them, you will make them more reliable and see the pain points. In future projects you will avoid those/have solutions you instinctively go to because you experienced it.

Write some libraries along the way to help with the pain points you solved yourself. You will learn what makes a good interface and documentation for 3rd party libs which you will probably be using a lot of, even if it's just the main framework or standard lib of the language you are using.

Lastly, all of this will help guide you in your evaluation of new languages, frameworks, and libraries, which you will be doing a lot of during your career when you build/rebuild/extend.

Good luck!

tmaly 6 years ago

Have you considered contributing to an open source project that you respect?

Picking a side project is a great way to learn and grow.

If you learn from books, I would recommend Test Driven Development by Kent Beck, Clean Code by Robert Martin, The Philosophy of Software Development

kat 6 years ago

I find high level abstractions more practical, and easier to understand, when I work on larger projects. I would recommend looking at larger open source products or picking up a few books on enterprise software design. You can skim through the academic theory, if you're already familiar with it, and concentrate on extending their code examples.

Patterns of Enterprise Application Architecture - by Martin Fowler Domain Driven Design - by Eric Evans

JoHawth31 6 years ago

Thank you for the responses ladies and gents. At the risk of upsetting some of you further, I fully stand behind my PHP comments. I'm only kidding (sort of). Thanks again.

rc-1140 6 years ago

Hi OP, I had the same problem you're having, still do to an extent. I was the only dev at my first job and had no one in the real world to turn to. I learned several things from a friend who was already in the industry for years before I got into it when I was searching for my second job, and I'd like to share them because your question will get slathered in the typical HN well-meaning yet empty responses:

> How would I unit test an http handler func that is the entry point for a RESTful API? I need to do authentication, database access, and return some JSON data. How do I keep the test as one "unit" when I need to do all of these things?

At this point, you're ready to ask "real" questions on places like StackOverflow, Reddit boards, and chat rooms (Discord, Slack, Gitter, IRC, etc). You have enough understanding of the technical jargon to postulate questions to the community at large. I asked a question on SO about how unit testing in Android works because I was getting a NullReferenceException - you know, the type of problem that gets badgered with the standard and huge SO answer about NullReferenceExceptions[1] - and I got a really nice answer that taught me a fair bit about the Android ecosystem. Put enough thought into your question, include code and links to stuff you've done, and most of these resources will bear fruit for you.

Another benefit of joining these communities is if you get into the chat room ones and become a known face, people will genuinely want to help you. I learned about the history of delegates and how to write extension methods because I was chatting about going through "C# 6.0 and the .NET 4.6 Framework" and had some questions about delegates, and one of the members set aside some time over a few days to give me a small challenge for writing an extension method, explaining delegates along the way.

> Again, this is just a singular example, but the theme is pretty consistent across any higher level programming challenge I come across.

This is the time where you can also start reading books like Code Complete and get something out of reading it. Pick up some of the usual suspects like Clean Code, Code Complete, Working Effectively With Legacy Code, etc. and get crackin'. You can treat Code Complete sort of like a manual that you peruse the chapter list and see if it has a relevant chapter to your problems and give it a read, or go through it cover to cover.

> "skills chasm"

I know I just told you to spend money on books, but a resource that was REALLY good for building skills was Pluralsight. For me, since I was working in C#, I perused the C# Path and learned about equality, LINQ, etc. Some of the courses get really specific and deep into it; for even more depth, you might have to turn to books. Actually, there's an intermediate course on Pluralsight called "Creating Well-tested Applications in Go" which might benefit you immediately but YMMV.

It's the go-to that just works for building skills so everyone spits it out immediately, but yeah, as much as I dislike people who just go "projects help you grow!" and drop the mic, projects are gonna help you out a lot. If you can't do big things because of work or time constraints, do small things. An example I can provide was learning about reading/querying .sdf files, which meant I had to do some digging into deprecated libraries and tech. I did a little playing around with some sdf files in LINQpad by connecting to it and simply reading some values. Small things build up.

[1] https://stackoverflow.com/a/4660186