Ask HN: Why is code from chip manufacturers of such a low standard?

https://news.ycombinator.com/item?id=23240293
by sorisos • 6 years ago
4 3 6 years ago

I have had the unfortunate to work with a lot of C code from chip manufacturers such as ST, Microchip(Atmel), Bosch, Semtech. More often then not the code quality is rather low[0], sometimes even embarrassing. Perhaps I am just unlucky and only seen the bad parts, but it seems like a good business plan to provide a decent driver/library before spending a single dollar on marketing? Or at a minimum, have a experienced programmer review what is released as "official" to avoid shaming the company name.

Can anyone explain this?

[0] To avoid offending anyone I do not want to link repos, but here are some examples of "low code quality":

- Libraries that looks like internal test code renamed and pushed to github.

- Using bit-fields for registers. Well, it will probably work even though it is implementation defined. It is however a strong indicator the programmer(s) are relative new to C which manifest itself in all kinds of other issues.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com