tag:blog.oskarth.com,2013:/posts Oskar Thorén 2022-10-12T00:24:24Z Oskar Thorén tag:blog.oskarth.com,2013:Post/891323 2015-08-07T16:07:22Z 2022-10-12T00:24:24Z PSA: Experi mailing list

This is just a announcement for subscribers of this blog. Most of the things I write online nowadays ends up on my experiments journal: http://experiments.oskarth.com/.

I didn't want to move over subscribers directly, but if you wish to subscribe to its own mailing list you can do so here: http://oskarth.us10.list-manage.com/subscribe?u=eb9509b0e9820f2fc234227d6&id=6bb99e6219

That's all! _o/

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/825481 2015-03-16T22:21:49Z 2015-04-14T12:19:36Z Unfolds: a jungle of ideas (prototype)

Unfolds is a tool I've been working on for the last few weeks. It's just a prototype, but I want to get it out there so people can try it.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/701586 2014-06-08T18:10:13Z 2014-06-08T18:21:04Z Etymological Delights 1-10

When I want to understand something I often start by looking up the history of a word. Here is a small selection of words and their history. Quotes are taken straight from Etymonline.com, a wonderful english etymology site. Selective interpretations follow; I'm just a layman, an amateur.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/698752 2014-06-01T21:16:29Z 2014-06-02T05:16:35Z Using regular expressions to learn a language

Regular expressions are cool creatures, but I've mostly been avoiding anything but the most basic ones, thinking they are more trouble than they are worth. Last week I found myself needing them when I was going through a largish code base. I ended up solving two problems, as well as ending up with two new problems.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/696089 2014-05-25T20:29:45Z 2014-05-25T20:33:17Z Web framework in Clojure

This weekend I made a small web framework in Clojure. It was written in less than 4 hours, is less than 100 lines of code, and it doesn't do much. Here's the code for it.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/692638 2014-05-18T13:02:34Z 2014-05-18T13:57:47Z Commmunication wells Wiio's law states that "Communication usually fails, except by accident". To understand what words mean, it's useful to look at their history. Communication means "to make common". Accident comes from ad- "to" and cadere "fall". Taking this humorous saying seriously for a minute, where do we have to fall to make something common? Imagine a cross-section of a landscape, with a number of wells of various depth and breath. A well represents a field, like physics, cooking, or writing. The depth is how specialized the field is. The breadth is how many people are familiar with it. For example, English is quite complex but it's common to a lot of people, so that's a wide but deep well. Obscure trivia is shallow and not very wide. Something like Quantum Field Theory is very deep and not wide at all. As we discover more things, especially in science, wells merge or disappear. Is this an accurate depiction of human knowledge? Probably not, but it gives you a way to communicate complex ideas: (a) understand that you are in a well and (b) make it easy for people to fall into that well. (191 words)
]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/689581 2014-05-11T20:53:21Z 2014-05-18T13:02:23Z Coin change problem

How many different ways can you make change for $1, given quarters and dimes? What about the general case with some amount and a list of different types of coins? The key observation is that we can divide the solutions into two parts: those that requires the first coin and those that don't. From this observation a recursive function "count" can be devised, with count(money, coins.tail) + count(money-coins.head, coins), together with some common sense base cases, will show how many ways we can make change. (86 words)

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/686437 2014-05-04T19:38:08Z 2014-05-18T13:02:33Z How to make scrambled eggs

The most important thing about scrambled eggs is stopping them from overcooking. Start off with eggs in the pan and some butter. Don't salt or whisk the eggs before they get into your pan. Use a spatula. Start on a generous heat. Give them a break from the heat once they get going, so they can combine and avoid drying out, repeat three or four times. Continue stirring, it's a live thing. When it starts to get together, take it off. Put creme fraiche to cool it. Season with salt, peppar and a touch of chives. Recipe by Gordon Ramsay. (100 words)

Image: http://www.quietlikehorses.com/2012/10/the-best-scrambled-eggs.html

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/682936 2014-04-27T20:22:30Z 2014-07-02T10:07:22Z The Simplicity Toolkit

Last post we talked about simple vs easy in the context of general error handling. Here's a more general framework for thinking about simplicity, coming from Rich Hickey's talk Simple Made Easy. All distinctions made in this post are taken straight from that talk.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/679543 2014-04-20T20:33:37Z 2014-04-23T14:08:52Z Simple error handling using slingshot and clj-http

Lately I've been been thinking about simplicity in software. When I say simple I mean: not compound. This is different from easy, which is a measure of familiarity. If this distinction is unfamiliar to you, I recommend you stop reading this and go watch Rich Hickey's talk Simple made easy first. With that said, let's turn to the subject matter at hand: What does simple error handling look like?

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/677024 2014-04-13T21:53:52Z 2014-04-14T06:50:38Z Which companies own your phone screen real estate?

On a smartphone, the home screen is the prime real estate. It's where our eyeballs hang out. Metaphorically speaking, of course. No one is getting a screen implanted into their eyeballs - yet. On my iPhone 5 I have 24 icons in total. Here's the breakdown company by company.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/673764 2014-04-06T22:17:46Z 2019-10-23T17:10:14Z Basic auth in Clojure

This week I wanted to implement a simple authentication mechanism for a small website. I didn't want to add any complicated login mechanism, and I wanted to customize the site based on who logged in. Here's how I did it so I using a basic auth and ring middleware.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/669783 2014-03-30T21:59:43Z 2014-03-31T08:44:24Z Gaps and Anomalies: 16-20

