You Might Not Need JavaScript



(Depending on what browsers you need to support.) This is a nice resource that includes some pure CSS methods for features you'd typically build with JavaScript.

Resizing Images with Node.js

My fun with Node.js continues. Yesterday I put together a script to resize jpegs on-the-fly: imageSize.

As part of my c2bk program I've been revisiting this site and cleaning up pieces that have broken over the years. One of those pieces is a few dozen galleries of photos I posted here between 1999-2005. Before photo-sharing sites existed you had to do it yourself. The photos are small and not very good, but they are part of my history.

I added thumbnails for each gallery to my archive page. The images are small, but they're not thumbnail-sized which made that archive page inefficient to load. Picking those images out one by one and creating thumbnails seemed like a hassle. Even writing a script to do it seemed like it wasn't worth the time involved.

Then I thought, what if I could just specify the image size in the URL and have them automatically be the correct size? That sounded like a job for node.js and CloudFront. Resizing the image was quick work with sharp. It took a bit to get the URL path-parsing working correctly and to add some caching headers to the response, but then it was all set.

By putting this behind CloudFront, the images are generated on-demand when needed but should be served from Amazon's servers most of the time. Might be overkill for some thumbnails on my archive page, but it's a handy thing to have in my toolbox for future blog/photography experimentation.

Venomous Charlatan

George F. Will: Donald Trump is the GOP's chemotherapy. The last paragraph here burns so brightly with rage that it transcends rant and becomes oddly beautiful.

Scraping Together RSS with Node.js

The other day I was sitting around thinking about scraping a website (as one does) and I was frustrated by the complicated regex I was going to have to write to pick the data I wanted out of HTML. (Your classic two-problems problem.) So I started daydreaming about being able to scrape sites using jQuery selectors to get the elements I needed.

Then I thought, how about using a pure JavaScript environment like Node.js? I like servers and I like JavaScript, so it seems like I should like Node.js just fine. With a bit of searching I came across a great tutorial: Scraping the Web with Node.js and I was off and scraping. The cheerio module had already solved my jQuery selection problem.

At this point I could easily grab the data, but I was frustrated thinking about wrangling it into a consumable format. I was starting to get in the Node.js mindset and thought, "I bet there's a module that can help with this." A few minutes of searching later, node-rss was installed.

It took a bit of wrangling to get my first RSS feed going, but I was surprised at how quickly it all came together. It's not so different from firing up cpan and including modules in Perl scripts. But npm is just friendlier. Being able to run npm install in a new environment takes some the tedium out of your day.

So yeah, the Node.js script I wrote goes out and fetches Likes (favs, stars, hearts, etc.) from Medium, Twitter, GitHub, and Hacker News and returns RSS feeds with those likes. This lets me bring all of my favorites from those places into one spot where I can then do other things with them, hooray! I put the code up on GitHub: Recommended RSS.

Then with the help of forever I set it up as a service and I'm aggregating away. My to-do list for this little app includes caching and handling dates. I wonder if there are modules for those.

IP Spoofing, DDoS, and Centralization

Strange Loop IP Spoofing Talk

