Matthew Lang avatar

Matthew Lang

Web developer amongst other things

Micro Monday shout-out to my writing prompt generator on Micro.blog, @penmuse.

Start that novel

Nicholas Bate has the steps you need to start that novel.

Just what we need, more guns

I’m not surprised it’s being suggested by Trump that they need to arm teachers in schools.

Rather than making schools safe areas to learn, aren’t they just going to be turned into places where kids fear for their lives? Arming teachers is one thing, but in the heat of the moment, can armed teachers react in the same way that the police should?

John Gruber also linked to an article describing the devasting effect of AR-15 bullets on the organs.

More guns is not the answer.

I’ve been moving a few newsletters so that they’re sent to Feedbin. Amazed by the amount of newsletters that don’t allow you to just update your details.

Unsubscribing, finding the landing page and then subscribing again is quite a chore for a few newsletters.

Great to see Ethan making progress under the watchful eye of club professional Andy Carlton. More work on the short game this week with great results. šŸ‘šŸ»

Looking forward to more nights like this when I can get both the boys out on the course.

Forgot how great the Silent Alarm album by Bloc Party is šŸŽµ.

Using Stimulus in PenMuse

It’s been a while since I dabbled in a bit of JavaScript. It’s not that I don’t like programming in JavaScript, it is growing on me, it’s just I’ve never found a real use case for it in a web application. The thing about JavaScript though is that there are so many great frameworks available that mean you often don’t have to write any of the curly bracket stuff.

Vue.js has been on my radar for a while but what has really grabbed my interest has been the release of Stimulus.

For a lot of web applications I work on, I don’t want to re-write a whole view for a particular framework, I just want to enhance a part of that view. Both the above mentioned frameworks do this, but I decided to try and use Stimulus with a web application of my own just for fun.

The copy to clipboard is a nice example to start from in the Stimulus handbook and so I started with this basic example by adding a copy to clipboard button when displaying a writing prompt in PenMuse. Not only was it good to broaden my reach beyond the Rails code that I am used to writing, I also got to experiment with WebPacker as well.

The final results are good and there was a few hiccups along the way in trying to copy the prompt from an input element that didn’t interfere with the user interface.

I did at one point create an input elemement on the fly to copy the prompt from when the button was pressed, but it jerked the screen up and down on tablet devices as it was copying the prompt. Horrible.

I decided to settle on using an input group so that you can partially see the prompt being copied. It’s not ideal, but it’s working and it doesn’t mess with the screen in anyway on different devices.

I’ve still got some adjustments to make for smaller devices like stacking the buttons on the home page so that they appear as a column but that will come later in the week.

Robots opening doors? Calm down people, we’re a long way from Skynet happening.

I could really do with a col-md-1.5 class about now. #webdevwoes

So, even with the night shift on, iPads aren’t good for night time reading. Already thought this would be the case. Just as well I prefer to read my Kindle at night.

Great to see the snow didn’t put Drew off from his golf yesterday.

Snow! What snow?

Would you download an app that wasn’t on the App Store and didn’t have any developer credentials (name, company etc) against it?

Feels good to be starting another Rails project. I’m hoping this one runs for a while, but I really need to spend more time on throwaway Rails projects and learning more about things like ActionCable and Turbolinks.

Write daily

Nicholas Bate with a run down on being happy. Writing daily is just one simple part of it.

Write daily about what is working so that you observe, notice and appreciate it.

— Basics 7: How to Be Happy by Nicholas Bate

RSS discovery

A common observation around the slow uptake of RSS readers is that RSS is still something that people don’t understand.

RSS readers often rely on the user to add the feeds that they want, but unless users know where to look then users may be turned off by an RSS reader. A blank page with no suggested or recommended feeds in it isn’t going to demonstrate what an RSS reader can do.

I’ve noticed that podcasting apps like Overcast and Pocketcasts include discovery sections that show you podcasts that you can subscribe too. They provide recommended and categories sections that people can click and find out more information about that podcast. If they like it they can subscribe.

Perhaps it’s not only about adding subscribe buttons to our sites but also making RSS readers more user friendly by adding RSS discovery so that people can find the content they want.

_If my memory serves me right, Feedly does include such a discovery feature, so thumbs up to them! _

Despite a few attempts this week and last week at using VS Code, I keep coming back to Sublime Text. I think if I had a severe problem with using ST then I would make the switch, but as it stands, it just works.

If it ain’t broke, why fix it?

Move to Jekyll complete

Last night I finally pulled the trigger and moved my Ghost hosted blog to Jekyll. While the cost of running a managed blog was the most significant influence on the decision, there were other factors as well.

Easier writing

Ghost had been a promising idea when it started a few years back. A blog where the focus is on the act of writing. And it started well. The two-pane design with the plain text on the left and the rendered post on the right was great and allow you to see the post in real-time. In a recent change though, the Ghost decided that using a single pane with a WYSIWYG writing pane was more beneficial. The old two-pane environment was still there but just hidden away.

