I’ve always had a hard time with regular expressions: I know that they are useful, but I use them so rarely that I cannot get a hold of all the syntax.
So, now is the time to write an article for myself to remember all the stuff. Continue reading “Regular Expressions Demystified – A Mini DSL for Regex in Python”
Christmas is over, so we get rid of the Christmas Tree.
Today I want to show You another Code Kata: Roman Numerals. The task seems to be quite easy. Write a program which converts a decimal number into a string which contains the equivalent as a roman literal. E.g. convert 1984 into MCMLXXXIV.
We just use the characters from I to M.
We first write a simple conversion function which ignores the abbreviation syntax, so instead of IX for 9 we write VIIII. To do so we use integer division and modulo operation. We start with the highest number and work our way down. Have a look: Continue reading “Code Kata: Roman Numeral – Part 1”
Inspired by a blog post of Dave Thomas I started to implement my technology learning roadmap by writing little code katas.
To kill two birds with one stone I first solve a programming puzzle with my lingua franca Python. That helped me to concentrate on solving the algorithmic part of the puzzle because I don’t have to constantly worry about syntax and semantics.
Then I did the whole thing again this time in the language I want to learn: Rust
To give You an example how that works I will elaborate on the Christmas tree kata. Continue reading “Code Kata: Christmas Tree”