Monday, September 30, 2019

awesome inline DOM content editng

Whoa.... (in case the tweet goes away: in most browsers you can go into the console and type document.designMode = 'on'; and then edit text directly in the document. Great for pranks as well as seeing how the page reacts to different text lengths etc.

Friday, September 27, 2019

cargurus and ownership and iterations

From my company's engineering blog, Why devs should embrace project ownership and swift iteration.

The essay is legit, and I would say that if you're A. looking to buy a car, we're the best place to start (CarGurus became #1 in a crowd of sites who will help you find a new or used car in the area by being the first to not be afraid of calling a car overpriced when that was the case) or B. if you want a job in Cambridge - either tech / engineering, or in sales / getting dealers on board (or whatever listings are on it - hit me up, for reals, it's a great place.

Tuesday, September 24, 2019

autocompletely stupid

Could someone explain this to me? I want to look up the town of "Ocean Grove, NJ" (where my mom and my Aunt live... I'm trying to compute its distance to the infamous closed waterpark "Action Park")... I pop open Apple maps on my phone (for some reason on my desktop, Google Maps can't compute the distance.)

So I pop open the map and see...

Ok, typing an "o" looks promising, like it already knows what I might want to say... (well, except for the "oarking" bit, probably an old typo of mine?)

"oc" is even better...

and then "oce" gets me back to the crap I've never searched for in my life.

I'm trying to get a feel for what the algorithm thinks it's doing here... why getting more specific makes it thinks the more-local-to-me-now is now more important than the something-that-I-searched-for-in-the-past...

Monday, September 23, 2019

virus vs virus

I've been thinking about an old post on hacker Andrew "bunnie" Huang's blog, looking at the information density of human viruses. My favorite quote from it:
[on analyzing H1N1 in terms of bits of information] So it takes about 25 kilobits -- 3.2 kbytes -- of data to code for a virus that has a non-trivial chance of killing a human. This is more efficient than a computer virus, such as MyDoom, which rings in at around 22 kbytes.
It's humbling that I could be killed by 3.2kbytes of genetic data. Then again, with 850 Mbytes of data in my genome, there's bound to be an exploit or two.
That's just a neat way of thinking about it... it seems amazing that you can quantize information like that.

Sunday, September 22, 2019

Sunday, September 8, 2019

the 32767px hack

There was a time, a decade ago, where using <table> for layout was reviled as horrendously poor form (and obviously it's semantically messy, and puts too much display information in the html markup) but CSS and proper html couldn't yet simply do what was simple to do in tables. But: Tables were pretty good at letting you indicate how you wanted unknown sized content to sit relative to other content. Not until flexbox and css grid layout appeared, really.

In those days,  doing something like - getting multiple column-y divs to be as tall as each other without knowing how tall their content was tricky, this GIF shows the challenge:

One solution was the Equal Height Columns Hack where you would - I'm not kidding - add 32767 pixels worth of padding at the bottom, but then undo that with the negative equal value of margin.

I was kind of bitter. This kind of thing wouldn't even register as an challenge for a table-based layout - and using a table seemed MUCH less horrifying than this 32767 pixel garbage. (Apparently the number was empirically derived as large but not too large for most browsers). And really, is having an endless pile of nested <div> that much worse than non-data <table>?  But I'm a hopelessly out of touch caveman for thinking so? OK.

I'm over it now, and am delighted CSS provides solid options that are semantically good. But overall I will always err on the side of pragmatic simplicity over semantic purity.

(Here's a similar grumbling blog entry from 2012 - using floating divs was another solution for solving problems caused by abstaining from tables)

Friday, September 6, 2019

letsencrypt is so so good

Just a public note of admiration for Let's Encrypt - getting SSL for a site used to be a weird and costly pain in the ass, but they make it so easy (at least if you have command line access to your webhost)

Monday, September 2, 2019

tightly packing uneven squares via CSS (or js)

Like I've mentioned One of the toughest part of Porchfests is making the printable poster guide. Although I wish everyone would just use my groovy mobile sites, apparently many people feel more comfortable with a piece of paper - but it's a lot of information to try to pack into just a few sheets.

For JP Porchfest I used a block schedule:

However, Belmont Porchfest tends to have only one band per porch, so this kind of layout wastes a lot of space.

Also... just having band names isn't that appealing to be honest. What if we could get the band descriptions in there as well? Would that make a more appealing display? Let people really get a feel for what they want to see?

I tried using inline-block and then float, and got something like this:
It wasn't quite what I had in mind... I'd really love something to make better use of the space.

This stackoverflow question pointed me to http://isotope.metafizzy.co/ - their default "masonry" layout provided me something like
That seems much more likely to make a better use of space!

the poetry of technology

I found this Hugo Williams poem I blogged a long while back:
I phoned from time to time, to see if she's
changed the music on her answerphone.
'Tell me in two words,' goes the recording,
'what you were going to tell in a thousand.' 
I peer into that thought, like peering out
to sea at night, hearing the sound of
waves breaking on the rocks, knowing she
is there, listening, waiting for me to speak. 
Once in a while she'll pick up the phone
and her voice sings to me out of the past.
The hair on the back of my neck stands up
as I catch her smell for a second.
at the time I wrote how I loved that message she used. but now I'm struck what a beautiful, poetic, dramatic technology we had for... what, 20-30 years? From 1975 to 2005? The idea of screening calls live, the plaintive "if you're there, pick up... please pick up"... we've lost that! Arguably though it's part of the whole trend away from voice...