An engineer at Cloudflare shares some data from the front lines of fighting DDoS attacks. He also makes the connection between DDoS and service centralization and offers some potential solutions. (Unfortunately I don't see any incentive for big companies to fix this problem.)

Indie Hackers



Talking about money in public is awkward but so helpful and necessary to independent developers. Indie Hackers looks like a great attempt to pool some collective knowledge. [via anil]

Prime Reading

If you're an Amazon Prime person you might want to head over to their new Prime Reading to see what's available. They've made a bunch of Kindle books, magazines, and graphic novels free for Primesters. If you need a place to start you can't go wrong with classic Moebius or early Peanuts.

RadioPublic: Podcasting Still Needs RSS



Really nice to see PRX's RadioPublic using RSS and open standards to extend podcasting rather than working to lock people into a particular client.

False Depth, JavaScript, and Surrealism

I didn't want an iPhone 7. I mean, I don't want one. The improvements are incremental at best. And that fake depth of field!? That's gimmicky, right? You can't simulate beautiful bokeh. You need heavy glass. Then I read this take: iPhone 7 Plus Depth Effect is Legit. Hmph.

Ah, front end JavaScript frameworks. Let your heart soar as you read how they've been rated in The State of JavaScript 2016. Then cry tears of knowing sorrow as you read How it feels to learn Javascript in 2016.

Speaking of surrealism, Salvador Dalí keeps appearing in my news. Taschen is republishing Dalí's 1973 cookbook. A cookbook? What's next? Finding out he had a long lost collaboration with Walt Disney at some point in 1945? And that it has been reconstructed for viewing on our personal screens? Yes:

And and?! He illustrated a version of Alice in Wonderland? Yes. Or is it all Mirage?
flickr photo
Grey Greenhouse
flickr photo
Filbert Bin
flickr photo
Pumpkin Time

Link Finders

The latest episode of Reply All is all about online scams: #78 Very Quickly to the Drill. As a balance to all of the scamminess mentioned, they talked about a service called The Ring Finders. It's an organization that lists people with metal detectors across the country who will help find lost wedding rings. It was a great way to end the episode, and a good reminder that lots of people have the impulse to help—and people can get problems solved with that help.

That train of thought led me to the idea that there should be a website called The Link Finders. There's nothing more frustrating than knowing you've read a certain article or seen a certain piece of information that you can't find again. I wrote about some strategies for finding lost sites in 2006: Finding Lost URLs. It's a recurring theme in MetaFilter's backchannel, MetaTalk. There are two of those types of post on the front page as I type this: someone read something on MetaFilter somewhere, they've tried their personal searching bag of tricks, they come up empty, and they need assistance finding it.

Seeing that process in public is satisfying. Someone has a specific problem, others chime in with suggestions, and most of the time the person finds their bit of info. If the information is also of interest to you it's even better. You get randomly referred to a link you might not have seen otherwise and you get a sense that there is justice in the universe.

Lazyweb, go!
flickr photo
Morning River View

Burning Man Sunrise Set by Tycho

This set made my day and I'm not sure how but that last track was perfection. Thanks, kottke!
instagram photo
new donut shop! 🍩

c2bk Infrastructure Report

Infrastructure updates to this blog continue apaceish:
  • HTTPS1 on at all times
  • Emoji everywhere
  • Friendlier URLs for posts with slugs
  • CSS now SASS-y
  • Super modern git and CDN deploy process with a bash script
  • Cutting edge access reports with analog
  • Most recent CodeMirror for textarea while composing posts
  • Deferred loading of video embeds
  • Bug fixes and performance improvements

And for fun here are the services I use for this site:
I still feel more couch than blogK at this point, but ticking off items that have been on my to-do list since the early part of this century feels good.

1 Proper pronunciation?
2 The hovering businessman emoji's ska roots.

Election Profit Makers



Someday this election's going to end...

And when it does, the Election Profit Makers podcast will end. But today is not that day. When life hands you election absurdity, one response is to transform it into better absurdity. That's EPM: better absurdity. If you're not already gathering intel and riding those waves, it's time to invest while you still can.

Old Geek Jobs



This site that sprang out of a Hacker News discussion of a Tim Bray post is relevant to my interests.

Lake Street Dive, "What I'm Doing Here"

Wednesday night moment of zen. You might need a chaser.

Facing Fear



danah boyd on what the traditional media can learn from the internet: don't feed the trolls.

Let's Encrypt

I'm a big fan of Let's Encrypt. They made the task of setting up and maintaining SSL/TLS certificates—a process more convoluted than it should have been—into something simple. I've been using it for the certificate here and for several other sites for quite a while now and they have a solid process.

To top it off, their certificates are free (as in beer). They have taken away most of the excuses people use for not making their sites secure. (If you care about Google rankings you probably moved to a secure site years ago. If not, the time is now.)

All of this free goodness isn't free. They just shared their operating costs and are asking folks to donate to help keep it going. Even if you don't use their service directly, there's a good chance some of the sites you frequent do. I think it's worth supporting a more secure Web.
instagram photo
morning jade

c2bK: Comment Emojification

As part of my Couch to BlogK program (c2bK), I'm making some infrastructure improvements around here. This blog uses some home-rolled PHP, a handful of Perl scripts for snagging photos from other services, and love. I figured suffering the slings and arrows of a public commenting system would help me stay on task, but my old commenting system felt a bit dated. I knew there was only one thing that could bring my weblog comments into the Slack millennium: emoji.

I don't have research to back it up, but I'm fairly certain that kids these days don't even use text. They share pictures and write elaborate encoded messages with a set of pictograms that communicate with more verve than the stolid word. Who am I to fight against a tide of verve?

Once the decision was made, I thought it was just a matter of making sure my database was using a character set that could handle emojis and I'd be off to the races. Iñtërnâtiônàližætiøn is a solved problem! UTF-8 has solved everything! Well...

Using emoji on your phone is easy. Using emoji on your desktop is not as easy. And even though I'm bringing this website up-to-date for the kids who might not even know what a desktop is, I'd like our elders to be able to participate in the fun. Building my own emoji-selection contraption felt like a tall order, but I google stumbled on wdt-emoji-bundle by Nedim Arabacı which did most of the heavy lifting for me. He was inspired by the Slack emoji picker which translates emoji into a colon-delimited short name that can mingle easily with text.

That led me to Slack's own Cal Handerson's project emoji-data that is the rosetta stone of emoji. You see, different device manufacturers use different codepoints to represent the same glyph. So even if you're storing the incoming emoji characters correctly, not everyone would be able to see, for example, Down-Pointing Red Triangle on the other end. emoji-data does the work of saying that Android's arrow is here, Apple's arrow is there, and you don't need to just give up on people being able to emoji together.

(This doesn't even touch on the problem of different visual implementations across different emoji sets.)

Instead of storing the universal emoji characters, I opted to store the short name as plain text and then do a bit of translating on the other end. Another of Cal Henderson's projects, php-emoji made it easy for me to write some quick translation functions and then I really was off to the races! (No, I don't have emoji implemented for posts yet.)

Long story short: emojis are hard, this hand-coded blog now has a comment system with a Slack style emoji menu, support for emoji short code text, and a bridge to interface with the Snapchat generation thanks to folks like Cal and Nedim sharing some of their work in public.

And all of that means I'm on my way to blogK.
instagram photo
sci-fi & fantasy