I got a YouTube play button!

Posted on 2023-10-18 19:07 +0100 in Creative • Tagged with YouTube • 2 min read

According to YouTube I joined up on 2006-09-04. I don't think that's quite correct. I did have a Google Video account from very early on, and uploaded a couple of things, and it got ported to a YouTube account when Google discontinued the original video service and settled on YouTube post-purchase. So I guess, in some respects, it's kind of correct.

For most of that time I had hardly anything on there. Couple of videos to do with the weather station I ran for a few years, some things related to my photography, couple of things related to hacking with code; that's about it.

Then, a couple or so years back, when I got heavily into PCVR gaming, I started to record my gaming sessions and upload them.

As of the time of writing there are 1,109 videos in the PCVR playlist, and around 1,300 videos on my channel in total.

As for subscribers... eh, come on, few people are really interested in watching some old bloke stumble around in VR, and I was very late to the game anyway. But, apparently, around 350 lovely folk care enough about my nonsense to subscribe.

Nowhere near enough for a YouTube play button, that's for sure. Only... I now have a play button!

YouTube Lego Play Button

I mean, sure, I have to build it myself...

YouTube Lego Play Button

...but it's something to show for all my efforts, I guess. ;-)

YouTube Lego Play Button

As for how I got it: presumably anyone/everyone with a YouTube account with some content got the offer of goodies (I also got offered free coffee, sausage rolls, socks, and a bunch of other stuff I've forgotten), and I was lucky to claim one of these almost the instant the email turned up.

It's very likely the only YouTube play button I'll ever receive. I think it will take pride of place on my desk.


LinkedIn is useless

Posted on 2023-10-16 14:16 +0100 in Tech • Tagged with LinkedIn • 2 min read

I have a LinkedIn profile more by accident than on purpose. For most of that site's early days I just ignored it, even needing to go to the trouble of aggressively marking emails from it as spam as it seemed to want to turn itself into some sort of online networking cult, encouraging folk to send invites to their contacts, or worse. But after job-seeking in late 2017 the recruiter who found me the position I took up asked if I might join up and endorse him or some such nonsense and, at the time, I thought what the hell.

Since then though I've mostly found it useless, and at times straight up horrific. Don't even get me started on how a previous employer's push to make everyone use their profiles as more company branding created a perfect pool for people to go phishing in, while at the same time IT were on a phishing-awareness push; a perfect illustration of how some people lose their minds when it comes to that site.

The last year though, while working in a more FOSSy world, I've started to dip my toe back in when it comes to linking to what we're building with Textual. As such, I drop into the app once or twice a week and look to see what other folk might be talking about too.

During a recent dip in I saw this:

A suggestion from LinkedIn

Huh! Okay! That... that's actually kind of sensible! While I'm nowhere near looking for anything else to do, showing off the public projects you care about seems like a good idea. GitHub repos can be a good CV, I believe.

So I click through...

The project add form

And that's where it all falls apart. Pretty typical for LinkedIn I'd say. Name, description, obsession with skills, obsession with building up a social graph. But...

No link to the repo.

No.

Link.

To.

The.

Repo. O_o

o_O

I can't even.


Going full Apple search

Posted on 2023-10-14 08:39 +0100 in Tech • Tagged with Apple • 2 min read

For as long as I've had a smartphone -- so ever since the HTC Magic was released -- I've used whatever search tool Google have had available as my way of searching for stuff from my phone. Even when I made the switch to the iPhone, back when the iPhone 11 was around, I still installed and used the Google Search app.

Since jumping ship from Android to iPhone, I've followed the usual track that some do of "embracing the ecosystem", and it generally has paid off. The more I lean into "the Apple way", the more stuff actually does work together and work together well (I won't say "it just works", because that can sometimes so very not be true, but really I do find that Apple's ecosystem is more coherent and more stable than the one Google provided). But searching for stuff... that stuck with the Google search app.

So, more as an experiment than anything else, starting this morning I've removed the Google search app from the home screens of my iPhone and my iPad and I'm going to force myself to use Spotlight to do all my searching, and see how I get on with it.

Searching with Apple

Of course, when it comes to searching for stuff on the web, it's not going to make a whole heap of difference; it's sill going to end up searching with Google, but I do like the idea of search leaning into what Spotlight knows about my stuff too.

Also, on my phone at least, it has the added benefit of freeing up a slot in the dock at the bottom of the home screen.


astare v0.8.0 released

Posted on 2023-10-10 21:42 +0100 in Python • Tagged with PyPi, Python, coding, Textual • 1 min read

textual-astare is another Textual-based Python project that I've developed in the last year and I don't believe I've mentioned on this blog. Simply put, it's a took for viewing the abstract syntax tree of Python code, in the terminal.

astare in action

I've just made a small update to it this evening after someone asked for a sensible change I've been meaning to do for a while. When I first read the request I was going to look at it next week, when I have some time off work, but you know how it is when you sit at your desk and have a "quick look".

So anyway, yeah, v0.8.0 is out there and can be installed, with the main changes being:

  • Updated textual-fspicker
  • Updated textual
  • Made it so you can open a directory to browser from the command line.
  • Made opening the current working directory the default.
  • Tweaked the way dark/light mode get toggled so that it's now command-palette-friendly.

I think the code does need a wee bit of tidying -- this was one of my earliest apps built with Textual and my approach to writing Textual apps has changed a fair bit this year, and Textual itself has grown and improved in that time -- but it's still working well for now.


All green on GitHub

Posted on 2023-10-01 09:14 +0100 in Coding • Tagged with GitHub • 2 min read

In about a week's time I'll have had a GitHub account for 15 years! I can't even remember what motivated me to create one now, but back in October 2008 I grabbed the davep account...

Making my account

...and then made my first repo.

First repo made

My use of the site after that was very sporadic. It looks like I'd add or update something once or twice a year, but I wasn't a heavy user.

First few years

Then around the middle of 2015 I seem to have started using it a lot more.

The next few years

This very much shows that during those years I was working on personal stuff that I was making available in case anyone found it useful, but also leaning heavily on GitHub as a (a, not the) place to keep backups of code I cared about (or even no longer cared about). Quite a lot of that green will likely be me having a few periods of revamping my Emacs configuration.

The really fun part though starts about a year ago:

Working on FOSS full time

It's pretty obvious when I started working at Textualize, and working on a FOSS project full time. This is, without a doubt, the most green my contribution graph has looked. It looks like there's a couple of days this year where I haven't visited my desk at all, and I think this is a good thing (I try really hard to have a life outside of coding when it comes to weekends), but I'm also delighted to see just how busy this year looks.

I really hope this carries on for a while to come.

Apparently, as of the time of writing, I've made 12,588 contributions that are on GitHub. What's really fun is the fact that my first contribution pre-dates my GitHub account by 9 years!

My very first contribution

This one's pretty easy to explain: this is back from when I was involved with Harbour. Back then we were using SourceForge to manage the project (as was the fashion at the time), and at some point in the past whoever is maintaining the project has pulled the full history into GitHub.

My contribution history on GitHub is actually older than my adult son. I suspect it's older than at least one person I work with. :-/ 1


  1. I'm informed that this isn't the case2; apparently I'm either bad at estimating people's ages, or bad at remembering them; or both. 

  2. Although it's not too far off. :-/ 


Mandelbrot Commands

Posted on 2023-09-29 12:42 +0100 in Python • Tagged with PyPi, Python, coding, Textual • 2 min read

I don't think I've mentioned it before on this blog, but some time back I decided it would be fun to use Textual to write a Mandelbrot explorer (simple Mandelbrot explorers have been another one of my favourite known problem to try an unknown thing problems). Doing it in the terminal seemed like a fun little hack. I started off with creating textual-canvas and then built textual-mandelbrot on top of that.

Not too long back I added a "command palette" to Textual (I'd prefer to call it a minibuffer, but I get that that's not fashionable these days), but so far I've not used it in any of my own projects; earlier today I thought it could be fun to add it to textual-mandelbrot.

Mandelbrot commands in action

Most of the commands I've added are trivial and really better covered by (and are covered by) keystrokes, but it was a good test and a way to show off how to create a command provider.

Having started this I can see some more useful things to add: for example it might be interesting to add a facility where you can bookmark a specific location, zoom level, iteration value, etc, and revisit later. The command palette would feel like a great way to pull back those bookmarks.

What I really liked though was how easy this was to do. The code to make the commands available is pretty trivial and, I believe, easy to follow. Although I do say so myself I think I managed to design a very accessible API for this.

There's more I'd like to add to that (the Textual command palette itself, I mean), of course; this was just the start. Support for commands that accept and prompt for arguments would be a neat and obvious enhancement (especially if done in a way that's reminiscent of how commands could be defined in CLIM -- I remember really liking how you could create self-documenting and self-completing commands in that).

All in good time...


Apple Design

Posted on 2023-09-23 08:10 +0100 in Tech • Tagged with Apple, iOS, iPhone, design • 2 min read

As someone who started out in the Android ecosystem when it came to smart phones -- starting out with a HTC Magic and going through a few different phones before settling on Pixels (until I finally jumped ship to iOS in 2020) -- I have to admit that there's always been something nice about the design of iPhones. iOS, less so... My first exposure to iOS was back in 2015 when I got an iPod, and I wasn't terribly impressed. It looked okay, but it felt so far behind Android in terms of functionality.

Much has changed and improved since then. These days, 3 years into being totally consumed by the Apple ecosystem (one day I should write a post about how comprehensively I've moved over), I'm won over and I like how iOS works now.

Except this...

Bad design

That thing where, when you're in one app, it will show the most useless link "back" to another app, and in doing so bump the time up and out of the way a little. Like, seriously, compare it to when the app link thing isn't there:

Good design

Once you see it, you can't unsee it.

Toggle of the two images

After all this time you'd think they would have found a less janky way of doing this; perhaps even simply removed it (I can't remember the last time I needed or wanted the ability to go "back" an app like this, especially not with the bottom-of-screen swipe gesture being a thing). If nothing else you'd think that, by now, they'd have found a way of doing it that doesn't look so terrible.

The "eh, let's just shove it here" approach that seems to be on display here almost reminds me of the "time wiggle" that used to mildly annoy me back on my iMac.


A map of my year in Obsidian

Posted on 2023-09-11 20:07 +0100 in Life • Tagged with journal, Obsidian, graph • 3 min read

Some time around late October or early November last year, around the time I started working at Textualize, I "discovered" Obsidian. While I didn't need another note-taking application (having gone through Evernote, trying to use Org, dabbling with a couple of other things and finally settling mainly on Apple Notes), I was quite taken by its style and ubiquity and the fact that it was, at heart, just a bunch of Markdown files.

So quite quickly I started using it; not to replace Apple Notes (which is still my general note-taking tool of choice), but to keep work notes and a daily coding journal, the latter coming in useful for the quick end-of-day meetings we normally have.

One of the things I was quite taken by was the graph. It was interesting and fun to see how each of my work days related to other work days, and what subjects kept getting pulled in, etc.

So come the start of this year I had an idea: what would it be like to keep a personal vault, but one where I track things I've done. Not a journal as such (I do keep one of those too, have done for many years now, but that's for other far more important reasons -- perhaps I'll write about that one day too), just a daily record of stuff I've achieved, stuff I've actually done, the routine things and the exceptional things?

What would that graph look like?

While it's not the end of this year yet, here's how that's shaping up:

The main graph

Each of the yellow circles is a day, each of the blue ones is a tag of some sort. As you'd imagine, the size of the circles relates to how often that item is tagged. So I can see what proportion of my days so far this year have been tagged with being heavily involved with work:

Work

Likewise, if I want to see how many days this year have involved a significant spot of gaming:

Gaming

Ditto for days where I've done some coding on pet projects, or even some personal-time coding relating to work projects (it might be work, but it's also Free Software and I do like to support FOSS!)

Coding

I sort of have a curated set of tags I apply, but I've not made it a strict set; if some new situation crops up that calls for a new tag I'll use it. Mostly though I try and keep the tags pretty general so lots of days can relate to the same general subject.

Another thing I've done is tag each and every day with the day of the week, so while it's not really surprising to find that Sunday doesn't dominate over other days, I can see which days are Sundays and perhaps wander along the connections and see what I get up to:

Sunday

I don't quite know what I hope to get out of this, I don't really know if there's anything useful to be had here at all, but it will be interesting to look back over it at the end of the year. It also means that I'll have a directory hierarchy full of Markdown files, all tagged and filled with information, which I'll be able to grep and slice and dice and count and perhaps pull into a database and cross-reference with stuff and things.

Or perhaps it's all just really me not having a good use for Obsidian but inventing one anyway. ;-)


Textual Query Sandbox Update

Posted on 2023-09-10 09:22 +0100 in Python • Tagged with PyPi, Python, coding, Textual • 2 min read

Since quickly hacking together textual-query-sandbox a few days back, I've made a bunch of small changes here and there. While most have been cosmetic and playing with some ideas, some have also been internal improvements that should make the tool work better.

The most prominent change is one I pondered in the previous post, where I thought it might be interesting to have a small collection of playgrounds grounded together with a TabbedContent. So as of now the tool still has the original playground which had an emphasis on nested containers:

Playground 1

There's now a playground with an emphasis on selecting widgets within containers1:

Playground 2

There's also now a playground that has an emphasis on pulling out widgets based on ID and classes:

Playground 3

The other change you will notice from the original post is the DOM tree shown in the bottom right corner. Note that that isn't there to show your query result (that's the bottom left panel), it's there to help picture how the DOM in the current playground hangs together, and will hopefully help in picturing the structure for when you write a query.

