Monday, September 13, 2021

what color shall we paint the bike shed

 Today at work I had reason to mention bikeshedding, where too much time and attention is paid to not-significant-enough details. Here's another example of it used in context.

Saturday, September 4, 2021

links in the traditional blue

 Why is the sky are links on the web traditionally blue? A really fun look at very early browsers.

Fun ("fun") fact - I've had a personal start page ("kirkzilla", a play on mozilla) on line for, like, decades. At first it used a trick in early Netscape of displaying your saved bookmarks as a page, but later I made it its own thing. But I kept the colors the classic Mozilla even when I had to use CSS to do so...



Thursday, August 26, 2021

storybook - display the literal code in "show code" story block

 We were having a problem where the "show code" button for some of our components in storybook was being over-interpreted; like our formik config object was just showing as [Object object] and else where we were seeing children elements showing up as <MDXCreateElement> instead of the actual child.

One work around is to make sure you have docs.source.type = 'code';

Like in the meta of our .mdx that might be 

<Meta
  title='Components/Form'
  component={Form}
  docs: {
    source: {
      type: 'code'
    }
  }
  }}
/>

or we could do it globally in our preview.tsx, where we had a 

export const parameters = { docs: } 

All ready to go.

The downside is, this makes it so the "show code" content is no longer dynamic; we aren't applying it globally because we like the idea of having the source / properties for the current set of parameters shown. (like the code for a disabled button or whatever)

the music of the hemispheres

I slowly worked my way through Ian McGilchrist's The Master and His Emissary, his longest study into the division of focus of the left and right hemisphere of the brain and its possible implications for how societies construct themselves and evolve over time. 

Even if you are skeptical of the importance of the physical division in how our minds come together (though I think McGilchrist makes an excellent and well-researched case - I mean like 1/5 of the book is citations!) I think it's clear that there are several spectrums. In McGilchrist's view, the left hemisphere - the one that guides the right side of the body - tends to be very concerned with what it can control. It is reductionistic, it likes to categorize, it tends to isolate. In comparison, the right hemisphere is takes in the world as it is. It is holistic, everything is context-based.

Computer programming is intensely reductionistic. You solve a problem by breaking into tiny pieces. When explaining it to non-programmers, I tell it's like breaking a recipe into steps for an idiot chef. 

If you really push this idea, you get explanations for things like functional programming - the usefulness of completely isolating a bit of computation from context. Similar for unit tests: an extremely fine-grained way of studying every little pieces-part in isolation. 

McGilchrist worries that the left hemisphere (reductionism) tends to swamp the right hemisphere culturally, over time (with some counter-swings of the pendulum) but he doesn't think that the right hemisphere should predominate; the most fruitful times are when there's a balance. 

I see the for functional programming. On the one hand, it's easy to understand how code works best if you have clearly defined contracts and a clean room environment each time. On the other hand... it's often tough to get stuff done that way! I think of James Hague's essays on recreating retrogames as pure functional programs - if you think about all the state in even a humble game like Pac-Man: all the dots, the scores, the monster positions, etc - you REALLY have to jump through hoops to avoid terrible anti-patterns (whole state in, whole state out) and I begin to suspect it's would never have a good effort/reward ratio for forcing these games into the modality.

