Show more

A big breakthrough for me today was realizing that most of what I know about is wrong.

I mean literally. There was a standards update in the early 2000s that fundamentally changed some rules of the language, in a desperate attempt to wallpaper over the disaster that error messages had become by forcing developers to be more explicit about specific statements (so that the compiler had enough info to distinguish typos creating accidentally-valid statements from mis-instantiations of templates, because the language is complex enough that parsers can’t tell the difference… This is related to the legendary issue with the language that WhenYou<nest<templates>> some compilers get really confused about whether you meant “close template argument” or “bitshift right” at the end of that statement).

… but I was programming on Windows back then, and Microsoft basically told the standards committee to pound sand; they had a billion human-hours of accrued business logic (their own and their customers) written in MSVC’s interpretation of C++, they’d do what they want. So I got CVS-receipt-length error messages but didn’t learn the tweaks to the language to try and make those shorter. Those tweaks are (in the new environment I find myself in) -Wall -Werror-flagged, so the old ways are dead.

Now I have to learn how the language spec literally changed while I was doing something else and that I just un-lucked into training in the wrong dojo.

Hey, gotta know there’s a problem to fix the problem, right? ;)

@gbhnews FWIW, Facebook did a rash of community standards violations today. I think they had an unannounced bug (accidentally wired their test TOS violation recognizer to prod maybe?) that got rolled back.

Was the story accepted after disputing the TOS violation?

@kkeller @lauren I expect it'll really put the 'c' in primetime programming.

@tjc @hynek @jimbob I think that's good advice for interfacing with the command line in general.

@tjc @hynek @jimbob The main reason I use scp over rsync is I can't magically wipe half the files in the source copy directory if I get the scp flags wrong.

@Radical_EgoCom@kolektiva.social I am deeply sad to know the answer to that question.

There are victims of violent crime charity organizations that will assist a victim with immediate medical expenses. They are backed largely by donations from the eventual legal settlements (which, depending on how thorny the situation and judgment-proof the assailant, can take up to half a decade from the attack).

@colinsmatt11 @nicemicro @urusan Modern cars have at least one main computer and often multiple computing systems networked together.

True story: I bought a Ford recently and about a year into owning it the engine went absolutely bonkers. Tried to rattle itself apart. I took it into the shop and they fixed it for free because it turns out that the problem was a software bug that they had put out a recall for---there was a software regulator that makes micro adjustments to the angle of the camshaft to maximize efficiency, and when certain bad luck criteria occurred it calculated the wrong angle and put the cam wildly out of phase, causing the engine to fight itself.

So yep, software glitch wrecked my engine.

I'm excited about the potential for in embedded automotive programming... But they really should've chosen a different language name for marketing reasons alone. ;)

@jerry My wife had a beagle that hid behind the toilet every time it stormed, and she had such great hearing she'd react to a storm next county over, poor thing.

@kate @schuelermine Languages with static analysis inference engines need a way to decide when to stop inferring and require the user be explicit about something, which serves as a kind of a "circuit breaker" in the whole system---it's a place where the inference engine can stop and bundle up a chunk of program and declare deterministically "this chunk has these properties all the time." Rust does what a lot of languages do and makes functions one of those places (I'm hand waving and ignoring generics a bit here).

You can contrast that with C++, which, due to the interplay of the preprocessor letting you redefine anything, a lack of actual module system meaning anything you include and anything your includes include can influence the code you're writing, the template engine trying to match against all possible specializations of a template, and the separation of compiler and linker steps, has the delightful property that when you look at a function call, you really know very little about how that function is defined. Maybe `int` means something different in this section of code. Maybe there are two different implementations of the function depending on which translation units were fed to the linker. Maybe there's a template specialization hiding out somewhere way up in the include files that are included by the include files you include that special case is one possible pattern match of the types of arguments in a template.

This nonsense not only makes the code hard to compile, it really makes it hard to reason about.

@lobrien I agree in principle, but the thing I've come around to these past years is that principle rarely aligns with practice on large codebases (especially large, alien codebases). "Just look at the object's methods to know how to use it" turns into a lie far quicker than we want.

There were some good research projects I saw in the past on this topic, though I'm not sure what came of them. One out of Carnegie Mellon years ago crawled Google Code and augmented the documentation of Java classes with examples of the classes being returned from factory functions (because they realized it was far, far more common for Java objects to be synthesized out of complex factories than simply constructed for most frameworks people were using). Neat solution, but it was deeply machine-learning and I think it imploded when Google shut down Code Search.

(It's worth noting that colocation in a single file is ideal, and you can approach that ideal without OOP. OOP and good module design are orthogonal principles).

So I don't do book recommendations because, cards on the table, I hardly read books these days. Too much time spent reading to read.

But Catherynne Valente is on track to release the sequel to Space Opera in November this year. Space Opera was the best book I read last year, and I can 1,000% recommend it if you haven't read it.

Can't wait for the next one.

amazon.com/Space-Oddity-Opera-

A little bit about .

So I’m pretty cool on OOP these days, and the main reason is that I’m pretty hot on writing code that’s easy to change in the future. The main advantage to OOP is that one couples the data to the methods that can manipulate the data. This is great, and makes intuitive sense.

The main disadvantage, I’ve decided, is that for just about all OOP languages I’m familiar with, this divides the world into two sorts of functions per object class:

  • The methods the class knows about

  • Everything else

… and I’ve come around to thinking that drawing that line is prognostication. Especially since basically all systems I deal with don’t let you “open up” an object definition and add new methods. So you end up with foo.something() methods, but also manipulate(foo) methods living in some other library, and don’t even get me started on whether methods that involve manipulating two objects should be foo.do(bar) or bar.do(foo) or both or neither. All of that is just noise. These days, I prefer to keep the set of “methods the class knows about” as close to zero as possible.

So what’s replaced OOP for me? Usually, I’m nowadays working with interfaces, composition, functions, and generics. I find those work great, and the situations where I really want OOP are vanishingly small. If I want to find the “methods” of a data type, I just search the codebase for functions that take that data as an argument (trivial with modern IDEs and modern languages)… and hey, bonus, it finds me the additional functionality that someone else wrote in their module because they couldn’t re-open an object to add behavior and they weren’t in control of the module that defined the object!

@atomicpoet Linux has won everywhere except the day-to-day traditional desktop computing experience.

But I like your framing of this concept because it calls into question why that's a brass ring that people even want to grab. Maybe Apple and Microsoft have that well in hand and Linux should be something for people who aren't looking for a sanitized experience.

(... Still, it would be nice if I could get XMonad running on a new install without having to go back in time and reread my own blog posts ;) )

@3psboyd ... there is no sequence of characters I can arrange to express my emotional reaction to this news, nor my gratitude to you for bringing it to me.

Please accept this emoji as inadequate compensation.

🪿

@3psboyd It feels like deep cosmological injustice that some of the comics I read are still going on while Onstad had to put his pen down.

(... not yours, yours is great. I'm thinking of some other names I'd prefer not to name because the Internet is like fairyland sometimes and to name them is to invoke them).

Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.