Skip to main content

Featured

How to defeat that pesky bug

Are developers becoming lazy and unskilled, or just being more efficient ?


Are developers becoming lazier and losing valuable skills or are they simply being more efficient? 

What am I talking about? I'm referring to the use of libraries. More and more jobs I've been at or devs I've spoken with have told me they use a multitude of libraries to aid them with their work, in particular front end libraries. However, I do feel I see this more so in full-stack developers or teams without dedicated front and back end teams; where the pressure of doing more & limited time can force your hand. 

For this article (due to the plethora of libraries out there across a multitude of languages) I'm going to be focussing predominantly on JS libraries as an example.


Are devs just getting lazy, or is the use of libraries justified?

In my opinion, as long as you're using them for the right reasons, they're perfectly acceptable. Ask yourself though, are you using them because you don't know how to do it any other way? Or are you using them for efficiency, speed and easily ready extra functionality? 

If the former, I would take a step back and learn how to do it without the library first. I suggest this for two reasons. 

Firstly you gain a valuable skill set, learning new ways of doing something (which may give you more customisation) or mean a better standard of code. 

Secondly,  if the library for some reason was to become deprecated, or your next job doesn't utilise libraries, you still have the knowledge needed to carry out the same work, giving you an advantage against competition at a job interview. 

If it's the latter, and you already know how to do something, yet are using a library for efficiency and rapid development then continue to do so, you have nothing to lose, but remember to brush up your skills regularly (there may be something new).



What made me think of this?

I was recently discussing with friends on Furlow, some job specs. Some of which requires you to know vanilla javascript and develop applications without the need of any libraries. It got me thinking after 8 years developing, could I even do that. Could I create custom animations, styling, grid layouts and such without any help from a library?  And you know what, I wasn't confident! 

I realised because in my day to day job, I'd utilised jQuery, jQueryUI, bootstrap and other libraries and frameworks for so long I'd forgotten how to do some basic and nice UI features in vanilla JS and CSS.

As a result, I gave myself a swift kick up the backside and decided to take the 50 Projects in 50days course in HTML, CSS and JS by Florin Pop (@florinpop) and Brad Traversy (@traversymedia) which opened my eyes to actually how quickly and easily you can develop nice functionality,  coding snippets and projects in just CSS with some vanilla JS. It also helped me realise just how much I did and didn't know. It made me realise how much I use code libraries and CSS frameworks, not based on reliance, but just because it had become an everyday occurrence, and I hadn't stepped back to reassess is there a better, more innovative way of doing something. 

So why do I use libraries? Is it laziness? Or is it something else?


Well, firstly its because our company encourages the use of jquery, bootstrap, kendo grid and other libraries over vanilla JS and CSS. Questions are usually asked during PR's if ga developer goes against the "norm". 

Secondly is speed. It's much quicker to call $('div').slideDown() than it is to write custom CSS and add event listeners and such, (for quick development tasks). Additionally, some libraries offer quick access to functions that could take several hours to develop manually. When you need a quick fix, or there isn't really a need to reinvent the wheel, libraries are your goto.



Pros of JS Libraries & Frameworks

Cons of JS Libraries & Frameworks

Reduced time to develop
Greatly reduces innovation - For people who love these challenges will soon run out of juice in their work. Work can become outdated and repetitive. Developers no longer need to “think” about a problem, a library will solve it for them, making them “lazy”

Maturity of the code - the code is normally developed by communities with years of experience, and refactored to be performant, and reliable.
Doesn’t handle those edge cases - Frameworks need to work for masses. As a result, it looks at the bigger picture and therefore can’t handle those edge cases related to your project.
Every application will always have something unique about it. Eventually, there will be at least one edge case that doesn't fit the mould of the library or framework, and you will either shoe-horn your app to fit that mould, or you make a mess trying to get the framework to fit your application.

Team Friendly - If the team utilises an already established framework, it’s possible that some team members have used it previously and familiar with the functions, making it easier to learn and develop with.

Performance - Although frameworks help in gaining overall performance, there will be areas where the core language would perform better. 

Less in-house maintenance - On average, roughly 70-80% of the cost spent during the product life goes in maintenance and support.  If most of the code is within a community library, the task of keeping it up to date lies with the developers, not the team.

Upgrades/Compatibility - One of my favourites, something every business or developer has come across at some point in their career.

Sometimes you are restricted by the version of a library, or framework your team is using because it “doesn’t play nice with other libraries”, or simply doesn’t support them.

On the other hand, you may be forced to upgrade in order for it to work with other projects.

The control is taken from your hands.



Summary:


I think the main point I'm trying to make within this article is, you're only being lazy or leading yourself down a dark road if you abuse library/framework usage. If you use them without thought, because the documentation is easy to use, or you've read some post on StackOverflow that told you to do it, you need to reassess your thought process.

Don't blindly use libraries unless you've thoroughly thought about:

a) The benefit you get from using the library over doing it yourself

b) Do you know how to do it without the library, if the answer is no, take some time out and learn whether that be via a paid course, or a free online tutorial or documentation.


If you're still not sure, speak to other developers, get involved with developer communities (I highly advise joining the Dev.to the community) or following developers on Twitter (other social media platforms are available).

I hope this article has given you some food for thought, and don't forget you can discuss this with me via Twitter @Gweaths




Comments

Popular Posts