Assembly language is hot again, but there are some specific pros and cons to using it in your IoT project.
By many accounts, Internet of Things (IoT) developers are still happy to kick the tires on potential projects. According to VisionMobile survey data, just under half of all IoT developers are in IoT to "simply explor[e] the technology without any specific use case in mind," or are fiddling around to pass the time. They're hobbyists and explorers, in short, and aren't looking to make money with their IoT pastime.
That's too bad, because to be successful in IoT, developers may have to become proficient in a very un-hobby-esque programming language--Assembly.
In other words, forget high-level programming languages and their abstractions, all you who enter into IoT development. It's time to get low, low level.
Back to the future with Assembly
According to Tiobe's programming language index, Assembly just cracked the top-10 for the first time...ever. These "ratings are based on the number of skilled engineers worldwide, courses and third party vendors," notes Tiobe. The ratings correlate strongly with IEEE's own language rankings, both of which show a resurgence in Assembly:
Sure, developers still glom onto C, Java, C++, Python, and other general purpose languages. But, as developers have frantically tried to connect lots of things, they're increasingly turning to Assembly to assist, as the Tiobe blog indicates:
Why would anyone write code at such a low level, being far less productive if compared to using any other programming language and being vulnerable to all kinds of programming mistakes? The only reasonable explanation for this is that the number of very small devices that are only able to run Assembly code is increasing. Even your toothbrush or coffee machine are running Assembly code nowadays. Another reason for adoption is performance. If performance is key, nobody can beat Assembly code.
The challenges with Assembly
According to David Curry, Assembly's allure may come down to its broad applicability: It is "capable of running on just about anything." However, he echoes Tiobe's own concern that "the downside is there's no hand holding at all, if your code doesn't work, too bad."
Worse, Assembly may actually hardwire your IoT project in ways that can't easily be maintained, as one commentator notes: "There are at least four problems with assembler: lack of maintainability, tediousness in coding, lack of portability and lack of being able to use new processor features over time."
He goes on to stress, "In some of the smallest systems for IoT you may be tempted to use assembler, but when the next chip comes along or the architecture you have becomes multicore, or develops a level of cache, or uses other techniques that make it hard for assembly language coders to get the same efficiency as a higher-level language, you may be sorry.
This commentator therefore begs developers to "fight the urge" and "help the compiler do what you need it to do." And yet, developers seem willing to take on this risk in order to program all these different devices.
Of course, some developers do love to muck around in Assembly language. Jens Bleuel, for example, promises that IoT "will get us much more fun like this--really cool stuff" like programming an old-school Commodore 64 to tweet.
SEE: Internet of Things (IoT): Cheat sheet (TechRepublic)
But then, it won't be nearly as cool to gather around the watercooler with your C or Julia IoT story, when you could be wowing everyone with your Assembly prowess.
- How to become a developer: A cheat sheet (TechRepublic)
- Developers are calling it quits on polyglot programming (TechRepublic)
- Best programming languages to learn on your own time (TechRepublic)
- Apple's Swift programming language: The smart person's guide (TechRepublic)
- 10 of the coolest cloud programming languages (TechRepublic)
- Internet of Things: Five truths you need to know to succeed (TechRepublic)