LRUG talk: "Patches Welcome!"

Posted by Denny at 22:00 on Mon, 09 Nov 2020

I gave a talk at LRUG tonight. The title I went with was "Patches Welcome!", although a more prosaic title could have been "Why I do open source software development". It covered how I got started in open source and what I learned from that (professionally and philosophically), as well as what I'm currently working on (ShinyCMS, mostly!) and how I can use my own projects to help other people.

LRUG recorded the talk and have shared the video:

Sidekiq Status

Posted by Denny at 19:46 on Wed, 04 Nov 2020

Sidekiq Status web dashboardI've just added the Sidekiq::Status gem (with appropriate config), and hooked it into the jobs that rebuild the blog/news feeds and send newsletter emails.

If you have longer-running jobs (sending to a big mailing list, for instance) then while those jobs are running you'll be able to use the new 'Statuses' section of the Sidekiq web dashboard to see details of what Sidekiq and ActiveJob are doing 'mid flight'.

Spam, spam, spam, egg, chips, and spam

Posted by Denny at 18:55 on Sun, 01 Nov 2020

I recently enabled the contact form on this site, but I soon realised that I had missed out an important feature when I wrote the ShinyForms plugin. A large number of spambots were kind enough to bring this mistake to my attention, and that's why today's merged PR adds reCAPTCHA and Akismet protection to ShinyForm submissions.

Update, two days later: Apparently I rushed that feature a tiny bit, in my haste to defend my inbox. Here's a PR that fixes form recaptcha, and adds form mailer tests.

Paginate All The Things

Posted by Denny at 01:04 on Thu, 22 Oct 2020

In a tidal wave of copypasta, I just added admin pagination and search routes for All The Things - mostly because I tripped over the docs for route concerns while I was looking for something else, thought they sounded good, and wanted to try them out :)

Generating a documentation website with MkDocs and GitHub Pages

Posted by Denny at 23:56 on Sun, 18 Oct 2020

Screenshot of docs websiteToday I merged PR #661 - Did Somebody Say Documentation?

The highlights of this PR are:

  • Each major feature and each plugin now has its own Markdown documentation file in the /docs folder
  • The new ShinyCMS documentation website is generated from the files in /docs, using MkDocs

The docs website is hosted on GitHub Pages, which is pretty straightforward to set up and keep updated with MkDocs. When I run 'mkdocs build' MkDocs generates a HTML version of each of my Markdown docs (applying my chosen theme at the same time), and puts them all in the /site directory. When I run 'mkdocs gh-deploy' it pushes the contents of that directory to the special gh-pages branch that GitHub Pages serves the site from.

The only fiddly bit was preventing CircleCI from trying to run my tests on that gh-pages branch, as they would fail spectacularly on account of it having no actual code in it. The solution I went for in the end was to put a minimal 'do nothing' CircleCI config in /site; MkDocs kindly leaves this in place when I run 'mkdocs build', and then pushes it up along with the rest when I run 'mkdocs gh-deploy'.

Help offered to new programmers

Posted by Denny at 10:10 on Sat, 10 Oct 2020

I got a Google alert today letting me know that GitHub had automatically created this page encouraging people, especially less experienced people, to get involved with the ShinyCMS-ruby project - triggered by my tagging a few issues as 'good first issue'.

This made me wonder if there was anything I could do to further help and encourage anybody who's thinking about picking up one of those issues, but maybe isn't quite confident in doing so. I've always admired the way the Dreamwidth project brings new people into open source development and gives them a really positive start - I don't imagine I'll be getting quite as much interest as them :-p but I'd like to do whatever I can if anybody out there is interested. I was helped by the community on freenode a huge amount when I started out many years ago and I'm always looking for ways to pay that forward! In my day job I spent most of the last four years leading a team of 6-8 developers, and one of my favourite things about that role has been mentoring people who are just starting out in their careers. I'd love to use that experience to help people who are taking their first steps into the open source community. :)

So, tl,dr; if you're new to programming, and you'd like to try to tackle one of the issues on this project, but you're not quite sure whether to go for it - please get in touch. I will be happy to help you in any way I can - whether that's talking the issue through in more detail so you're sure you understand it, helping you think about how to approach the problem, pair coding with you to fix it together, or any other way I can help - whatever will make you feel comfortable to give it a go!

First birthday!

Posted by Denny at 22:07 on Thu, 01 Oct 2020

Photo of lit candle shaped like a number oneToday is the official first birthday of this project!

(I actually started a few days before October 1st last year, but I've decided that running 'rails new ShinyCMS' and then trying to fix all the rubocop errors in the Rails boilerplate don't count as 'starting' for purposes of having a nice neat birthday date) :)

I'm pretty pleased with how it's going so far. Although initially I wish I'd realised this anniversary was coming up a bit sooner, as I would have tried to knock a few more things off of the list of "features the Perl version has and the Ruby version doesn't (yet)". Instead I've been doing a bunch of refactoring lately, and actually I have zero regrets about that - one of the great things about this project is that I'm getting to refactor a lot, and it's made a significant difference to how happy I am with the system - both at a zoomed-in and zoomed-out level.

Massively Increased Test Gravitas ;)

Posted by Denny at 07:08 on Tue, 10 Mar 2020

Today I replaced most of the Faker calls in the tests with CultureSeries.culture_ship, for great Banksian joy :)

Although I did this purely for the geeky love of the Culture books, it did actually flush out a few flaky tests - ship names containing apostrophes tended to break any tests using the 'include' matcher. I'm changing those over to has_css as I notice them, which escapes the apostrophe appropriately, and is a more precise test too, so double-win there.

Now I have to go read Player of Games again. :D

Ahoy! Basic web stats tracking

Posted by Denny at 20:10 on Sun, 08 Mar 2020

Added basic tracking of web stats (powered by Ahoy). There's not much in the way of output yet, but they're getting stored in the database now.

Hopefully, once this feature-set is fleshed out a bit more, it will allow most sites to get by without using Google Analytics, which should simplify their cookie permission requirements a fair bit.

Email validation

Posted by Denny at 22:49 on Thu, 27 Feb 2020

Today I added email validation in models, using the email_address gem. Very straight-forward integration with ActiveRecord - it provides a validator, so it really just plugs straight in with zero effort. I've configured it to skip MX checks when my tests are running, I think that was the only thing I had to tweak.