• 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

Monthly Archives: September 2024

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 →

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

September 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Aug   Oct »

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