I sense there's still a lot of fun things I could add to this, and I'm still keen on the idea of having the playgrounds "soft coded" in some way, so people can make their own and load them up.

Another thing I want to try and work on is making the display as useful as possible. While I think it's actually pretty neat and clear, there's not a lot of space2 available to show the playground and the results. Finding a good balance is an interesting problem.

For a number of reasons this is turning into a really enjoyable tinker project.


  1. This is, of course, slightly nonsensical wording. Containers are widgets in Textual. Pretty much everything you see in your terminal is a widget, even a Screen is a widget. 

  2. A lot of this of course hinges on how big someone's terminal is. I tend to run a fairly high resolutions with the smallest font I find readable so my terminal windows are often pretty "big"; other people tend to have something much smaller in terms of cell with/height. 


Textual Query Sandbox

Posted on 2023-09-01 07:42 +0100 in Python • Tagged with PyPi, Python, coding, Textual • 3 min read

Sometimes I can have an idea for a Textual widget, library or application on my ideas list for weeks, months even, before I get around to it -- mostly just due to not having the clear time to make a run at getting it going -- and then other times an idea can pop into my head and it has to be created there and then. Has to be!

This happened yesterday evening.

While the tool I built is something I'd thought of before (back around November last year I think) it hadn't even made it to my "list of stuff I should make" that I keep in Apple Reminders; not sure why really. But then yesterday evening a question cropped up on the Textual Discord server that related to the subject and I was reminded of it.

