Senko Rasic

A practitioning bit-shifting magician turned cat herder. @senkorasic

Beyond type errors

Ways of calling a piece of code incorrectly

Consider this Python function:

def factorial(n): """Returns n! (n factorial)""" result = 1 for i in range(2, n + 1): result *= i return result

Provided that this code is correct, what are kinds of errors (bugs) that can happen when this function is...

Read More

October 12, 2014

Security of complex systems

What Shellshock can teach us about emergent behaviour

As I write this, the Internet is in panic over a catastrophic remote code execution bug in which bash, a commonly-used shell on many of the today's servers, can be exploited to run arbitrary code.

Let's backtrack a bit: how is it possible that a bug in command-line shell is...

Read More

September 26, 2014

Kupnja stana: neverending story

One person's account of a Kafkaesque process of purchasing a home

This is an old article from my Croatian blog. It would lose much in the translation, so it is reposted as-is. To spare you the effort of learning Croatian: it chronicles my adventures in trying to purchase and furnish an apartment, in a manner similar to...

Read More

August 13, 2014

Learning Go

From the perspective of a C developer

For the past few weeks I've been looking into Go [0]. It's a rather new language, backed by Google and it seems to have gained a fair amount (relative to its age) of adoption from developers.

These day I'm coding primarily in Python. Apparently, most people switching to...

Read More

July 18, 2014

Type checking in Python

A second installment in a series of programming experiments

One of the defining properties in Python is its dynamic type system. This is both a blessing and a curse. The benefits are probably obvious to every Python programmer.

One downside is that it lets through a class of simple, but very easy to make, errors, that could be...

Read More

May 17, 2014

Maybe in Python

An installment in a series of programming experiments

This post talks about a neat trick for simplifying program flow in Python. If you know Haskell, you'll recognize it as the Maybe monad. If you're more of a Scala or OCaml type of person, it's an Option. If OOP and design patterns rock your boat, it looks eerily...

Read More

April 30, 2014

True problems of software development

An exceptional decades-old nugget of wisdom

I'm halfway through Patterns of Software, a collection of essays by Richard Gabriel (one of creators of Common Lisp). The book approaches problems in software development from a philosophical standpoint and is heavily influenced by works of Christopher...

Read More

March 02, 2014

Linux and OSX

I made a switch that isn't

Yesterday I tweeted this:

A long time ago I was a full-time Linux user and occasional Windows user. Apparently now I'm a full-time Mac user and occasional Linux user.

The tweet and syndicated Facebook post about, in reality, pretty incosequential thing, got more responses than...

Read More

January 15, 2014


Switching to a new blogging engine

As of the time of this writing, my current blog is still a WordPress instance hosted on own VPS. Many times I've considered switching to something else, mainly because WP is notoriously exploitable and requires constant vigilance in updating the version, and because the themes...

Read More

September 28, 2013