loading...

On tackling challenge alone, and enjoying the learning process

axelledrouge profile image AxelleDRouge ・6 min read

December is nearly there and I feel the need to reflect on everything I have done this year.
I have taken parts in many projects with the organizations I am part of, I have joined a project to win the next municipal election to bring more democracy and ecology in the city I live in, I have taken an interest in open sources projects thanks to the hacktoberfest and dev.to (of course), I have once again tried to work on mine,... And I have started my new job.

This job has been full of interesting experiences where I had to learn a lot as a dev, to meet the requirement necessary for the success of the projects.

Nearly always alone, or two at most, to develop JS app that could have critical importance (in terms of security, efficiency, performances, memory management,...) I had to learn a lot. That's the thing about GIS applications, the clients often are in critical domains of industry that could have an impact on everyone. In my case, it was mostly about public safety, and security. It was incredibly motivating especially compared to my old job where I would work on the communication website for the IT department of the subsidiary of a bank, even if it was a NodeJS app.

So, how to tackle a challenge...

You could ask "but if the applications were so important, why were you nearly alone to work on it ?", well I would have to answer that JS dev that want to work in smaller company specialized in GIS are few and far between (especially here in France where the dev are in strong demand everywhere with recruiters fighting for every developers, even the less experienced ones (and I certainly don't qualify myself as experienced).
So I found myself without much support, just here and there, and I had to survive, sink or swim.

It's all about the mindset...

And, you know? I think those are some of the best methods to learn (if you are motivated). I had heard and learned here and there about methods (such as Test Driven Development or Design Patterns applied to JS) but it was in passing (in one of the greatest experience as a candidate for a job I had, maybe I could write something about that someday) or in the short learning course (a few weeks) that I had two years ago. But as I tackled the multiples challenges I had, I learned. And I learned a lot.

With the right resources...

In order to do that, dev.to has been a precious resource. Thanks for that, btw.
Because, in the case where you are essentially alone in front of your keyboard, asking yourself "seriously ??? how can I succeed, I don't even know where to start ?" You need references and knowledge. So I imposed myself a few rules.
First : I spend at least one hour everyday on dev.to (mostly at lunchtime, and believe me, in France it's not a small detail) I learn about every tech I've got an interest on, and some I don't because, why not?
Second : Everytime I learn something new, if it could improve the app I work on, I try to apply it in my work, it may be the answer to my current issues. No, just keeping the current code because I'm lazy, because I don't have the time, or just because... is not a way to learn and improve, and improve my code. I don't have much time to follow tutoriels in example app. If the logic is sound, I'll understand it quickly and force myself to use it everywhere until it becomes second nature and I can teach it to someone else (the ultimate proof that I have understood the methods and learned it). Of course, mastering it is a challenge in itself, but well practice makes perfect.

A strong necessity to do well...

For example, I learned ReactJS when I had to rewrite a supposedly React app. I insist on supposedly. It was the most terrifyingly written app I've seen in my, admittedly short, experience. But it was a very good way to learn. It was full of security holes and really dangerous for the client (who had most fortunately not made the security checks yet). You could take the OWASP recommandations and throw it through the window. With the best practices of maintenability and clean code. And the tests, of course. Because who need that? They may have been some use of the React library, but the previous person who developed the app clearly didn't take the time to understand how it works. Judging by the amount of JQuery used for complex algorithms (full of bugs of course) that I absolutely nothing to do with UI, well I was not impressed. So I campained to rebuild at the architecture of the app, in order to really use ReactJS, patch all the security holes (or should I say chasm, and finally have a maintenable app. And obtained the right to do it.

To start from the beginning...

And so I started by creating a stable development environment to use ReactJS and others packages. I had to setup the JS app with webpack, scss, babel.
Then, I created the basis architecture of the app (learning ReactJS in the process) for the components.
Then I transfered the old code to the right component, starting the hard refactoring process along the way.
When I had a good base with the legacy code, I first worked on the most urgent parts, the security holes. I had to understand quickly the logic in the old code and then learn how to recreate it using React (the hardest part was not the one you would think of). And when gradually I had an easier app to work on, and I gradually enjoyed the work much more, the work became quicker and I could improve the code more to make it more readable, to shorten the functions to their smallest part, making them easier to debug and test. I understood more and more the value of every best practices I had only heard or read about before.

And gradually build upon strong foundations...

I then turned on the css stylesheet (only one stylesheet for an entire professional React app) and proceed to cut it in pieces, to use scss to apply DRY method to it, to progressively make easier to maintain too, to eliminate the multiple rewriting. Somewhere along the way, when I had to redo the responsivity, I discovered and fell in love with CSS Grid. And discovered the superpowers of SCSS to use mixins, themes, functions,...

Then after the n bug on the most important part of the applications, I resolve to rebuild from scratch the logic, even if I had to keep some less important parts. Because the current functions were so... well complicated to understand and correct. And the tinyest change could provoke bugs everywhere.
I decided that I was done with all that, replace the code completely. Having had enough of bugs, I used Test Driven Development combined with designs patterns and Data structures. If I even had doubts about the pertinence of using those techniques, they vanished quiet quickly. From the conceptions of the algorithms to the implementations, it was more efficient, more enjoyable and more powerful.
I started by writing the steps, then pseudo-code on good old paper. Then I toyed with patterns to find the most appropriated one. Then when I had every steps, I code the tests with the results I want, or didn't want, and then the functions.
And finally plugged everything in the components.

It's time to enjoy the results and... learn more

Now the application is (not bug-less) more secure, more efficient, load more quickly, has less bugs. I can add multiples functionalities to it with just a few hours of code, which certainly please my project manager.
And now I can certainly build upon everything I have learn. I have not tried React hooks yet. I have not use functional tests on React Components. I want to learn more about functional programming. And create impressive CSS animations.
And... And... And...

So, I am satisfied. And passionated.
I want to learn even more, and I never want this feeling of work done well to end.

I hope my experience would have helped someone else here.
For every junior developer out there, many someday you will find yourself face to face with what looks like an impossible high mountains, with noone behind you to support and watch your back. Don't worry, if you are motivated, if you are passionated and ready to learn, you will climb it. And looking bellow, at everything you've just done, the feeling of success will be that much stronger.

Thank you for reading :)

Discussion

pic
Editor guide
Collapse
sir_kif profile image
Adam Wakif

First i like your experience .. Programming changed my life .. Because of it I became a fan of learning and discovering new things .. Every day I put a new challenge to me to improve my level and my skills in programming.I hope one day to become like Bill Gates or Steve Jobs. In the end i wish you good luck in your career

Collapse
axelledrouge profile image
AxelleDRouge Author

Likewise :)
It's such a strong feeling of accomplishment when you create a new feature, with something you just learned. Even just correcting a bug is rewarding.
Good luck on your path to become the next Bill Gates or Steve Jobs ;)