As developers, we always want to have the ability to build programs faster while delivering them at higher quality. This ability can be learned by any developer regardless of your coding experience, computation power, and tools on your workspace, or your keyboard typing speed.
This article is an extended article of the previous part, consider reading it first if you haven’t already.
- Plan your work
- Don’t reinvent the wheel
- Do what is required only
- Take on bigger challenges
- Live healthily
- Do it now
- Don’t overwork your-self
- Quality is not constant
- Always have a deadline
- Know your peak time
- Reflection is the key
- Measure objectively
- Explore outside of the work
- Faster Testing
01: Plan your work
“If you fail to plan, you are planning to fail” — Benjamin Franklin
As developers, we tend to think that rushing towards the keyboard and start writing some code at a higher speed, would make us finish our projects faster but, this idea is very wrong because one among the big reasons slowing us down is not at what speed we type our code, it is most of the times because of having no plan or poor plan towards our project.
Why planning your work is so important
- It increases focus. Without focus, it would take a very long time to finish even simple projects. The more focused you are on your project, the faster you will finish it.
- It gives clarity. You will get a better understanding of what you are expected to do and how urgent.
- It minimizes fuzzy thinking. Since mostly we are creating programs for one among the most difficult thing to predict in the world Forex market, we are always bombarded by different ideas on our minds once the idea we first intended to use fails. It is essentially a good thing to stick to what we planned early if we want to finish our project faster.
Before you start any journey, you need to have a clue to where you are going, so give your project enough time for preparation to make sure you are not missing anything else, when you are very clear about what you want, then it is the time to start typing some code on the keyboard.
02: Don’t reinvent the wheel
On big projects, trying to start from scratch can be difficult and frustrating, so one of the best ways to get things started would be to consider using past works of others on CodeBase, Market, or anywhere else.
Probably someone has already done the same project that you are trying to do before and using them as a starting point might help us to get started very quickly and be some steps ahead of where we could have been if we had started from scratch.
NOTE: Not all the previous works are good to use, you have to choose the right project
Things to consider when choosing the right project to use.
Choosing the right work to use can help you get things working fast, but choosing the wrong work can make things miserable, below are some of the things to consider.
- Make sure it has fewer or no bugs, You don’t want to start your project with initial bugs (Check it/debug it).
- It should have clear and well-explained documentation, Since you need to understand pretty much everything in that work you just chose, It needs to have good documentation that you can read, Just like we read MQL5 basics when we were newbies, It is the same thing that happens here.
- Code is up-to-date; MQL5 language gets updated time after time, some of the methods and implementations that were compiled and they were working in last year are probably not going to work the same this year, this is because of the language updates. So, always make sure that the code used on that project is recent. The best way to check for that is to compile the code in MetaEditor to check if it runs with no errors.
For example, You want to create an Indicator that draws lines based on the Moving Average calculation and some other Calculations, you might download a moving average indicator from CodeBase, then modify it or add some buffers to shape it the way you want it.
There is almost every code in the CodeBase for pretty much all the basic task you might want to perform so, choose the right one for you
03: Do what is required only
As developers, We often forget what we are supposed to do on our project, we tend to prioritize coding things that do not directly affect what we mainly want to achieve from our project.
For example; Fancy Chart animations, Chart Objects, and Buttons in Expert Advisors.
As you can see that all the mentioned items have no direct impact on any of our trading activities and most of times our EA(s) are better off without them.
Since objects are created under the ObjectCreate() built-in-method, It might take a lot of time to code them and not to mention arranging them so they all appear well on the chart so the process feeds a lot of our time.
I honestly don’t recommend Chart Objects and fancy animations on Expert Advisors(when you want to develop faster) unless you want to create a trade assistant.
Let’s say. Customer on the freelance wants you to code a Bollinger-Band Expert Advisor with some other features like Trailing Stop, do only that, Nothing More Nothing Less.
It is not wise to use all of your energy to code less important things, till you reach the deadline just to realize that you have been wasting your time because the program if full of garbage.
It is not wise either to start less important things first when your mind is excited and creative, then start important things last when you are tired, or just rushing to finish your project because you have reached the deadline or it’s too close.
“Learn to separate the majors and the minors. A lot of people don’t do well simply because they major in minor things” — Jim Rohn
Always start with the major and sometimes complex tasks that have direct Impact to what you want then, if you haven’t reached the deadline you can now start doing all that minor cool stuff.
04: Take on bigger challenges
As I said in my first Article, faster developers are the ones that are flexible and comfortable in what they are doing. So the key in this point is that we need to be comfortable as developers so that we can become faster.
so, how can someone become comfortable?
I believe that you probably have played a video game before. If you played the most difficult level and succeeded or beat the most difficult player on that particular game, Playing medium/moderate levels becomes easy and it becomes easy to beat the average player.
This principle is great and does not only apply to playing video games, but also it applies to coding.
Choose an area that you want to be good at then plan for the complicated program you’ve never done before. For example, to be good at EA(s), plan for the multi-features such as multiple strategies, multi-indicators, too many chart objects, multiple trade modifications, etc. Soon after you just finished planning for that hardcore project, Set tight deadlines, and try to finish before that.
If you succeed, many projects you might face in the future will be easy, your will be more comfortable and, as the result your speed developing them will eventually increase.
"Take on the most difficult challenge and the rest will become easy" — Steve Chandler
The aim here is not to hurt yourself but to make yourself vulnerable to difficult challenges that you might experience in your career, that might need you to solve them quickly.
05: Live healthy
If you want to be productive in this career, then health is one of the things that you have to make sure you are not getting it wrong.
The coding career requires a lot of mental work in learning code, remembering, being creative, staying focused, etc.
- Learning without remembering what you learn is doing nothing
- Coding without focus is a waste of time.
- Without creativity there is no Innovation, differentiation, no opportunities, and complex problems are hard to solve
I am not an expert on health, to those wishing to go deep on the Subject I would recommend reading this blog post
Below are my health tips to improve your productivity that leads to faster development
Know the value of stepping away from your code.
If we stick to coding 24/7 we may not notice that we are not being creative and focused all the time, because to the average human in this 21-century focus is a major problem.
Some studies dating from the 1990s suggest that due to natural variations in our cycle of alertness, we can concentrate for no longer than 90 minutes before needing a 15-minute break.
Health experts recommend having a 90-minutes coding session but,
I code within random sessions depending on how I see my productivity going on, Sometimes I may code for many hours without taking a break but some days it just happens that I can’t focus much and found myself needing random breaks to refresh my mind. I believe we have different attention spans so plan and set the right coding session that works for you.
Get enough sleep to make your brain function to its maximum.
You need at least 7 hours of sleep a day.
Eat Better and Exercise.
Going for a run the first thing in the morning is the best way to improve your mood the entire day, Try it if you haven’t already and see how your productivity increases the whole day.
Dead people write no code, Sick people write bad code, Take care of yourself
06: DO it NOW
Anytime you got hit by an idea on your next big project, Don’t put it off, Start doing it by starting to plan for it as I said on the first point. Unless you have something more important than it, you need to start doing it immediately.
Do it NOW sometimes LATER means NEVER
Starting it immediately will not only help you to reach the deadline fast, but also you will avoid unnecessary delays that are unimportant and may cause your mind to start playing down the idea during that delay time frame.
“ Time goes on, so whatever you’re going to do, do it now “ Robert de Niro
Delays have bad consequences when it comes to developing. It is very easy to forget what you planned to do the first time when you got hit by an idea(especially if you did not write it down) Also, it delays the product use and improvements .
07: Don’t overwork yourself
The coding career is full of different kinds of stuff and endless things that we need to learn, To be honest, you are not going to be exceptionally good at all of them, because they are too many.
The key to faster development even though you are not good at all areas of your project, is to not trying to do everything on your own. I touched this on the third Article: Point #05. on making your project open source so that people could share their views on that particular project.
But that process itself requires exposure (some people might not need that) and might take a little bit of time for people to start contributing especially if people that came across it were not much interested.
Assuming you want to finish it very fast, the best way could be to hire someone on the freelance.
The point here is that you hire someone to work as a partner(to help you out in areas that you are not an expert)
I personally, am not good in the field of indicators, I barely understand the buffers and other kinds of stuff concerning indicators since I am not a fan of them (due to personal issues) but, I am an Expert in Expert Advisors, scripts, and many other things. If it happens on my project that I feel that I need an Indicator, I will need to hire someone to do that for me and I will do the rest.
If the project is big, break it down into sections and hire more developers, The more Freelance developers involved in it, the faster you will get it done.
This method is quite expensive but it is worth it. I believe It is probably the fastest way of all, This is why tech or innovative companies never hire one programmer(sometimes not even less than 1000), because they understand this principle.
08: Quality is not constant
Instead of hurrying to finish the project, you need to consider what is needed at the end of the day a GOOD QUALITY PRODUCT.
Poor quality product is not the end of the work, as it will always require us to make some improvements as time goes on and hence, there will be no end of the work.
Before you proceed to the next step, Make sure that you are making better code and ideas implementation, good Architecture, design, bugs-free code, etc. So that once you are done, there will be no turning back.
The process of creating a high-quality product might seem slow but, it is not and what most developers don’t realize is that poor code and bad architecture will always haunt us wanting us to make it better.
GOOD QUALITY PRODUCT does not mean it is a holy grail, it briefly means
- Done as planned
- No bugs
- Well designed, Structured and clearly explained
- Easy to use and easy to pass to another
I strongly agree with "Robert C. Uncle Bob " when he said
" The only way to go fast is to go well. Every time you yield the temptation to trade quality for speed, you slow down. Every time ".
09: Always have a deadline
What if there was no ending to the football match, what would happen to the players?
They will be no enthusiasm and no effort, the game will not be fun, and there will be no game at all!
There has to be an ending to everything we are doing in life so that we can be serious about it.
Once you have Planned for your work, Set a deadline for when you want the project to be ready, The deadline will also be used to measure your coding speed once you reach the end of the project.
Also, setting a deadline is a sign being a matured developer and shows how serious you are about finishing that particular project.
There is a deadline for any job in Freelance (not strictly enforced though) and you have to do the same thing on your own projects, It does not have to be perfect but you will have time to improve.
If there is no deadline there is also no ending of your project.
10: Know your peak time
Everybody has their peak time; the moments where your productivity and learning is at a high level, It might be on certain days of the week or certain hours of the day, This is because of our brains being in different states. For example, my most productive hours are from 4:00 am when I wake up until about 7 or 8 am, Those are the hours I use to learn new things and perform difficult tasks.
To others, it might be in the morning, afternoon, midnight, etc. Find your productive hours and use them effectively to move your project forward.
Working in these most productive hours can be great for those who are busy doing other things such as going to the job, and they have little time to work on their programming projects.
11: Reflection is the key
You need to take the time to inspect your code, The aim of doing this is to make sure that you are learning from your mistakes so you don't get stocked the next time and waste your time on the same error you made before and successfully solved.
Eliminate blind spots in the scope of your application; Sometimes you have to trust your gut; When you have implemented something and you feel like you don't understand it, you have to investigate that it might be true or, You have implemented something and you feel that it is not the best way to implement it.
12: Measure objectively
Consider doing a detailed Self-examination as you work for a couple of days, Analyze your activities and ask yourself, Where does my time go?
Let's say you realize that most of your time is spent on reading code rather than writing code. Then you have to learn how to read code faster.
13: Explore outside of work
I would like to call this a Warm-up Sportsmen/Sportswomen do it in their careers, we can do it too.
While you are not working on your project, explore new Libraries, Indicators, Scripts, tools, and techniques to help you boost your productivity.
You can work on Open Source projects that are somehow similar to your project or, there are several similar aspects of it.
This will get you prepared for the actual project, if you do it well you will notice that your project is becoming easier than before and your speed will inevitably increase.
14: Faster testing
Testing is one of the crucial areas that you need to be good at since you will be testing so much after you write a few new blocks of code to make sure everything works as expected.
Apart from writing and reading code, Testing is the area where most of our time will be wasted unless you don't get it wrong.
Testing your programs might somehow depend on Hardware resources on your PC and several software setups.
For example, (Under specific settings) If your CPU has 5 Cores, don't expect to test as fast as someone with 7 cores or 9 cores. Not to mention other factors such as Memory, Strategy Tester setting, Agents configuration, and the Program you are testing.
This is a huge topic to cover all in this article, I would recommend you to learn from all the sources below
- Parallel Calculation in MetaTrader 5 (Article)
- Multicore/Thread tester (Forum)
- How does CPU/RAM impact backtesting/Optimization (Forum)
- MT5 Strategy Tester Agents | Multi-Threaded Backtesting (Video)
Below, are few simple tips on how to test faster.
UN-CHECK Visual mode with the display charts Indicators and Trades Checkbox.
DISCLAIMER: Uncheck this box will hide all operations that you are used to see on the chart when testing. Do this if you are already sure(you know) about how your program is working on the background.
CHOOSE Modelling Option to Open Prices Only
CHECK Profit In Pips for faster calculations Checkbox
DISCLAIMER: all the Trades profit/Loss will be in actual pips, not in money.
Long Story Short.
I’m wishing you all the best in your journey to become a good developer, that's all for this Article. If you have some tips you want to share with me or others, feel free to add them to the discussion section of this article.
Thanks for reading.