Senko Rasic

Facts and Beliefs

In context of software development

Software must have a purpose[0].

This is both self-evident and controversial. If we're expending serious effort to build it, it better have a purpose, but on the other hand, the purpose (the why) and the behaviour (the what) are often conflated.

Purpose is like a mission statement - a concise description of why something is being done . . .

Read More

July 12, 2015

Progressive Fibonacci

In which our protagonist codes up the simplest thing that could possibly work

Hey Protagonist, gimme a function calculating and returning N-th Fibonacci number.

Here you go:

def fib(n): if n == 0 or n == 1: return n return fib(n - 2) + fib(n - 1) 

Hey, it crashes if I give it a non-natural number, that shouldn't happen. It should nicely report the error instead.

Okay, no problem, here's a modified version:

def . . .

Read More

June 29, 2015

Junk Social

How I accidentally quit Twitter and Facebook

At some point, a couple of months ago, I noticed that my Facebook feed devolved into 9GAG reposts and random things about people I sometimes knew, often not. Twitter wasn't any better — it was mostly flame wars about web development issue du jour[0].

This wasn't the case of me just not grooming the feeds. I heavily curated Twitter . . .

Read More

January 27, 2015

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 used?

First that come to mind are type errors. The factorial . . .

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 exploitable remotely? And why is it a problem if a shell, . . .

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 Kafka's The Trial, except there's a happy end and I'm not a literary genius.

. . .

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 Go are users of Python, Ruby, and similar languages. So, . . .

Read More

July 18, 2014