Skip to content

Author: lafnlab

Michael Hawkes is a professional computer technician who writes open source PHP code as a side hustle, and spends the rest of his spare time playing with his cats, working in the garden, and attempting to learn the violin. He is the sole-proprietor of 10th Street Media, LLC.

Protocols

There are a lot of different protocols on the web (XKCD sums it up nicely). Basically, every big company has their own way of doing things making stuff easier to find, or putting stuff in context. The three protocols below are encouraged by different major tech companies, though they all kind of do the same thing.

  • Open Graph protocol: http://ogp.me/
  • Microformats: http://microformats.org/
  • Schema: https://schema.org/

The protocols below are used by different projects on the Fediverse.
OStatus protocol: https://www.w3.org/community/ostatus/wiki/Main_Page
ActivityPub: https://www.w3.org/TR/activitypub/
Zot: https://project.hubzilla.org/help/en/developer/zot_protocol
Diaspora: https://diaspora.github.io/diaspora_federation/

OStatus is an older protocol and is mainly used by older projects on the Fediverse, such as GnuSocial.

ActivityPub is a newer protocol which has been adopted as a standard by the W3C, giving it some authority over the others. It’s mainly used by newer projects, such as Misskey, and it’s the one I’ll be focusing on in Amore.

Zot was developed by the Hubzilla project, but is also used by Osada.

The diaspora* protocol was developed by the diaspora* project, but is also implemented in Friendica.

Some Fediverse projects, such as Mastodon and Pleroma, implement multiple protocols, usually to include OStatus, ActivityPub, or both.

Rabbit holes

Several years go I used to get sucked into the rabbit hole that is Wikipedia. I used to visit its Main Page, then click on some random link, go to an article, and get caught in this loop of clicking random links and reading random articles. It was exciting and it felt like I was absorbing all this valuable information when most of it was, in fact, useless.

Lately, my latest rabbit hole has been to go to fediverse.network or the-federation.info, and find random Fediverse instances to visit. I imagine this is what it felt like when Facebook and Twitter were still new and shiny and trusted by their users.

For what it’s worth, Mastodon runs more than 70% of all Fediverse instances.

Cool feature of the day: Some Mastodon instances have public membership lists, like this one at mastodon.social.

That’s Amore

When the site you visit first
Is on the Fediverse,
That’s Amore!

It’s almost winter break, so it almost goes without saying that I’ve been thinking about a project to keep me from getting bored. Over the past month or so I’ve been looking at the Fediverse and the projects associated with it. It sort of started with Twitter and Facebook clones, but it’s really taken off over the past couple of years due to Mastodon. Since finding about the Fediverse, and after trying and failing to get along with GnuSocial, the idea of creating my own version started taking hold.

But that would be too simple. Since there are already a bunch of applications that play in the federated universe, surely I could find one that suited my needs. Alas, that’s not the case. None of the applications I looked at had simple installation instructions. Some of them even required specific usernames on the server in order to run (Yes, PeerTube, I’m giving you the evil eye). Ideally, I want a web-based application that can be installed and running in under five minutes. While I’m willing to take an hour or two if I think the software is worth it, most Fediverse friendly applications don’t seem worth the effort.

Not finding an admin-friendly application, I decided to create Amore, an open-source, Fediverse friendly, microblogging and dating application written in PHP, using MySQL/MariaDB. PHP and MySQL are at the backbone of millions of websites, including Facebook, Wikipedia, Wikia, and any website running WordPress, so it’s only natural to expect to find a web-based application that uses them. Applications that run other languages or use other databases create hurdles to use.

With regard to social media, I like Twitter a lot. I’m on it nearly every day. I like the character limit, since it forces people to get to the point. Plus, it’s easier to be witty in small doses.

If all of this wasn’t difficult enough, I also want the software to function as a dating site, though the implementation will be left up the individual website owners. I’ve tried a lot of dating apps and websites, and I’m usually disappointed by them. I understand, most dating websites only exist to make money for the owners. If there’s no profit motive, the website/app wouldn’t exist. In contrast, most Fediverse websites are run without ads, either relying on donations or being run out of someone’s pocket. To me, a dating website that runs without ads, or without requiring paid memberships would be great, but it leads to a potential problem.

