Shirish Productions Blog

Top 10 Common Mistakes Developers Do While Coding

In this article, I have compiled and have chosen the most popular mistakes that developers do in their daily line of work for a discussion.

When it comes to programming, Software Developer Engineers are in nothing short of being smart, intelligent, problem solvers in their daily lives. However, even they are humans too at the end of the day. They too make mistakes. Yes, indeed some of which would not suit the personality traits I used to describe them a little back. Some are technical mistakes to which only people in the expertise may be aware of, however there are some really eye opening basic level human mistakes that would be comprehended by most people.

I have gone through various articles, materials online and even with a bit of coding experience background, I have come up with some popular mistakes we may come across while coding.

Hopefully by the end of this article, you will find some information useful and will learn and try to avoid theses mistakes I am about to share them, in no particular order.

  1. “It Works Fine In My Browser.”

Starting off with the most simple but often neglected trait of even some handful of veteran developers is by being ignorant, or if we can put it, selfish is the word. This particular dialogue quote would be a nightmare and should not be used to convey to your Product Managers or the Directors in charge of the site development.

This simply means that the end result of the product has not reached the clients expectations.

The main problem with this hurdle is when some developers get too comfortable with working on a particular browser, that’s fine however they should be always in constant thought about how their development will be rendered and reflected onto other various browsers.

Mistake: They will complete the entire development and testing with that one particular browser and will test pages with that bias mindset that it works perfectly smooth without any hurdles.

Impact: Having a bias browser centric workflow will not only result in a poor work etiquette execution but will be shown completely different when viewed on other browsers.

Solution: It would be near impossible and not wise to completely test the development betas on every single browser and version history available on the planet. However, having said that before, it’s completely fine to work with a suitable browser but will be effective if we do occasional combability checks with other browsers from time to time.

We are also fortunate that these days, some developers themselves have come up with various Softwares, tools & even browsers that will mimic how your site will look on other browsers. Tools like Visual Studio and browsers like http://browsershots.org/ & https://www.browserstack.com/ will show snippet screenshots and will be of a great hand!

2. Gluttony for Images

Now this this indeed a real problem amongst several websites developers make. Even we all feel and have a mindset that a site will be pretty and wholesome if we incorporate not one, not two, but several high resolution quality pictures/graphics onto our sites. Nope, that may not be true in all aspects. Mainly, this is also a habit that is being overseen by developers when it comes to filling up content for their sites.

Mistake: Over extensive use of high quality pictures and/or graphics scaled down to fit the site with “img element” for the height and width attributes. Moreover, the original artefact files which are being linked from CSS and JavaScript will be extensively large. Hence marking up the source HTML to be unnecessarily huge, complex and extensive.

Impact: The impact of this common mistake is pretty straight forward. This is in direct relation to time and it surely slows down the overall user experience as it takes time to load onto the respective browsers. Some users may be impatient and will try to refresh the page again causing the entire cycle to relapse one more time. In some worst case scenarios, long loading times would trigger an error.

Solution: Revaluate your design structure again and ask yourself these questions.

  • “Are these many pictures/graphics really necessary in my site?” If not try to remove all unwanted/unnecessary elements from your site. This would significantly in return show great progress in loading times.
  • You can check out tools like Shrink O’Matic or RIOT that would aid in compressing your pictures/graphics file sizes.
  • You can also choose to Preload Images onto your site. This may not necessarily show significant speed, however it will certainly load up the images much faster. For more information, see article.

 

3. Unresponsiveness Across Devices

This is slightly similar to the first point, being selfish and not showing concern about the various devices, browsers, our development will be reflected onto.

Mistake: The problem here is simply draws down to developers assuming that users are having the exact monitor display standard ratios as them.

Impact: Not being mindful of these circumstances will result in poor execution when it renders on other devices, such as mobile site experience or when the user has bigger monitor display outputs. This would collapse the basic design structure developed by the developers and the User Interface experience takes a huge blow.

It could simply not show crucial design aspects of the webpages, information, or simply the navigation to other pages will be flawed & the total site will be unresponsive.

Solution: Very simply to be really mindful of the broad applications, being responsive while developing and to refer and note to other modular sites and how they have built responsively across multiple devices.

4. Refreshes That Go Overboard

Okay, now that you’ve created a well-served multiple pages for your website, however you did not plan properly hence the execution did not come out spectacular in terms of the elements within the pages to load. This is also then tied up to the overall experience to any user who stumbles across your site & tries to navigate through.

Mistake: The mistake is very straightforward, many developers create sites that apparently required users to refresh their pages for each interaction input given by the user.

Impact: This then results in firstly a poor planning strategy in the first place and similar to mistakes mentioned earlier, this would affect the performance of the whole site & compromise on the User Experience quality. Leading to unwanted disastrous refreshes every now and then & if there a slim wall of error, the webpage will be broken upon multiple refreshes.

Solution: Simplest thing to note and keep in mind is to check if, constant direct communication with the server is required at all times. For example, we can overcome this by basing on client-side scripts to provide instant information when the link to server-side fails. Moreover you can also alternate using tools like AJAX or to develop your sites basing on single-page application (SPA).

5. Writing In Large Functions

Many developers become so engrossed in their work that that sometimes if not most of the times they just automatically type in strings of code functions one to another and so on. This is sometimes or mainly done unintentionally or perhaps if you have a habit of writing lines and lines of codes that crosses 500 lines, then you may be making a mistake that is hindering your coding efficiency!

Mistake: When your coding style is large and you can’t contain/organise your coding lines to a self-limit.

Impact: Your own choice has impacted yourself by having so many strings/functions attached to various lines of code, this would then in return be intensely difficult not only for you but to anyone who wants to check your work in case of an unexpected error. Moreover there will be several interactions and paths amongst the codes.

