First day of GiveCamp 2016. Working on the Cleveland Garlic Festival website. Seems like it’s going to be another relatively easy one, as I think the last few have been. We are rebuilding the site to run on WordPress and be responsive, plus other general improvements as we go. I’m on a team of four plus one organization representative. Things are going smoothly.
Toby's Log page 85
Library of Babel
Awesome, there is a digital version of the Library of Babel. Everything that you could ever write is in there, with some caveats. Caveats are that:
- each book is less than or equal to 1,312,000 characters
- it is in the English alphabet
- all characters are lowercased
- all non-alphabet characters removed except the space, period, and comma
Any searches would have to be translated to those specifications.
I found this through Jeremy Keith’s discussion of the anchor / link element.
The writings of Charles Dickens, Adactio, and myself can be found in there, many times over.
Today, I ran over and killed some sort of mammal with my car. It darted out from the side of the road and went under the side of my car. I only got a glimpse out of the corner of my eye. I didn’t get a chance to do anything before it went under my tire. I think it was a possum. I only remember killing a mammal once before, a raccoon at night when I was in high school. A sad occurrence. A side affect of our popular mode of transportation.
Quick regex to strip html tags
Recently, I needed to strip some HTML tags from some data. The goal was to make a field in a database that was a WYSIWYG text area into plain text content that could go inside a link. I did it using a simple regex of /<\/?[^>]+>/ to find the tags so I could replace them with an empty string. In PHP, this looked like:
$string = preg_replace('/<\/?[^>]+>/', '', $string);
This is perhaps a naïve implementation, but it served my purposes fine. Of course, I had totally forgotten about PHP’s built in strip_tags() function, but on comparing it, it also seems to not do exactly what I want. For instance, it seems to get rid of the content of <a> tags.
I finished reading Dune today (yesterday), except for the appendixes.
Continue reading post "#1182"This past weekend of three days was dominated by two things: reading of Dune and Independence Day events.
Continue reading post "#1180"I was relieved today (yesterday) to find out that a document from my health insurance company that said something about a claim being denied did not mean I owed $700+ dollars for some minor blood tests I got last year.
Library card for Dune
Got myself a library card today for the Cuyahoga County Public Library system.
Continue reading post "Library card for Dune"Abstractions: interfaces as lists, details, and flows
I read a post recently of Dave Rupert lamenting that he can describe any digital interfaces as lists, details, or flows. This is, of course, an abstraction. Abstractions can be useful for reducing complexity and making things understandable. In code, they also can be used to reduce duplication and provide reason for limited responsibility, improving maintainability. But if everything is fit into a small number of buckets, it can certainly make it seem like there is a lack of diversity, a sameness to everything.
With any good abstraction, everything can fit into it with a certain level of mental effort. Some might be more willing to go further than others to make a given classification work. In code, too heavy abstraction can lead to a given abstraction trying to do too much, or conversely, functionality being limited to fit a simple concept of the abstraction.
Continue reading post "Abstractions: interfaces as lists, details, and flows"Long day downtown today (yesterday). I took the day off for the Cavs parade, then went to an Indians game after. I may post more later, but to summarize: packed rapid transit, lots and lots of people, lots of waiting, lots of sun, hot, lots of walking, lots of garbage, saw a few Cavs players from afar, kinda heard some speeches, confetti and loud fireworks, saw people running from what turned out to be gunshots, large colorful animal statues, kid running across baseball field and climbing home run wall to escape into stands.