Developers deal with common problems in their work. Here’s are a few problems and how to overcome them.
Duplicate code throughout the program
If you write code which is duplicated in the program it can be hard to maintain and can introduce bugs. You may think you have made the change to the code, but then find out the same method was duplicated in a different file and wasn’t updated when you made the change. Causing different results, essentially a bug. This is why you should avoid duplication as much as you can. You should create one method and put it in a location which can be called by different sections of the program. When you need to change the method later on, you only need to change it in one place, rather than search for or miss the duplicates.
Introducing new bugs after making a change
When you make a change to a program, or you add a new feature, you run the risk of introducing new bugs into the program. You can help to prevent this by writing unit tests. You write unit tests in a separate project to test the methods and functions in your program are working correctly. A test is an that a method does what it is expected to do, or that a method is called when it is supposed to do. The more tests your write for your program, the higher percentage of code coverage you will have. You would aim for 100%, but not many large programs get to 100% code coverage.
No version control
You may have added new features or changed a part of the code and put that code live. Then when the site is live, a bug may be discovered or you may be asked to remove the feature and go back to the previous version. This can be a problem if you don’t use version control.
What is version control?
Version control is the process of recording changes in a program so you can go back to specific versions later on. When you work for a company, you will most likely already be using version control, probable SVN or GIT. When you are working on personal projects, you may not be using version control, so you will suffer the problems caused by this. I suggest you start using GIT for Open-source Software projects, or install Visual SVN Server on your machine if it is a private project.
Reading/writing code which is difficult to understand
When writing code, you understand it yourself, but do you know whether others will understand it too? Will you understand it yourself if you come back to it 6 months later? This is why companies have coding standards. These are a set of guidelines, rules or best practices to follow so that everyone else will be able to understand the code, no matter which developer wrote it. This covers conventions for things like naming, commenting, indenting, line length, single line or multi line methods etc.
Estimating how long a task will take to complete
When working as a professional developer, you will be asked how long a task will take to complete. This is needed for quoting a price, scheduling in the work and setting expectations. It can be difficult to estimate how long something will take, you need to look back at similar tasks and see how long they took. If you didn’t measure how long they took, you will need to break it down into smaller tasks and make an educated guess for each item. This is why it is good to measure how long tasks take to complete. You can use this to create more accurate estimates for future tasks.
5 Common Developer problems and how to overcome them
5 Common Developer problems and how to overcome them
The 5 Most Common Problems New Programmers Face–And How You Can Solve Them
The Problem with Programming
10 problems that every programmer has to face in his life
What are the main problems faced by programmers?
The most difficult problems you will ever face as a programmer
8 barriers to overcome when learning to code
6 common problems you may have with other programmers
What are the most common programming tasks?
The 10 Most Common Beginner Programming Mistakes
Also In The February 2017 Issue
Building and creating your tools with the Minecraft toolbox helps you survive the game.
Sensors give robots the senses humans have.
30+ ideas for all age holiday gifts, from books to apps to board games to VR and more.
There might be a reason that too-real robot and video game character creeps you out.
You computer mouse cursor finally gets a cat to chase it.
Create turtles with Python, the programming language.
This programming language uses colors instead of text and punctuation to add and perform other tasks.
Use micro:bit to water your plants!
Knowing how passwords are cracked can help you create better passwords.
Studying satellite photographs shows a lot about what happens in the world.
There are a number of strategies teachers (plus parents and students) can take to learn programming.
Pigpen ciphers uses alien-like symbols to hide secret messages.
This project uses conductive thread to create a glove to activates your phone.
The repl.it website and React are one way to create mobile apps.
Software programming does neat things with language, in this case, mixing capital letters.
This Scratch game has lots of ways you can customize the game play. No cats were harmed in the making of this article either.
Links from the bottom of all the October 2017 articles, collected in one place for you to print, share, or bookmark.
Interesting stories about computer science, software programming, and technology for October 2017.