• 0 Posts
  • 36 Comments
Joined 1 year ago
cake
Cake day: November 13th, 2023

help-circle





  • Story takes place in a whole-ass galaxy. Everyone winds up back on Tatooine for some stupid reason; the planet with barely one ecosystem, practically zero vegetation, no economy that matters, yet populated with two (?) cities. Other planets also have exactly one ecosystem, culture, and one optional urban center1. There’s also only 12 or so planets that matter, yet half of everyone you meet are from all the other ones. You may not like what you see, but this is peak sci-fi writing performance, right here. /s

    This story could take place in a diverse corner of a single Earth-like planet and it wouldn’t be all that different.


    1 - Meanwhile planet Coruscant is an urban center where the ecosystem can best be described as “traffic” and the culture is “city folk that inexplicably eat at 1950’s-style diners”.




  • I’m inclined to agree. I think the best path through would be to focus on laws that benefit multiple minor players that have a seat at the table.

    Antitrust laws in general are a good example. These function at the direct expense of big monopolies, but are exactly what companies need if they want in on what was monopolized. And in the case of breaking a monopoly down, the resulting “baby” companies given more power, growth opportunity, hiring opportunities (job growth) and money making potential than the parent. This can also spur economic growth for all the fat cats out there by creating many new investment and hiring potentials. Overall, if you can get past the monopoly itself (read: take the ball away from your billionaire of choice), everyone else involved stands to benefit.

    There may be other strategies, but I can’t think of any right now. I think the key is to tip the scale in favor of more favorable outcomes, then repeat that a few more times, achieving incremental progress along the way. Doctorow outlines the ideal end state for all this, but it’s up to everyone else to figure out how to get there.

    While I don’t like the idea of embracing capital to improve things, the whole system is currently run this way. Standing with other monied interests that are aligned with the same goal might be the only way to go.


  • Just yesterday, Mrs. Warp Core was trying to enroll with an online service. The self-service email confirmation link refused to function correctly in Firefox on a desktop operating system (Windows in this case). It worked flawlessly on Firefox+iOS. Said link also shuttled the user straight off to the phone app.

    I’ll add that nearly ever other aspect of their public facing web, including the online chat support, worked flawlessly everywhere I tried it. This all just reeked of hostile design.

    When asked about why this is, I simply said:

    The browser provides good security and choice for the user. Apps provide good security and control for the vendor.







  • Honestly, this is why I tell developers that work with/for me to build in logging, day one. Not only will you always have clarity in every environment, but you won’t run into cases where adding logging later makes races/deadlocks “go away mysteriously.” A lot of the time, attaching a debugger to stuff in production isn’t going to fly, so “printf debugging” like this is truly your best bet.

    To do this right, look into logging modules/libraries that support filtering, lazy evaluation, contexts, and JSON output for perfect SEIM compatibility (enterprise stuff like Splunk or ELK).



  • Last time I did anything on the job with C++ was about 8 years ago. Here’s what I learned. It may still be relevant.

    • C++14 was alright, but still wasn’t everything you need. The language has improved a lot since, so take this with a grain of salt. We had to use Boost to really make the most of things and avoid stupid memory management problems through use of smart (ref-counted) pointers. The overhead was worth it.
    • C++ relies heavily on idioms for good code quality that can only be learned from a book and/or the community. “RAII” is a good example here. The language itself is simply too flexible and low-level to force that kind of behavior on you. To make matters worse, idiomatic practices wind up adding substantial weight to manual code review, since there’s no other way to enforce them or check for their absence.
    • I wound up writing a post-processor to make sense of template errors since it had a habit of completely exploding any template use to the fullest possible expression expansion; it was like typedefs didn’t exist. My tool replaced common patterns with expressions that more closely resembled our sourcecode1. This helped a lot with understanding what was actually going wrong. At the same time, it was ridiculous that was even necessary.
    • A team style guide is a hard must with C++. The language spec is so mindbogglingly huge that no two “C++ programmers” possess the same experience with the language. Yes, their skillsets will overlap, but the non-overlapping areas can be quite large and have profound ramifications on coding preferences. This is why my team got into serious disagreements with style and approach without one: there was no tie-breaker to end disagreement. We eventually adopted one after a lot of lost effort and hurt feelings.
    • Coding C++ is less like having a conversation with the target CPU and more like a conversation with the compiler. Templates, const, constexpr, inline, volatile, are all about steering the compiler to generate the code you want. As a consequence, you spend a lot more of your time troubleshooting code generation and compilation errors than with other languages.
    • At some point you will need valgrind or at least a really good IDE that’s dialed in for your process and target platform. Letting the rest of the team get away without these tools will negatively impact the team’s ability to fix serious problems.
    • C++ assumes that CPU performance and memory management are your biggest problems. You absolutely have to be aware of stack allocation, heap allocation, copies, copy-free, references, pointers, and v-tables, which are needed to navigate the nuances of code generation and how it impacts run-time and memory.
    • Multithreading in C++14 was made approachable through Boost and some primitives built on top of pthreads. Deadlocks and races were a programmer problem; the language has nothing to help you here. My recommendation: take a page from Go’s book. Use a really good threadsafe mutable queue, copy (no references/pointers) everything into it, and use it for moving mutable state between threads until performance benchmarks tell you to do otherwise.
    • Test-driven design and DevOps best-practice is needed to make any C++ project of scale manageable. I cannot stress this enough. Use every automated quality gate you can to catch errors before live/integration testing, as using valgrind and other in-situ tools can be painful (if not impossible).

    1 - I borrowed this idea from working on J2EE apps, of all places, where stack traces get so huge/deep that there are plugins designed to filter out method calls (sometimes, entire libraries) that are just noise. The idea of post-processing errors just kind of stuck after that - it’s just more data, after all.



  • Yeah, I know that the super-flat planar look was the intent, but there’s a reason why you don’t see much in the real world that resembles the cybertruck. It turns out that the non-planar features of typical car panels are there to add rigidity. Flat sheet metal wants to bend, twist, wave, and even flap in the wind. So there are probably internal supports or struts welded to the panel backsides, in order to keep them flat. Problem is, that process tries to distort the panels due to heat from manufacturing.

    And since they opted for stainless, this adds additional problems. In this case: you can’t hide imperfections with bondo and paint. The panels have to be perfect, every time. It requires tolerances that belong on a sports car, not a pickup.