This is a continuation of the gaps and and anomalies series. You can read the previous 15 gaps here:  http://blog.oskarth.com/tag/gaps

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/666876 2014-03-24T00:26:40Z 2014-03-24T00:42:44Z Ten weeks in a row

About three months ago I set out to write a post every week. This marks the tenth week of posting in a row. I did this as part of an online version of Iron Blogger together with a bunch of other Hacker Schoolers. What follows are lessons I learned, as well as some general thoughts on it.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/664505 2014-03-17T02:01:06Z 2016-11-14T19:10:38Z How to beat confirmation bias in any given domain

Confirmation bias is a disease where the afflicted is looking for information that confirms his or her hypothesis rather than trying to contradict it. At present time, it is estimated that the whole of humanity is effected by it. Why is confirmation bias a problem? For one thing, looking for confirming evidence doesn't make you learn new things about the world. Since the world is pretty big, and humans are generally small, this is a problem.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/662266 2014-03-10T03:30:30Z 2014-03-30T20:52:18Z Gaps and Anomalies: 11-15

This is a continuation of the series started here: http://blog.oskarth.com/gaps-and-anomalies-1-10

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/659874 2014-03-03T02:05:16Z 2014-03-03T13:24:11Z Two types of errors

I wanted to run Datomic Pro on a cheap test server with 1GB RAM. The default settings for Datomic Pro are a bit too memory-intensive for this. This is a tale of two very similar errors that I had and how I fixed them. What's interesting is the difference between the two.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/657527 2014-02-24T01:09:05Z 2014-02-24T01:20:47Z Rex and Albert: meet Romeo and OJ

In Thinking, Fast and Slow Kahneman introduces System 1 and System 2. Unlike the left-brain / right-brain pseudoscience, this distinction has some merit. It represents much of what we know about how the brain processes things. System 1 stands for the slow and deliberate, while System 2 stands for the automatic and unconscious. These systems have very anonymous names because we don't know very much about them; in scientific terms, it's just two different responses, which underlies, among other things, much of behavioral economics. To avoid confusing them, some people have come up with the clever names Rex and Albert. Rex conjures up images of a T-Rex, whereas Albert hopefully (after having heard it the first time, at least) makes you think of one of the most foremost physicist of all time. I'll let you guess which System belongs to which. Now who's Romeo and OJ?

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/655190 2014-02-16T19:42:36Z 2014-03-30T20:52:08Z Gaps and Anomalies: 1-10

This is a blog series devoted to a footnote in an essay by Paul Graham. I started writing these down three months ago in a now inactive blog. I figured it belongs here rather than there.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/652482 2014-02-09T17:32:34Z 2014-04-19T20:47:56Z Anatomy of a Om component

Om is a Clojurescript library to represent UIs[1]. It interfaces with React.js, which is what Facebook built and is using to make their app. By using a efficient algorithm for computing DOM Diffs, inspired by Doom 3's game engine render loop, the complexity of keeping track of app state is reduced significantly without performance costs. This is a very brief overview of a Om component.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/648411 2014-02-02T22:25:36Z 2014-02-02T22:25:36Z Bifurcation Analysis with XPP

This is a continuation of last week's post. I had some troubles getting the graph that I wanted, but Bard Ermentrout (the creator of XPP) fixed the problem in a sentence via email (lesson: when stuck, don't be afraid to ask the experts). There will be many technical terms which won't be elaborated on in this post. I encourage the reader who want to follow along to look up things they are not familiar with on Wikipedia. The post assumes you have some familiarity with bifurcation analysis (the qualitative study of ODEs).

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/646377 2014-01-27T00:54:38Z 2014-01-27T14:10:12Z XPP - quirky but declarative and interactive

Complex systems in fields like System Biology can often be described as a set of differential equations. These differential equations represents how species like proteins and enzymes change over time during various circumstances, like differing initial conditions and parameters. The behavior of the system corresponds to various biological phenomena like cell differentiation. Usually one has a bunch of these equations, based on experiments, assumptions or both, and want to figure out how the system, say, a cell, behaves. XPP is a tool that makes this easy.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/643639 2014-01-20T02:23:55Z 2014-01-24T18:30:09Z Decade dollars and using the right level of precision

A couple of years ago I was referring a article about a company which had seen tremendous growth in a very short period of time. It was a Swedish company that had somehow established itself in Russia but with very little exposure in the Swedish press at all. A guy asked me, surprised at not having heard of this company, how many employees they had. My answer? I think it was 500, but it could have been 50.

]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/582583 2012-11-01T12:00:00Z 2014-04-08T11:03:44Z Writing a DSL in Clojure

The goal of this article is to explain how we could go about writing our own domain-specific language (DSL) in Clojure. We will use Chipper, a very simple DSL for reasoning about logical gates, to do so.
]]>
Oskar Thorén
tag:blog.oskarth.com,2013:Post/604896 2012-10-01T12:00:00Z 2017-01-10T06:17:28Z How are you spending your time?

Going through Hacker School for the first time this summer made me more familiar with the landscape of programming. I began to see patterns, and with that, paths. I know what kind of things interest me and what I want to get good at. This is my list of things I am either learning right now or want to learn during my second time around. The first half consists of things to do, and the last half of general themes.

]]>
Oskar Thorén