Weblog
Embedded-System Programmers Must Learn the Fundamentals
The design and implementation of embedded systems options have been influenced by CPU power within past three decades. In the beginning of microprocessor revolution, developers had to by hook or by crook shoehorn simple applications onto low-frequency, 4- and 8-bit micro-controllers. Application-level software developers often deal with the latest and greatest hardware, while embedded-system engineers typically work with much lower performing hardware. No wonder that embedded-system developers are considered to be the best when it comes to doing the most work with set frames of processing power.
In general embedded-software-development practices turns out to fall behind commercial-software-development practices by almost a decade. While commercial-system programmers began to use high-level languages, embedded-system developers began using C.
Until recent years, modern computer systems doubled its memory capacity as well as performance every couple of years while the cost of such systems decreased. Such assumption that computers performance will soon double allows developers to avoid the code optimization. Consequently, lots of software engineers have even no idea of how to write optimal code, while the rest aborted their skills.
The new generation of software developers grew up training on high-performance computer systems, creating code in abstract languages such as Java, PERL, and Python. Industry professionals warn these programmers all the way on their educational and professional lives, to avoid machine dependency at all costs. Consequently, plenty of today’s graduates and practicing developers lack the basic knowledge of low-level-computer-system operation, that is critical if their purpose is to write optimized code for their applications.
The bulk of developers consider that its not worth devoting much time to micro-optimizing code before it gets obvious where the performance bottlenecks are. But, conversely, while designing software at a system level, one should primarily consider performance issues should. A good engineer will do this automatically, as he possesses the feel for where performance issues will cause problems. A seasoned programmer will not admit the situation and believe that a bit of code fine-tuning further on will fix any problems.
The matter is that fresh developers often write code neglecting the performance of their code. However, it is well-known that system design without due attention to performance scarcely will produce top-performing systems without major rewriting. Worse than premature optimization can be only designing a system without respect to system performance. The implication that 20 per cent of a program’s code accounts for 80 per cent of its execution time has been the downfall of many designs.
Years ago, software developers reckoned on ever-increasing CPU performance that will cover the poor engineering. But this does not work any more. Developers no longer have the luxury of writing mediocre code and having ever-increasing CPU performance. Software programmers must provide applications that meet performance specifications. To become more effective and yield better code, they may need some education, while that education takes their time they could possibly invest into some project. But it is very important to continue education, thus learning how to create good code – and that what should be the integer part of their professional career.
So, to create good code, developers need to learn the fundamentals. One of the fundamental disciplines is machine organization, the ability to understand how the machine works. This knowledge is a must for any embedded-system engineer. Most developers are proficient with Java but this does not imply that they are able to work with low-level hardware and know assembly language.
No one can call himself embedded-system engineer without understanding the hardware, but this practice is becoming more and more commonplace as new generations graduate. The issue is that hardware is taught as integer part of assembly-language-programming course, which is considered to be obsolete and students see little use in it and quickly forget it. As a result, the industry gets the embedded-system engineers who do not differentiate between floating- and fixed-point arithmetic or how to pass parameters to a function.
Though, CPU performance may not be able to increase as before, there is some good news. There exists an ample opportunity for embedded-application performance enhancement through using advanced programming techniques and methodologies. Software developers can implement the above methods without the need to drop down into assembly language or return to difficult techniques of optimization. First of all, its necessary to start thinking in low-level terms but writing high-level code. Having the sheer understanding of how generic machines execute machine-level code and the way how compilers translate high-level source statements into machine instructions, developers can sagely select which high-level-language statements yield the best possible machine-instruction sequence. Each developer must know these fundamentals, though engineering high schools often neglect it as hardware has always been the magic wand.
Currently, it is an acute problem that lots of premature developers have failed to master the machine organization. So, when hiring a seasoned professional for a position, try to make sure that new employees aware of machine organization, moreover the knowledge of assembly language is a plus for the position. When already working in the company, senior and more experienced engineers should share their experience with junior ones. The model mentor/apprentice does pay off: by reviewing the apprentice’s code and pointing out the ways to improve it, senior engineers give inexperienced programmers an invaluable help and incentives to become great programmers.
Also, consider the situation when programmers think that performance is a hardware issue. Programmers who hold such views are usually the seat of the trouble. Companies should eradicate the culture that considers performance to be someone else’s concern.
Software developers deficient of fundamental topics, like machine organization, need to repair this situation. They should learn assembly language as the means to master machine organization, but it is not always sound. In that case, one can omit learning the assembly and set directly to machine organization.
As of current situation, ever increasing performance is coming to an end, hardware designers have almost given their all; and its developers responsibility to yield high-performance code.