An ideal dating website/app has millions of active users all around the globe. However, unless it’s owned by a billionaire, it’s hard to imagine it getting by without ads or paid memberships. Millions of users means a lot of servers, a lot of bandwidth, and a lot of money to keep running.

I’m hoping that the decentralized nature of the Fediverse – combined with easy to install, setup, and use – will encourage website admins to consider running Amore, preferably without ads or the need for paid memberships.

Despite all that, Amore is still very much alpha software. It’s not suitable to be run on a production website. It lacks many features found on most CMS software, let alone any Fediverse apps, or dating applications.

Mycroft AI

Today I found out about Mycroft AI, which is an open-source answer to Alexa, Siri, Cortana, and OK Google. Like its proprietary competitors, Mycroft will listen to your commands and do stuff for you, such as setting an alarm, playing music, telling you the weather, getting stock quotes, and so on. Unlike its proprietary brethren, Mycroft won’t analyze this information to play targeted ads for you.

I haven’t installed it yet because I’m still looking into it. I have a lot of questions that I still have to find answers for. For example…

I have a Linux laptop that I use pretty frequently, plus an Android smartphone, a Linux PC in the home office, and another Linux PC being used as an entertainment center. My first question is whether I should us a different wake word for each device, or use the same one for all of them? Is it like the issue of password reuse, where it’s more secure to use different wake words?

It’s an interesting idea, so I hope they keep the development going.

Max Social

Reading this article about how the “short-term, dopamine driven feedback loops” created by social media giants are killing normal discourse, it makes me wonder how to fix it. Maybe if Facebook, Twitter, etc limited people to a maximum number of friends/followers, it would introduce a check in the system.

I normally use Twitter, so I’ll use their terminology for this. Let’s say everybody can only follow 500 people, and that they can only be followed by a maximum of 500 people. By limiting the number of people you follow, your diet of tweets is limited only to those Twitterers. That extra cute video of your kitten playing with a puppy can still go viral, but it’ll take longer to happen.

With a maximum limit on who we follow and who can follow us, we’re forced to do some picking and choosing. I think most people would follow close family members and allow the family members to follow them, and there would probably be something similar with coworkers (or maybe not). But for the rest, who would you follow? Politicians? Celebrities? Athletes? Artists? Conversely, who would you let follow you? Former classmates? Fellow hobbyists? Advertisers? Co-religionists?

Do you follow someone who seems to have gone off the rails and started relentlessly tweeting about pigeons? You can unfollow him. Do you follow an aunt who never tweets, ever? Unfollow her and follow someone more interesting.

Introducing maximum limits into social media would be an equalizer, since the cashier at the deli around the corner could have the same number of followers as the leader of the country.

Just a thought.

Move it on over

Today I’ve moved my website from Site5 to Dreamhost.

It’s not a decision I made lightly. because moving a site, with all the posts, media, etc is pretty complicated. But for roughly the same price, Dreamhost seems to offer better service and more amenities. The thing that really got me was that Dreamhost offers free SSL certificates from Let’s Encrypt, while Site5 seems to be dragging its heels on this. I suspect Site5 views SSL sales as a profit center. Regardless of whether that’s true, it’s hard to turn down free SSL certificates, thus the move to Dreamhost.

Review Haiku, again

Over the past year or so, I notice I haven’t been writing as many Review Haiku. There are a few reasons for this. One reason is that I wasn’t very satisfied with the most recent method of posting them, where I created a static PHP page for each review. While it’s good(-ish) if I want to compile them into an EPUB in the future, it’s also tedious.

Another reason is that I’ve been binge-watching TV series on Netflix and Amazon, and haven’t been watching as many movies. Very few TV series are worth creating a haiku for each episode, so I end up watching a lot of material for very few haiku.

There’s not much I can do about the latter issue, but I think I’ve fixed the former. Recently I took a class at Udemy on WordPress theme development and it was very informative. Since then I’ve created a custom theme, with a custom post type (review) and custom taxonomies for the post type. This past week I’ve been entering the older Review Haiku into WordPress and this page is the result. I hope you enjoy them.

JavaScript Coding Challenge 1

JavaScript Coding Challenge 1

