How my coding changed once I became a Software Engineer?

Nidhi
ILLUMINATION
Published in
2 min readJan 31, 2024

--

In college I made web development projects, where the code looked somewhat like this (no judgements please):

<button onclick="changeDOM()">Click me</button>

var unusedVariable;

function x() {
var a = 10;
var b = 20;
var result = a + b;
return result;
}

var apiKey = 'abcdef123456';

document.write('<h1>Hello World!</h1>');

You see the problem? The problem is basically every statement in the above example.

  • Declaring variables and functions with unintuitive names
  • no comments
  • no modularity.

Because the goal was to get the work done. The webpage should just look and work like we want, without any overhead of anybody else’s experience and need.

It didn’t matter if we wrote all the code in one line, because usually we were the only ones working on it or a couple of more people.

Photo by Arnold Francisca on Unsplash

Now, you ask?

Each line of code matters, each check-in matters.

Some best practices I have picked on the way:

  • Make variable names intuitive.
  • Use proper private/public protection on the variables.
  • Proper spacing matters, the nit comments on the PR got me into adding proper spacing while coding instead of checking later.
  • Break the code into easy-to-understand functions.
  • Add comments wherever necessary, because even you won’t remember what certain code you wrote does after few months.
  • Add elaborative description in PRs, with demo videos if needed.
  • Git has been haunting me until now, still learning the commands and functioning. So, pick good grasp on it.
  • I know asking someone else seems embarrassing but wasting hours or days on the same issue isn’t the way to go too. Find a balance between both: finding solution yourself and reaching out.

These are just the few things I learnt in these few months. Hopefully you can benefit from my learnings and apply them in your journey!

--

--

Nidhi
ILLUMINATION

Software Engineer at Microsoft | I Write About iOS dev, Programming languages, Artificial Intelligence and more | Coffee keeps me alive