Replace Main Site? 2017

Been wondering the last couple of days if I should replace the main BootBlock.co.uk site with this, instead?

The main site was supposed to have a combination of quick updates like this and big, main articles - hence the Articles link on the side. But the problem is that the site feels too "bulky" and ill-suited to the quick-fire posts like these, so I'm wondering if I should just bin it and shove this in its place.

Would be a shame to lose some of the articles, though, such as the Learning to Drive series.

Need to think about it more; plus, if I do switch it over eventually, then they will be more content to see as I'm hoping to update this daily - if I do development every day.


Moved over to BootBlock.co.uk 2017

A little bit involved to do but now I've moved everything over from the previous sub-domain to here; new content will be gushing forth almost every day as opposed to the almost-yearly prior dribble.

I've integrated AdSense, although the block above is too tall in my opinion. I'd prefer a single-line height but Google doesn't seem to like that too much these days. Might as well keep it to a standard size.

Next up is sorting out the categories page so it makes sense and just generally works better. Maybe I made post categorisation too flexible...


Lost my First Post 2017

Yep, it was bound to happen - and it just did.

Wrote a large post on my keyboard and wanting a mechanical replacement and hit Submit with the appropriate Draft flag set so I can save it to the server in case I lost it. Then I lost it when the server gave me an error. That, my friends, is what you call irony.

Oh, and of course, I'm very annoyed right now.


New Sections on BootBlock.co.uk 2017

When I moved this blog thing over from the sub-domain, I kinda forgot that the main site had various links on it to different places such as the forums, my software, and of course to contact me.

Had a bit of a WTF moment the other day as I realised all of the said links were gone! No-one could view anything other than the absolute crud that I dribble onto here; it was only supposed to be a sub-domain and not the actual, main site.

Well. That changed.

I've now added a few sections at the top-right of this page; the main ones are links to my free and commercial software, and an area that contains contact information.

And I've just realised that this site doesn't say who I actually am.


Donation Page 2017

While I was fixing up an application that I hadn't worked on in a while, I noticed that it linked to a donation page on the previous blog. A donation page that no longer existed when I revamped things; I've just been sorting that out.

There's now a dedicated donate page and a link to it at the top of this very page.

I'm honestly not really expecting much from it as my software was donation-ware for almost 20 years and, well, it didn't exactly go very well. This forced me to finally start writing commercial software and stop giving it away for free. Well, there are "free editions" available so they can still be used for free if you don't require the more advanced features (and aren't particularly bothered about supporting the software). I couldn't bring myself to put the software entirely behind a paywall.

Shame, really.

(Incidentally, this is why there isn't a "next generation" of Comica as I can't really charge for it and I can no longer give away software for free)


Broken Pagination 2017

I was supposed to be doing smallish posts for this blog and so setting pagination to 40 posts per page seemed like a good number.

Except it didn't turn out that way; the posts are tending towards pretty large and so 40 posts was way too much. Far too much vertical text.

So I changed it to 20.

And then sorting broke.

When I originally started this blog rewrite, I couldn't get the posts returned in exactly the correct order due to the way collections et al work in Laravel, and I finally ended up doing a reverse() within the actual Blade template that displays all of the posts.

I then made changes to the Controller to reverse the results and in combination with the pagination, it went a bit... weird. Some more tarting around later yielded nothing helpful.

I remembered the stupid reverse(), ripped it out and - tada!

Now pagination is set to 10 posts per page.


Just a Test Post 2017

This is more of a test than anything.

Due to an explosive productivity growth on my part (oi - steady on), I'm finding myself typing these blog posts in advance. I'd rather have one large post per day than multiple in one go, possibly resulting in a couple of days without any new content. I'll still add smaller posts if I can actually think of anything.

This test is to ensure I haven't done anything stupid like assuming all posts are in a sequential date ordering; extremely unlikely, but always test. Test everything just to be sure.

There are two posts waiting to be made live as I write this very entry. It's going against the whole recap-of-the-day purpose of this blog, and I can see myself falling even further behind (or should that be ahead?); that is, I'm going to end up queuing posts for publishing days ahead. Not sure what to do about that.

I just can't stop raving typing!

Timed Publishing

I could do with setting a Publish Date on unpublished posts and have them go live at specified times. Except of course such functionality isn't present on this blog.

I'm on shared hosting, so I never really got into messing with Cron jobs.

I think Laravel has support for some time-based thing, but I'm not entirely sure how it can trigger itself. Must be based on visitor access - that's the only thing I can think of. If the site doesn't have visitors then the job would be missed... too unreliable in my opinion, so gawd knows.


Timed Publishing? In! 2017

Woke up yesterday morning and had a thought while I was on my way to the bathroom: timed publishing doesn't need to be Cron-based. Just set a date on the post and display that post if the current date/time is past it.

It seems I got somewhat fixated on the whole Cron job method of allowing posts to go live based on a set date and time that the obvious non-scheduled way of doing things just passed me by.

I spent yesterday getting the feature in and made it live. Posts are now displayed based in their (newly added) published_at column rather than created_at. Of course I had huge amounts of fun with timezones. sigh

I gave the site a quick test on mobile after someone mentioned it doesn't work. Seems it's just a minor formatting issue, at least on Android Chrome, involving the quote in the header at the top of the page. I'll probably just not display it on mobile browsers; presumably there's a mobile substring in the User-Agent header.

Didn't quite get around to sorting out the categories display (click on a category at the top of this post) and so viewing a category right now doesn't work quite how you'd expect. I probably should've gone with keywords rather than rigid main and sub categories.

Finally, I added a set of badges to posts so I can see at-a-glance if any specific flags are set rather than having to rely on remembering what their background colours denote.

Post Flags


Formatting Fix for Mobiles 2017

I was just about to go to bed and then thought it would be a great idea to jump right into PHP and sort out the mobile-issue with the quote above. D'oh.

Alright, the blue quote at the top of this page seems to be a bit too long for mobile browsers and overflows out of its header bar. The solution? Don't show it on mobile browsers - sorted!

Did a quick search to see if I could just detect mobile within the User-Agent and sort it that way. Instead, I found some library that kept getting referenced and decided to just go ahead and make use of it: the Agent library, with Laravel support - hurrah.

This somewhat goes against my own lightweight way of doing things, but presumably it's not quite as easy as detecting a mobile sub-string as otherwise why would there be a dedicated library for it? In fact, don't answer that.

Integrated it and all that and then the site stopped working due to an exception. Deleted the vendors folder from the server - which took minutes - and then re-uploaded my local version as no doubt something was missing. A few minutes later - it all works. Phew. Oh; as a bonus, a load of libraries also got updated with a quick composer update, so that's nice.

A quick addition of

if (!Agent::isMobile()) {

along with a change to remove the appropriate <span> and such, and it was all done.

Does it work? No idea. Haven't actually tried it on a mobile device yet (although inversing the logic works so I'm hopeful it's all fiiine) as my phone is elsewhere in the house. But, there are no errors and so worst case is that it makes no difference.