Tuesday, May 30, 2023

the ol' juice

10 or so years ago, I was a big advocate for "Juicy" UI - interactions with just a splash of gratuitous kinesthetic pleasure.

I do suspect that was a little easier to achieve in the bad old jQuery days - adding an easing or extra animation to a specific action (as an adverb, so to speak) is more direct than setting up a CSS animation (which is more like working with adjectives) Especially for chaining multiple animations, where I think you still have to dip into JS.

But you still see signs of it - I love Material UI's react button that sends a sonar blip of color out from wherever you click it.

My project manager at work was talking about Rive, especially the delightful cat paw interaction (on hover) with the "Get Started" button at top.

It seems Rive's space is a bit closer to what used to be done in Flash - larger animations and fancier mini-cartoons - than jQuery, but still. That cats paw button is great!

General self-plug: if your company might be looking for a Boston-based UI dev (with midtier / whole-site background) for React/Typescript, and with an eye for the old "juiciness" and other ways of delighting users - I might be that guy! https://kirk.is/portfolio

Friday, May 19, 2023

[Re: structuring and working in React]

Jacob Paris has some hot takes on twitter:

"You probably don’t need - useEffect - Postgres - serverless - state management - dark mode"

State Management is an interesting one. (Especially given Paris' followup: "Not one person has tried defending state management - Truly a sign of the times") My first professional React project was making heavy use of Redux, but given its complexity... as soon as other alternates to bad old "prop drilling" (especially useContext) emerged, I'm not surprised they took over.

Looking over technologies that have come and gone, I've noticed that simplicity usually wins. Going way back, it (plus performance) is why Java EJBs flamed out - or more universally why JSON came in and wiped out use of XML in so much infrastructure. It is also why React muscled out Angular. (But the other part of that is, simplicity isn't enough if a framework isn't offering enough solutions, which is why Angular was previously able to gain traction in a JQuery-world.)

My hot take: I think more projects might do what Svelte is doing in terms of switching to JSDoc annotations vs TypeScript. You can read a response to the hub-bub that created... TypeScript can add a lot of visual complexity to function declarations and the like, and the errors and warnings it generates (especially when dealing with layers of React components that use polymorphism) can be arcane and difficult to interpret. I am not surprised that people are looking to alternatives for ensuring compile-time correctness.

Caveat: I know I am FAR more comfortable with duck typing than most of my peers. I'm certainly not calling for a return to the wild west of loose typing, but right now TypeScript doesn't feel like it has the simplicity that so many enduring technologies share. (Counterpoint disclaimer: TypeScript DOES seem to be firmly establishing itself as a de facto standards - much like React rose to predominance - and so this prediction might not be worth the paper it isn't written on.)

Wednesday, May 17, 2023

the problem of chatgpt

 I had a thought I wanted to express visually:

I really do think this previews some of the biggest problems of the online folk for the next few years, if not more.

In terms of design, I looked at some online Venn Diagram tools (all of which required signup) but realized I'd be better served writing it in code, via P5. You can play with the code at https://editor.p5js.org/kirkjerk/sketches/9r6jEiaHs though it's messy - I only had a vague idea of what I wanted so I iterated and tweaked by hand and didn't bother to clean up after.

Venn/Euler Diagrams had some interesting limits - at first I wanted "true things" and "false things" to cover the space completely, but A. that's not how these diagrams work and B. actually there are a lot of things that aren't fully true or false.

Also I wanted to put a space on "Things ChatGPT knows it doesn't know" but these diagrams don't show the empty set very well.

(Thanks to Arnaud, Melissa and Topher.)

Tuesday, May 16, 2023

mapping: still expensive

 4 years ago I switched away from Google Maps for all my Porchfest needs to Leaflet, hitting Mapbox.

 It's tough. Most of these services have free tiers that sound generous, with hundreds of thousands of free tiles, but then the costs can get out of hand - especially for spiky event traffic.

Last year Somerville Porchfest used $300 worth of Mapbox tiles - this year more like $600! That's 1.4 Million Tiles served (I think that's so many because people have to zoom in so much to see the bands! Somerville is dense and the city blocks are thick with bands on Porchfest.

But at least we have some numbers to go by.

https://www.mapbox.com/pricing charges 50 cents per thousand requests.

So like your first 200,000 are free, but then the next 200,000 would be $100! That's a pretty big jump.

https://www.here.com/get-started/pricing says to be 8.3 center per thousand. That starts charging at 30K, but the 1,400,000 would have been a more reasonable sounding $116 or so.

https://github.com/leaflet-extras/leaflet-providers has information on using providers. I think I need to switch.

Monday, May 15, 2023

new porchfest features


Spoiler: I'm soft launching a job search, my time with Monster Worldwide (and my time on a "design system for design system" project with its parent Randstad) will be ending in around 6 weeks. https://kirk.is/resume and https://kirk.is/portfolio if you want to see what I can do as UI Engineer reaching into the middle tier (Boston based, flexible about onsite vs WFH, React and Typescript for adding features to the front page and bread and butter search of some very high profile companies.)

But even as I balance that day job with learning and interview prep, I have a "side hustle" I'm proud of, making websites for various porchfests in the Boston area (along with the directory site https://porchfest.info ) In a dream world I would be doing something like this full time, helping more and more neighborhoods declare an afternoon for bands to get out of the garage and in front of an audience on the porch... but for now it's just a hobby with small stipends.

For most of my sites (JP, Fenway, Newton, Belmont, Dedham, Melrose, Natick, Newton, and now Medford) I do the whole shebang: the landing page, online signups, drag and drop tools for "matchmaking" (connecting bands and porches) and geolocation, display of the block schedule and interactive maps (in a mobile friendly way), handling bulk email contact, and sometimes even making print materials. But Saturday was the area's oldest and biggest porchfest, Somerville - https://somervilleartscouncil.org/somervilleporchfest/2023/image/ - I "only" do the map/band card page for that but I love how it looks. And helping them make a static frontend of their site starting 4 or 5 years ago has been one of my "hero stories" - the version of the map and band browsing page that was hitting their Drupal backend for every request was a recipe for annual disaster. Porchfest traffic is INCREDIBLY spiky- even for a completely static site, it can be a challenge if you have a limited hosting budget. I reached out to the folks running it, we hashed out a way of pulling data as JSON, and I built a statically rendered (SPA-ish) site that let the browser do all the work of filtering and map-wrangling.

One of the biggest questions for a porchfest is whether they are "B.Y.O.Porch" (like Somerville), or if their vision of inclusion means more matchmaking (like JP, the first city I started doing these for) or some permutation of the two. My newest site, Medford, requested a new feature where we could send a link to porches that didn't have any band associated with them, allowing them to request a band from those that didn't yet have a porch. I was able to come up with the page thumbnailed here in less than a day of work, along with the update to my bulk mailer system to send the link (with appropriate authentication) to just those porches.

Anyway, get in touch if you want to know more about Porchfests - or if you have any thoughts about where my next day job could be...


Thursday, May 11, 2023

"It's a miracle anything about this ecosystem works at all."

Some articles I've found interesting lately:

It's a miracle anything about this ecosystem works at all.
But here's a more cheerful view along with a useful summary of some of the history: The JavaScript Ecosystem Is Delightfully Weird - interesting with Dan Abramov's "React circa late 90s Windows", I remember being really impressed how ASP.net (I think it was) could change a function from running on server to the browser with just one keyword function descriptor...

Practical Guide To Not Blocking The Event Loop

I wonder how much of my future will switch to prompt engineering. It's annoying what bullshitters LLMs can be, they are there to please you and to say likely things, and the connection to the truth is semi-tangential... (but some people are really running with it)

Wednesday, May 10, 2023

the unmac-ish options for terminal, and window: not as bad as it used to be!

One of my favorite things about switching to Mac from Windows was having proper Unix terminal windows. It's interesting though, the settings for it are some the most-old-school Unix, least-Mac-y-simplified things I've seen on Mac...

Anyway I finally had an excuse to mess with it and "window groups", my current project has a Core, Brand, and Bridge part, and a tendency to color code things Black, Blue, and Red. The color coding is definitely making things easier on my head...

Incidentally, looking back on setting up a Windows 11 machine for my aunt... Windows has definitely gotten better over the last ten years - in particular they seem to have successfully clamped down on OEM bloatware. Combined with the "yeah every machine is now a touchscreen" (which I saw my Aunt take advantage of instinctively, and then my optometrist jabbed an onscreen button as she was walking away from the desk), along with the legacy of stronger game support... I'm not likely to switch back but it would be less horrible if I had to

Monday, May 8, 2023

the future of vr


RIP Metaverse, we hardly knew ye ...It's not clear if there is a specific death knell or if this is just a vibe check, but I don't think VR has really found its legs.

The real metaverse action seems to be in Roblox and Second Life- each have about 60 million players, and encourage building new things in the shared world. Fortnight has 5 or 6 times the player base of either, but is more "The OASIS" of Ready Player One than the metaverse of "Snow Crash".

Apple is widely expected to release its VR or AR goggles soon - I am dying to see if they come up with a compelling usecase. Ever since the return of Steve Jobs their new products have been category-making or -dominating: music players, smartphone, tablet, smartwatch, wireless earbuds. So on the one hand it would be surprising to see them make a big misstep; on the other hand, what is the killer app? And even if the price is half the predictions (as was the iPad) it's still pricey.

I've only dabbled with a few VR products, but they so isolate the user from the physical environment...it's psychologically not comfortable. AR, projecting objects into a view of the real world vs VR's attempt at immersion, might help. But I still don't know what they will offer me in terms of productivity that a big old flatpanel won't...

Friday, May 5, 2023

fun with geography

The True Size Of... is a fun way to compare the size of regions despite the usual distortions of projecting a globe onto a flat map, it's so pleasant to drag a country around and see it stretch accordingly.

Thursday, May 4, 2023

react + redux review, really

Crush Your React and Redux Interview: 20+ Top Questions and Strategies covers the basics. I'm rusty in Redux now, a bit, and I'm worried that my understanding of it is tempered by how CarGurus liked to use it with immutable.js, which definitely added to the complexity in ways that might not apply without that library.

Tuesday, May 2, 2023

thoughts on the future of programming in an AI-heavy world

 Going down a rabbit hole of figuring out how the increasing presence of AI will impact the career scene for me and my peers... Don’t worry, ChatGPT will NOT replace all programmers starts with a summary of a more alarmist article it is responding to.

It's easy to suspect we're at the crook of a hockey-stick curve for NLP tech, but there's absolutely a chance we may be near the top of an "S" curve - (much like how we are approaching hard quantum-ish limits for our chip manufacturing, and Moore's Law no longer seems to be in effect.) Anecdotally, I shelled out for the GPT-4 flavor of ChatGPT, and it seems prone to the same kind of problems 3.5 has - at some point the way a language model doesn't really model the problem and explore the implications limits what it can do.

So right now we have climbed two steps in tech with products that are widely available to any programmer:

Step 1: ChatGPT can write decent code snippets and serve as a replacement for Stackoverflow (which seems like a relief given that Google seems less of a reliable resource for such tech things than it used to) You will usually need to adjust this code and verify and test it, but it's very good at writing variants and amalgamations of boilerplate stuff - and remembering the nooks and crannies of a language or library on behalf of the programmer

Step 2: (or maybe, 1.5) - Copilot is more integrated into editors such as VS Code. I have dabbled with this and don't love it - when combined with other CodeSense-y autocompletion features, the interactions can get a bit messy, and while there were a few incidents that impressed me with the cleverness, when it chokes it can be very hard to pick your way out of the mess (for example, it was notable worse at autocompleting includes than the older style autocomplete was)

So I'm now wondering if anyone who is working on making a product for the next step, where an AI examines your entire code base and can write files directly.

Until (or unless) they get the hallucinations under control, there will be a need for a human mediator. (The need for human oversight may be lessened if they start to set up semi-adversarial AIs to test what the core AI has made and is proposing to put into place.) But right now these AIs are just as confident when they are falling off the edge of their knowledge as when they are smack dab in the middle of it, and the industry doesn't have a embodied knowledge as to what types of subtle mistakes AIs might make - especially on the security front, so companies might be more vulnerable to attacks my folks who understand what the AI was thinking better than you did...

react aria

 Adobe making a drive for accessibility with React Aria ...