Dead code, 10 bit color, Prusa, Integrity, CGI

  • Dead code removal. This is one of the never ending topics. Sure, there's dead code in the source. It's just code which is left there, in case it's needed later and it can be later cleaned up, but it's highly likely that nobody wants to pay for that cleanup, which means that the code will be left there indefinitely. I often make it very clear that some code is just left there, and it's not required. Either it's completely commented out, or methods are renamed to clearly indicate with prefix that it's unnecessary. Sure, it's good to have a cleanup for stuff like that, if anyone prefers code quality. But as said, most of customers prefer cheap code quickly, nobody cares even a bit about code cleanness, security or quality, if it just happens to work. Same principles apply to: Redundant code and Duplicate code. Also multiple parallel implementations of same function / method / thing, which work just very slightly differently (not intentional!) are one of my favorites. Especially with floating point values and "money" this can lead to all kind of interesting situations. Software rot. As well as using all kind of libraries can easily lead to dependency hell. That's why I'm often avoiding usage of external dependency libraries, unless necessary. - I've got so many projects which would need major refactoring. But from practical standpoint, why waste all the effort, when it's already working?
  • Found out that my new display / display controller setup does support 10 bit (per color channel) color only on display port connected displays. So the Display Port displays use 32 bit color (total, without alpha, RGB). And the HDMI connected displays are limited to 24 bit color (total bits, without alpha channel, RGB). Well, those displays are mostly for terminal, logs and chat windows. Luckily in that use it doesn't matter too much. 24 bits is already total overkill for that use, even 15 bits would do it well. One friend got also totally confused about this topic, is it bits per color channel or total bits for RGB only. Is the alpha channel included (RGBA) and so on. Checkout Color Depth @ Wikipedia.
  • Prusa 3D printers - Had a talk with a friend, how important it is, that Prusa is actually using their own printers to manufacture more printers. Because this leads to positive "Eat your own dog food" feedback loop. For developers, who aren't installing, configuring, installing or troubleshooting the software, it's just so easy so say. Blah, that would be just minor usability improvement. It's already working and improving it would require extra work. And then all the improvement ideas are just forgotten. But if you're doing those tasks daily for the product, then you'll quickly realize, that even if it's working, it sucks and making a few minor improvements would make the overall process a lot better and nicer.
  • Worked hard on one project, where there are some data integrity issues. As well as accumulation of data in the database. Proper cleanup code is missing. I'm implementing it as fast as possible, so we could avoid disk full situations, which can be quite annoying for everyone. Sure, for short term also adding disk space works. But if the growth is rampart and there's lots of unnecessary stale data, cleanup code is only thing which is going to help. - For hobby projects, it's of course totally different. You can take a deep dive and spend a week or two, finding out exactly what's wrong and why.
  • CGI library is interestingly brittle. I just managed to crash it, by having field on form, without specified value. Sigh. And no, it doesn't crash when I try to read the value. The whole library crashes when FieldStorage is called to parse the input data.