10

I'm curious, what was the most ridiculously otherworldly, the least understandable, eye-opening code you have every seen?

BUT, I mean that in a good way. And what did you learn from it?

For me personally, I would probably say some of the c++ stdlib implementations. Just totally not English in some places. I mean seriously, sometimes asm is more readable than c++

Comments
  • 2
  • 0
    Just to follow :)
  • 1
    @AlgoRythm That was the Nucleus RTOS where I first came across OOP in plain C.
  • 1
    @Fast-Nop That's really cool, I didn't even know there was a distinction for real-time OSs
  • 1
    @AlgoRythm Well Nucleus is just one of them, and it happened to be the one my company back then decided to use.
  • 1
    @Fast-Nop Why did you use an RTOS?
  • 2
    @AlgoRythm That was for embedded systems. We had around 1 MB of EEPROM and 512k of RAM in the products. That wasn't and isn't enough for Linux.

    Even today, you can't run Linux on Cortex-M controllers without some MB of external RAM and stripping down Linux - which blows up the hardware cost too much, especially given the lousy performance you'd get.
  • 1
    @Fast-Nop So was there anything to do with timing being important or was it just the limited resources on the hardware?
  • 2
    @AlgoRythm We didn't have hard real time contraints, but we needed a full-blown IP stack, an embedded web server, and multi-tasking, all of that on small hardware.

    Since that wasn't the core competence of our company, the CTO decided we better bought that, and RTOS are what you get with these requirements.

    We even got professional job training on that RTOS to gain traction as quickly as possible with our actual products.
  • 1
    @Fast-Nop Thats really cool, the professional training must have been very interesting. I'm curious what all of that software is doing on such small hardware
  • 1
    @AlgoRythm Basically, it was some measurement devices that customers could query over IP. Yes, IoT - that was already around in the early 2000s, over GPRS.
  • 2
    @Fast-Nop Early IoT! That's really cool.

    But honestly, seeing as there are refrigerators that you can tweet from... do you feel a tiny shade of shame having participated in early IoT? lol
  • 2
    @AlgoRythm Well that was direly needed. Previously, our customers had used dial-in connections to these devices, data calls over GSM.

    The problem was that they had thousands of these devices and needed racks full of modems just for reading them out in a timely manner.

    With GPRS, they could ditch the racks in favour of a single ethernet card.
  • 1
    @Fast-Nop I'm sure your project was very noble, in sharp contrast to many IoT projects today.
  • 1
    Dang I am late for the party...

    For me it was the assembly implementation of a program (I don't remember the book, sorry) and the slow, painful process to understand it. And when things clicked, it was brilliant.

    (sorry for the short reply, circumstances and all are keeping things... interesting here)
Add Comment