a html quine


Yesterday I was on a bus! Yes, a bus! I don't get to ride buses so often due to the working from home lyfe, but I took the opportunity to write some simple code (as I used to do on buses in the past... i even gave a talk about it once, when alt.net was a thing.)

And the thing I coded on the bus was a html quine.

Go and see this html quine

It's... different?

html quine.jpg

A quine is a program that produces, as output, its own source code. I've discussed and demonstrated quines over here in the wiki.

And as I say in the html quine link, although the idea had bounced around in my head for a decade, the thing that reminded me to go and do it was seeing this piece of "Code as Art" from Geoff Huntley recently: no yaml. There must be more Code as Art in this world.

See also, lengthy Hacker News discussion and more recently more discussion.


auto play

Even though I'm polite and I click yes to let all the websites keep their cookies on my machine, for their own devilish surveillance purposes, even though I say yes and there are no doubt a million cookies filled with details about me, knowing everything i like and what i click on, and invading every ounce of my privacy, it seems that they can't seem to find the one cookie that matters, they keep losing that one cookie i care about and it's the cookie that says: "Don't autoplay the fucking videos on youtube." Just don't do it. He's told us, over and over, on every device, not to autoplay those videos, just hold onto this one simple fact, this tiny binary digit of truth, and do not autoplay those videos. But that's the one cookie they cannot retain, they cannot keep hold of, it evades their grasp, it leaps out of their fingers like an oily fish cookie, a digusting cookie flavour that is not very popular when A/B tested in regular stores, it is the slipperiest cookie and i click once more to say "again, i tell you, please i beg you, do not autoplay your videos" and once more I know they will forget this fact as they have a specific form of memory loss, a Korsakoff syndrome all their own, where all private thoughts of an individual are retained indefinitely and sold to the highest bidder but one particular bit of data is unlike any other and is somehow coated in polytetrafluoroethene and cannot be persisted in any form, it is like those burn after reading messages that will self destruct as soon as they are read and so i am stuck endlessly watching one autoplayed video after another down stranger and stranger wormholes down rabbit rabbit holes in weird enclaves of digital degeneration as i see things unthinkable things things i cannot unsee and always i squirm and wish to escape but it cannot be done i must keep watching them play and play the playing must be played they cannot pause their playing, the playing must play, like clockwork orange i am bound before the screen with eyeballs clamped open by spidery metal fingers and please keep your cookie no more autoplay for me i cannot resist.



TimeSnapper for Mac: Beta Testers Needed

TimeSnapper Logo Finally some exciting news on the TimeSnapper front.

For a long time, the most requested feature for TimeSnapper has been a whole new version, for the Mac OS. Many of our customers and friends have moved from Windows to Mac over the last decade, and consistently told us that they miss the peace of mind and assistance that TimeSnapper provides.

One such customer, Jon Schneider was so tired of the situation that he built a new version of TimeSnapper, from the ground up, for the Mac OS. He is now part of the TimeSnapper team (along with Atli and I) and we're now ready -- with your help -- to welcome beta testers: people who are willing to run this software and give us feedback, suggestions and error reports about their experience.

A quick recap: TimeSnapper is a piece of software you can run in the background of your computer. It takes screenshots of your desktop every few seconds all week long. You can use it to recover text you've lost when (for example) your browser crashes, or you can use it to help fill out a timesheet, or just to gain an objective answer to the question "Where did my time go?" It's clever about the way it uses resources, so it doesn't fill up your hard drive or slow your computer.

Huge thanks to you for considering coming along on this journey, and a biiiiiiiiiig thank you to Jon for stepping up and getting us here.

ts mac options

ts mac playback


React is NOT ok

Look how tragic this is....

You create your new react app with:

npx create-react-app my-app

And it spits out 907 lines of techno-babblicious output, scrolling scrolling scrolling in your console, ending at last with exactly one useful shard of information:

