The thread formerly known as "Weekend Coding"

TIL you can join SQLite databases together.

Mr. Willison is one of the creators of Django, and I recently found out he also runs

Prolific dev!

So what we’re saying is(forgive psudo code pls):

regexes_for_queries_for_functions = { "thing-[0-9]{2}.*": "Select function..." "get-.*": "Select function" ... ".*" "Select function ..." }|
for regex, query = range (regexes_for_queries_for_functions):
   if regex.match(args):
        result, err = sql.Select(query, args)'
        if err; return err; done
        return result(args)

I use very very few plugins or customizations with my vim. But I’m considering replacing NerdTree with CtrlP.

Scott codes in a DDE.

Disintegrated development environment.

1 Like

Went back to working on the web site, but ended up going down rabbit holes. I’m spending all my time on trying to make the actual work as smooth and perfect as possible, and then I end up spending all my time working on that side stuff.

For example today.

Someone made a GitHub action that can execute an ansible playbook that is in the Github repo. They set it to not check host keys, which saves a lot of hassle, but is a security risk. I had to edit their action and send in a PR so that you can optionally provide host public keys to verify against.

Then since I was testing so much, fail2ban on my own server was blocking me out a couple times. I ended up changing it so it never bans my external IP. But what if my IP changes? It probably doesn’t change often, but it could. I made a script on my raspberry pi that checks on a regular basis, and if my IP changes, it emails me.

And we’re still in the scaffolding zone and not near the actual GeekNights web site zone.


OMG too accurate.

1 Like

Since IFTTT is effectively dead I’ve been doing more of that on my own. The Raspberry Pi I use for piHole has proven to be very good for running tiny scripts with trusty old cron.

Since Dell doesn’t offer automatic in-stock notifications, and I want to buy a monitor now that the price is lower, I made a little script to check if the monitor is in stock and email me if it is. Runs twice a day with cron. Uses Python requests to get the page, then uses BeautifulSoup to “read” the HTML and find if the out of stock message is present on the page. For email I’m actually using Popen to call out the msmtp. That way I don’t need to put any SMTP settings or auth into the script. Keeps it simpler.

I also have another one I wrote recently that checks my current public IP address on a regular basis and emails me if it changes. So far it hasn’t! Not like I have a guarantee of a static IP, but it’s not changing, so that’s nice. I can probably semi-rely on it if I want to run any public services at home.

1 Like

Does gmail give you grief about email from not-a-high-reputation-server?

No. I’m sending the email via Gmail.

Taking an interest in Java and my library has two books. One from 2011 and another from 1999. Is there a significant difference in the programming language in the 10+ year gap?

Yes and no. The fundamentals of the language, it’s basic syntax, etc. have not changed. All the programs in those books will probably still work, though no guarantees.

However, in 1999 the current version of Java was 1.2 IN 2011 it was Java 7. Now they are on Java version 16. There have been a LOT of changes. Mostly there are newer better ways of doing things.

This is why people use up to date online resources for learning programming these days, and not dead tree books. Not to say those old books are useless, but at bare minimum you should be able to pirate a pdf of a much newer ebook.

Favorite is Haskell.

1 Like

Debugging, the text adventure:

TIL that os.path.join() in python will discard path components if one of the arguments is an absolute path.

Suppose you want to read a file, make some changes, and save it to a different location. You might have

f = open(filename)
g = open(os.path.join('changes', filename), 'w')
# do your calculations

If filename contains /absolute/path/to/good_data_dont_delete.csv instead of just good_data_dont_delete.csv, line 2 will helpfully discard 'changes', and open /absolute/path/to/good_data_dont_delete.csv. In write mode.

Ask me how I know.


I had not known about many of these things.

Some favorites:

And Fully Countering Trusting Trust.

This is so true. Even moreso on the frontend with Javascript/node stuff, but also the backend, and various attempts to replace it. I have made a career of sticking to established and time tested tooling, and not trusting anything that is too new. You don’t always have to be chasing the hot new thing. It makes no difference to users what you build your app with. If you don’t already have a stack, choose something that has withstood the test of time. Put your energy on making things better for the users/customers and your actual mission, not on making things more fun and exciting for the developers by playing with new shiny bits.


It is “done” enough to release and use to build the new GeekNights web site. I’m going to make a few demo videos for this as well, but that will have to wait until later in the week.


I made a demo video.