Top 10 Programming tips

Code by hand. It sharpens proficiency and you’ll need it to get a job

Computer monitors become thinner, hard drives lighter, and programming languages more powerful, but coding-by-hand still remains one of the most effective methods to learn how to program. Be it on a whiteboard or notebook, coding-by-hand requires further caution, precision, and intent behind every line of code. Because unlike on a computer, you can’t run hand-written code midway through the sheet to check if the work is correct. Although more time consuming, this restriction will mold you into a more fundamentally sound developer, both in the classroom and the job market. For college exams and technical interviews – a critical component of the job interview process – you will have to code-by-hand, because not only is this good for learning, but it’s universally known to be the ultimate test for a programmer’s proficiency. So start early and get used to this old-school practice.

Ask for help. You’ll need it

As awesome as it would be to become the next Steve Jobs on your own, the reality is that people learn faster with mentors and peer feedback. What may seem like an immovable bug or topic could be quickly alleviated by a fresh pair of eyes or a new interpretation of the subject. Whether it’s online or in-person, ignore the trolls and don’t be afraid to ask for help, because every programmer has been in your shoes before. Besides, most developers love to code, and if there’s one thing that passionate individuals enjoy, it’s to share their knowledge with others. Word of Warning: At Coding Dojo we suggest using the 20 minute rule. Take at least 20 minutes to figure something out on your own before asking for help. There’s a good chance that the answer is already in front of you, and besides, struggling makes you a better programmer overall. Hint: Stackoverlfow and learn programming are gold mines for online programming assistance.

Understand the fundamentals

Many people tend to ignore programming fundamentals because it seems very easy or boring and move on to the next chapter. This leads them to get stuck on the advanced concepts of programming, and hence they have to return to the fundamentals again, and therefore they end up wasting a lot of time. So if you want to learn programming faster, you should never miss your programming 101 classes. Understand the basics and then onto the next part.

Also Read: Top 10 Programming Languages For Competitive Coding


If you are a maths freak, you would surely love this next tip. You may have used sets in your lower classes. Remember something? Yeah, exactly, Unions and stuff. So, there are people like me who don’t like to use automated softwares sometimes. The reason for that is Security. Let’s take a simple example of Microsoft Excel. Some people tend to use excel only to the group and create a database. They just need that and good security for that. They are not interested in formatting the text, colour and stuff. So, what I do at those times, is I create my own python Programming software stack and create my own database. For some of my security reasons, I prefer Python over MYSql. So, coming back to my point of sets, Sets are extremely useful when creating databases. Especially when you want to find matches, create groups and other similar tasks. Following is a simple example of that.

A = {1, 2, 3, 3} A set([1, 2, 3]) B = {3, 4, 5, 6, 7} B set([3, 4, 5, 6, 7]) A | B set([1, 2, 3, 4, 5, 6, 7]) A & B set([3]) A - B set([1, 2]) B - A set([4, 5, 6, 7]) A ^ B set([1, 2, 4, 5, 6, 7]) (A ^ B) == ((A - B) | (B - A)) True

Coding by Hand Is Highly Recommended

This might sound strange to some. Why use your hands to write code when the actual work is expected to be done on a computer? There are strong reasons for it. One reason that can be immediately understood is that if you were to get called for an interview for a programming job, the technical evaluation process would include coding by hand. While that is a valid reason, experts have found that if the coding is learned this way in the beginning, the next levels of learning are easier and faster. It’s because coding by hand is the most efficient method of learning how to program. Therefore, the sooner you adopt the basics at the beginning, the better.

Seek out more online resources. There’s a wealth of content

If a particular concept doesn’t make sense, be it on in a textbook, or during class lecture, maintain your confidence and look for alternate online resources to learn the same content. Everyone learns differently, and just because one source doesn’t make sense, doesn’t mean there’s something wrong with you. It means that you’re not clicking with the delivery of the material. The online resources to learn computer programming are endless, and there’s always tutorial, or blog explanation that will make the material-at-hand crystal clear. Hint: Don’t underestimate the power of search.

Learn by doing

As they say, practice makes a man perfect, and it is pervasive in all the activities, let alone learning a programming language. You have to practise your coding skills regularly. You can’t just read a topic from a book and leave it and never come back. You have to make your hands dirty. When you practice coding, you will face many problems, and to solve them, you have to revisit the topic. This simple practice will help you retain all information for a longer period. When you write your code and play with it, try new codes, experiment with it, and look at the results, you will find errors that you will optimise. This regular practice will make you a better programmer. You can work on personal projects, participate in hackathons, play coding games and many more things.

Make notes, leave comments

During PLC programming, it is easy to lose track of the code, especially when working on complex projects containing dozens of function blocks or hundreds of lines of code. For easier orientation in the code, we recommend to write down notes describing I/O designations, the functionality of a function block, a short guide for the code etc. With such notes, you can easily orient yourself in the code even after a longer time period and also make the project accessible to other users such as colleagues, maintenance crews or customers. When used frequently, a string of comments can then form up a comprehensible "manual" for the project, describing in detail its functionality.  In the case of function blocks, you can insert comments into the Mervis IDE interface. ST users then can write their comments directly into the code. An example of a comment in the Mervis IDE

Create and follow a naming convention

The random naming of valuables or function blocks, especially in complex projects, can make the work much harder not only for you but also for any other person working on the project. We thus strongly recommend creating a unified template for names of variables and/or function blocks and following that template during the entire work on the project. The Mervis IDE allows you to easily re-name variables, I/Os or controllers - this feature is especially valuable when searching through dozens of variables, where a unified naming convention can save you a lot of time and stress. The latest Mervis release also introduced the Search function, allowing you to search for a specific variable and all of its occurrences across the project.

Fiddle Around With the Codes

This basically means you need not be stuck in a straight jacket of coding exactly as per the inputs are given. You must try your hand at making changes in it just for the heck of it. That way, you may learn how the end results get altered when you make changes to the coding. This does not mean you go about changing the whole program; far from it. When you reach the stage of being capable of changing whole code programs in the learning process, you may be given an assignment to write the codes for a certain program. You will know the final output that is expected from your code. After doing it right, go back and tinker with it a bit here and there, and see how the output changes. This will give you enormous confidence in your skills and you will know how you can make these changes if the desired output is not achieved in any future assignment.