• 0 Posts
  • 26 Comments
Joined 5 个月前
cake
Cake day: 2025年6月4日

help-circle




  • I have seen and worked on many projects that use inheritance, polymorphism, interfaces, all the staples of OOP. It’s true that none of these use only OOP principles and applies them rigorously. Real world projects are almost? always a mix of many different paradigms, because the truth is no one paradigm matches all use cases - and every programmer is only familiar with a few anyway.

    This is one of the ways I believe Java went wrong: the program entry point is naturally a function, not an object. Wrapping main in an object makes little sense. Similarly, having absolutely everything inherit “Object” is forcing OOP where it doesn’t belong.

    But that doesn’t mean OOP isn’t used in the real world. It is.



  • I feel like a lot of what he attributes to malice or obfuscation is rather his unfamiliarity with the technical side of things.

    Mapping numbers to non-sequential glyphs is exactly what happens in PDF, and PostScript before it. So is text positioning by Cartesian coordinates rather than in reading order.

    Ligatures and multiple font variations have been around since fonts existed. Fonts that render incorrectly unless you use them in one specific way are legion (turns out font designers often have very little technical understanding, or just don’t care).

    The only thing that sounds like obfuscation to me is changing the font encoding on every call. And if that is indeed its purpose, it’s a very poor attempt.



  • The things you mentioned are very good, but what I’m missing is feedback and a good foundation.

    Feedback should come from other developers - ideally experienced, but a good dialogue between beginners can also teach both sides a lot. For me this came only after I started working, through code reviews. But you could also try contributing to open source, or putting your own code online. Although I fear you won’t get much feedback.

    A good foundation is about software and hardware designs. Without this you will inevitably come to a point where you made a fundamental mistake in design.

    For hardware design I recommend YouTube. Many channels talk about low level hardware. You don’t need to become an expert, just get a high level understanding.

    For software design, check out the gang of four’s Design Patterns. It is a seminal work. You don’t need to read it all but be aware of the patterns, and study a few like factories and facade in detail.






  • I’ve finished Avowed, and am going back to Baldur’s Gate 2, which I had put aside for it.

    I liked Avowed well enough, though it is far from perfect. I would have preferred a classic CRPG like its predecessors, but it was fun to see the Living Lands in 3D - and the graphics really shine at night. It is absolutely gorgeous after sunset. And I loved the ending, although it seemed a bit too positive.

    In BG2 I’m only in chapter 2. I just found Mazzy and am continuing to explore the dungeon she’s in.





  • Don’t blame this on gcc or the library/function author - it is 100% user (i.e. programmer) error. Uninitialised memory of any type is undefined behaviour in the C and C++ abstract machine. That means optimising compilers can assume it does not exist.

    For example, the compiler could see that your ‘b’ is never initialised. Therefore, using it would be undefined behaviour. So, the optimiser can assume it is never used, and it is as if that code simply does not exist: the behaviour you saw.

    I’m not saying that is what happened, nor that it will always happen, but it is a possibility.