Success! Created my-app at C:\example\my-app
Inside that directory, you can run several commands:

	yarn start
		Starts the development server.

	yarn build
		Bundles the app into static files for production.

	yarn test
		Starts the test runner.

	yarn eject
		Removes this tool and copies build dependencies, configuration files
		and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

	cd my-app
	yarn start

Happy hacking!

But after the wall of gobbledygook that preceded it, it's easily overlooked.

If the React team knew about the wonders of "ok" (for bash or powershell) they'd simply create a ".ok" file inside the "my-app" folder that says:

yarn start #   Starts the development server.
yarn build #   Bundles the app into static files for production.
yarn test  #   Starts the test runner.

...Then you'd immediately be able to find the commands again, and run them with a simple "ok 1", or "ok 2" or "ok 3"

But instead: those commands, sailing by in the infinite neon-scroll of the console, will be lost in time like tears in rain.

blade runner ending, tears in rain


Using "ok" as a Project Control Room

Here's an example of the scrappy, useful sort of way I use an ok folder profile to help me get things done.

I'm co-writing a book with Joseph Cooney. When I want to work on the book I navigate into the correct folder, using this command:

j ev

j is an alias for jump which is part of my markjump.ps1 system for navigating around. "ev" is the first two letters of the bookmark i've got for this location, so markjump "jumps" me into the ~\evergreenskillsdotcom folder.

Inside that folder, if I type "ok" I see a list of all the actions that are easy to run.

ok evergreen

As shown in the screenshot the options I get are:

  1. clowncar # use clowncar to generate static html
  2. .\build_and_push.ps1
  3. browse "https://docs.google.com/document/d/************************/edit" # view DA BOOOK
  4. browse "https://docs.google.com/spreadsheets/d/************************/edit" # subscribers
  5. j journal; code .\nontechnicals.md; popd; # work on non-technicals
  6. browse "https://webmail.************************" # ****** inbox leon@evergreenskills.com
  7. browse "https://trello.com/b/********/evergreen" # Joseph's Trello for EV
  8. browse "https://www.reddit.com/r/EvergreenSkills/" # REDDIT for ev

This rag-tag bunch of commands acts as a kind of "control room" for all the different work-fronts of the book.

control center

I can re-generate the website by calling ok 1 (this uses a static html generator i wrote in powershell called clowncar, which uses pre, markdown and yaml)

I can rebuild and push the site live with ok 2

I can continue to edit or write the book itself with ok 3

I can see the list of people who have subscribed to be notified at ok 4

There's a bunch of research notes about non-technical skills I can edit at ok 5

I can send or receive email from the evergreenskills domain with ok 6

Joseph has a trello board where we share a lot of notes and ideas at ok 7

And there's a reddit site where we've been sharing links, at ok 8

