• Martin Thoma
  • Home
  • Categories
  • Tags
  • Archives
  • Support me

Recent Posts

9 Clean Code Patterns I wish I knew earlier

9 Clean Code Patterns I wish I knew earlier

Do you know the feeling when you look back at code which you wrote early in your career? I always feel a bit horrified. But there is a positive side to it: I learned something new 😄 A core part of good software is readability. Keeping the mental complexity low so … Read More »
Hooks vs Callbacks vs Webhooks

Hooks vs Callbacks vs Webhooks How do I use them and where is the difference?

Photo by Dan-Cristian Pădureț The Unix programming philosophy is to do (just) one thing but do it well. Focusing on one core task is hard as developers see and feel their users' pain points and desires. To be able to focus on the core product but allow additional functions … Read More »
Synchronous vs Asynchronous vs Concurrent vs Parallel

Synchronous vs Asynchronous vs Concurrent vs Parallel What is the difference and why does it matter?

Photo by Edurne Chopeitia on Unsplash We developers like to throw around terms that feel natural to us, but are technical terms that most non-developers don’t use in the same way. This article is aimed at all the poor souls who have to deal with us, e.g. product … Read More »
Python Puzzle 4

Python Puzzle 4

What is the output of def foo(bar=None, **kwargs): print("\tbar={}".format(bar)) print("\tkwargs={}".format(kwargs)) print("Test 1:") foo(bar=12, holla=13) print("Test 2:") foo(holla=13, bar=12) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output: Test 1: bar=12 kwargs={'holla': 13} Test 2: bar=12 kwargs={'holla' … Read More »
Defaults of Configuration Files

Defaults of Configuration Files

I often need configuration files in the software I develop. In principle, I can think of two ways to deal with configuration files: Complete: The configuration file has to have all values which will later be accessed by the application Partial: The configuration file might only define some values. In … Read More »
Label Correction Algorithm

Label Correction Algorithm

The label-correction algorithm is a generalization which includes very common graph search algorithms like breadth first search (BFS), depth first search (DFS), A*, Dijkstra's algorithm and Branch and bound as special cases. Pseudocode Pseudocode for the Label correction algorithm Explanation: First if: The left hand side is a lower bound … Read More »
R - A language

R - A language

Quite a while ago, I had to use R for a statistics class. Nice things about R R has a neat programming environment called rstudio: RStudio As you can see, RStudio conveniently shows: The code, an interactive console, a window with plots, loaded variables / functions as well as their values … Read More »
URL RegEx

URL RegEx

A very short thing to share, but likely valuable: An RegEx for URLs. In search of the perfect URL validation regex has several positive and negative examples for URLs as well as several regular expressions to test against those test cases. The only one which matched all correctly is by … Read More »
Languages for Back Ends

Languages for Back Ends

What programming language would I use for the back end of a big, new project in a startup which wants to offer a web service? Sure, on the client side there is pretty much only JavaScript (including variants like CoffeeScript and TypeScript) in combination with HTML and CSS. I've used … Read More »
Critique of Python 3

Critique of Python 3

Consistency is an important quality property of a language. One of my main points of critic agains PHP was inconsistency (see PHP: A strange language). Let's see where Python is inconsistant. Naming Underscores or not PEP 8 recommends underscores for functions, if I remember it correctly. However, some built-in functions … Read More »
  • Martin Thoma - A blog about Code, the Web and Cyberculture
  • E-mail subscription
  • RSS-Feed
  • Privacy/Datenschutzerklärung
  • Impressum
  • Powered by Pelican. Theme: Elegant by Talha Mansoor