Peter 'Codecop' Kofler's Blog

September 15, 2025

Von Neumann Turing Machine

On my search for harder coding challenges, join me implementing Fizz Buzz using a Turing machine where I dive into Turing machines from a practical coding perspective using Java. In the previous part I finally understood Turing machines (TM) and created a Universal Turing Machine (UTM) using a Tape and TuringMachine classes. This is the second part.

Fizz Buzz
I want to implement Fizz Buzz but I have no idea how to start. A simple implementation in Java might be:for (i = 1; i <= 100; i ) { // l...
 •  0 comments  •  flag
Share on Twitter
Published on September 15, 2025 01:48

August 5, 2025

Universal Turing Machine

[image error] The more I practice, the more I explore extreme situations. I have tried to go faster. Other times I Programmed with Nothing. Maybe it is the difficulty of only using low level constructs that makes these group of coding constraints appealing to me - which makes coding in assembly still interesting to some people, too. Then I tried to create Fizz Buzz using a Turing machine. I guess I lacked the purity of Computer Science university exercises. I will dive into Turing machines from a practical co...
 •  0 comments  •  flag
Share on Twitter
Published on August 05, 2025 04:12

July 7, 2025

Only Exceptions for Control Flow

Where It Started
At technical unconferences I like to start (and conclude) the day with some fun coding. After all, writing code is (still, in June 2025,) at the heart of software development. During SoCraTes Linz 2024 I proposed the first session to be a "Coding Fun session: Only use exceptions for control flow." I explained that it would be impractical but fun ;-) Using exceptions like that was an anti pattern but I wanted to see what would be possible.

Coding Fun: Only Exceptions for Control...
 •  0 comments  •  flag
Share on Twitter
Published on July 07, 2025 02:08

June 25, 2025

Patching Io Addons

This project is getting out of hand. I just wanted to use Regular Expressions in Io. This is the forth part of me trying different extensions of Io. First I installed addons without native code, then I compiled native code of addons and in the third part I:Checked package.json and build.io for hints about needed third party libraries and headers.Found ported libraries for Windows in GnuWin32, e.g. ReadLine.Compiled Io addons with dependencies.Fixed the undefined reference to 'IoState_registerPro...
 •  0 comments  •  flag
Share on Twitter
Published on June 25, 2025 07:03

December 30, 2024

Integrating Io Addons

[image error] This is the third time I write about making existing Io extensions work under Windows. While I still struggle with Socket - a crucial dependency - I install and compile random addons to see what could go wrong. Almost every addon I touch has a different issue that I need to resolve for my Io Windows build dating back to 5.11.2013. Till now I have covered the following situations:Clone current addons right into the addons folder, see part 1, Kano.Rename addon folders to start with an uppercase le...
 •  0 comments  •  flag
Share on Twitter
Published on December 30, 2024 08:10

December 16, 2024

Compiling Io Addons

This is the second part of my journey into installing Io addons. A quick recap: Io "is a dynamic prototype-based programming language". It was made more? widely known by Bruce Tate's book Seven Languages in Seven Weeks. Io's extensions, i.e. libraries or packages however you like to call them, are called addons and follow the same structure. Eerie, Io's package manager, fails on my platform and I have to add addons manually. It is the main purpose of these posts to show how it can be done. I exp...
 •  0 comments  •  flag
Share on Twitter
Published on December 16, 2024 05:16

December 9, 2024

Installing Io Addons

Io is an interesting programming language. I had not planned to learn a new language in 2024. Then, in a quiet moment, I reached for Seven Languages in Seven Weeks by Bruce Tate. It is an older book, published in 2010 and I know some of the languages described there. I like studying programming languages. Playing with basic concepts without the need to finish larger tasks is relaxing. It should be an easy read.

[image error] The Io Language
Io "is a dynamic prototype-based programming language." It seems mor...
 •  0 comments  •  flag
Share on Twitter
Published on December 09, 2024 02:47

July 4, 2024

Encapsulation vs Business Rules

[image error] No Naked Primitives is a Coderetreat constraint which trains our object orientation skills. No primitive values, e.g. booleans, numbers or strings, must be visible at object boundaries, i.e. public methods. Arrays and other containers like lists or hash-tables are primitives, too. I love this constraint, as it pushes people right out of their comfort zone. ;-) (I wrote about No Naked Primitives in combination with other constraints and included it in the expert level Brutal Coding Constraints.)

...
 •  0 comments  •  flag
Share on Twitter
Published on July 04, 2024 02:45

April 23, 2024

39 Years of Coding

[image error] Last week was my 39th anniversary of coding. I got a Commodore 64 as a present for Easter Sunday from my mother. I own an old image to prove that. The exact date is tricky: There are no time stamps on my files, I do not know how old my oldest programs are. I wish I had added comments with time stamps back then. I was able to pin down some programs, like demos, to the year they were created by investigating file names and scrolling messages. On of these attributes to Easter 1986, so my start must...
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 23, 2024 06:11

March 10, 2024

Programming with Nothing

I like extreme coding constraints. A constraint, also known as an activity, is a challenge during a kata, coding dojo or code retreat designed to help participants think about writing code differently than they would otherwise. Every constraint has a specific learning goal in mind, for example Verbs instead of Nouns. After playing with basic constraints for a long time now, I need more challenging tasks. Combining existing constraints makes things harder: For example Object Callisthenics or my v...
 •  0 comments  •  flag
Share on Twitter
Published on March 10, 2024 09:34