(I've hidden a few guids, to try and slow the doomsday clock on the guid apocalypse)

Even a simple project like this one has an evolving set of different urls and commands and activities. Maintaining a little .ok file is the simplest way I've got to keep track of them.

Unlike a documentation site it contains "executable" commands. And since I use powershell for all navigation and automatically run ok everytime I enter a folder, it's always in front of my eyes, and doesn't "rot" the way documentation does.

(Image is from Pilotpriest β€Žβ€“ Original Motion Picture Soundtrack... I've always loved that image since I saw it on archillect)


Meetings: Are They Worth It?

I tweeted recently that, inside a corporation, it would be handy to have, for example...

An Outlook plugin that automatically edits every meeting request, and appends a few characters to the title:

If the meeting request was for 10 people, for 120 minutes, it would calculate "10 people times 2 hours times (some reasonable rate per hour, e.g. $89)" and then it would append "for $1780" to the time of the meeting hence:

Project Kick Off

would become:

Project Kick Off for $1780!

(The exclamation would only be added if the dollar amount was above some configuration value.)

Or better yet:

Project Kick Off for $1780, so make sure it's worth it!

John Cleese: Meetings, Bloody Meetings.

And, although it was not an original idea, I saw a few people in agreement.

In the past I've seen some "passive-aggressive" tools that perform a similar calculation, giving attendees a calculator to continuously measure their mounting frustration: but I think my idea is more straight-forward "aggressive-aggressive".

Initially it would be hampered by people feeling defensive, but once the underlying truth has been internalized people can (I believe) move forward and be both: less wasteful and more productive.

As always, I reserve the right to change my mind in the morning.


The Visitor Effect

This is an amazing, remarkable and wonderful effect we have been using at work to achieve things all by ourselves that we couldn't achieve in five lifetimes if we had to achieve things all by ourselves. If that sounds confusing, it is.

The visitor effect is a little like "rubber duck debugging".

spray n wipe.jpg

We've noticed at work that there are some corners in our code or some processes, that only one person is fully "across". One person wrote it, maintains it, and takes care of it. No one else ever needs to worry about it and frankly, no one else would want to. These are bad things because the "lottery count" is 1.

The "lottery count" is exactly like the "under the bus" count, but not quite as grim; I'll describe the latter, then the former. The "under the bus" count on a project asks "how many people would need to be hit by a bus, before all crucial project knowledge would be lost?" and is often phrased like this: "But what if Rupert* is hit by a bus!?" to which Ingrid responds, "Then you can be certain I'll need an alibi." Because all this casual discussion of death and mayhem is a bit distasteful, particularly for Rupert, it's better to say "But what if Rupert wins the lottery and doesn't come back to work on Monday?" The lottery count, then, is a more generalizable mathematical treatise, resembling a knapsack problem that ponders, which minimal spanning subsets of workers are barred from forming lottery syndicates to avoid major risk to the project? But I digress.

The visitor effect proceeds like this:

"Hmm, Rupert is the only person who understands the SCLABE System. We'd better ask for someone else to work on it with him."

Ingrid volunteers. But we give Rupert some time to prepare. "In three weeks time, Ingrid will look after the SCLABE System for a few days." Rupert experiences a brief panic then launches into a flurry of activity, tidying up and improving the system in anticipation of Ingrid's scornful gaze. Rupert looks at his code with fresh eyes. "What is this doing here? Why is this so broken? How come this thing is still scattered over seven classes? Why is this coupled to that? What's with these warnings? Why is that test commented out? Why isn't that TODO: done?" and so on.

Two weeks later Ingrid finds she hasn't got time to take over from the SCLABE System. But already it's running at 300% efficiency over its old performance.

This is the visitor effect.

* Rupert, Ingrid, and SCLABE are characters introduced by Simon Harriyott in What?! Rupert can't leave! He's the only one who knows the SCLABE system!. Simon's disclaimer, which applies equally well here reads: "SCLABE is a fictional legacy system written in COBOL on an AS/400. Rupert is a fictional developer, whose resemblance to anyone you know is the whole point of this exercise."


2018 By The Numbers

Being productive in 2018 was again a challenge. If you produced nothing, but managed to survive: good for you!

Here's a summary of things I shipped. Numbers in parens, e.g. "(3,2)", are the figures from last year and the year before.

instagram/secretgeek 2018

The tweets that travelled the furthest were both about Evergreen Skills

Well, let's see what 2019 is all about.

Previously previously


Think you're clever? Can you name each of these CASING styles?

How many of these capitilization styles can you name?

I'll give you a clue, the first one is "UPPERCASE"

  2. all work and no play makes homer something something
  3. All Work And No Play Makes Homer Something Something
  4. AllWorkAndNoPlayMakesHomerSomethingSomething
  5. allWorkAndNoPlayMakesHomerSomethingSomething
  6. All work and no play makes homer something something
  7. all_work_and_no_play_makes_homer_something_something
  9. all-work-and-no-play-makes-homer-something-something
  10. All-Work-And-No-Play-Makes-Homer-Something-Something
  11. All wOrk And nO plAy mAkEs hOmEr sOmEthIng sOmEthIng
  12. alL woRk AnD No plAy MAkeS HOMer sOMetHInG sOmetHING

Take your time. Look through them carefully. One at a time, out loud, say what each of them is called.

Scroll down for the answers.






The Answers

Easy one first up:


That's uppercase. Letters A-Z.

2. all work and no play makes homer something something

...lowercase, letters a-z.

3. All Work And No Play Makes Homer Something Something

...Title Case, the first letter of each word is capitalized.*

4. AllWorkAndNoPlayMakesHomerSomethingSomething

Good old PascalCase... words are smashed together, with the first word capitalized.

5. allWorkAndNoPlayMakesHomerSomethingSomething

PascalCase's close relative, camelCase... words are smashed together, with the first word not-capitalized.

6. All work and no play makes homer something something

Sentence case... all words lowercase, but the first letter capitalized.

7. all_work_and_no_play_makes_homer_something_something

Snake case: underscores as word separators.


Combine snake_case with UPPERCASE and you get C_CONSTANT_CASE.

9. all-work-and-no-play-makes-homer-something-something

This is kebab-case, great for URL fragments, it's lowercase with each word separated by a hyphen.

10. All-Work-And-No-Play-Makes-Homer-Something-Something

This is Train-Case, the slightly shouty cousin of kebab-case.

11. All wOrk And nO plAy mAkEs hOmEr sOmEthIng sOmEthIng

You might have to pay attention to spot that this is vOwEl cAsE - where vowels are sent to UPPERCASE.

12. alL woRk AnD No plAy MAkeS HOMer sOMetHInG sOmetHING

And this is an exmple of Sponge Bob Case, where letters are randomly assigned a case; it's different every time, and hard to detect. You can't disprove that every one of the above examples is ALSO an example of Sponge Bob case. That's the thing about random ;-)

Here's a NimbleText pattern that demonstrates all of the above.

Yeh, this fun and educational content is also a promo for NimbleText...

This example lets you play with all the different casing styles and generate your own in a snap!

Thanks to Doeke Zanstra for the idea of vOwEl cAsE.

* For a more nuanced take on Title Case (for professional writers) try the title case converter tool, which can apply complex house styles, like Chicago, APA.


NimbleText is now a Machine Learning Platform

(TL/DR NimbleText 2.9 is available now. It can *infer* a pattern from a single example.)

I saw this image on twitter a few weeks ago, and it got me thinking...

machine learning 66.jpg

The first part of the diagram is a perfect description of NimbleText: given some data and a pattern (the 'rules') it produces an answer.

I started to wonder:


How hard could it be to turn it around? Could I make it act like the second part of the diagram?... given some data and a single example of an answer, can I make it produce the rules (the pattern) to produces this answer?

Soon after, I had a satisfactory result and NimbleText can now act like the second part of the diagram.

Here's an animated movie of it in action:

Pattern inference in action

If you leave the "pattern" textbox blank, but insert an example result in the result textbox and hit "calculate" it will deduce the pattern.

In other words, you can use an example to deduce the required pattern.

For example, if you have this data:


...and you don't have a pattern, but you know the result you want, just enter an example result based on the first row, for example:

Hello there Jenny Jones 

Hit Calculate and the miracle of “machine learning” will use your example result to deduce a pattern:

Hello there $1 $0

Hit Calculate again the result will become:

Hello there Jenny Jones
Hello there Sam Smith
Hello there Jack Johnson

It's cleverer than that though. NimbleText also deduces any functions that are needed.

If you had the data above, with an empty pattern, and the example result you provided was:

jenny JONES

Press Calculate and it will use your example to deduce THIS slightly more delightful pattern:

<% $1.toLowerCase() %> <% $0.toUpperCase() %>

Press Calculate again, and the new pattern will be applied, giving you the result:

jenny JONES

...without you ever having to waste your finger's precious few remaining keystrokes typing out (or remembering) all those nasty function names. It can deduce quite a few other functions as well.

Try it for yourself!

Let me know about any bugs via a comment, or via email to support at nimbletext.com. cheers!

(It's probably worth pointing out that any "machine learning" occuring here is just "classical programming"... it's a very handy feature all the same!)