Zac Anger's Blog

A Tip


Tags: advice

I have, like, an actual kind of tip, for new-ish developers.

It's pretty simple. Shouldn't be too hard to grasp, maybe a little harder to implement.

Have confidence in your code.

If you don't have confidence in your code, then try this:

Write code in which you have confience.

It really sucks to have to walk someone through your code when you're not sure it's even doing the things it's supposed to do, or when you are sure it's doing the right things but doing them in a really gross kind of way.

I think this is something everyone struggles with. It's really easy to copy and paste stuff from StackOverflow, and everyone does it for a while. I still do it sometimes, though usually with a lot of testing and reading before actually running that code.

It's really easy, as a new dev, to say "Well, I don't know how to do that thing, can you just show me?" And that's okay, but it's a lot more okay to say "Hey, I spent an hour with the docs, here's my implementation, here's the stack trace and I couldn't find anything helpful on the source's issues or SO, do you have any ideas?"

It takes a while to write code that you don't hate, but usually even someone who's been programming for a few months knows what good code looks like. It's concise, readable, logical, and consistent. It doesn't make you cringe.

I'm not really very good at writing code and feeling great about it. When it comes to, say, raw Node or a Bash script, I'm usually better with these things than anyone I know on a personal level, and have no problem taking charge and just doing things. But when it comes to the things I actually do every day (which right now means React, Koa, AWS stuff, Docker, trying to read C#, and Sass, mostly) I know I'm not that great. Knowing that I'm not that great means I take probably twice as long as I would to get anything done as I would if I was the best at that thing in the room, because I know people who know more than I do will be looking at my code and will need to fix it.

That's not a bad thing, but it's not a good thing either. It means I'm programming without confidence, when I'm writing React or Sass. And I'm not even bad at either, I just have no confidence when writing these things on a project with people who are better at them than I am. That's something that I should get over.

Anyway, I meant to write this post on the train and post it when I got home, but I ended up standing on the train so it's split, from while waiting for the train 'til 10:30 PM while sitting at DevMountain, so it's probably a little disjointed.

The point here is, if you have confidence in what you're doing, you'll get stuff done quicker and better, and if you don't have confidence in what you're doing, make it so that you can.