Solution: Again take a moment here to revaluate your choice of code functions and ask yourself these questions. Just as a guideline, note that…

  • Any function should not be any larger than 50 lines.
  • Should be easily understandable & explainable in short with/without AND or OR
  • Should not contain nothing more than 8 total “if, switch statements and or looping constructs”.

 

6. Repetitive Coding

This method is also vastly used by several developers when they have a structure/layout, they simply go primitive by just copying and pasting the lines of code to build. This has been since the early days and being noticed amongst the developing community to being referred to as “DRY” or “Don’t Repeat Yourself”. Despite this many developers still do these once in a while.

Mistake: The general idea of copying and pasting code that you have incorporated into several other sections may not be a good idea.

Impact: Quite a handful of things can go wrong with this mistake. Firstly, blindly copying and pasting line of codes is not a wise thing to do & next it certainly adds bulk & overall length to the entire code lines as mentioned earlier. Furthermore, this is an act of laziness which in direct relation to the quality of the code. To make a Software survive for long requires quality and this is not one of it. Having these kinds of duplicate methodologies will only make your Code Smell & will certainly increase the technical debt to it also adding critical security risks overall.

Solution: Get into the habit of learning and using loops and functions in coding. This would certainly make the coding layout more efficient in the long run & easier to manage. Moreover, a Web Framework can also aid in selective shortening of codes. Learn more about Web Framework here.

7. Dilemma Over Choice of Language

Perhaps the most common mistake or rather the Million Dollar question to Developers is “Which Programming Language Is The Best?” Bet many of you reading also are in dilemma.

JavaScript developed applications or frameworks like Node.JS, Express. Maybe Python, Scala, Ruby for development and then or C or C++ or C#? Which is the best framework method? Database developments can be developed using MongoDB, SQL, SQLite etc.

Mistake: The confusion and battle to figure out which coding language platform is the best in the market. This is an ongoing issue since the early days of Programming scene, now to make it matters worse, there are more and more newer fresher choice of languages being introduced.

Impact: Unsure about the choice in the language and the stigma to perhaps use the best language might not be the most effective method in case to case scenarios. May not fully encompass the client’s needs. Should not blindly follow a language just because it is enriching for another client etc.

Solution: The right question to ask here is “Which Programming Language Will Be The Best Choice For My Project?” This would certainly show matured thinking and the knowledge and exposure to know which is which & best optimised for the respective needs for the clients. A good developer is one who is a real problem solver and looks at these languages as tools and will have the right knowledge to solve the problem!

8. Overcomplicating Everything

As a developer, one has to understand that having the most intricate, complex functions is not really the whole point. Veteran developers will prefer to have a more easier approach.

Mistake: One of the other mishaps in this industry is that, when it comes to coding, some developers may think this is an IQ test, hence they tend to go unwanted levels of extra mile to work really hard to come up with tons & tons of complex items.

Impact: By showcasing complex codes and over complicating lines of code at will is simply not efficient. This would slow down the whole cost and effect & by having complex means more time. May not be ideal.

Solution: Codes should be easy to read, understand and most importantly very efficient at the end of the day. What is the point of having the most complex code in the world & it not being able to execute anything in the end? The main point of developers and coding is that the spirit of solving problems should not be lost along the way trying to create complex things.

However, easy coding does not necessarily mean taking shortcuts. One of the methods used by Developers to overcome this is Pseudocode. This will efficiently help by making codes simple straight to the point, getting to the heart of the problem & solving it.

Read more about it here.

9. Poor Planning

To develop and write lines of codes requires an extensive amount of understanding in both good planning and design. For example, when we go shopping some may choose to prepare a shopping list beforehand or when we want to build a house, we come up with a blueprint.  It then certainly makes our lives so much easier having the whole idea planned out to an extent.

Mistake: Many developers oversee this simple task by not planning beforehand. Hence they face trouble upon coding with poor planning execution.

Impact: By not having a proper plan in hand, this will lead to a disaster when it comes down to the actual line of work by the developer. Moreover, without planning questions are never arise, hence they go unanswered from the team. Therefore, communication is lost & resulting in the compromise of the whole project. 

Solution: Before starting the project, learn to identify what exactly needs to be accomplished. Know how to tackle the problem and be sure about it. If there are any questions pertaining to these, keep track of them and revert back to your team consistently till you are completely confident about your tasks. This is a very basic but very neglected in today’s world, once followed it will be very effective and beneficial to your overall workflow. Don’t be hesitant to ask questions!

10. Not Having Fun!

Yes programming may not be fun at all times. It is one of the duties which requires immense focus and at times it understandably challenging. However with an open mind you can choose it to be fun filled by making it less frustrating.

Mistake: Many developers stay put in their desks or workstations for hours without moving an inch. Many have a mindset of working hard means a commendable factor & thus they continue to work prolonged hours.

Impact: This would be really grinding to their daily lives and also impose some serious consequences to their health. Most common health ailments amongst developers are usually associated with eye, neck, head strain.

Solution: Get some inspiration every now and then. Learn about various new emerging technologies in the word. There is also a lot to love about coding, learn new skills, methods etc. Take breaks when you really need one, you should. Go out for a walk, hike, eat something, you should get inspired and motivated in the end. Your company does not want to lose you!

See how Shirish Productions is able to offer industry standard IT Development Solutions to boost your business! Check out more here:

More to explorer

How Branding Can Affect Sales?

Is branding really that important? Think again. Several people often neglect the words “branding” and even in today’s standard, many business do

Leave a Reply

Your email address will not be published. Required fields are marked *