Similarly for unit tests. In my experience, programming bugs are an emergent property! In my experience, very few bugs are because of a blatant mistake inside of a unit... rather they show up as different units are drawn together, and these bugs reflect misunderstandings of contract or context. In other words, yes you want to keep an eye on your trees, but doing so obsessively isn't going to assure you have a valid forest. Higher levels of testing are critical, and to the extent resources put into testing one level might take from testing at another level, I would prefer the higher level views (that will, in turn, exercise the code at the lower levels.) But - it's a balance. (But my relative disinterest in unit tests is a rather unpopular view to people whose intuition believe it's THE key to keeping projects under control.) 



Monday, August 23, 2021

clickbait title images vs the skim

Netflix seems to be using more of a "clickbait" model. The article mentions one possible different path: analytics wise they ARE more closely tracking user engagement for like, entire series and 80% of full show, vs their previous "at least 2 minutes of watching".

I'll mention another factor that might ameliorate their clickbait trend: on most of their apps, their skim feature is really good. Empirically it looks as if they load a single giant image of thumbnails early-on, and once that is loaded you can skim the whole move -- effectively watching the whole thing on 10 or 20x fast forward, so if you ARE looking for something in particular: steamy scenes, battle scenes, whatever - you can ascertain that pretty quickly.

Sunday, August 22, 2021

homestar runner and the power of flash

Really good video praising both Homestar Runner and Flash as a medium in particular.

Flash's ignominious end is a tragedy! I never quite understood what happened. The reasons usually given for its demise are
1. "it's insecure". Like with Java applets, for some reason companies just couldn't get their acts together to batten down the hatches? Which is really weird, because it seems like stuff it would be very easy isolate in a virtual sandbox, especially relative to the trend to make javascript do everything.

2. "html5 is much better for video". I mean this is true, but as the video shows being "a wrapper for live action video" was a johnny-come-lately trick for flash

3. "it's hard on processor/battery life". I mean, I guess. But even in Steve Jobs' Thoughts on Flash letter, he's talking about video codecs, not the lightweight interactive animation that made Flash so powerful.

I think it's right to blame Apple for much of this. In that Jobs letter "Oh it's all mouse-centric, with rollovers, and our touch devices don't do 'hover'" is pathetically short-sighted - but it gets into the real reason, control of content. I think it's less "these Flash apps won't be good enough" and more they'd be too good.

Eventually, html5 technically picked up most of the capabilities that were lost when Flash went away, but there just isn't the community built up around it.

I feel bad that I didn't get into Flash... "Processing" was good enough for most of my stuff I wanted to build and then share via web, and now P5 plays that role. I took a one day class in Flash but it mostly dealt with animations that were easier to teach, not the type of interactive game stuff that I found most interesting.

I'm not sure where the action is, in terms of interactive content creation but especially community. P5/Processing has a little of that, "Scratch" probably has more - and Minecraft and Roblox, I think? And "Mario Maker". But much of the energy has been sapped off my either content creation community for non-interactive stuff, like Tik Tok.

In a related note I started playing around with Nintendo's "Game Builder Garage", pretty cool stuff as well... but it's always challenging to use a system where I feel a bit hobbled, especially at the beginning, relative to what I can make using traditional programming.

Tuesday, August 17, 2021

prokopetz on the tribulations of user-focused design

 While some people assume tumblr is a ghost-town, it actually is pretty vibrant, but is even more dependent on figuring out whom to follow than most social media. 

One of my favorite posters is prokopetz. He mostly talks about tabletop/roleplaying and games and general geek culture  (sometimes spinning off in hilarious ways with remarkable inversions) but I appreciated this take on user interface:

I guess a lot of my skepticism regarding user-focused design stems from working in tech support and witnessing first hand that user interfaces can only guide people to perform a task in a particular way if the method you have in mind is already very close to their prior assumptions about how the task ought to be performed.

If the way your UI thinks the task ought to be carried out and the way the user thinks the task ought to be carried out are very different, nine times out of ten what happens is that the user will Rube Goldberg together some bizarre workaround that’s ten times as complicated, takes ten times as long, and fights against the interface every step of the way, but preserves their prior assumptions, then become emotionally committed to their workaround and respond to any effort to demonstrate a more straightforward approach with extreme and disproportionate anger.

Critically, there doesn’t seem to be any way to avoid this scenario using pure design, because different people will have mutually exclusive prior assumptions about how the task ought to be performed, and you can’t possibly accommodate all of them. Conscientious design practices can supplement explaining shit in words, but they can’t replace it.

Figuring out the user’s possible mental model and explicitly hinting where it needs to be updated is so important! I’m a little more optimistic than the author, but still…