I’m stoopid! So I code in “easy mode”.
Tags: webdev, beginners, programming, productivity
Published: 2023-06-24 15:30:52

I can’t even speel stoopid left… and yet…

You might be wondering why I say this, but the main reason is: I think that, in general, “programming is easy”. So, either I’m doing something really wrong or maybe I’m just cheating by using the “easy mode”?

## It’s too much to think about

Let’s start with everything before you start typing the “hello world”.

The more you think about “decoding” the code, the less you can spend on what the code is actually doing.

I use VSCode and will show some extensions I use, probably most of the bigger IDE has those or a similar one. I’m also fullstack and working usually with JS/TS only, so I’ll show extensions for the front and back and/or JS/TS, but unless you’re using some esoteric language (or maybe creating a new one) then you probably will have extensions for that language.

### Which are functions, constants, variables, and classes…?

Whenever I open code, with my settings, I instantly know what is a function, const, class… In my case, [Dracula](https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula) does that.

But there are themes that don’t make that kind of distinction and when everything is the “same color”, then that means you have to actually think and know which is which.

### Other colors and related things

I also use the colorized brackets option (before I used an extension for that) because it shows me exactly where things start and end, coupled with [Indent Rainbow](https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow).

Then you have [Peacock](https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock) if you need multiple workspaces open (ex: front and back). And if you need multiple workspaces (or have lots of projects), then you probably want [Project manager](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager).

For HTML and JSX, [Auto Complete Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-complete-tag) was always a staple that it’s been recently added to VSCode, so it’s one less extension… but [Highlight Matching Tag](https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag) is still useful.

Comments are important and [Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments) highlight it as long as you follow it. And since we use it for “TODOs”, then [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree) will help you remember all of those.

### How are you writing the code?

Lint and formatting are essential! This means [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).

Don’t forget [Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces) because while you might not see them, someone will (maybe git… and in a file with no other changes…).

But after those, I also have [SonarLint](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarlint-vscode) that catches other things and even works out of the box with any project, even legacy ones that you can’t really figure out how to use a lint without breaking stuff (disclaimer: I’m not complaining… but any coincidence is entirely similarity).

You also have [axe Accessibility Linter](https://marketplace.visualstudio.com/items?itemName=deque-systems.vscode-axe-linter) that will find some crude mistakes and also [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) because you know… stoopid mistakes happen.

And [CodeMetrics](https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-codemetrics) to check if your functions are getting too complex or not (do tweak the numbers to your liking, especially the JSX rules).

And finally, the extension that will make you think you’re as stoopid as me: [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens). I can’t stress enough how important this is. When you have all the other ones, this one will paint your whole screen red and orange throwing every problem at your face.

### Know your work tool

It amazes me that people use and depend on VSCode for their work and don’t even bother reading the changelog of their work tool. I’m not even saying macros, cords, and other shortcuts. I’m saying that basically every month they release new features and people just don’t bother learning what changed.

Again, I’m stoopid! I usually just call the command center for a lot of things… but… I know what I can do and I’m always learning about options that make me have to think less and less about things that aren’t important.

## With all of that out the way… easy mode!

All that remains is only what the code itself is doing.

A lot of things I don’t need to think about because Error Lens caught a warning or error that another extension found, so all that I need to do is think about business rules and how to implement them in code.

Code Metrics is another one that helps with this because it shows you where functions are getting too complex. You, while writing it, might think it’s “easy”, but your stoopid one-month-later self will have no idea what were you thinking then.

### Bad memory will make you a great developer

Really!

I have a good memory for useless things and trivia, but when it comes to what I was doing last week or with the very things I’m working with… out of sight, out of mind.

Knowing that I make sure that I write code in a way my future stoopid self will understand. 

Even then I’ll sometimes find a piece of code that I have to spend a few minutes trying to figure out what it’s doing… do I do what I need and call it a day? NO!

When I have to spend time thinking about what’s going on, then it’s clear it’s time to refactor and/or comment on what I just learned before I forget it again. It’s an investment, you already spent time and it would be stoopid to make the next poor schmuck (maybe you) go through all of that again.

### Wait it’s only that?

I don’t come from a CS background, I “started” with optimizing Excel Spreadsheets, then I had one single not-that-great VBA for Access class and I remember asking the teacher something along the lines of “Wait, you can do EVEN games with only assignment, loops and ifs?”.

And that’s how I started out!

### The true hard mode

In interviews when asked about the biggest challenges, I always like to say: “people”.

Because not knowing what they want or wrongly thinking they need something is always a bigger challenge than something technical. 

An extension to that is that the biggest “technical” problem I suffer is with integrating stuff, usually because the docs, when present, aren’t sufficient or sometimes are so outdated that it’s a lie.

The boundaries between “our code” and “other people's code” will always be the biggest challenge and that’s why being stoopid makes me think of ways to make it easier for other people, be it naming stuff better, commenting, or maintaining good documentation.

---

I have a lot more extensions installed and there are probably a lot more settings that help me every day… if you feel I forgot something or you have a recommendation, leave it in the comments!

And of course… if you thought about glasses and librarians when you saw “stoopid”, then you are right. =]