• Home
  • About
    • About The Coder
    • Language List
  • Code Rules
    • #1: Clarity Trumps Everything
    • #2: Source Code is for Humans
    • #3: Don’t Ignore Warnings
    • #4: Comment As You Go
    • #5: Always Use Parentheses
    • #6: Always Define Literals
    • #7: Never Repeat Yourself
  • CS-101
  • Python-101
  • Simple Tricks
  • Guestbook

The Hard-Core Coder

~ I can't stop writing code!

The Hard-Core Coder

Category Archives: Fun

Interesting projects.

Tk Windows in Python

24 Monday Nov 2025

Posted by Wyrd Smythe in Fun, Interesting, Python

≈ 2 Comments

Tags

Python code, software design

Python has included the Tk interface module (tkinter) since versions 2.7 and 3.1. The module is a binding to version 8.5 of the Tk GUI suite for making windowing applications. My first installed version of Python was 2.7, so I’ve been aware of the module for over ten years but never explored it.

At the beginning of this month, I decided to dive in. It led to an intense two-week bout of 12+ hour days, but I emerged with working apps (and my sanity). This post and ones to come document and share what I’ve learned.

Continue reading →

Simple Python Tricks #18

25 Monday Aug 2025

Posted by Wyrd Smythe in Fun, Python

≈ 2 Comments

Tags

Simple Tricks, text

Recently I found myself dividing my attention between watching the Minnesota Twins lose yet another ballgame and goofing around with an idea that popped into my head for no reason I can name.

The idea turned out better than imagined in terms of capability given its design simplicity, so I thought I’d document it here. It’s not super useful as is, but those relatively new to Python might find it educational or otherwise helpful.

Continue reading →

Cellular Automaton Redux

12 Monday May 2025

Posted by Wyrd Smythe in Fun, Python

≈ 2 Comments

Tags

cellular automaton, Python code

In the previous post [see Elementary Cellular Automaton], I presented an implementation of a 1D elementary cellular automaton. Unfortunately, the code turned out to be an example of leaping into an idea without carefully reading the background information.

Long story short, while the code works and generates images, it doesn’t generate the correct images for all 256 rules. In this post, I present improved code that does.

Continue reading →

Elementary Cellular Automaton

28 Monday Apr 2025

Posted by Wyrd Smythe in Fun, Python

≈ 3 Comments

Tags

cellular automaton, Python code

For quite some time, I’ve wanted to write some Python code to implement and elementary cellular automaton. In particular, I wanted to “investigate” (play around with) the famous Rule 110, which is known to be Turing complete.

Despite the name, this has nothing to do with cellphones. It’s a 1D variation on the well-known 2D Game of Life designed by British mathematician John Conway. [See the John Conway’s Life and Life With Class posts for Python versions]

Continue reading →

The Python Turtle

30 Monday Sep 2024

Posted by Wyrd Smythe in Fun, Python

≈ 3 Comments

Tags

Python 101, Python code, turtle graphics

Some of you may have encountered the Logo programming language or one of its many offshoots. A memorable aspect of Logo was its use of turtle graphics — a form of vector graphics similar to pen plotters. Notably, turtle graphics features a relative drawing cursor.

Standard Python includes a turtle graphics module. It doesn’t have a huge production value (there’s no easy way to save an image, for instance), but it can be fun to play with.

Continue reading →

Python Tredoku Solver

16 Monday Sep 2024

Posted by Wyrd Smythe in Fun, Python

≈ 1 Comment

Tags

computer programming, puzzles, Python code, software design, Sudoku, Tredoku

I’ve never been particularly interested in puzzle games. Figuring out software has filled that niche for me (plenty puzzling enough). So, I’ve never done a Sudoku puzzle. Recently I read a post about Tredoku, which is a kind of three-dimensional Sudoku.

In that post was an unsolved Tredoku puzzle. I wasn’t tempted to try to solve it myself, but I did think it might be fun to see if I could write some Python to do it.

Continue reading →

A Faster Fibonacci

02 Monday Sep 2024

Posted by Wyrd Smythe in Fun, Python

≈ 1 Comment

Tags

data caching, Fibonacci series, iteration, recursion

The famous Fibonacci sequence starts off [1, 1, 2, 3, 5, 8, 13, 21, …] and continues forever. Each number in the series, except the first two, is the sum of the previous two numbers. For example, 3+5=8.

The canonical algorithm to calculate the series uses recursion and is elegant enough to be a common example of a recursive function. But while elegant conceptually, the algorithm is deadly computationally. In this post I’ll look at several ways to dodge the bullet.

Continue reading →

Musical Scale Modes Table

01 Sunday Oct 2023

Posted by Wyrd Smythe in Fun, Python

≈ 2 Comments

Tags

computer code, Python code, software design

Mathematician and educator John Baez has an excellent series of blog posts about music theory. The seventh concerns generating scales by using notes separated by fifths. Shifting the start point generates the seven major scale modes. Shifting the root key generates those seven modes in the twelve keys (a total of 7×12=84 scales).

John asked if any of his readers would be interested in creating that table of all 84 rows. It sounded like — and turned out to be — a fun exercise. This post explores in detail the Python solution I came up with.

Continue reading →

Calculating the Number e (in Python)

10 Sunday Sep 2023

Posted by Wyrd Smythe in Fun, Python

≈ 2 Comments

Tags

computer code, exponential functions, math, Python code

It has been almost a year since my last post here. I haven’t been idle code-wise, but I have been too distracted by Real Life to do any blogging here. My publication rate is way down on my main blog, too.

To get me posting here more, I think I need more of a focus on casually documenting my own little projects rather than Code Wise articles. Those take more work than I seem willing to put in these days. With that in mind, I have some trivial Python fun to share…

Continue reading →

The Last Bug

26 Friday Aug 2022

Posted by Wyrd Smythe in Fun

≈ 3 Comments

Tags

computer humor, funny poetry, humor, old time stuff, poetry

Recently I posted an oldie from the last century. Here’s another from the deep time layers of my file system. It’s a poetic parable any programmer can relate to.

Think of it as the programmer’s version of Sisyphus.

Continue reading →

← Older posts
Follow The Hard-Core Coder on WordPress.com

The Posts

  • Python Tk Calculator App
  • Tk Windows in Python
  • Dual Numbers in Python
  • Python Decorators, more
  • Python Decorators, redux
  • Byte Multiplication Trick
  • Parsing Multipart Form Data
  • Simple Python Tricks #18
  • Simple Python Tricks #17
  • Simple Python Tricks #16

The Topics

  • Blog (4)
  • CS101 (37)
  • Fun (36)
  • Interesting (5)
  • Opinion (12)
  • Python (59)
  • Stories (15)

The Month

December 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Nov    

The Past

Posts

RSS Feed

Comments

RSS Feed

The Main Blog

Visit Logos con carne

Lots of wyrds... with meat!

The Author

Wyrd Smythe

Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts.

View Full Profile →

Create a website or blog at WordPress.com

  • Subscribe Subscribed
    • The Hard-Core Coder
    • Already have a WordPress.com account? Log in now.
    • The Hard-Core Coder
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar