Matthew Lang avatar

Matthew Lang

Family guy and web developer

The not so fun weekend of debugging code problems

It's been a while since I last posted here. I've been getting my head down and working on my CMS product, which has left not much time for blogging.

Over the last few weeks, I've been putting in place a feature that should allow for more flexible page designs so that customers can use a series of widgets to build up pages. It's a three-level form with a page with many sections on it, and each section has a single widget. The thinking is that the sections can be re-ordered regardless of what type of widget it holds. It hasn't been without its issues, though. It took several attempts to get this overall widget design with the page in place.

Thankfully, that part of the feature is done, but I'm still working out some issues with this.

The main issue is when I add a new section and widget to the page, it clears any input elements that I have changed on any other sections widgets on that same page. The merry-go-round of possible sources of the problem includes the usual areas when things like this go wrong on the front-end—namely Turbolinks and Javascript.

The biggest problem just now is that of time, though. I don't get much more than a couple of hours at a time working on this, and when I do, I feel that I am problem-solving the same things over and over again. It's just as well that we're still in a national lockdown here in Scotland because it does afford me some extra time to work on this.

Hopefully, I can make progress with it this week.

Reminiscing of days with Sublime Text

Over the weekend, I decided to re-install Sublime Text to see If there have been any substantial updates to it. I haven't used it in a few years now since moving to VS Code.

The text editor remains snappy and fast as I navigated through a large codebase and made a few changes. Sublime Text was never a slouch when it comes to performance. It was always fast for me, even on larger codebases.

Intrigued, I turned to Sublime Text's package control to see if there were packages there for Ruby and Rails and general web development. While I don't really need these, there are nice to have in the text editor. What I found was quite disappointing.

Most of the packages that I have used in the past on Sublime Text have not seen much in terms of updates, with a few packages listed as missing. Clearly, VS Code has impacted the number of actively maintained packages as developers migrated from Sublime Text to VS Code when it first hit the scenes.

Although I'm pretty much baked into the VS Code ecosystem thanks to its huge library of extensions, I wouldn't be against going back to Sublime Text. Maybe one day I will. For the moment, I'll leave it on my Macbook and see what I get from it as a wee change to VS Code.

First hit of the year

First hit of the year for me and Drew at Paisley Golf Club today!

A glorious afternoon of weather and a welcome change to the snow and rain we’ve had the last few weeks. I was a bit rusty but Drew has managed to find some extra yardage to his drives over the winter. I’ve got some catching up to do!

Don't forget that text is everything

Graydon Hoare suggests we always bet on text.
Text is the most socially useful communication technology. It works well in 1:1, 1:N, and M:N modes. It can be indexed and searched efficiently, even by hand. It can be translated. It can be produced and consumed at variable speeds. It is asynchronous. It can be compared, diffed, clustered, corrected, summarized and filtered algorithmically. It permits multiparty editing. It permits branching conversations, lurking, annotation, quoting, reviewing, summarizing, structured responses, exegesis, even fan fic. The breadth, scale and depth of ways people use text is unmatched by anything. There is no equivalent in any other communication technology for the social, communicative, cognitive and reflective complexity of a library full of books or an internet full of postings. Nothing else comes close.

Always bet on text
I wholeheartedly agree. You can keep video clips, online meetings, voice memos and all the stuff. Text is the ultimate form of communication.

In a change from my regular Leuchttrum notebooks that I use, I wanted to try something different. Last week I ordered a Dingbats Wildlife notebook.

It’s a bit bigger than the Leuchttrum notebook which I don’t mind. It also includes a single bookmark as opposed to the Leuchttrum’s three. Hardly a deal-breaker as I can add my own bookmarks.

Aside from being eco-friendly, the notebooks come in many colours. 

It's been a code and coffee morning

I'm trying to build a bit more flexibility into a Rails application by adding the ability to have multiple widgets on the one page.

From a presentation perspective, the problem looks easy. Any number of widgets for a page can be modelled to be presented as a complete web page. It doesn't matter how the data is put together, e.g. flat files, canned models, hard-coded HTML.

What complicates the problem is how the user creates and manipulates these widgets to their needs. I've seen enough back-end interfaces for various products to know it can be done. The Mailbrew interface, which has similar functionality, is how I want this feature to work.

Instead of sitting at the text editor and blindly coding my way out of this, I've been using my iPad to sketch out a few ideas of how widgets of different shapes will relate to the page, and how a page will assemble these widgets. The problem is starting to unravel now.

Might be time for another coffee.

First paragraph: Troy

Troy. The most marvellous kingdom in all the world. The Jewel of the Aegean. Glittering Ilium, the city that rose and fell not once but twice. Gatekeeper of traffic in and out of the barbarous east. Kingdom of gold and horses. Fierce nurse of prophets, princes, heroes, warriors and poets. Under the protection of ARES, ARTERMIS, APOLLO and APHRODITE she stood for years as the paragon of all that can be achieved in the arts of war and peace, trade and treaty, love and art, statecraft, piety and civil harmony. When she fell, a hole opened in the human world that may neve be filled, save in memory. Poets must sing the story over and over again, passing it from generation to generation, lest in losing Troy we lost a part of ourselves.

— Troy by Stephen Fry