I’ve been looking to do more with my iPad Pro. I’m already using it for remote development work and a fair amount of writing, reading and listening. Unfortunately, a down-side of Ghost’s new writing pane made using the iPad Pro impossible. Characters were rendered twice with each keystroke, and I was unable to even copy and paste a blog post from another app such as Bear or Ulysses. In a recent update to Ghost this bug is fixed, but such a breaking change made me question why I was reliant on a product that prevented me from writing.

With Jekyll I can write anywhere with any app that I use daily. I can even write the post straight into my GitHub repo through my browser and save the changes which will automatically publish to my blog. The only thing that will stop me writing and publishing is whether I’ll have a connection to the Internet and in this day and age, that’s becoming such a rarity.

More control

With a move to Jekyll, I’m also able to make changes to the layout of my blog in a much easier way than if I was using Ghost. With Ghost, you need a local working environment first to make your theme changes. Setting up a local environment is reasonably straightforward, but keeping it up and running is not as simple as Jekyll. With just a single command I can have my blog up and running on my browser, and I can make any changes I need to the layout. There’s a small number of dependencies to getting my blog running, and it only requires some flat files for content.

I’ve also got more control over the photos I use on my blog and where I host them. I can either include the images in my blog directly or upload them to another hosting service like Amazon S3 where they’re still in their original format and I can export them if I need too.

Tried and trusted

My days of being wowed by-products such as Ghost are probably over. Tried and trusted products that are simple to manage and let you own your data are two significant factors for me. Ghost looked to be simple, to begin with, but even now there’s still a large number of features that many other bloggers take for granted from their chosen CMS. I’ve tried Jekyll in the past, and now I wonder why I didn’t stick with it.

Data is always a significant factor with me. The export facility of Ghost is excellent, and they were able to allow me to download all the images for my blog through a separate link as well, but I don’t think that’s enough. A single zip file containing all data including images would make things so much easier.

Manton Reece has an idea for this, and it looks promising, but getting the more prominent companies to adopt this is another matter.

With Jekyll though, I can always trust in the fact that my data is there in the purest form needed and that’s in plain text files.

That painful moment when you realise that the reason your JavaScript isn’t working is because is you have a typo in your elements id attribute.

The return of the subscribe button

The subscribe button used to be everywhere on the Internet. It’s about time it made a return

Every blog should have a Subscribe button. In an open ecosystem this is a problem, a problem that silos don’t have. Which is the advantage Twitter (a silo) has over the open web.

— Scripting news

Important things

Michael Wade provides another gem of being productive.

One important thing today, that will put this day far ahead of days when you hoped to achieve much but scattered your focus on trivial matters.

— If You Do … by Michael Wade

Me? I’m just looking to complete that one important thing a day.

A Wishlist for Micro.blog

Micro.blog has been getting some great updates over the last couple of weeks and I’m looking forward to seeing more improvements to come. In using Micro.blog to migrate some content from another blog, I’ve been compiling a list of features I would like to see added.

Optional cross-posting to social media

One thing that puts me off post to Micro.blog more frequently is that I have my account linked to Twitter so that it syndicates my posts to Twitter. Lately though I’ve felt that I don’t want everything to be published to Twitter, but at the same time I don’t want to turn off the cross-posting to Twitter as every dollar helps keep Micro.blog going.

In the interests of being able to comfortably post more often though, I’ve disabled cross-posting to my Twitter account. If I want something to show on Twitter, I’ll post it there myself.

All this though leads to one thing I would love to see in Micro.blog and that’s the ability to opt-out (or in) to cross-posting with each post that I write. This is perhaps the biggest feature request of the three as it involves changes on the web client and the two native clients.

Posts searching

A couple of weeks I decided to import over 1700 posts from my Ghost blog to Micro.blog. The import went fine and after seeing the posts on my blog I was quite happy for everything to sit there. The only problem though is that the archive is difficult to navigate with such a large volume of posts. Most people might not have this amount of posts, but it would be nice to have a search feature on the posts page in the web client to allow people to find specific posts that they want to update.

Post length separation

Micro.blog allows two types of posts. Short posts that are 280 characters or less and longer posts that can have an optional title.

It would be great if these types of posts could be separated in the generated micro-blog site with class names in the CSS for each type of post. These same class names could be used in the custom CSS section of Micro.blog to to override the styling of posts depending on their length.

You don’t ask, you don’t get

Maybe these things are already being considered and maybe they’re not. I know Manton is always chiming in on his timeline and is very active on Micro.blog’s Slack channels as well. So this is me asking. So how about it @manton?

I think the Frontlines series might be a good read while I wait for the last two books in the The Expanse series.