Toby's Log page 89

Just one day after writing that I would try to post once a day, I missed posting. Certainly contributing to my difficulties in posting is the amount of time I spend thinking about and composing posts. Sometimes when I have a topic that I could easily write a short post about, I have a desire to hold off until I can write a more in-depth version. But really, I’d prefer to write more and get my ideas and experiences out sooner, even if the results are imperfect and more open to criticism. I can always revisit later. If I don’t write when it’s on my mind, there’s a chance it just will never get written. I have tons of blog post ideas or partial drafts written down that are old enough now that I don’t remember enough about them anymore to easily write about them.

Also contributing to my difficulties is the never-ending stream of new blog posts and other information other people are creating for me to read. I tend to get sucked into reading them, ignoring getting my own things done. A while back, I wrote on my whiteboard “Less reading, more writing”. I haven’t been following that advice, but that’s part of my goal with this post-per-day idea. We’ll see how I do.


I am going to try to post something once a day for a while, either on this blog or my personal blog, even if it is just a short, tweet-sized post. I think posting helps me document what I’m working on, techniques, things I find, etc. for my future self to more easily find. It’s surprisingly easy to forget things when I figure them out for one project, then don’t use that same thing again for a little while. My site will eventually have something more advanced for these purposes, but for now simple blog postings will work.

Also, I’ve noticed a strange SEO / traffic benefit to my site wherein my traffic is much more likely to be on the higher side on the day or day after I post, even though those posts are almost never the ones being visited. Perhaps the search-engine algorithms see the site as more “fresh”, even though the articles that get the bump aren’t fresh at all.

The biggest problem with this is that even a post I intend to be quick often takes an inordinately long time as I look up things and add more to it. Like this post. We’ll see how well I do with my goal.


Web app manifest, first go

I’ve added a basic web app manifest to my site. I have not experimented with the results, but I did run it through a web manifest validator mostly to success. I used the MDN guide and the HTML5 doctor article for help. I also read some of the in-progress spec, though it seemed more implementer-friendly. The content of my manifest is currently (prettified):

{
    "background_color": "#4e784e"
    ,"display": "browser"
    ,"icons": [
        {
            "sizes": "64x64"
            ,"src": "favicon.gif"
            ,"type": "image\/gif"
        }
    ]
    ,"lang": "en-US"
    ,"name": "Toby Mackenzie\u0027s site"
    ,"scope": "\/"
    ,"short_name": "\u003Ctoby\u003E"
    ,"start_url": "\/"
    ,"theme_color": "#4e784e"
}

I’m just using Symfony’s JsonResponse object to render a PHP array.

This is one more thing that I really shouldn’t’ve put time into until my site is more fleshed out, but it seemed cool and simple to add.


Working with SVG Icons

At Cogneato, we’ve been using icon fonts for at least a couple years now. We recently started using SVG icons for a new part of our CMS that allows clients to pick icons from large collections for use in their content. Working with SVG’s is a bit different than with icon fonts, so I created some helper code to make it easy to get them in place, have proper accessibility, and

I like icon fonts fairly well, but there are some advantages to using SVG icons. For us, we were wanting to allow clients to pick from a large selection of icons from within our CMS. Requiring downloads of giant icon sets so they could have a large selection but only show a few on a page would be very bandwidth inefficient, and managing loading the set(s) a particular client wanted to use would be complicated. Unless they use a lot on a single site, cherry-picking each icon should use less bandwidth. This is easy to do with SVG’s.

There are many ways to use SVG’s, but when you need to be able to change colors based on context as we do, inlining SVG elements is the only (practical1) way. With them, you can use fill: currentColor; to use the text color of the container, which we need. Many SVG tutorials use SVG sprite-sheets and then inline spartan SVG elements that contain little other than the <use> element to reference icons from the sheet, saving size for repeated icons and potentially allowing the sprite-sheet to be cached. However, sheets have the same bandwidth management issues as the icon fonts. So I went with direct DOM insertion.

Continue reading post "Working with SVG Icons"

I Ohio voting in democrat primary

Today, “I Ohio voting”. I got in just about at the last minute. This time, for the first time ever, I took a party ballot for voting in a primary. I dislike the two-party system and how limited our choices are with effectively two not-so-dissimilar options. I think regardless of who is elected, more things that I dislike will come to pass politically than things I like. I don’t really want my name associated with either of the large, powerful parties that control this country. However, I kinda like what Bernie Sanders brings to the table, as compared to the other options. He was an independent for a long time, and still has that feel, at least as much so as a candidate can in this political environment. He’s down, but not out, so I figured I’d give him a tiny bit of help with a vote.


Firefox tag groups removed

Firefox tag groups / panorama has been removed from Firefox proper. Luckily, they’ve moved the official source to a separate project as an extension called Tab Groups. The extension seems to function the same and migrated my existing tab groups to without trouble.

I guess there is benefit to having less code in the core Firefox project to maintain, but this is one of those cool features that sort of set Firefox apart from other browser. There is a Chrome bug requesting a similar feature that has 356 stars and comments praising the feature. Development apparently stopped in Firefox years ago, so maybe this split could actually increase development, but there’s always the chance that it doesn’t get updated to work with a new Firefox version at some point and disappears. At least the code is on Github.

I think the features has issues, such as slowness, moving around of groups when resizing windows, and a bit clunky of a UI, but is the best option I’ve seen for dealing with large numbers of web pages and multiple topics, particularly in the short term. Right now, I have 383 tabs in 28 groups, plus a dozen or so tabs in two other windows. Some of them I probably haven’t looked at in years. I think for long-term storage, local or “cloud” bookmarks are the best way to go. I’d like to work on moving most of my tabs to my delicious account, or better yet, my own site, but even then, I will want tab groups for day-to-day organization.


Finding short TLD’s

I’ve been looking for a short domain to potentially use for permashortlinks. For a domain to be usefully short, it must have both a short TLD and short SLD. Having three characters each would make for seven total characters (including the period) for the domain. Much more than that and it starts to lose its usefulness. There are no one character TLD‘s (though they’d be great for permashortlinks). Two character TLD‘s are reserved for country codes. I’m a bit reluctant to use a code for a country I don’t live in, and the one I do disallows whois privacy. I’m a bit reluctant to decide that my address, phone number and email address will be “perma”nently available for all to see (assuming I keep the permanent promise of of permashortlinks). So three characters have been where I’ve been doing most of my looking.

There are a number of good lists of available TLD‘s. Indiewebcamp has a list of options with a brief blurb on their fitness and possible problems. It only has country code domains though. United Domains has a list with current TLD‘s and their prices plus soon to be available TLD‘s. It has a page for each with some information about the TLD and marketing-speak thoughts on uses. Name.com has a list with per-TLD pages as well that are often more brief. It’s hard to parse these lists to find just the short ones though.

I found two plain-text lists of TLD‘s (IANA’s and publicsuffix’s), which got me to thinking that I could parse these to find just the ones with three characters. I wrote a script in PHP and modified it to handle any number of characters. It looks like:

Continue reading post "Finding short TLD’s"

</toby>