For a long time, JavaScript was a programming language I tried to stay away from. It’s notorious for being insecure, but maybe a lot of that is due to sloppy coding by some of the people who use it. These days, however, it’s nearly everywhere, so it’s hard to escape. When creating websites, it’s considered as essential to know as HTML and CSS. Recently, I noticed Udemy had a sale on virtually all classes, so I signed up for The Complete JavaScript Course: Build a Real-World Project. I’ve only been doing it a few days, so I’ve got a long way to go. Of the 113 lectures, some of them are called “Coding Challenges”, where the student tries to write a project based on what has been taught already.

Lecture 14 is Coding Challenge 1. The challenge is a simple game between two players. Each player takes their height in centimeters and adds it to five times their age, and the winner is the one with the highest number. To make the game a bit more complex, a third player later joins the game. The code below is my solution.

// simple game
// highest value of height (in cm) and five times age wins

var playerOneHeight = 180;
var playerOneAge    = 26;
var playerTwoHeight = 190;
var playerTwoAge    = 22;

var p1Score = playerOneHeight + playerOneAge * 5;
var p2Score = playerTwoHeight + playerTwoAge * 5;

/*
if (p1Score > p2Score) {
    console.log('Player One wins');
} else if (p1Score < p2Score) {
    console.log('Player Two wins');
} else {
    console.log('Players One and Two are tied');
}
*/

// make it more complex
var playerThreeHeight   = 176;
var playerThreeAge      = 54;

var p3Score    = playerThreeHeight + playerThreeAge * 5;

if (p1Score > p2Score && p1Score > p3Score) {
    alert('Player 1 wins!');
} else if (p2Score > p1Score && p2Score > p3Score) {
    alert('Player 2 wins!');
} else if (p3Score > p1Score && p3Score > p2Score) {
    alert('Player 3 wins!');
} else if (p1Score === p2Score && p1Score > p3Score) {
    alert('Players 1 and 2 have tied!');
} else if (p1Score === p3Score && p1Score > p2Score) {
    alert('Players 1 and 3 have tied!');
} else if (p2Score === p3Score && p2Score > p1Score) {
    alert('Players 2 and 3 have tied!');
} else {
    alert('All players have tied');
}
    
 console.log('Player 1: ' + p1Score + ' Player 2: ' + p2Score + ' Player 3: ' + p3Score);

I’ll post more of the coding challenges later.

Attic Insulation

As mentioned in the previous post, the attic of my house had virtually no insulation in it. Indianapolis is sort of in a weird place when it comes to weather. We don’t often get heavy snowfalls or bitter cold in the winter, however, they do happen every so often. Since heat rises, an uninsulated attic lets out a lot of heat. Adding insulation is like putting a thick quilt over the top of the house, trapping most of the heat underneath it, which is what you want in winter. By trapping the heat, the heating bills should be lower. So the theory goes, at least.

In fall of 2016, I started looking at insulation, hoping to install it before winter. My first choice was to get insulation made from recycled denim, but it isn’t carried by stores in my area and getting it shipped to my house would have been prohibitively expensive. Fiberglass insulation is also expensive, but it’s available almost everywhere. Reluctantly, I decided to go with fiberglass because it’s cheaper and more commonly available. The final product I chose was Owens-Corning kraft-faced R-38 batts. Each floor of the house is a little over 800 sq ft, so I planned on getting that much insulation. Since each pallet of insulation covers approximately 320 sq ft, I bought two pallets and planned on seeing how much I needed after going through it all.

The House

Home Sweet Home
Home Sweet Home
Last spring, I bought a house in the Haughville neighborhood of Indianapolis. It’s a two story house in the American Craftsman style and was built in the 1920s. Though the house has been well-maintained and is very livable, with a house this old, it’s not surprising it needs some work. As I do new projects around the house, I’ll post about them, along with pictures. But before I do that I want to write a bit about the neighborhood, in general, and the house, in particular.

I moved to Indianapolis in March of 2000, and prior to the move I’d lived in Colorado for more than 20 years. I didn’t know anything about Indy, but I knew that if I wouldn’t be able to see mountains, I wanted to live in an urban area, where the tall buildings would block the mountainless view. Basically, I didn’t want to see that the mountains weren’t there. Weird logic, I know. Upon moving to Indy, I got a 500 sq. ft studio apartment in downtown Indy at the corner of 13th and Pennsylvania (around the corner from the President Benjamin Harrison home). It was a nice place, but rather basic. Rent when I first moved in was $325 per month. And life went on.