You know how sometimes you get an idea, and you already wrote and extended the code that makes it possible so surely you only need to do a little audio editing and CSS animation tweaking and graphic design and HOLY SHIT HOW DID IT GET SO LATE?
Blog
Note #14059
Our eldest decided that it wasn’t fair that only her dad (@misterjta) would get a #FathersDay card brought home from school and decided to make one for her “Uncle Dan” too.
Note #14044
Lots of interesting results from the @bodleianlibs staff survey. Pleased to have my suspicions confirmed about my department’s propensity to be accepting of individuals: it’s the only one where a majority of people strongly agreed with the statement “I feel able to by myself at work” and one of only two where nobody disagreed with it. That feels like an accurate representation of my experience with my team these last 7-8 years!
The problem with single page apps
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
…
Single-page apps (or SPAs as they’re sometimes called) serve all of the code for an entire multi-UI app from a single
index.html
file.They use JavaScript to handle URL routing with real URLs. For this to work, you need to:
- Configure the server to point all paths on a domain back to the root
index.html
file. For example,todolist.com
andtodolist.com/lists
should both point to the same file.- Suppress the default behavior when someone clicks a link that points to another page in the app.
- Use more JavaScript—
history.pushState()
—to update the URL without triggering a page reload.- Match the URL against a map of routes, and serve the right content based on it.
- If your URL has variable information in it (like a todolist ID, for example), parse that data out of the URL.
- Detect when someone clicks the browser’s back button/forward button, and update the URL and UI.
- Update the
title
element on the page.- Use even more JavaScript to dynamically focus the content area when the content changes (for screen-reader users).
(Shoutout to Ashley Bischoff for those last two!)
You end up recreating with JavaScript a lot of the features the browser gives you out-of-the-box.
This becomes more code to maintain, more complexity to manage, and more things to break. It makes the whole app more fragile and bug-prone than it has to be.
I’m going to share some alternatives that I prefer.
…
Like – it seems – Chris Ferdinandi, I’ve got nothing against Single Page Applications in their place.
My biggest concern with SPAs is that they’re routinely seen as an inevitable progression of web development: that is, that an increasing number of web developers have been brainwashed into thinking that they’re intrinsically superior to traditional multi-page websites. As Adam Silver observed the other year, using your heavyweight Javascript framework to Ajaxify your page loads does make the application feel faster… but only because the download and processing time of the heavyweight Javascript framework made it feel slow in the first place! The net result: web bloat, penalising of mobile users, and brittle applications with many failure points.
Whenever I see a new front-end framework sing the praises of its routing engine I wonder how we got to this point. After all: the Web’s had a routing engine since 1990, and most efforts to reinvent it invariably make it worse: less-accessible, less-archivable, less-sharable, less-discoverable, less-reliable, or several of these.
Visit the Ashmolean Museum
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
Keep an eye out for our youngest (and, briefly, me!) in this promotional video just released by the Ashmolean Museum.
Look After Lorcán
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
This is Lorcán. Lorcán has cystic fibrosis (CF) Lorcán is two years old. Lorcán has been fighting a potentially life shortening lung infection for the last six months and treatment isn’t working.
There is an amazing drug called Orkambi made by Vertex that is not funded on the NHS, this drug could help Lorcán and thousands of others. Over 240 people in the U.K. have died waiting for it to become available. Vertex and the U.K. government are letting people with CF die because of a disagreement over cost.
Parents have had to find an alternative way of getting these drugs for their children and the Cystic Fibrosis Buyers Club have found a generic copy of the drug that individuals can legally import, it is a fifth of the cost. This is however still beyond what we can pay.
…
I’ve previously shared (one, two) content about my friend Jen‘s two-year-old son Lorcán, who suffers from cystic fibrosis, as well as joining in the #strawfiechallenge earlier this year. A particular aim of Jen has been to get access to a drug that could add decades to her son’s life, but which isn’t being made available on the NHS. Running out of options to get access to medicine that could dramatically improve her kid’s quality of life and prognosis, she’s now set up a GoFundMe and is soliciting donations.
If you can help, even just a little, please do.
Berlin 8:00 a.m.
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
This explorable features an agent based model for road traffic and congestion. The model captures a phenomenon that most of us have witnessed on highways: phantom traffic jams, also known as traffic shocks or ghost jams. These are spontaneously emergent congested segments that move slowly and oppositely to the traffic. The explorable illustrates that phantom jams are more likely to occur if the variability in car speeds is higher:
So, if say 90% of the cars try moving at 120 km/h and 10 percent at 150 km/h, everyone might end up going 80 km/h on average. Whereas if everyone travelled at about 120 km/h no reduction of collective traffic flow occurs.
…
This is the best demonstration I’ve ever seen of the creation of phantom traffic jams. Playing with the (interactive) model, you can set up scenarios and watch how they affect traffic throughput. When everybody drives at 120km/h, everything’s fine. But when everybody drives at between 120km/h and 150km/h, traffic jams occur which result in everybody having to slow down to less than 120km/h!
This counterintuitive fact is hard to explain to people, but this interactive model makes it perhaps a little bit easier.
(There are, of course, other – more human – factors that result in an increased frequency of phantom traffic jams, but mathematicians are rarely concerned with what happens in the real world!)
How to Draw a Horse
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
The last Soviet citizen: The cosmonaut who was left behind in space – Russia Beyond
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
Sergei Krikalev was in space when the Soviet Union collapsed. Unable to come home, he wound up spending two times longer than originally planned in orbit. They simply refused to bring him back.While tanks were rolling through Moscow’s Red Square, people built barricades on bridges, Mikhail Gorbachev and the Soviet Union went the way of history, Sergei Krikalev was in space. 350 km away from Earth, the Mir space station was his temporary home.
He was nicknamed “the last citizen of the USSR.” When the Soviet Union broke apart into 15 separate states in 1991, Krikalev was told that he could not return home because the country that had promised to bring him back home no longer existed.
…
Reducing motion with the picture element
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
I was just talking with Dave about the accessibility of moving images on the web, and he said:
hm… I wonder if you could use
picture
+prefers-reduced-motion
?He then sends the following code:
<picture> <source srcset="no-motion.jpg" media="(prefers-reduced-motion: reduce)"></source> <img srcset="animated.gif alt="brick wall"/> </picture>I copied the code, dropped it into a post of mine, created a static image of an animated GIF, and turned on the “reduce motion” preference (System Preferences > Accessibility > Display). And then BOOM. Just worked. In real time!
…
I added reduced-motion support to DanQ.me earlier this year, but I only bothered to pay attention to the animated parts of the layout and design itself (the “bounce” on the menus and the cutesy motion of the logo, for example) and considered the (few) GIF animations and the like that I’ve added to be out-of-scope. But this approach is really quite simple and elegant, and I’ll bear it in mind if I ever have need of such a thing!
Goat LARP
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
…
Goats are the main characters. You are the supporting cast.
This game is about running mind-blowing live action experiences for goats. You will act as director and storyteller, transporting the goats to an unforgettable dream world of mystery and magic, etc etc.
Goat Larp is one part larp, one part hangout-with-animals-and-take-silly-pictures. In some ways, we are roleplaying that this is a larp.
The Goat Larp Rulebook
Rule number 1 through 100 is BE NICE TO THE GOATS.
Your Character
Show up at the farm dressed as any character you want. You could be an elf, a steampunk, the mayor of space, Hulk Hogan, Darth Vader, whatever.
Your character has no knowledge of how you got to this mystical goat farm, but you can sense that these goats are IMPORTANT. They need to be entertained. You need to run a larp for them.
Goat Activity Cards
There will be a stack of Goat Activity Cards. They are suggestions for activities you can do with the goats. For example:
One goat plays as Frodo, another will be Sauron. Use lawn posts to mark off an area representing Mount Doom. If Frodo visits Mount Doom before Sauron touches him, the world is saved. If Sauron touches Frodo, all is lost.
Another example:
President Goat’s cabinet must advise them on an important decision. The fate of the world is in this goat’s hands. One post is labeled “World Peace”, another post is labeled “Nuke Everything”. If President Goat bumps into a post, their decision is made.
Both teams may try to persuade the goats using any (safe) means they can come up. You are encouraged to ham it up, over-act, and monologue about what’s going on. This gives the goats a nice, immersive experience.
You may also come up with your own quests. In fact, you should, because most of the stuff we’re writing is garbage.
You can read more ideas for Goat Activities here.
…
Oh, I thought: it’s LARPing but with goats. You know, like Goat Yoga is yoga but with goats. Okay, fair enough: whatever floats your goat…
…but no, I was wrong. This isn’t so much LARPing with goats as LARPing for goats. As in: the goats are the player chatacters; any humans that happen to come along are mobs there for the entertainment of the goats.
The Internet remains a strange and wonderful window into a strange and wonderful world.
Note #14005
Dan Q found GC6102Y Minecrafty 3 – Zombie
This checkin to GC6102Y Minecrafty 3 - Zombie reflects a geocaching.com log entry. See more of Dan's cache logs.
Found via quick diversion from my expedition to the 2019-05-27 51 -1 geohashpoint nearby. I don’t often find myself on this side of the city and I was pleased to find a good-sized and well maintained geocache here, in a park I’d never visited! Initially I took 6 the wrong path and had to double back but soon knew where to look. TFTC, SL.
Geohashing expedition 2019-05-27 51 -1
This checkin to geohash 2019-05-27 51 -1 reflects a geohashing expedition. See more of Dan's hash logs.
Location
Hashpoint appears to be at the very end of Bleache Place, a suburban cul-de-sac in South-East Oxford. Looks very close to, but not on, the driveway of number 15. Possibly a convenient nearby lamp post for possibly attaching a “the Internet was here” sign?
Participants
Plans
(So long as he can get enough of his coursework done to justify taking a break), Dan Q plans to cycle out to the hashpoint at some point during the day.
Expedition
14:55 – okay, I’ve not finished as much of my coursework as I’d hoped, but I’ve finished enough that I can afford to take a break of a couple of hours to cycle out to the hashpoint, do a silly grin, put up a “The internet was here!” sign, and whatnot. Here we go!
15:58 – Success! Photos, tracklog, and details to follow. I’ve put a sign up so I wanted to put a message here for anybody who happens to see it and visit this page before I get home and finish writing-up!
Came home via geocache GC6102Y, safely home by 17:15 and back to studying!
Tracklog
Photos
Caverna Do Dragão
This is a repost promoting content originally published elsewhere. See more things Dan's reposted.
Remember that 80s TV show Dungeons & Dragons?
It turns out that Renault’s target customer base in Brazil do, too. Presumably it was a way bigger deal over there than it was here, because this new car ad feels like it could genuinely be a trailer for a live-action reboot of the series. And now I want to watch it.
(I do have some questions, though. Like: Diana was only 14 years old when she and her friends were transported to the Realm of Dungeons and Dragons… so when did she learn to drive? Am I supposed to believe that she just rolled a natural 20 on that driving check? And where does Sheila go when she turns invisible so that Bobby doesn’t end up sitting on her transparent-lap? And how does the car’s navigation computer work: are we to believe that there’s a GNSS network in the skies above the Realm? The Internet must know!)