4 things I wish I’d known before starting as a Software Engineer

It’s been almost 6 months since I started my new career in the technology industry and I’ve learnt a lot in that time. The period has been split roughly 50/50 between formal training and work, each providing new insights to what my future career has to offer.

While my personal study before applying for the role has stood me in good stead, there are a few things that if I’d have had my time over I definitely would have paid more attention to:

Unit Testing

Practice writing unit tests. I cannot stress this enough!

My journey learning React through FreeCodeCamp has been a great help to my day-to-day role and I’ve found myself able to be productive and solve some tricky problems. In the last 6 months I’ve found I can code a working component quite quickly, however writing the unit test takes me a whole lot longer.

We write our unit tests using Jest, Enzyme and Chai, which all work perfectly with React. I’ve had a steep learning curve setting up mocks/stubs/fakes and knowing some of the intricacies around Shallow rendering and Mounting components. Spies are also one that has thrown me. You can assert that a function has been called when performing a certain action, rather than asserting on the value that it produces. In this case a spy is set to a function and register’s when it’s been invoked. It’s all a bit confusing to begin with, but I feel that with practice it will hopefully become more ingrained.

FreeCodeCamp now offers a Quality Assurance module that focusses on unit testing. Having my time over I would focus on this first and foremost. Unit testing is such an integral part of my team’s work and if I’d had any bit of experience with it then I could have been even more productive coming into the team.

Well-Named Functions/Variables

What I’d tell my past self if I saw him today is “This really matters!!!”. It’s probably the aspect I struggle with the most. Writing a good function or variable name takes time and a lot of effort, certainly in my case! I’m still working hard on this. it’s definitely not a skill that comes naturally to me.

While it sounds really simple, I constantly have to remind myself:

“What does the function do? What is its purpose? What does it return?

When I come to refactor, this is one of the areas I focus on the most. While the function may make sense in your mind, can a non-technical person come in, read your code and intuitively understand what it should be doing? Sometimes you can become too blinded to your code and think it’s obvious, but when you actually read it aloud it really isn’t.

One of the earliest chapters In Robert C. Martin’s “Clean Code” is titled “Meaningful Names”. The prominence of this chapter shows how integral well written names are to an application. It helps the reviewing colleague and any current/future member of the team to read the code and understand it’s purpose. Ambiguous names create confusion, so stop it!

Isolating functions to a single use

Similar to naming functions to do what they sound like they should do, I also need to declutter functions so that they’re not performing more tasks than they should. I often found myself declaring a wide ranging function that performs a variety of tasks. This would get highlighted in code reviews and I would be encouraged to split it out into smaller chunks, isolating each piece of logic handling.

I’m told this is more in line with good functional programming that I’m trying to achieve with my React code. Each piece of logic has its own function and if that is needed to be used elsewhere, it can be abstracted away and reused by multiple components.

This is a nice quick-win for me. I find it much easier to break my chunky function into smaller bites. It’s just more naming issues that’s the troublesome part!

Object-Oriented Programming

This would have been the opposite had I known only object-oriented programming methods but my whole experience was centred around Javascript, used in a functional way. This has led me to be very blinkered to other writing styles and made it harder to learn those in the process.

My team uses React for front-end work and Kotlin for back-end. Kotlin is an object-oriented language and while some aspects of it are intuitive and seem a logical way to write code, it’s been difficult for me to pick up. This is particularly evident when reading other’s code. I often find myself looking up a class thinking it’s from a Kotlin standard library only to find it’s a custom class and I have no idea what it does!

This will be a learning curve for me, but one that I see massive benefits in me conquering. I’ve only started learning Kotlin in the last few weeks so it’s all very new to me.  However, I believe knowing both functional and object-oriented programming styles will make me into a more rounded and knowledgable engineer.

Conclusion

I’ve left this list at 4 – the ones that I felt I would have benefitted from the most before starting. Not necessarily knowing them fully and having a lot of experience in them, but at least having more exposure to those topics. I believe these would have given me the ‘biggest bang for my buck’.

I was lucky enough that my team uses React which I’d made a few projects through FreeCodeCamp (one of which you can see here). This has led me to be quite productive in my early months which in part gives me more exposure to harder topics. The areas above would have propelled me even further. These will be in the foremost of my mind going forwards and hopefully I will reap the benefits of this work soon.

I’d love to hear from your own experiences! Is there anything you’d wish to tell your past self at the beginning of their career?

2 thoughts on “4 things I wish I’d known before starting as a Software Engineer”

    1. Hi Dankwa, this is a good prompt, I’ve been meaning to write a post about this and I will definitely get to it soon. However, what I did was:

      What did you do to land that first interview/job?

      1) Taught myself my first bits of code
      I went through the FreeCodeCamp curriculum until I got my front-end certificate which covered HTML, CSS, JavaScript, jQuery and some JSON/API work. I then went onto the Data Visualisation certificate which then covered React and I had touched on the back-end cert which covered Node (I didn’t finish these certificates).

      The course has changed since I gained my front-end cert. The equivalent now is probably:
      – front end certification
      – front end libraries certification
      – JSON APIs and Ajax (from Data Visualisation Certification)

      This is where I’d got to before I felt confident in applying for roles, but I know some people who have applied far sooner than that.

      2) Sign up to GitHub
      I wish I had done this sooner. I had done all my FreeCodeCamp projects in CodePen which was great to get started, but I think putting my code onto Github would have given me more gravitas. I only did this right at the end. It wasn’t a gamebreaker, but looking back I would try to post more work up there sooner. The contribution chart keeps you accountable and shows that to your potential employer that you’re consistent. You can also post your code snippets from individual challenges there.

      3) Made a portfolio Site
      Just a basic one-page website. You can find mine here. Although I had Bootstrap experience through FreeCodeCamp, I didn’t think my own design was that great. I purchased a quick £10 Bootstrap Udemy course that helped me design it. The key to it is the portfolio section which showcased my code and where I was at technically. This is why I think setting up a GitHub sooner would have been better.

      4) Went to local meetups
      This is where luck played its part. My city hosted a technology week with a wide range of talks. I saw that a particular company held a ‘Coding for beginners’ course, open to anyone from the public. At this point I already knew what I was being taught, but I went along to see how professionals work and to network.

      I also went to other meetups including JavaScript monthly talks, a security group and a local FreeCodeCamp group. Through these I met people in the industry and asked for advice on getting in.

      When I came to apply, my interviewer was the same person who gave the coding for beginner’s course and someone who I had met at a security meetup. I made a note of mentioning we had met before. This was very fortuitous but it showed them how much I wanted to get into the industry. Coupling self-teaching and attending these external events in my own time proved I was motivated enough for the role.

      These are the things that got me to the interview/job stage. The response from applications was very polarised though. This company took me all the way to employment, but others didn’t even give me a response to my CV. My only advice here is persistence, don’t get too disheartened and try again elsewhere. Keep gradually expanding your portfolio and soon enough you’ll have all the relevant skills to become employable.

      I hope this helps. Please let me know if there is anything else I can help with!

Comments are closed.