The subject being: Textual DOM queries. I like to think that DOM queries in Textual are pretty easy to do, and well-explained in the docs, but it's fair to admit that they need a bit of practice first, just like any powerful tool. So I was reminded that I'd wanted to write a sandbox application, that would have a practice DOM inside it, an input field to type in a query, and a way of displaying the results.

So textual-query-sandbox was born!

Textual Query Sandbox

In this very first version (which was really quickly put together -- it was something like 15 minutes to write the main code and then probably 45 minutes tweaking styles, adding all the admin stuff to allow deployment to PyPi and writing the README) there's an Input, a display of a group of nested containers with different IDs and classes, and then a Pretty widget at the bottom to show the query result.

If you think this looks like it might be useful to you, it can be installed using either pip or (ideally) pipx:

$ pipx install textual-query-sandbox

and then you can run it with:

$ tqs

At which point load up the Textual query docs, type queries into the input field, hit enter and see what gets highlighted and which widgets end up in the result set at the bottom of the screen.

Like I say: this was a quick hack yesterday evening, I think there's a lot more can go into this. For one thing I think a more interesting practice DOM would be a good idea, with a good mix of widgets; another thing could be having a collection of different DOM playgrounds that can be switched between (a TabbedContent of different playgrounds could be fun here); this could even be taken further such that the user can create their own playground DOM to practice against.

Eventually it would be neat if this could be turned into a library that can be included in a Textual application, as a development-time debug tool, so that on-the-fly test queries can be made.

For now though, it's started, it's under way, and I think the current version probably covers 90% of the use cases for something like this; making for a really quick and easy tool to double-check how to query something.