\n\n\n\n
I first remember André Braugher from his performance in Glory where he played perhaps—low key—the most important role in the movie. He played the person with the most to lose and the least to gain by joining the army and fighting to end slavery (something the movie later acknowledges is pretty much a fool's errand). He plays the person we—the viewer comfortably separated from the events portrayed by circumstances, time, and knowledge of what will happen—should be but almost certainly won't be. (No more details: watch the movie if you haven't seen it.)
\n\n\n\nMost people will know him either from his role in Brooklyn Nine-Nine, an above average a great sitcom of recent years, or Homicide: Life on the Street, the best police procedural ever made, based on a fantastic non-fiction book by David Simon. (I revised this paragraph after conferring with numerous colleagues and discovering that my daughters' opinion is widely held; I am outvoted!)
In Homicide he is again playing someone who stands for justice despite his own self-interest. He is the black man with obvious intellect and education who chooses to work as a Homicide detective when there are so many better options for him, it ruins his marriage, and it is killing him. He works within a corrupt and under-resourced system and with colleagues he pretty much despises trying to make the tiniest difference when and where he can, and usually to his own disadvantage.
\n\n\n\nAnd, despite its being a comedy, as Raymond Holt in Brooklyn Nine-Nine he somehow again plays someone pretty much in this situation except that, now an older man and a captain, he has somehow navigated an earlier phase of life in which all of… this… was much worse, and today is comfortable enough that the horribleness is purely and not always darkly comic.
\n\n\n\nHomicide is one of my favorite TV shows of all time. Brooklyn Nine-Nine is my daughter's favorite TV show of all time.
\n\n\n\nAndré Braugher is already missed.
\n","$updatedAt":"2024-06-05T09:10:30.273+00:00",path:"andr-braugher-rip",_created:"2024-07-09T20:28:30.241Z",id:"8106",_modified:"2024-07-09T20:28:30.241Z","$id":"8106",_path:"post/8106"},{date:"2023-12-02T14:24:54.000+00:00",summary:"What vector graphic editing software produces clean output with minimal control points, specifically for creating symmetrical shapes and performing boolean operations, as explored by the author who has experience with multiple applications including Affinity Designer 2, Sketch, Vectornator, Graphic, Inkscape and Adobe Illustrator?",keywords:["inkscape","svg","boolean operations","vector graphics","sketch","affinity designer","vectornator","graphic","babylonjs","xinjs"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:30.285+00:00","$databaseId":"665dfafe000014726b3d",title:"Pi 5 follow-up","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nI don't have a working version of Illustrator any more, but I strongly suspect Illustrator produces perfect output in this case. In the end, I hand edited the bezier curves in my logo, but it looks like I possibly could have saved time by using Inkscape to do the booleans (and then going back to Sketch to produce clean output).
\n","$updatedAt":"2024-06-05T09:10:30.285+00:00",path:"pi-5-follow-up",_created:"2024-07-09T20:28:30.928Z",id:"8088",_modified:"2024-07-09T20:28:30.928Z","$id":"8088",_path:"post/8088"},{date:"2023-12-01T23:40:30.000+00:00",summary:"What is my experience with setting up and using the Raspberry Pi 5 compared to the Meta Quest 3?",keywords:["raspberry pi 5","quest 3","nodejs","nwjs","chromium","babylon3d","electron","mathml","svg","raspberry pi"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:30.273+00:00","$databaseId":"665dfafe000014726b3d",title:"Pi 5","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nOne of the things I did early during the COVID shutdown was buy myself a Raspberry Pi 400 (the one built into a keyboard) along with the camera module and some lenses. I did not realize that the Pi 400 did not have the required hardware interface to work with the camera (if I recall, the 8GB Pi 4 was already sold out, because a lot of people decided to play with Raspberry Pi devices during the lockdown).
\n\n\n\nAnyway, I never got to play with the camera module and in any event I think I lost track of it during my move to Finland. Maybe it will show up.
\n\n\n\nThe Pi 4 was pretty much perpetually out of stock ever since, with scalpers reselling the device for steep markups on Amazon. But, the Pi 5 seems to be easy to get, at least for the moment. As I type this, my microSD image is being verified…
\n\n\n\nWhen I got my previous Raspberry Pi, I was working at Google which means I was spending a lot of time using Linux, so messing around with the Pi was fun and easy. I got b8rjs working on it and played around. I've since tested xinjs on my old Raspberry Pi, and even found a bug (if I recall correctly, I assumed browsers supported MathML and the Pi's browser does not).
\n\n\n\nFirst thing, I received the Raspberry Pi 5 kit in a ridiculously large, nearly empty box that was mostly full of padding paper. Next, it was hard to open the white cardboard boxes without tearing them, so I just gave up.
\n\n\n\nThe case doesn't include screws (which it seems designed for) or instructions, so I googled the instructions and they were a bit poor (e.g. they told me to make sure the fan was plugged into the socket marked \"FAN\" rather than providing a diagram (it's not in the obvious place and it comes with a piece of plastic blocking it, so it doesn't look like a socket. Luckily I had a set of tools for mucking around with computers that includes a good set of tweezers.
\n\n\n\nAnyway, it assembles very easily (I think I slightly misaligned the heat sink… oh well).
\n\n\n\nFirst nice surprise is that the keyboard is actually, like old wired Mac keyboards, a USB hub. And in fact it one ups Apple by providing three extra USB sockets (although it loses points for having a mini-or-micro-USB socket vs. a type-C socket for the cable coming from the computer. Is that even allowed in the EU these days?
\n\n\n\nThe first type I had to type an \"@\" symbol I had a \"wow this is super spongy\" reaction to keyboard. It may be a nice USB HUB but it's not a great keyboard.
\n\n\n\nI plugged it in and the Pi 5 immediately powered on (and the fan started spinning, so I'm relieved not to have to spend upwards of two minutes disassembling and reseating the connector). What's a nice contrast to my Pi 400 experience was that I assumed that once I plugged in the monitor, keyboard, and mouse I'd need to reboot because I seem to recall that my old Raspberry Pi didn't send a signal to the monitor if it didn't have a monitor plugged in during boot. But, no, as soon as the monitor was plugged in (still micro-HDMI sockets) everything Just Worked.
\n\n\n\nThe Mac-like menubar at the top of the screen has three icons in the top-left corner, an app menu, a browser button, and a terminal button. Perfect.
\n\n\n\nOh yeah and when I created the image for the machine on my Mac it offered to copy my WiFi credentials onto the image (and triggered a security dialog when I said yes) and it Just Worked. This was a conspicuous pain point for the Quest, and I let it slide because I assumed that Meta must have had some issue with Apple's security stuff that stopped them smoothing it over. But, apparently, Raspberry Pi can do it (and their imager tool looks far more polished than the Meta support apps for the Quest 3 do).
\n\n\n\nI quickly got into my Google and Apple iCloud accounts thanks to the new Passkey stuff which isn't an option for the Quest (and of course Meta hasn't put any effort into helping with this because it's the kind of thing anyone seriously using their product would quickly get frustrated by, and no-one internally seems to be using their product much).
\n\n\n\nSo I was up-and-running much faster than with my Quest 3. Also the thing seems way faster than the Quest 3… it certainly dealt with iCloud Drive and Google Photos very nicely. So now I have a nice desktop picture. Super important.
\n\n\n\nMy next step was to install NodeJS and another nice surprise is that it runs nodejs 20.x (I also note that the Chromium that is preinstalled was v116.x which is pretty recent. I imagine at some point I'll have to do a massive update (apt tells me there's a lot of stuff to update, and I can't be bothered right now). I'm looking forward to seeing if I can build out electron or nwjs apps.
\n\n\n\nI do find the partially transparent Chromium window to be a bit nasty looking.
\n\n\n\nA quick dip into the Chromium inspector shows that MathML and SVG are there. ui.xinjs.net and b8rjs.com both load and run their most challenging demos pretty decently (the babylon3d demo on the b8rjs.com site is a bit sluggish, but reflections and shadows are working). Also timezones.xinjs.net runs very nicely (and that's a pretty gnarly collection of SVGs).
\n\n\n\nb8rjs.com has stress tests which I ran and it seems to be about 25% as fast as my 2021 Macbook Pro M1 Max on the create and render 10k table rows (~1300ms vs. ~350ms), and 20% as fast at the create 100k rows with the virtual data-table test (~1800ms vs. ~360ms).
\n\n\n\nSo I'm about to hit the sack, but overall a much better initial experience that with the Quest 3, despite this being very much not a product for ordinary consumers. Not having to deal with Meta is a huge bonus, of course. Given how well all the Raspberry Pi stuff works, Meta's Quest team should really should hang their heads in shame.
\n","$updatedAt":"2024-06-05T09:10:30.273+00:00",path:"pi-5",_created:"2024-07-09T20:28:31.644Z",id:"8085",_modified:"2024-07-09T20:28:31.644Z","$id":"8085",_path:"post/8085"},{date:"2023-11-18T16:23:36.000+00:00",summary:"What are my initial impressions and thoughts on the Meta Quest 3, its user interface, usability, and related software issues?",keywords:["meta quest 3","vr headset","usability issues","software bugs","pairing keyboard","virtual desktop app","remote display","video capture","mic audio","apple"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:30.268+00:00","$databaseId":"665dfafe000014726b3d",title:"Meta Quest 3—Part Two","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nMost user input on the web (e.g. login pages) is done using forms even though HTML forms are not fit for use and need to be prevented from doing their default thing to work properly since \"Web 2.0\". (Basically, if you hit enter or push a button inside a form its default behavior is to reload the page and lose everything. This is weirdly not what anyone wants but made sense kind of before web pages started communicating with servers directly. This is sad, but one of the reasons the web has been so insanely successful is that it is very forgiving and doesn't break old stuff gladly.) xinjs-ui
provides a simple reusable form wrapper that does all the \"usual things\" people want forms to do and stops bad things from happening while trying to leave everything as much alone as possible. So it lets you use <input type="date">
elements to display and modify date values in a robust and standard way. Guess what flat out doesn't work at all on the Quest's built-in browser?
The built-in interactive demos on the site let me actually quickly test a bare <input type="date">
alongside the \"wrapped\" version that was failing to verify that it's not my code that's the problem. You simply can't enter dates via a date input. So, good luck scheduling calendar appointments or booking airfares on any site that uses standard widgets. (Contrast this with mobile Safari which not only supports such things but goes out of its way to provide native experiences around things like auto-complete.)
I should note that the Quest browser does a great job with <select>
elements. This isn't a failure of engineering, this is a failure of emphasis. Clearly no-one cares if you can get work done using this thing. There's no-one coming into the office in the morning and trying to work using their Quest headset for as long as possible until they reach a blocker and then raging out, writing a bug report, and telling the manager of the team responsible to fix their shit.
Interestingly, the Quest 3 offers beta support for desktop sharing out of the box. I actually paid for a third-party solution for this for my Quest 2, which I was planning to try out on the Quest 3 once I sort out the Quest 3 being attached to the wrong account. Anyway, this looks promising.
\n\n\n\n(Addendum: both the free beta of Remote Display and the commercial Virtual Desktop app are discussed in more detail in the follow-up article.)
\n\n\n\nCapturing Video is pretty easy (meta-right-trigger to start and stop video capture), except that by default it won't capture your mic, and I'd rather narrate my experience than capture silent video and then overdub it. After all, don't you want to know what my user name means in the language I made up?
\n\n\n\nYou can capture mic input by using the \"camera\" app to trigger video capture and manually switching the mic on for that capture, but by default it is always off (I hoped turning it on for one video might change the some underlying setting—it does not—or at least that next time I used that dialog it would default to the previous choice—and no it doesn't do that either. AFAICT there's no way to turn it on mid-way.
\n\n\n\nIronically, streaming your experience is also possible via the camera app and here the default is to include mic audio. Just in case you thought Meta suddenly cared about your privacy.
\n\n\n\nAnyway, I haven't figured out a way to conveniently capture video with mic audio nor have I got stuff syncing to my computer yet.
\n\n\n\nIf you put yourself in the shoes of a usability tester at Meta, consider just how little of a damn they must give about you to make doing all this stuff so messed up. Personally, were I on the team building this stuff, I'd be frustrated just in my own ability to capture quick examples of bugs or other issues and share them and fix it just for my own convenience.
\n\n\n\nThe depth of indifference to usability I read into all of this is mind-blowing. But, never ascribe to malice…
\n\n\n\nAt least one of the emoji used in my previous blog post (and likely this one too) does not render on the Quest 3. Apparently Meta isn't even keeping up with Emoji (and it's not like I'm using super modern obscure ones).
\n\n\n\nAs an Apple shareholder I suppose I should be thrilled that the company in the second-best position to make inroads into the VR / XR / AR space is so clueless, but I really wanted to love the Quest 3. As I said to my girlfriend, when Apple made the iPhone they had Eric Schmidt doing industrial espionage for Google on their board. He went back to Google and told the Android team to stop working on their new Sidekick and instead steal Apple's ideas. Despite this, Apple has maintained a durable technical and usability advantage in the smart phone space for fifteen years. How dominant might they be in the VR / XR / AR space when their competition is this clueless?
\n\n\n\nBack during the mass layoffs in Silicon Valley in 2022 Zuckerberg was supposedly furious that there were a ton of people working on Oculus project that weren't using or only grudgingly using the product. Dogfooding is crucial for any consumer product and your goal needs to be a product you use all the time in preference to alternatives and probably in preference to things that aren't even seen as alternatives.
\n\n\n\nI'm sure the Apple Watch team has people who use their Watch instead of their phone as much as they can. They probably have \"leave your phone at home\" days. I'm sure there iPad team has people who use iPads for things other folks use their Macs and iPhones for. I'm sure there are Vision Pro team members who don't have any monitors, who code on their Vision Pros when they can, who attend meetings with them, and when they run into problems they fix them.
\n\n\n\nAs soon as you internalize the idea that the product you're building is for \"other people\" that you are imagining, you are fucked.
\n\n\n\nThe fact that most Facebook employees avoid Facebook outside of work and won't let their kids use it says a lot about it.
\n\n\n\nAnd yes, I worked for Facebook and no I didn't like it and it didn't like me. And yes, I bought Oculus products post FB-buyout and held my nose despite all of this.
\n\n\n\nMore to come once I pair a keyboard and install Opera and/or Chrome.
\n","$updatedAt":"2024-06-05T09:10:30.268+00:00",path:"meta-quest-3-part-two",_created:"2024-07-09T20:28:32.367Z",id:"7986",_modified:"2024-07-09T20:28:32.367Z","$id":"7986",_path:"post/7986"},{date:"2023-10-25T22:41:47.000+00:00",summary:"What are my concerns and experiences with using Panic Nova for my work, leading me to switch back to VS Code for my day job?",keywords:["nova","reconsidered","panic nova","syntax highlighting","editor instability","crashes","phantom errors","custom syntax support","documentation","web preview"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:30.274+00:00","$databaseId":"665dfafe000014726b3d",title:"Nova… reconsidered","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nI was willing to turn a blind eye to other issues, e.g. the fact that the documentation for its custom syntax support is horrible and implementing simple embedded syntaxes is either impossible or nightmarishly difficult (or, perhaps, perfectly easy but just not documented).
\n\n\n\nThe thing I really like about Nova is having everything in one window on a gigantic screen and the fact Nova remembers my exact window layout. So I can have my file browser, editor, terminal, web preview and debugger, excellent git integration (honestly, it's almost like having Sublime Merge—a git client I like so much I tend to run it all the time just to do things like amend commits and spelunk history—built into the editor).
\n\n\n\nBut if your app needs to do authentication in a popup window, Nova's web preview doesn't handle it, so that's partially out the window, which makes it less attractive for my \"day job\".
\n\n\n\nI really want to love Nova, but the instability and flaky syntax hiliting are a bridge too far. At least for my day job… for now.
\n","$updatedAt":"2024-06-05T09:10:30.274+00:00",path:"nova-reconsidered",_created:"2024-07-09T20:28:32.907Z",id:"7949",_modified:"2024-07-09T20:28:32.907Z","$id":"7949",_path:"post/7949"},{date:"2023-10-14T10:17:26.000+00:00",summary:"What is my perspective on the book \"A Fire Upon the Deep\" by Vernor Vinge, particularly in regards to its ideas, characters, and world-building?",keywords:["a fire upon the deep","vernor vinge","sf novel","computer science","ideas and invention","galactic zones","slow zone","beyond","transcendent gods","internet influence"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:20:52.491+00:00","$databaseId":"665dfafe000014726b3d",title:"A Fire Upon the Deep, Revisited","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\n(This is an AI-generated image linked in a reddit thread talking about generating this image using AI, so I don't feel too guilty using it.)
\n\n\n\nI recently discovered I had collected a lot of credits in the audiobook service I subscribe to and for lack of a better option grabbed a bunch of SF novels I had read and loved twenty or more years ago to see what I thought of them now. (In some cases, they were books by authors I loved which I may not have read). The second of these books I've listened to is A Fire Upon the Deep, by Vernor Vinge.
\n\n\n\nVernor Vinge's day job was teaching Computer Science at San Diego State, and it definitely shows in A Fire Upon the Deep. If you haven't read it, and you like SF, it's wonderful stuff. It doesn't quite qualify as literature in my opinion—Vinge's ability to render character is often weak, a common failing of SF writers—but where it comes to ideas and invention this book is right up there. If you love Iain Banks's Culture universe, as I certainly do, this book seems to have pulled many assumptions from the same zeitgeist.
\n\n\n\nI won't dwell on the book's shortcomings. There's a romantic subplot in the book that is utterly unconvincing and the major non-abstract villain (there's an overarching villain in the story that isn't really a character) is cartoonishly and ridiculously evil and has zero character development. The ending, as endings often are, combines forced tension with forced resolution. It has an ending, which is about as much as can be said for it.
\n\n\n\nBut oh, the ideas...
\n\n\n\nThe core idea of the background is the idea of galactic zones, apparently correlated with mass density, that determine how well complex systems (like intelligence and computers) are able to operate. Being relatively close to the galactic core puts you in the \"slow\" zone where intelligence is lacking and complex computer circuits and faster-than-light communication simply don't work. The furthest reaches, of \"beyond\" are \"transcendent\" and there dwell the gods.
\n\n\n\nThis is not just a superficially examined idea. First of all it's not a fixed thing, and the boundaries experience \"weather\". Next, there is travel and communication between zones. And the zones have their benefits and hazards. Humanity emerged from the slow zone some distant time past, and this may not have been its first emergence.
\n\n\n\nWritten in 1992, like the early Culture novels, Deep is strongly influenced by the pre-Web Internet. Assume a galactic Net that is basically like the internet, but with wildly varying restrictions in speed and bandwidth of communication, Vinge-as-computer-scientist is right-at home exploring the wheels, cars, parking meters, traffic jams, and hub cab thieves of such a network. Some of his insights about trolling and misinformation are prescient. Others, like his assumption that a clearly visible truth will be self-evident and obliterate most malicious speculation now seem hopelessly naive.
\n\n\n\nI particularly like the network postings being affixed with a machine-translation route-path. As in, the series of translations needed to get from the original text to what you're reading. Except of course the language you're reading isn't that language at all.
\n\n\n\nAnd there's a race of plant-cyborgs that don't really operate in human time-frames and have terrible problems with short-term memory (which is one reason they are cyborgs, the other being locomotion). And, yes, they're fun.
\n\n\n\nMuch of the action takes place on a planet in the Deep—the slow zone—where the dominant alien species on a planet is a dog-like species which operates in small packs that have a group—hive mind—consciousness built upon rapid \"networked\" audio communication. And again, this idea is deeply considered with all the parking meters and hubcaps.
\n\n\n\nThe politics of the book are quite pathetically and parochially American. The book's female characters are weaker even than the male. The most interesting possibilities of the alien politics among the hive-mind dogs are basically ignored. It's by no means a perfect book. But the ideas are worth the visit, even if in the end it is not a tour de force like the Ancillary trilogy.
\n","$updatedAt":"2024-06-05T09:20:52.491+00:00",path:"a-fire-upon-the-deep-revisited",_created:"2024-07-09T20:28:33.542Z",id:"7943",_modified:"2024-07-09T20:28:33.542Z","$id":"7943",_path:"post/7943"},{date:"2023-09-25T13:31:26.000+00:00",summary:"What is my perspective on the effectiveness of assault weapons bans in reducing gun violence in the United States?",keywords:["assault weapons bans","gun control","second amendment","handgun regulation","semi-automatic rifles","gun violence","australia","united states","dunblane massacre","supreme court"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:30.268+00:00","$databaseId":"665dfafe000014726b3d",title:"Sensible Gun Laws","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nIt's been a while since I've posted anything overtly political, but I just listened to the third and fourth episodes of the latest series of Malcolm Gladwell's podcast, Revisionist History. Even though this is probably my favorite podcast of all time, I wasn't hugely taken with the first two episodes. The thesis that America's obsession with gun culture is [largely] a result of too many Westerns being on TV in the 50s and 60s has some credibility, but we can't fix it now except by waiting for the deluded to die.
\n\n\n\nBut the third and fourth episodes deliver two huge punches:
\n\n\n\nShooting Lesson discusses the disingenuity of the arguments of gun control advocates, namely that \"assault weapons\" aren't the problem, semi-automatic weapons, and handguns in particular, are the problem, and advocating for \"assault weapons\" bans is a political gimmick not an actual useful argument.
\n\n\n\nMoral Hazard discusses the improvements in trauma care for gunshot victims that, it turns out, is responsible for the decline in homicide rates in the US. Violent crime is up, shootings are up, but owing to improvements in medical care, 95% of gunshot victims are now saved. If we really want to understand what's happening with violent crime, we need to track shootings, not homicides, and there is no methodical capture of this data in the US.
\n\n\n\nAs someone who doesn't (or very rarely) shoots, but knows a fair bit about guns owing to (a) having been a heterosexual boy who grew up in the 70s, (b) being a huge fan of procedural crime fiction, (c) a wargamer, and (d) a role-playing game designer, I was fully aware that assault weapons are neither the problem nor a coherent category (a semiautomatic rifle that isn't an AR-15, lacks a pistol grip, and has a wooden stock is in no way less lethal than an AR-15, the AR-15 is popular because it's modular, so folks can customize and \"hotrod\" them).
\n\n\n\nWhat I wasn't aware of was that gun control advocates are disingenuous about pursuing \"assault weapons bans\" because that they can get people to vote for them. It's a \"something\" they can \"try to do\" to gain votes which will be voted down by their political opponents. Assault weapons bans are to gun control arguments what late term elective abortions are to \"pro-life\" arguments.
\n\n\n\nSimilarly, I knew that trauma care for gunshot victims has vastly improved. E.g. US casualties in Vietnam numbered approximately 60,000 dead and 150,000 wounded while the numbers for Iraq are 4,431 dead, 31,994 wounded, and Afghanistan are 1,921 dead, 20,713 wounded. The ratio of wounded to dead went from 2.5:1 in Vietnam to 10:1 in Iraq and Afghanistan. In other words, 75% of the people killed in combat in Vietnam survive with modern medivac and trauma care.
\n\n\n\nIn contrast to this, the US homicide rate peaked in 1980 at 10.2 per 100,000 people (per annum) whereas as of 2019 the homicide rate was half that, at 5 per 100,000. It seems pretty reasonable to suggest that this \"halving\" of the murder rate took place an increase in the attempted murder rate masked by huge improvements in trauma care. And if you look at the rate for rape, 36.8 in 1980 vs 42.6 in 2019, this tracks. On the other hand, the \"violent\" crime rate has somewhat decreased since 1980, but (a) this includes everything from fist fights to mass shootings, and (b) we also know that statistics-driven policing (\"comstat\" etc.) led to methodical underreporting of \"minor\" crimes since the 1990s. Rape is, of course, a complicated crime to compare to homicide. E.g. society has changed its definition of rape and the threshold for reporting has changed. The big problem is that the US just doesn't track violent crime or gun crime rigorously enough.
\n\n\n\nAnother key point raised in the Moral Hazard episode is that rifles are, on average, far less deadly than pistols simply because it's hard to get in close with a rifle and shoot someone lots of times. Instead, unless the first shot is an outright kill, the person hit falls to the ground and is harder to hit again. Again, the problem isn't \"assault rifles\" but semi-automatic firearms of all kinds, and handguns (the difference in rate of fire between a semi-automatic pistol and a revolver is basically irrelevant).
\n\n\n\nThe crime data I'm using is here if you want to check it.
\n\n\n\nAfter the Port Arthur massacre, the conservative (\"Liberal\" coalition) Australian government at the time took the controversial stance of simply banning semi-automatic rifles. I attended a large rally in Sydney at which the anti-gun crowd was addressed by politicians of all the major parties. Since then, as Jim Jefferies has pointed out in his excellent bit on Gun Control, there have been no more mass shootings in Australia. That said, Australia's homicide rate in 1990 (before Port Arthur) was 2.2 in large part because handguns were strictly regulated. Even so, it was 0.74 as of 2021. I found these stats here. From what I know, Australia is not actually a less violent country than the US (I don't have the stats handy, but last I checked Australia has slightly higher rates for violent crime than the US, they just don't end in shooting deaths).
\n\n\n\nGiven that Australians probably watched all the same westerns as Americans, are just as prone to violence as Americans, and have the same frontier macho dude delusions as Americans, my basic conclusion is that strict handgun regulation eliminates roughly 75% of gun homicides, and banning semi-automatic rifles eliminates another 50% of gun homicides. But banning \"assault weapons\" accomplishes none of this. There are plenty of semi-automatic rifles that aren't \"assault weapons\" and in any event most of the gun homicides are from handguns.
\n\n\n\nAs such, campaigning for an \"assault weapons ban\" is worse than useless. It probably fails, it won't persuade anyone of anything (and in fact hardens opposition from reasonable people who know anything about guns), and it won't stop anyone from being murdered. And if it succeeds it will take the steam out of genuine reforms by (a) not working and (b) allowing folks who voted for it to rest on their laurels. It's virtue signaling at its worst.
\n\n\n\nThe Sandy Hook perpetrator could have accomplished just as much mayhem with a non-assault-style semi-automatic rifle or handguns. In fact the Dunblane massacre in Scotland was conducted with semi-automatic pistols and revolvers.
\n\n\n\nSo it comes down to what the purpose of proposing assault weapons bans actually is. If it's just posturing for the purposes of pretending to have a plan to \"do something\" about gun violence that serves as a bullet point for political platforms then, I guess, mission accomplished. But as a measure to actually address gun violence it serves no purpose.
\n\n\n\nI've been wrong about plenty of things in the past. Back in 2004 or so I was basically against making gay rights or gun control major planks in the Democratic Party platform because I thought they were vote losers and the problems were intractable. I was comprehensively wrong about gay rights but at least the gay rights policies actually addressed real problems and proposed real solutions.
\n\n\n\nIt's possible that \"assault weapons bans\" are a brilliantly nuanced policy that signals to people who would happily dispense with the 2nd Amendment (\"of course you can change it, that's why it's called an amendment\", to quote Jim Jefferies) that they're on our side while not aggravating gun owners too much because they know (a) it will never pass and (b) even if it actually passes they'll just sell their \"assault weapons\" to the taxpayer and use the money to buy the new modular non-assault-style semi-automatic rifles that will promptly become wildly popular and easily available, or just buy handguns if they really want to murder people.
\n\n\n\nI think focusing on \"assault weapons\" is purely counter-productive, and the screen capture suggests Fox News does too. It doesn't persuade anyone and it antagonizes both the unreasonable pro-gun folks who might otherwise not bother voting and the reasonable pro-gun folks who correctly recognize it as disingenuous and pointless.
\n\n\n\nBut, what Assault Weapons Bans aren't is a way to reduce gun homicides or address gun violence. Preventing impulse purchases, age restrictions, background checks, and red flag laws will have some impact at the edges, but a lot of these measures will likely be declared unconstitutional by the conservative idiocracy dominating the Supreme Court.
\n\n\n\nTo actually reduce gun violence in the US, we need to ban semi-automatic weapons, strictly regulate handguns, and come to grips with the insane number of guns already in circulation. And that entails repealing or further amending the 2nd Amendment and probably changing the composition of the Supreme Court or drastically reducing its power by some constitutional sleight of hand (which is also how it got the power it has).
\n\n\n\nWe also probably need to fix a lot of psycho-social problems but that's clearly a second order issue (recall Australians also watched American TV, fancy themselves to be rugged frontier individualists, and so forth, yet have far fewer gun homicides.)
\n\n\n\nFile it under the US system of government is broken and probably can't be fixed.
\n","$updatedAt":"2024-06-05T09:10:30.268+00:00",path:"sensible-gun-laws",_created:"2024-07-09T20:28:34.189Z",id:"7920",_modified:"2024-07-09T20:28:34.189Z","$id":"7920",_path:"post/7920"},{"$permissions":[],date:"2023-09-22T18:11:27.000+00:00",summary:"What is my perspective on the game Starfield, its various aspects and features, and how it compares to other games?",keywords:["starfield","opportunity lost","game review","space opera","fallout","crafting system","loot system","inventory management","ground combat","modding community"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:29.711+00:00","$databaseId":"665dfafe000014726b3d",title:"Starfield: Opportunity Lost","$collectionId":"665dfb040030d12ada24",content:"Here's the spoiler-free summary: Starfield, as a launch-day product, is the best sandbox \"space opera\" game since Mass Effect Andromeda. With some improvements and, presumably, a lot of help from the modding community, it may improve somewhat (and Mass Effect Andromeda has not had the benefit of continued attention from Bioware, unfortunately).\n\n\nIt's basically Fallout without VATS with a 1970s retro-future feel instead of a 1950s retro-future feel, except this seems more like an accident than a decision. E.g. even in the 1970s I'm pretty sure people had telephones and walkie talkies. Computer networks hadn't become commonplace but the internet already existed. So it has a Syd Mead / NASA Publicity Department feel without this being integrated into the setting.\n\n\nOh and the crafting system is like Fallout, but worse (and makes no sense in context), the loot system is like Diablo, but worse, and there aren't Fallout-style perks, and the skill system is padded with skills that make no sense and tiers that simply make the game less fun (e.g. leadership is a top tier skill so being able to have a fourth crew member on your ship—anyone can have three—requires you to devote a crazy number of skill points to things you probably don't care about).\n\n\nI would rate it a C+ and suggest you only buy it at full price if you're super anxious to try it out. Otherwise, play something that's actually good and wait for it to go on sale.\n\n\nBetween us, my sister and I have played through all the major arcs and many of the side-quests and have 36/50 of the achievements (neither of us care a fig for achievements so that's quite a lot). We've \"finished\" the game and even played a bit of what can happen afterwards (it doesn't get better although it does have one nice surprise that I can't really say anything about without it being a huge spoiler). We've also both played Bethesda games going back to Arena.\n\n\n## Inventory\n\nInventory management is a constant annoyance in this game. In a future with no Amazon deliveries where you need to physically walk to a store to buy glue (cough \"adhesives\") there's no concept of even \"let me buy this stuff and stick it in my cargo hold\". I won't even go into all the fractal ways in which it sucks because there are so many. It even perversely affects space combat because if you have a ship with decent cargo capacity (a must if you want to stay sane) then defeating a smaller ship in combat and boarding it leads you to \"OMG do I want to deal with the inventory fallout of switching control to this ship?\"\n\n\n## Ground Combat\n\nIf you're going to take an existing game engine and turn it into Starfield would you pick Skyrim's / Fallout's engine or, say, an engine that can cope with vehicles, stealth, and cover? Like, say, Grand Theft Auto or Watchdogs?\n\n\nBear in mind, probably the best / least bad part of Starfield is anything to do with spacecraft and space combat. Unlike ground combat, space combat has been engineered from scratch and basically works and has a pretty good UI. And you can see more or less where things are. Unlike the crafting system, you can modify your starships without burning dozens of skill points, and you don't need to keep a gigantic inventory of crap to build recipes out of huge and arbitrary component lists to then build parts out of random crap you need to collect using equipment you may not have handy.\n\n\nSo, first of all, there's no cover mechanic. And everything is crazy heights so you'll often find yourself crouched behind a thing that is two inches too tall to shoot from behind while crouched, so you need to stand and immediately be visible to anyone anywhere who wants to shoot you, which they will do with zero delay for aiming.\n\n\nNext, the art direction is such that it's super hard to see enemies. This may be \"realistic\" but it sucks and the enemies can in fact see you through cover, dense foliage, fog, and smoke, so realism is not an excuse. They will find the most obscure line of sight to you and shoot instantly as soon as you, say, one-shot someone with a suppressed sniper rifle while concealed. Which is also one of my gripes about Fallout 3 and Fallout 4. And of course, in order to one-shot someone with a sniper rifle you need to have dedicated a ton of skill points not just to marksmanship but also crafting. Because this is a future where you cannot actually buy stuff you want conveniently / at all. And this is Bethesda where a common mob can typically survive four headshots.\n\n\n## Crafting & Outposts\n\nThey are horrible…\n\nSeems like I didn't finish this review. Oh well, I may come back to it now that Starfield has been improved somewhat and the expansion is out.\n\nTo be continued…?\n\n","$updatedAt":"2024-06-05T09:10:29.711+00:00",path:"starfield-opportunity-lost",_created:"2024-07-09T20:28:36.343Z",id:"7917",_modified:"2024-10-21T21:53:41.927Z","$id":"7917",_path:"post/7917"},{date:"2023-08-29T17:37:27.000+00:00",summary:"What is my perspective on using Nova as a potential alternative to Visual Studio Code for my coding needs?",keywords:["nova editor","text editing","visual studio code","syntax coloring","intellisense","keyboard shortcut","search tools","build files","documentation","extensions"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:29.708+00:00","$databaseId":"665dfafe000014726b3d",title:"nova vs code","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nSimilarly, I feared there was an issue with build files not being ignored in searches, but while, once again, the system for adding ignore paths is not well-explained in the preferences pane and does not provide helpful examples (nor it is possible to edit entries—you need to delete them and add new ones). It took me several attempts to figure out that I need to ignore dist and then getting jsDoc boilerplate when I just want to use markdown, so I'm now using and just want to tell the editor that anything inside this is markdown, and, ideally, anything inside a
<pre>js...</pre>
code block is javascript, and so forth.
Again, Nova seems to support this stuff, but the documentation is abysmal. It tells me that the thing is possible but neither gives an example nor explains exactly how it might work. I get the idea that I probably need to find documentation on creating an extension, but I can't find that. (Edit: I found the documentation!) I tried looking inside the Nova package to see if there are any syntax declaration files in it but no dice. I have literally no clue what the file should look like, nor what to do with it were I to create it.
\n\n\n\nNow, I haven't spent weeks spelunking the documentation (as I have for Visual Studio Code) nor devoted serious time to understanding its extension architecture (as I have for Visual Studio Code). This isn't fair. And I do see evidence that once I do penetrate the veil of documentation, Nova is actually going to turn out to have superb tooling for all this because of references I see to leveraging modern tools for defining parsers and syntaxes which look like things I briefly worked on after getting frustrated by tools like jison.
\n\n\n\nAll of my issues with Nova currently come down to documentation and examples. If I can figure out how to write a simple extension that will help me with writing documentation and a minimal amount of boilerplate, there's really no downside to Nova and the reduction in Window clutter is simply amazing.
\n\n\n\nSo, I'm continuing my experiment and will either discover that the extension situation is awful or too proprietary (I need to be able to support Visual Studio Code users even if I don't use Visual Studio Code myself) or it will allow me to reuse most of the stuff I've done for Visual Studio Code and I'll pay Panic their extremely reasonable subscription fee.
\n\n\n\nIf I hadn't spent six months working in the VS Code extension API when I was at Google and didn't care about supporting VS Code users and being able to reuse or lightly adapt snippet and syntax definitions from VS Code, my guess is I'd be sold on Nova at this point.
\n","$updatedAt":"2024-06-05T09:10:29.708+00:00",path:"nova-vs-code",_created:"2024-07-09T20:28:36.931Z",id:"7867",_modified:"2024-07-09T20:28:36.931Z","$id":"7867",_path:"post/7867"},{date:"2023-08-29T15:05:02.000+00:00",summary:"What is the purpose behind the redesign of thexinjs-ui
table component and how did it lead to a simpler implementation for users while improving its extensibility?",keywords:["xinjs-ui","0.4.0","graphical table filter","filter-builder","table component","virtual table","framework","implement table","sorting","search"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:20:54.360+00:00","$databaseId":"665dfafe000014726b3d",title:"xinjs-ui 0.4.0's graphical table filter","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\nThe main reason xinjs-ui
exists is that I wanted to have a really good table component I could just plug into projects. It would be easier to just use something off the shelf, but virtual table components aren't actually widely available, and those that are are not free, quite heavy, and tend to come with a lot of stack assumptions and dependencies.
Also, being able to implement a really good table is an acid-test for a framework.
\n\n\n\nAs soon as you build a good table, you're going to need to filter it (i.e. search) and sort it. So xinjs-ui
has a really slick <filter-builder>
and a simple but powerful makeSorter
function for creating complex callbacks for Array.sort
.
The original <filter-builder>
was driven by a syntax inspired from google search (in essence instead of tokens like site:foo.com it allowed haystack:needle, but provided alternatives to the ':' allowing comparisons such as '<' (less than), '>>' (after), '=' (equals, vs contains) and so on.
While this seemed very powerful and clever and efficient to myself and my colleagues, the users struggled with it, and so I provided extensive online-help, automatic hints, and added features such as support for quoted strings with spaces, and so on.
\n\n\n\nYesterday, I tore all this up and replaced it with a graphical user interface inspired by Apple's Finder (but simpler and more explicit than that). While it took me a couple of months to figure out exactly how to implement this, the code is now actually simpler and has fewer failure modes. Instead of parsing a simple grammar, the user interface enforces sensible inputs.
\n\n\n\nThe old contains
FilterMaker
looked like this:
{\n hint: 'field:value',\n explanation: 'field contains value, ignoring case',\n description: (field: string, value: string) =>\n `${field} contains "${value}"`,\n token: /^([^\\\\s]+?):(.+)$/,\n makeFilter: (field: string, value: string) => {\n value = value.toLocaleLowerCase()\n return (obj: any) =>\n String(obj[field]).toLocaleLowerCase().includes(value)\n },\n}
\n\n\n\nThe new version looks like this:
\n\n\n\ncontains: {\n caption: 'contains',\n negative: 'does not contain',\n makeTest: (value: string) => {\n value = value.toLocaleLowerCase()\n return (obj: any) => String(obj).toLocaleLowerCase().includes(value)\n },\n}
\n\n\n\nThe new <filter-builder>
is simpler to extend because writing a new FilterMaker
doesn't involve writing a function to describe the resulting test function, regular expressions to parse the token, and most filters can easily be configured to provide both positive (\"contains\") and negative (\"does not contain\") variations. The makeFilter
function is simpler because it doesn't look at objects, just values. The order in which FilterMakers
are evaluated no longer matters, which means I don't need to explain that in the documentation.
As usual, it seems like a really good design decision is a virtuous circle: easier to use, less complex to implement, and easier to extend. As of writing, filter-builder.ts
is 434 lines including 100 lines of inline documentation with live example. The old version was 384 lines without documentation.
Post Script
\n\n\n\nI just realized the simplification win was further understated because the amount of CSS required to make this all work actually got smaller, and the new component is self-contained with respect to CSS while the old one was not!
\n","$updatedAt":"2024-06-05T09:20:54.360+00:00",path:"xinjs-ui-0-4-0-s-graphical-table-filter",_created:"2024-07-09T20:28:37.463Z",id:"7859",_modified:"2024-07-09T20:28:37.463Z","$id":"7859",_path:"post/7859"},{date:"2023-05-06T11:41:55.000+00:00",summary:"What is my perspective on the quality of \"Strange New Worlds\" and its representation of Star Trek?",keywords:["star trek: strange new worlds","tv show review","episode analysis","plot holes","unrealistic scenarios","science fiction","space adventure","gorn","brown dwarf","black hole","spock","mind meld","science fiction","star trek","cbs"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:24:50.979+00:00","$databaseId":"665dfafe000014726b3d",title:"Strange New Logic","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nHow anyone can take a show whose main character has Anson Mount's coiffure in Strange New Words seriously at any level escapes me. I mean, if the show featured scenes of his being interrupted during his daily two hour ritual, or if his cabin included some mysterious high tech device that turns out to be a hair styling machine, or perhaps he uses the transporter to vaporize himself every morning and produce a properly styled copy—ok, maybe. But perhaps that's the point. Maybe they're just telling us \"hey this is a fun, silly show about good looking people styled to look like comic book characters on space ships having pirate adventures\".
\n\n\n\nThe thing is, good stories need to take themselves just a little bit seriously to be good stories. Even off-the-wall screwball comedies benefit from having a vaguely coherent through line. The Monty Python folks cared about story when they were making Holy Grail and Life of Brian. We all know when a story is just carelessly made up as the teller goes along. It's what four year olds do.
\n\n\n\n\n\n\n\n\nNo, really, we'll explain the malevolent black cloud and the bear and the gate to Siberia and the gravity and the lottery numbers and it will be science! No, fuck off, it's not purgatory. There's no magic! Who took my cocaine? Get me David Lynch on the phone—he'll tell us how to make it all make sense in the end… What's that? Owls? Creamed corn?
\n
My first reaction to Strange New Worlds was that this might actually be a solid attempt to at least just do a better \"The Original Series\" (except, you know, without updating the basic tenets to identify and wash away today's pressing issues, which would make it a true remake and worthy).
\n\n\n\nThis is because, deep down, I want Star Trek to be good and am a crazy optimist.
\n\n\n\nAs is usual with every Star Trek series since The Next Generation, Strange New Worlds is a beautifully put together show with a great cast, incredible production values. We can't train people to write or edit halfway decent scripts, but we can churn out great camera operators, actors, and production designers.
\n\n\n\nPerhaps the only obvious (non-story) blemish is a godawful theme tune that sounds like one of those low-budget \"make it sound as much like this famous theme as you can without getting sued or hiring a competent orchestra\" except they could hire a competent orchestra. Just pay the estate of the original composer and update the arrangement or do something new. Or pay James Horner's estate for the Wrath of Khan music. Good grief.
\n\n\n\nAlso, as usual with most Star Trek stuff, they had to put Spock in it. Now, given it's set on the pre-Kirk Enterprise (in, um, The Original Timeline? It's not consistent with The Original Timeline but neither is The Original Timeline. Trying to reason about Star Trek is like trying to make origami cranes out of pasta) they have plenty of lazy fan-service. It seems to me that most Star Trek at this point could be called Star Trek: Spock, or sometimes Star Trek: Spock will Show Up, and that the primary goal of every story will be to demonstrate that Uhura was crazy over-qualified. Strange New Worlds actually hints that the job of communications officer might involve, I dunno, facilitating communications and stuff. If she could stop boasting about how many languages she speaks like a blacker, sexier, slightly-less-effeminite C3PO that would be even better.
\n\n\n\nAs an aside: I'd add that anyone who speaks as many languages as Uhura purports to would (a) not have a ready answer for the question \"how many languages do you speak\" and (b) would tend to underestimate. But hey, that's like the one-hundredth stupidest thing. I don't even have time to go into the deluge of gobbledygook that continues to be how Star Trek establishes \"so and so is smart and knows stuff\".
\n\n\n\nPerhaps the most novel idea in Strange New Worlds—setting aside the premise that people seeing Anson Mount in person or on comms could keep a straight face—is the ship's doctor keeping his terminally-ill daughter in, I dunno, transporter suspension, while he searches for a cure for what ails her. (Clearly, he has completely convinced himself that transporters do not vaporize you and then assemble a copy despite all the evidence to the contrary.) If you just accept the premise of this storyline (which defies all logic) then it works at an emotional level—you know, like The Walking Dead—but, like Ross's monkey, conveniently disappears when they encounter a Godlike Omniscient Being™.
\n\n\n\nBut we're getting ahead of ourselves. Because there's episode 4, Memento Mori, to remind us that special effects are cheap compared to continuity, respect for the audience, and proof-reading.
\n\n\n\nEven the V'ger episode of The Original Series cannot compare with Memento Mori for gibberish dialog that is so bad it seems like the writers are actively mocking the fans. \"We're going to shove this bullshit down your throats and you're going to like it, because you are contemptible simpletons who thought Picard is a work of genius.\"
\n\n\n\nAside: this is from memory as I sure as hell don't want to watch it again and can't find the script online, but in the V'ger episode the Enterprise fires a photon torpedo at V'ger. It has no apparent effect. Kirk says something like \"nothing can withstand that kind of force\". V'ger fires back. Spock says it had the force of ninety photon torpedoes, and Scotty says that they can only survive another few hits like that. Anyway, Memento Mori makes V'ger look like The Martian.
\n\n\n\nMy lambasting of The Walking Dead at least required you to consider what we know about The Real World (e.g. how a tank works, how to look out for things that want to murder you, how many guns there are in the US, how much ammo police carry around) to understand how stupid the story was…
\n\n\n\nMemento Mori is much more elegantly self-contained. You don't need to remember anything for more than a few seconds or remember anything you learned in middle school to be reduced to incredulity. It literally has a character lament the fact that they cannot raise the shields followed immediately by another character lamenting the fact that the shields are losing strength.
\n\n\n\nIt literally has the captain—who has just evacuated a landing team out of caution—raise shields because a ship won't identify itself and then upon hearing that they've opened comms—immediately lower them. What if they're just going to say \"Eat this human scum?!\" It's just crazy stupid.
\n\n\n\nThe ship turns out to be full of survivors of a mysterious alien surprise attack and needs immediate evacuation, but it's so heavily shielded as to prevent the use of transporters (the people, you see, are put inside the area with the radioactive cargo for safety, I guess?). Weird because the Enterprise is made of stuff that lets it submerge in a Brown Dwarf and skirt a Black Hole's Event Horizon (you know, later in the same episode) and its transporters seem to work fine. Well, forget that. No-one who watches Star Trek cares about pesky details. So we'll use this standard tube we keep for just such occasions that we've never seen before. Great thinking captain!
\n\n\n\nNow despite the fact that we've established the captain is cautious (this is how you show he's not just Kirk all over again, after all)—kind of—and the security officer is completely paranoid, no-one mentions that this will stop the shields from being raised despite the fact that they're rescuing survivors of an unprovoked surprise attack and that the security officer is acutely aware of the issue (you know, she raises it a few minutes later in the same episode). Nor does anyone suggest an obvious alternative that has been used many times before and doesn't preclude the use of shields: the shuttle.
\n\n\n\nNope. Our captain is decisive and brilliant and his officers—who are by no means unwilling to express differences of opinion—recognize this.
\n\n\n\nInstead, they use the tube and then they're immediately attacked. Because he's both brilliant and decisive, the captain instantly gives the order to raise shields (shouldn't he just have a button for that?) but the security officer points out that this won't work because of the tube. Gosh darn it. How could we have known? Anyone, no matter how brilliant and cautious and decisive and well-informed could have made such a mistake, no matter how brilliant and well-trained and outspoken their team of outstanding subordinates were.
\n\n\n\nBecause this is Star Trek we have no way to know whether they could get everyone out of the tube in 15s and then drop it and raise shields. We don't have any discussion of options or alternatives before or after. We have no background to draw upon because Star Trek is nothing if not inconsistent. All we know is that in this instance, the Enterprise survives a huge amount of pounding in a period of time sufficient to complete the colony ship's evacuation but takes very few casualties (and, oddly, as it turns out, more among the crew than among the evacuees, exposed in the tube) while giving the very strong impression that doing this stood a very good chance of getting everyone killed. Because: tension.
\n\n\n\nWhat we do get is super urgent desperation to finish the evacuation, so they can raise shields and maneuver, combined with breathless blow-by-blow reports of how the shields are getting hammered. Again, we can't expect Star Trek to be consistent with previous episodes, or canon, or… waves hands helplessly in the direction of Common Sense. But this reminds us that we can't even expect two successive lines of dialog to jibe.
\n\n\n\nIt stands to reason that they could have told people to get out of the tube, dropped it, and raised their shields far more quickly. And again, no discussion. It kind of worked, all is forgiven. We definitely won't discuss or revisit any of these decisions.
\n\n\n\nNow it's time to do a submarine bit! So they flee into a Brown Dwarf where the captain is willing to gamble everyone's lives on his ship being able to take more pressure than (a) the designers of the ship say it can and (b) mystery alien ship they don't know anything about. Because life is the most valuable thing… don't bother me with your so-called logic! It's this kind of human emotional reasoning that proves Vulcans might be smart but they're always wrong.
\n\n\n\nWe can't expect a Star Trek fan to care about, say, simple Newtonian physics. So, deep in the Brown Dwarf where their sensors by good fortune are slightly better than the enemy's, they have the Enterprise drop a torpedo on a the enemy ship with the reasoning that because the torpedo is so dense it will just fall out of the tube. You know, the way things in free fall don't. Oh and this is because the torpedo's sensors won't work in the Brown Dwarf because reasons.
\n\n\n\nSo because of made up reason we will brilliantly do stupid thing that makes no sense and would never work and it works! Star Trek at its best. Once again, we have shown our hero, Mr Hairstyle, is a decisive and brilliant out-of-the-box thinker.
\n\n\n\nSadly, this reveals the Enterprise's position to the mother-ship. Now they know it's exactly somewhere near that giant explosion plus however far it's moved since then. Got 'em! See, I knew we weren't close to the 43 minute mark!
\n\n\n\nWell, the brown dwarf is being sucked into a black hole. OH. MY. GOD. MORE. PERIL! But it's hard to see what's going on. Spock will go check it out. If nothing else, it will be handy practice in case they someday encounter a Giant Space Amoeba! But wait, he'll take the Security Officer because he can do mind melds and we haven't done that yet and this episode needs a flashback to build back story. Turns out, Gorn bad. Security officer traumatized. Wow. Deep. PTSD is a another thing we can't cure. Got it, mission accomplished.
\n\n\n\nLook, they're in a brown dwarf being sucked into a black hole pursued by mysterious aliens of unknown capability (but, you know, Gorn—the lizard-folks that future Star Fleet has never encountered until Kirk's duel, but everyone in today's Star Fleet knows about), and it turns out Spock isn't going to be left to die because mind-meld, instead we're going to do the whole \"pretend our sub got sunk\" maneuver but make it all science-fictiony.
\n\n\n\nSo, let's slingshot around a black hole and pull enormous g-forces because—and this is just science—we're in free fall and things in a ship experience gravity in free fall while the ship doesn't. Then, at the exact right point, we fire a torpedo—no wait, we've established that we're all out of torpedoes, so something else—full of crap (a show runner perhaps?) out the back and they'll think it's us blowing up because of red-shift. Yeah, that's the ticket.
\n\n\n\nIt's not like Strange New Worlds is dumber than most other tentpole CBS series. The contempt for the audience I see in shows ranging from Criminal Minds, FBI, NCIS, Picard, et al makes the fact that a series like Evil, The Good Fight (both from the same production company and creators), or even Seal Team, could come out of the same orifice even more of a miracle. I guess Star Trek fans have no-one but themselves to blame. If you throng to abject garbage like Strange New Worlds, that's what they'll give you.
\n","$updatedAt":"2024-06-05T09:24:50.979+00:00",path:"strange-new-logic",_created:"2024-07-09T20:28:38.559Z",id:"7524",_modified:"2024-07-09T20:28:38.559Z","$id":"7524",_path:"post/7524"},{date:"2023-04-05T20:43:16.000+00:00",summary:"What is my perspective on popular JavaScript tools and libraries in 2023?",keywords:["bundlejs","parceljs","fantasticon","ts-standard","javascript tools"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:20.066+00:00","$databaseId":"665dfafe000014726b3d",title:"Misc. bits of nice tech I've been playing with","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\nIn the course of building out xinjs I've been discovering all kinds of interesting new libraries and tools, some of which have been inspiring, some disappointing, and others a bit of both.
\n\n\n\nparceljs
is to webpack
, et al, kind of what standardjs
is to eslint
, an opinionated convenience wrapper that does a bunch of stuff so you don't have to. Unlike standardjs, though, it is highly configurable still.
In essence, parceljs will both provide a dev server with watch and reload from your front-end app pretty and do production builds pretty much automagically. It figures out from your entry-point what it is that needs to be done and does it.
\n\n\n\nI find it works particularly well with [bun](https://bun.sh), and conspicuously better than bun's built in dev-server (bun dev
) which I find unstable, inflexible, and an incomplete solution (bun parcel
does what bun dev
does, but makes fewer assumptions about your stack, while bun parcel build
does a great job of building your site for deployment.
The only reason I haven't given it 5/5 is that some of the config options don't seem to work as advertised (distDir
for example) and it doesn't do things like build webfonts from icon libraries out-of-the-box (but see fantasticon
above!).
I should probably downgrade ts-standard
to 2/5 given that it enthusiastically inserts bugs in my code, but I'm still using it so…
Anyway, if ts-standard
didn't screw up foo.bar || fallback
by turning it into foo.bar != null || fallback
or some such nonsense, I'd happily upgrade it to 4/5.
I seem to have made it over the hump and now prefer coding with xinjs to b8js. The one annoyance is that WebComponents involve manually writing a lot more binding (data and event) code than is the case with b8rjs components because the only thing being bound by xinjs
is the value
property of the component.
One thing I discovered (as a result of learning about [bundlejs](https://bundlejs.com/), which is a great tool for analyzing the size of code bundles (and thus boasting about the small size of one's libraries) is parcel
, a tech-stack-agnostic tool for quickly building out web-tech projects. Unlike many of its constituent parts, which are super-fiddly and highly oriented towards the React stack, parcel just doesn't seem to care.
And, in using parcel with [bun](https://bun.sh/), is just bliss, and gets around the fact that bun dev
might be great for interactive debugging with hot reloading, but it doesn't cut it when it comes time to build for production.
Parcel also vastly reduces the pain associated with shipping small libraries. This let me break useXin
out of xinjs
proper and make it a standalone library ([react-xinjs](https://www.npmjs.com/package/react-xinjs)), meaning that React is no longer needed for vanilla xinjs
projects.
Because xinjs
works so nicely with ReactJS it's nice to be able to consider widget libraries entirely on their merits versus being put off by dependency on React. (I haven't looked into integrating xinjs with Vue
et al, but imagine it will be easy enough. Similarly, xinjs
should integrate well with Angular
module futzing around with \"execution zones\".
What's really frustrating about ReactJS is that it's hardly \"one ecosystem\". Each widget library has its own styling schema. TailwindCSS looks interesting, but it's designed with a specific, fairly crippled,. React library. Meanwhile MUI looks great but has its own CSS architecture.
\n\n\n\n[Shoelace](https://shoelace.style/) is something I've been waiting for—a decent library of [web-components] that mostly just work. Naturally they work just fine with xinjs
although the mechanism for working with them is a little flaky.
tldr; if you use a Mac as more than a glorified Chromebook, buy
As I was tediously navigating folders in an \"Open…\" dialog today, it struck me that I was doing something stupid and unnecessary. Whatever happened to Default Folder, the shareware app I used to install on every Mac as soon as I first logged onto it? Didn't I have a current license FFS?
\n\n\n\nNow, Default Folder X requires a lot of permissions. In today's buttoned-down world, it needs to ask for permission to do lots of things that seem suspect—it is, after all, keeping track of every file and folder you look at. As a result of this, I've not been installing it on computers managed by IT departments and, for the last several years that's been most of my work computers.
\n\n\n\nSo, when I started using my new Macbook Pro in 2021 I forgot to install it. And because I'd gotten so used to dealing with file dialogs without it, I just never got to it.
\n\n\n\nLet me just say this: if you use a Mac as more than a glorified Chromebook, get Default Folder X
. It's the next best thing to Apple fixing file dialogs (which they're never going to do—I literally had an argument with the Human Interface team at WWDC about it back in the 90s).\n\n\n\nWhat is Default Folder X?
\n\n\n\nWaaay back in the 90s there was a collection of UI hacks for the Mac called NOW Utilities which did some amazing things. I won't go into it, but some of those things are still sorely missed. The most useful of these was called Super Boomerang (itself a refinement of Boomerang). Boomerang had two main tricks:
\n\n\n\nSo, for example, if you wanted to load a picture from Photoshop into Quark XPress you could go to Photoshop, export the picture. Then you could jump into Quark XPress and import, find the folder you just saved the picture to and VOILA it was already selected (it was the last thing you saved in that folder) and done.
\n\n\n\nSimilarly, if you were going through a folder full of documents it would keep your place for you.
\n\n\n\nBoomerang is long gone but its functionality (and then some) lives on in Default Folder, which became Default Folder X when Apple transitioned to Mac OS X (now macOS).
\n\n\n\nAside from its major improvement over Super Boomerang (i.e. it still works and you can buy it) Default Folder two truly magnificent features and a bunch of useful but less important stuff.
\n\n\n\nThe user interface of Apple's file dialogs has been a sore point with Apple's Human Interface Group for decades. They've tried to provide people with partial replacements like minifinder, launchpad, spotlight app launching, the sidebar, and so forth. The fact is that while Finder itself (especially the spatial Finder pre Mac OS X) is an absolute triumph of usability, the open save dialogs are borderline incomprehensible to most people.
\n\n\n\nDuring a feedback session at WWDC I got up and told the Apple Human Interface Group that the answer was staring them in the face. Replace file dialogs with the Finder. When you clicked open, just switch to Finder and visually filter what the user could see with the file handling properties of the application you were in. When you clicked save, just switch to finder and put the file in a tray or default destination and let the user drag it where-ever they wanted it.
\n\n\n\nMost of the audience got it immediately, but the Apple Human Interface Group simply couldn't wrap their brains around this idea.
\n\n\n\nThey've had 25 years to convince themselves they thought of it and it clearly isn't going to happen. Who knows, perhaps my reader has contacts in Apple. If so, I have a really great idea for the Contacts app…
\n\n\n\n\n","$updatedAt":"2024-06-05T09:10:29.714+00:00",path:"default-folder-x",_created:"2024-07-09T20:28:41.141Z",id:"7461",_modified:"2024-07-09T20:28:41.141Z","$id":"7461",_path:"post/7461"},{date:"2023-02-22T16:46:43.000+00:00",summary:"What is the true nature of Bitcoin's anonymity and how does the blockchain actually trace transactions? How do law enforcement tools play a role in identifying servers holding wallets used for Bitcoin transactions, and what potential benefits could a transparent and secure method of recording and tracing transactions offer in the real world?",keywords:["bitcoin","anonymity","blockchain","transparency","tracking","cryptocurrency","nsa","warrantless wiretapping","chainalysis","ethereum"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:29.712+00:00","$databaseId":"665dfafe000014726b3d",title:"Review: Tracers in the Dark","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nNow, I'm a long-time Bitcoin skeptic, and indeed my hot take on bitcoin soon after learning about its existence and the way blockchain works was that it was actually some kind of honeypot invented by the NSA or some other three-letter agency to gather intelligence on global crime networks. (This is also my opinion of TOR.)
\n\n\n\nEven if bitcoin were as anonymous and secure as its proponents proclaimed, its very existence combined with the relative inconvenience of using it (relative to, say, credit and debit cards) would mean that people using it would be hanging a lamp on their activities. Why does this person want to buy or sell stuff anonymously? In WWII much of the most valuable signals intelligence came from not from decrypting messages, but simply by analyzing who was sending messages to whom and using what codes. The NSA's warrantless wiretapping was, first and foremost, tracking traffic endpoints and metadata, not the content of conversations.
\n\n\n\nBut bitcoin turns out to be the absolute opposite of untraceable (by design) and anonymous only in the most useless sense of the word. I.e. you can't tell who a bitcoin wallet belongs to unless they actually want to use that money in the real world. And, as digital as we think we are, all the really important stuff we love, desire, and enjoy, is in the real world, whether it's Lamborghinis, delicious meals, or fancy shoes. Even digital goods, like, say, movies, can't be consumed without physical devices. Even if you directly inject the images into your brain, you're going to need wiring, electricity, and somewhere to sit.
\n\n\n\nSo when you try to convert real-world goods or (more likely) fiat currency into bitcoins or vice versa, you're associating the transaction with a unique bitcoin address, and every bit of value that has ever interacted with that address can be traced to its source or destination through time, forever. That's literally the whole point of the blockchain.
\n\n\n\nNow, these links can be obfuscated by merging money and redistributing it, arguably creating some form of plausible deniability (but also leaving a trail somewhere else, because any such obfuscation also involves interaction with the outside world).
\n\n\n\nImagine that I take cash from lots of people along with notes as to where they want the money to go, I then scramble the cash and pay out the amounts based on the notes and then destroy the notes. But unless everyone is sending the same amount of cash, you can pretty much figure out who paid whom. And if one party is sending a whole bunch of cash and another receives a whole bunch, it's really obvious. You can break up big transactions into lots of small transactions and recombine them later, and you can do all of this stuff at scale but… in practice, unless any such obfuscation is used with absolute discipline and in sufficiently large volumes, it turns out to be pretty straightforward to figure out what's really going on using statistical methods and correlating undisciplined transfers with disciplined transfers.
\n\n\n\nIn practice, these techniques just don't work.
\n\n\n\nNot only can bitcoin transactions be traced, but there are tools for doing it quickly, easily, and at scale. There's even discussion in the book of a secret weapon law enforcement currently has that lets them identify the servers holding wallets used for bitcoin transactions (probably because vendors of these tools have inserted their own servers into bitcoin networks and can statistically analyze the sources of bitcoin of transaction notifications).
\n\n\n\nAnyway, I'm not going to spoil the story. It's just great. It reminds me a lot of Hackers: Heroes of the Computer Revolution by Steven Levy in tracking a bunch of disparate parallel efforts that converge and combine, but more than Hackers it reads like the script of a really great technothriller (not very action-packed, more like brilliant but sometimes disagreeable nerds who sometimes scream at each other, maybe along the lines of The Big Short).
\n\n\n\nI will add that, oddly, the book actually makes me a smidge less skeptical about bitcoin et al (personally, I'd prefer a different cryptocurrency like Ethereum that doesn't waste huge amounts of power to do proof of work) in that stripped of its trappings of anonymity there may well be genuine benefits for truly transparent and secure methods of recording and tracing transactions. In such a world anyone could verify that Starbucks sourced its coffee from ethical sources, Nike wasn't using sweatshops, or that Apple wasn't using rare earth metals from conflict zones…
\n","$updatedAt":"2024-06-05T09:10:29.712+00:00",path:"review-tracers-in-the-dark",_created:"2024-07-09T20:28:41.849Z",id:"7446",_modified:"2024-07-09T20:28:41.849Z","$id":"7446",_path:"post/7446"},{date:"2023-02-19T10:12:21.000+00:00",summary:"What are the usability issues and potential improvements in modern aviation, particularly concerning pilot training, software, and airport infrastructure?",keywords:["airplane","aviation industry","usability","user interface","safety","training","software","hardware","tenerife airport disaster","ntsb"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:29.725+00:00","$databaseId":"665dfafe000014726b3d",title:"Air Crash Investigation: When Usability Failures Kill People","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\n\n\n\n\nOne of the things Boeing said it would do in response to the Boeing Max 8 MCAS crashes (again, user interface failures, caused by the leaky abstraction problem which is, again, a whole other topic) was to add a declutter mode with arrows telling the pilot which way to point the stick. What. The. Fuck?
\n\n\n\nAgain, even in Adrian Park's article, he spends all this time pointing out how screwed up the alarms and declutter mode were but then doesn't seem to realize that this was the central problem.
\n\n\n\nI won't even go into the infamous Qantas Flight 32 incident where an A380's engine literally exploded in mid air and shrapnel destroyed a host of different systems. Nowhere in the recommendations did anyone suggest that burying the copilot in hundreds of checklists while providing no kind of sensible overview of the system state might not be a great idea. Make no mistake: putting checklists on the screen vs. in giant folders full of paper that pilots need to search through in a crisis is a Good Thing, but again this shouldn't replace the standard UI in a crisis.
\n\n\n\nI'm hoping that the checklists were prioritized in some way but that might be giving the Airbus software folks too much credit. Any time Airbus's \"glass cockpit\" and \"game-changing automation\" comes up in Air Crash Investigation it's a pretty safe bet that a plane is going to crash because, at least in part, highly trained pilots are confused by its software.
\n\n\n\nWhy 33,000 feet? The aviation industry uses a truly bewildering collection of units including knots, feet, meters, miles, kilometers, pounds (of fuel) and so forth. I've actually seen people argue that this is actually a \"good thing\" when it comes to altitude (feet) vs. distance along the ground (meters) but—and hear me out—no it fucking isn't. Having binged several seasons of Air Crash Investigations and listened to all those cockpit re-enactments never once have I thought \"wow, the fact that altitude is measured in feet sure simplifies things\".
\n\n\n\nI should also note that West uses virtual horizons with a fixed plane overlay representing the aircraft's orientation whereas the Russians at least used to use a fixed horizon with a virtual aircraft. Leaving aside that in this case the Russians are just wrong, consider what happens in an emergency when a Russian military pilot is in control of a 737 which has two engines that deliver different amounts of thrust at a given throttle setting… If you guessed that he crashes the plane into the ground and everyone dies, you win a shiny new Captain Obvious Merit Badge.
\n\n\n\nThe worst air disaster in history (if you discount 9/11, of course) led to more than 500 people dying and is a case study in poor usability. At an airport frequently covered in fog, signage on the tarmac was unclear and did not match the maps used by Air Traffic Control. When taxiing pilots correctly reported their position as a location the controller did not recognize because it wasn't on his map, no alert was sounded, and two 747s collided.
\n\n\n\nThe fact that the controller wasn't alarmed by the fact a taxiing 747 had given a position he did not recognize suggests that this happened often enough that he was habituated to not really knowing where planes were on the taxiways.
\n\n\n\nWhen you consider the cost of the measures recommended after air crashes (e.g. replacing the assemblies of every front-flag assembly on every DC-9 in service) the cost of painting visible markings on runways, making the signs indicating taxi-way and runway identities, and standardizing the airport maps used by ATC and pilots seems pretty minuscule, yet a runway collision in Detroit resulted from nearly identical issues (also an at airport frequently plagued by fog) over a decade later.
\n\n\n\nAgain, no-one seemed terribly surprised that ATC wasn't freaked the fuck out that pilots were lost on their tarmac and reporting their positions incorrectly.
\n\n\n\nAfter the runway collision in Detroit, the US started standardizing runway and taxiway nomenclature (I think—usability gets so little focus in these shows that all I heard was half a sentence). Again, planes are big hulking beasts full of jet fuel and spinning blades with shitty visibility that steer far worse than cows and are frequently operated by pilots who are tired and unfamiliar with the airport. Why would we want good, consistent signage and nomenclature?
\n\n\n\nModern aviation is incredibly safe. There's no denying that the NTSB's approach to finding the problems in the system that lead to mishaps and then incrementally improving the system to eliminate as many causes of failure is a beacon for how we should address many of the world's problems. But that doesn't mean they don't have blind spots.
\n\n\n\nIt is so much easier to fix software than it is to fix hardware. When everything was paper forms and procedures, with a sprinkling of mainframe software with spectacularly bad user interfaces that no-one knew how to fix, the common wisdom was: training is cheaper than fixing processes, and fixing processes is cheaper than fixing software.
\n\n\n\nApple's influence (in large part indirectly, through Microsoft Windows (which was a Mac clone), Word, Excel, and Powerpoint (all originating on the Mac, if you discount Word for DOS which was replaced by Word for Windows), and the Web (strongly influenced by HyperCard and built on the NeXT computer) showed that making software that didn't suck wasn't that expensive, actually reduced training costs, and allowed you to encapsulate and iterate on processes via intuitive user interfaces.
\n\n\n\n(And yes, Xerox PARC and Douglas Englebart and all the rest were channeled through Apple but—seriously—go try using a Xerox Star and compare it to the Mac or Lisa.)
\n\n\n\nThe Aviation Industry seems to be locked into the 1970s \"command line\" mentality, where people are invested in the sunk cost of learning terrible systems and think that hard-won knowledge is intrinsically valuable because it was hard-won. Cars have had automatic chokes and synchromesh for over fifty years but pilots still need to deploy flaps for takeoff or which autopilot modes can cause stalls during icy conditions. If your answer to most questions is \"it's a training problem\" you're asking the wrong questions.
\n","$updatedAt":"2024-06-05T09:10:29.725+00:00",path:"air-crash-investigation-when-usability-failures-kill-people",_created:"2024-07-09T20:28:42.370Z",id:"7438",_modified:"2024-07-09T20:28:42.370Z","$id":"7438",_path:"post/7438"},{date:"2023-01-26T07:26:07.000+00:00",summary:"What is the motivation behind creating \"xinjs\" as an alternative to existing UI component systems, and how does it improve upon the shortcomings of libraries like b8rjs, RxJs, or Redux without adding unnecessary dependencies or code complexity?",keywords:["xinjs","b8rjs","ui component systems","typescript","react","code quality tools","packaging systems","code obfuscation","application state","dependencies"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:10:29.709+00:00","$databaseId":"665dfafe000014726b3d",title:"xinjs vs. b8rjs","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\nYou have to \"kill your darlings\" is attributed to William Faulkner, among others. In the case of open source libraries it's more a case of abandoning your dalrings. They're still there, they still—you hope—work. They don't need to die, but they're not going to get much or any attention moving forward.
\n\n\n\nWhile I may rail against other—more successful—UI component systems (frameworks, libraries, architectures), I have to face the fact that they've won. There's a ton of options out there and while they all have strengths and weaknesses, they're not going away, and they all do the job.
\n\n\n\nSo I've taken the most important thing about b8r, the thing that makes it so easy to work with, and extracted it from the stuff b8rjs does that other things do just as well or better, and tried to remove everything from it that might make you not want to use it, or prevent you from being allowed to use it.
\n\n\n\n\n\n\n\nWell, the last one still has an asterisk where it comes to code obfuscation (variable renaming in particular), but that's the stupidest reason not to do things sensibly I've come across. If I ever have a truly compelling reason to deal with it, I have a plan for that too.
\n\n\n\nIt still retains b8rjs's virtues:
\n\n\n\nAnd, of course, it makes managing application state incredibly easy without infesting your codebase with new dependencies and code patterns. It has almost no \"disposal tax\".
\n\n\n\nSo, if you like b8rjs, you'll probably love xinjs.
\n\n\n\nIf you've been using RxJs or Redux but have run into the problems that inevitably occur as codebases age, merge, or evolve, you'll probably be blown away by xinjs.
\n\n\n\nIf you love vanillajs but get sick of writing boilerplate code to bind data and event-handlers to elements, programmatically build HTML, or build web-components, you'll probably love xinjs.
\n","$updatedAt":"2024-06-05T09:10:29.709+00:00",path:"xinjs-vs-b8rjs",_created:"2024-07-09T20:28:42.852Z",id:"7433",_modified:"2024-07-09T20:28:42.852Z","$id":"7433",_path:"post/7433"},{date:"2023-01-24T18:02:04.000+00:00",summary:"What factors have made it difficult for me, someone with significant experience in the tech sector, to find a job recently, and is the emergence of ChatGPT a major contributing factor?",keywords:["tech implosion","job market","tech sector","employment","seniority","career","technology industry","recruitment","chatgpt","economic downturn"],author:"Tonio Loewald","$createdAt":"2024-06-05T09:20:58.618+00:00","$databaseId":"665dfafe000014726b3d",title:"Tech Implosion","$collectionId":"665dfb040030d12ada24","$permissions":[],content:"\nFor the first time in my career, it's hard to get a job in the tech sector. At least, for someone of my age/seniority. It's been a pretty darn good 30+ years, so I have no real right to complain, but it's a very destabilizing feeling to just not be able to find a job when, even a year or two ago, we had to beat recruiters off with sticks.
\n\n\n\nAnd it's not ChatGPT. It's the tech sector, fat and happy for so long, pulling its belt tight and shedding employees in the fear that tough times are coming.
\n","$updatedAt":"2024-06-05T09:20:58.618+00:00",path:"tech-implosion",_created:"2024-07-09T20:28:43.353Z",id:"7430",_modified:"2024-07-09T20:28:43.353Z","$id":"7430",_path:"post/7430"}],latestPosts:["currentcolor","15-elements-of-composition","apple-event-september-2024","what-generating-images-wth-chatgpt-and-walle-tells-me-about-llms","retcon-first-impressions","react-developer-experience-revisited"],"post/path=currentcolor":{date:"2024-10-01T18:44:59.962Z",summary:"Today I learned that since 2010 modern browsers have supported currentcolor, a magic css value that returns the current css color value.",path:"currentcolor",keywords:[],author:"Tonio Loewald",_created:"2024-10-01T09:46:02.560Z",title:"currentcolor",_modified:"2024-10-01T17:41:14.480Z",content:"\n\n/* Keyword values */\ncolor: currentcolor;\n\n
/* <named-color> values */\ncolor: red;\ncolor: orange;\ncolor: tan;\ncolor: rebeccapurple;
\n
/* <hex-color> values */\ncolor: #090;\ncolor: #009900;\n...\n
Every so often I discover that CSS has some feature I've kind of wanted for\nyears and didn't realize was there. Today I learned about currentcolor
.\nThis feature is mentioned here \nand it links you to here,\nbut you'll need to go find blog posts that explain just how darn useful it is.
What is it? It's basically a special variable that contains the currently set\ncolor. It's pretty much exactly what you want for, say, monochromatic svg icons\nalmost all of the time:
\nsvg {\n fill: currentcolor;\n}\n
\nNow, wouldn't it be nice if there were a similar value for background-color
?\nYou can set background-color
to currentcolor
(which is not helpful) but no\nthere is not.
Does this seem like a hack? You bet. Do I wish I'd known about this, I dunno,\nsome time between 2010 when it seems like it was implemented in webkit? Um,\nyeah.
\nGod damn it.
\n",_path:"post/ukw6zqkqjtti"},"post/path=15-elements-of-composition":{date:"2024-09-20T17:33:48.145Z",summary:"These are the notes I took while watching Peter Evans' excellent YouTube video with the same title.",path:"15-elements-of-composition",keywords:[],author:"Tonio Loewald",_created:"2024-09-20T11:33:32.658Z",title:"15 Elements of Composition",_modified:"2024-09-22T17:38:59.641Z",content:"\n\nI came across a nice video entitled [15 Elements of Composition in Photography](https://www.youtube.com/watch?v=gok-dqLx3vY)\nby Peter Evans, and I really liked it. It's free of fluff and has really nice examples.\n\nAnyway, if you don't want to watch the video, here are my notes, but the video is well worth a look.\n\nThe photograph above is one of mine, so don't blame Peter for that!\n\n## Vital\n\n- Focal Point (hook)—can be more than one, but one will be primary\n- Framing (as much in camera as possible, or crop in post; ignore aspect ratio, just make it look good)\n- Decide what you want to see and not to see (decide before you bring the camera to your eye)\n- Avoid background clutter\n- Resist temptation to “get everything in”\n\n## Non-Vital\n\n- Rule of Thirds (definitely not vital, but don’t get in the habit of centering your primary point of interest)\n- Leads-ins (usually diagnonal lines or curves that create depth) and foreground objects (don’t need to be obvious)\n- Diagonals, triangles, and curves (can be implied)\n- Keep horizons level\n- Give living creatures (people or animals) “looking/moving space” (also facing). This can even apply to inanimate objects like flowers and vehicles.\n- Rules of threes (or odds)—people weirdly prefer looking at three things or, failing that, odd numbers of things. \n- Positive & Negative Space (subjects of importance vs everything else)—try for a pleasing balance\n- Color, Shape, and Form\n- Strong Color (if related to the point of interest) can help, otherwise it is likely distracting\n- Frame within a frame (overused)\n",_path:"post/q6pw2t0a4y5j"},"post/path=apple-event-september-2024":{date:"2024-09-10T14:27:03.999Z",summary:"Apple's announcements weren't terribly exciting, but the hearing aid feature of the AirPods Pro and the Sleep Apnea diagnosis feature for the new and recent Apple Watch models are very nice. The iPhone 16 Pro's new ultra wide fusion camera is also very welcome.",path:"apple-event-september-2024",keywords:[],author:"Tonio Loewald",_created:"2024-09-10T09:30:56.867Z",title:"Between the lines of Apple's September 2024 announcements",_modified:"2024-09-10T09:30:56.867Z",content:"![caveman-with-smartphone.webp](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Fcaveman-with-smartphone.webp?alt=media&token=bbf6e4bd-1622-410a-9806-ebdd8635f875)\n\nI watched the announcements last night, Finnish time, and I have a few thoughts.\n\n## A bad day to own a Hearing Aid company\n\nPrescription hearing aids cost ~$1500 at Costco. Cheap hearing aids cost ~$80.\nBut now you can buy Apple Airpods Pro and get the diagnosis and the solution for\none low fee, and it's also possible this will remove some of the stigma of \nhearing loss.\n\nMy hearing isn't what it once was, and I'd rather buy Airpods Pro and get both\na really nice set of Airpods *and* get my hearing corrected than go to a doctor.\n\n## Also, maybe not a great day to own a Sleep Lab\n\nGetting diagnosed with Sleep Apnea used to be kind of inconvenient. Assuming\nyou had coverage, you'd have to sleep overnight in a lab. Again, an Apple Watch\nSeries 9/10 is definitely more convenient, likely cheaper, and you get a watch. \nNice.\n\n## iPhone 16 [Plus] / 16 Pro [Max]\n\nDespite the change in nomenclature (A16 vs A17 in the iPhones 15, A18 Bionic\nvs A18 Pro in the iPhones 16) and the purported focus on AI, the new phones\nbasically just seem to be ~15% faster than last year's models. That's fine,\nI only upgrade every 2-3 years and I've been drooling over the 100mm telephoto.\nNow, by waiting the extra year, I also get a 48MP fusion camera for ultrawide\nand macro photography.\n\n(It should be noted that Apple seldom talks about bytes or GHz in its consumer\nproduct introductions, so it may be that the A18 has substantially more RAM\nthan the A16/A17 and earlier, we'll have to wait until developers get to kick\nsome tires.)\n\nFrom the perspective of my wallet, it's very bad. I feel like the Airpods,\nthe iPhone 16 Pro, and the Watch Series 10 are all must buys. Only the EU's\ninsistence on crippling Apple might temper my desires.\n\n## Apple Watch Series 10 and Ultra\n\nThe Apple Watch Ultra is amazingly popular in Finland. I see them everywhere,\nespecially in Winter. I think it's very popular with cross-country skiers and\nthere are a lot of cross-country skiers here.\n\nThe new Series 10 seems to bring a lot of the Ultra's advantages down to the\nmain watch, which suits me as the Ultra looks crazy big on my wrist. First\nand foremost, the screen is actually larger than the Ultra's in a slimmer\ncase.\n\nThat said, the Ultra 2 is now a year old, and the only things they added were\nthe black option (which does look sick) and titanium straps (which also look\nsick).\n\n## Airpods Standard\n\nIt seems to me that the lack of active noise cancellation in the entry-level\nAirPods may be pure software, but perhaps not. Anyway, the mid-range AirPods\nare now AirPods Pro aside from interchangeable tips. Very nice. But the \nHearing Aid features of the AirPods Pro are impressive.\n\n![caveman-with-VR-headset,-stalked-by-monster.webp](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Fcaveman-with-VR-headset%2C-stalked-by-monster.webp?alt=media&token=5be5db3c-7404-4487-8577-888e85ab4f8e)\n\n## Vision Pro—down but not out\n\nThe Vision Pro is still being mentioned in dispatches and appearing in the\nfeature infographics. Apple hasn't abandoned it, but it's definitely not\nfront-and-center right now. Might we see a new model in 2025?\n\n## Apple's Neural Hardware & Training\n\nI still don't have a solid handle on how good Apple's neural processors are\nfor training models. The headline terraflops numbers look great, but are they\ncrippled in some subtle way? As I understand it, the way Apple is planning to\nuse AI is somewhere between using [RAG](https://en.wikipedia.org/wiki/Retrieval-augmented_generation) \n(which is essentially using data to enhance prompts with a pre-trained LLM) and\nand creating custom models from your personal data on device (possibly to\nbe used in conjunction with pre-trained models).\n\nE.g. you might have a model to do OCR on text in images, and a model trained \non your photos designed to recognize your friends, and both might be used to \nhelp drive image search.\n\nBut it doesn't seem like there's an particularly good reason to train on your\ndevice vs. on a \"private cloud\". Your photos need to be uploaded anyway (for\nbackup, etc.) so they're already going to be in the cloud.\n\n## Final Thoughts\n\nNothing terribly exciting, and yet I think the new products are each quite\ncompelling, especially the Watch Series 10 and the new Airpods Pro. The \niPhone 16 Pro wouldn't be compelling if you already have the iPhone 15 Pro,\nbut it's quite compelling to me as it covers all the most important focal\nranges I use a camera for except longer telephoto, which means when I do have\nmy camera with me, I don't need to swap lenses as often.\n",_path:"post/3kse5yg6kd75"},"post/path=what-generating-images-wth-chatgpt-and-walle-tells-me-about-llms":{date:"2024-09-08T18:53:59.317Z",summary:"I've been playing with LLMs a lot over the last few weeks, including going back to generating images with WALL-E, and I see common patterns of errors, but the nice thing about generating images is that you can literally see the problems immediately (in most cases) in ways that are much harder to spot with text and code.",path:"what-generating-images-wth-chatgpt-and-walle-tells-me-about-llms",keywords:[],author:"Tonio Loewald",_created:"2024-09-08T18:55:10.790Z",title:"What creating images with ChatGPT and Wall-E tells me about LLMs",_modified:"2024-09-08T18:55:10.790Z",content:"![a riff on American Gothic produced grudgingly by ChatGTP/Wall-E](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Famerican-gothic-meets-margaret-keane.webp?alt=media&token=78bd8f9b-46c5-4ae8-9fe4-6b0d92a82f5a)\n\nDespite all the \"progress\" on LLMs, I see consistent patterns of failure when using LLMs to \nattempt useful work. All of this makes perfect sense when you realize that all they are, at\nbottom, is a really, really impressive probabilistic autocomplete.\n\n1. LLMs do not reflect on their output. A person might reply to a question, and,\n realize half-way through their response that it is unclear, or getting off topic,\n or that they themselves don't know the answer. ChatGPT might *seem* to do this,\n but if so it will only be because sometimes the material they were trained with\n contained sources that did it.\n\n2. A lot of the \"progress\" consists of using the same technology to try to improve the\n prompt for you automatically, and to clean it up after it's created. We see this\n very transparently will Wall-E where sometimes it actually loses the plot and just\n tells you what prompt it generated from your input.\n \n3. If ChatGPT tells you what it's done, it doesn't in fact mean that it's done\n it, but just that a lot of source material contains such post summaries.\n \nI've seen various AI pundits talking about how \"hallucinations have gotten so much\nless common\". I see them constantly, and they're often masquerading as self-assessment.\n\nBut the really interesting thing is that the Wall-E image generator seems to \n\"hallucinate\" results in a way that is a visual analog of what's going on with the\ntext in ChatGPT.\n\n1. I ask for an image.\n\n2. ChatGPT embellishes the description (often rather well) and then either\n renders that, or offers to render it.\n\n3. The image usually fails to meet the specification in really obvious ways.\n\n4. ChatGPT tells me that here is the image which has everything I asked for\n (restated, usually accurately, from the prompt, but not matching the\n actual picture).\n\nThere's usually two options from here. One is to ask for the image to be tweaked\nin some specific way. This typically results in a completely different image\nthat is wrong in new and different ways and doesn't fix the problem.\n\n![the answer is no it can't](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Fimage-generation-is-highly-unstable.webp?alt=media&token=3364dc76-58f6-49d8-a5ab-b70a3c713351)\n\nBasically images are generated probabilistically from input. There's no\nconcept of \"adjusting\" an image, merely blowing it away and doing it over based\non additional content text and without any way of reflecting on the previously\ngenerated image.\n\nThe other option (this is in the iOS app, and doesn't work in the Mac desktop\napp—I haven't tried other platforms) is to scribble over the problem area\nand tell it what you want done. E.g. you could scribble over the face of\na character and say \"make this guy more cheerful\".\n\nThis is hit-and-miss, but the damage is restricted to the area you scribbled over.\n\n![specific-corrections-are-often-ignored.webp](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Fspecific-corrections-are-often-ignored.webp?alt=media&token=1ea28da3-f214-43c2-8f78-72a7d5883e4a)\n\nI tried this repeatedly, including specifying the new content, and the billboards/screens \nstayed stubbornly blank.\n\n## Generalizing\n\nI don't think image generation is a special case. I just think it makes it\neasier to immediately see that things have gone wrong and what's going wrong.\n\nWorking with code is much harder, because it's not obvious from inspection what\nnon-trivial code does or whether it has subtle errors hidden inside it.\n\nWhen I ask ChatGPT (or Cursor) to do something with code, sometimes it actually\nworks, but more usually it's very similar to what happens with an image request.\n\n1. I ask for a coding task to be completed.\n\n2. ChatGPT explains that of course it can do this, and elaborates on what\n I ask for, usually very well.\n\n3. ChatGPT then produces a bunch of code that (a) probably won't actually\n compile or run, and (c) doesn't do what it said it would.\n\n4. ChatGPT explains how this code does some fairly accurate restatement\n of what it said it was going to do.\n\nNow, you can basically do the same things at this point. You can tell it to\nmake a slight change and it will *probably* not do everything over again, because\nits earlier output is in fact part of the prompt, but it might.\n\nOr you can, say, copy-and-paste a specific problematic piece of code and ask\nit to fix that.\n\nYou can also tell it the errors its code is throwing, and it might fix them.\nWith text output, the text output is part of the prompt, so the probabilistic \ncompletion includes the conversation thus far (windows permitting), but this isn't\nthe same as actually knowing what the hell it's doing.\n\n\n",_path:"post/2xirh9mxpkg8"},"post/path=retcon-first-impressions":{date:"2024-09-04T15:38:19.675Z",summary:"retcon is a new Git client for the Mac that lets you rewrite the commit history in your git repository like a God.",path:"retcon-first-impressions",keywords:[],author:"Tonio Loewald",_created:"2024-09-04T12:37:30.403Z",title:"Retcon—First Impressions",_modified:"2024-09-04T12:44:26.866Z",content:"\nIt's been a while since a new tool for managing repo state has made an impression\non me. Basically my history with git
has been:
git
command line (ugh)For the last few years, that's where things stood. I used Github Desktop to\nhandle authentication, and would pop into Merge to clean up messes that were\nimpossible to deal with in Github.
\nMore recently, Panic's Nova integrates Git right into the \nIDE while providing similar levels of functionality to Merge. Unfortunately, \nNova doesn't quite cut it for me, so I use it for hobby projects.
\n\nBut a recent note on Daringfireball mentioned a\nGit client called Retcon that allows you to just click on your history and\nedit it like a God. I filed it away and thought I'd take a look at it later.
\nWell, today I found myself trying to fix a PR that had modified config files\nhere and there during its history and it was just beyond my ability to fix it\nin either Sublime Merge or Git. I was on the verge of googling the git command\nline arcana necessary to fix the problem when I remembered the article on\nDaringfireball…
\nAnyway, it costs $50/year (after the first year discount). I don't love \nsubscription pricing, but…
\nI was able to rebuild my PR exactly the way I wanted to in a few minutes.
\nLike a God.
\n",_path:"post/ruwvg6vnhn0x"},"post/path=react-developer-experience-revisited":{date:"2024-08-27T04:38:30.977Z",summary:"Hooks have settled in to the React world, so let's see how maintainable the code looks.",path:"react-developer-experience-revisited",keywords:[],author:"Tonio Loewald",_created:"2024-08-26T09:30:13.970Z",title:"React Developer Experience Revisited",_modified:"2024-08-27T06:38:49.353Z",content:"![The React developer experience is better, but it's still not good](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Freact-developer-experience-revisited.webp?alt=media&token=e4a3ea4e-39ba-4cfe-b185-cfcc4fb359dd)\n\nI'm returning to the world of React development after a hiatus of several years.\nWhen I last did any serious React development, hooks were the shiny new thing\non the block and now they've well-and-truly set in.\n\nThe good news is that hooks seem to have replaced redux as the state \nmanagement approach du jour, which means that how state gets from x to y is\nat least borderline comprehensible, but the down side is that the virtual\nDOM hierarchy, which was already pretty terrible, has gotten crazy.\n\n![this is the React website home page viewed in the React dev tools](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Freact-website-in-react-dev-tools.jpg?alt=media&token=7bbf0b93-70ae-401b-8c7a-e28e737f9900)\n\nThe preceding image is of the React home page with React Dev Tools open. The\narrow shows the SelectionProvider wrapped around the top-left-most widget\non the screen.\n\nI picked this because (a) it's not my employer's highly confidential code and\n(b) I wouldn't want to be accused of cherry-picking a particularly gnarly piece\nof code written by non-genius-level-React-engineers.\n\nSo this is the code that the React team chooses to show off to the world\nand it's a page which doesn't do a whole heck of a lot.\n\nEach of those things in the virtual DOM represents code that someone has to \nwrite, test, and maintain. And when they maintain that code they have to find, \nread, and grok the code around it. When you look at this, you're looking at\nwasted development effort up-front **and** compounded into the future.\n\n![this blog in the elements panel](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Floewald-dot-com-homepage-in-elements.jpg?alt=media&token=222fd5ee-0efa-48cd-9e11-7a05db5fdaea)\n\nAbove, by comparison, is this blog displayed in the elements panel. There's\nno virtual DOM because with `xinjs` the DOM is the DOM is the DOM.\n\nI don't know how long hooks-based apps last. In my experience Redux-based apps\nbecome incomprehensible to maintainers within three years. Maybe hooks apps\nlast a bit longer.\n\n## Navigating a Codebase\n\nOne of the problems with React development has always been a high\nnoise-to-signal ratio in developer tools. E.g. in the debugger you tend to\ndiscover your functions are deeply nested in anonymous wrappers that do \nthings I for one don't understand. (But hey, at least it's not Angular,\namirite?!)\n\nSimilarly, your DOM nodes are wrapped in lots of DOM nodes that tend to do\nfairly comprehensible things (e.g. I assume a SelectionProvider holds\nselection state for a widget, which is totally awesome and not something you\nwouldn't need to bother with if you just used the DOM APIs). So while it's\nnot quite as bad as trying to figure out the execution stack of an event\nhandler it's not ideal that just figuring out where in this huge mess the\nthing you're pointing at is and then finding your way to the thing you're\nactually interested in reminds me of trying to find traps and treasure in\nold school CRPGs by waving the mouse around and waiting for the cursor to \nflicker.\n\nGenerally, when you're trying to fix an issue in the user interface, either\nyou know exactly where the code is or you don't. If you don't you might\nsearch for some unusual text in the UI. Failing that you might look for\n(say) a class-name or a component-name as a clue.\n\nJust look at this garbage (here I can't use the React example because their\nsymbols have been intentionally obfuscated):\n\n![material ui select widget partially displayed in React Dev Tools](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Fmaterial-ui-in-virtual-dom.jpg?alt=media&token=761f1c19-4acc-4ba8-96fd-2db924fdc763)\n\nThere is virtually no useful information in this sea of genericity. I find\nit hilarious that the React Dev Tools hierarchy has minimized the indentation\nlevel just to avoid having the hierarchy totally disappear to the right.\n\nAnd what is it we're looking at here? We're looking at a small part of the\nlanguage select widget that allows the user to pick the UI language for this\napp.\n\n![xin-locale-picker in the DOM](https://firebasestorage.googleapis.com/v0/b/liquid-force-425209-g2.appspot.com/o/blog%2Fxin-locale-picker-in-elements.jpg?alt=media&token=3f6a0f78-4ab1-48e1-912b-1da1bcab36be)\n\nLast Thursday evening, after seeing a minor problem in the language menu of\nthe app I was working on, I decided to see how hard it would be to implement\nall of this nicely in `xinjs-ui`, so I did. The resulting widget is shown\nin action above.\n\nNow, I haven't fully dislclosed the hierarchy inside this example, *because \nI don't have to*. The stuff I disclosed in React Dev Tools was the bare\nminimum needed to find what I was looking for.\n\n## But the code is nice, right?\n\nNo. No it isn't. The elements you're seeing in the `xinjs-ui` example directly\nmap onto the code that creates them:\n\n```\nfooBar(bazLurhmann())\n```\n\nGenerates:\n\n```\n