The other day I was doing some pair REPLing with my colleague Sophie. Basically, I asked her for some various functions that, at first, she didn’t quite understand the point of, but eventually, it became clear. On the way to work today, after grabbing a coffee over at Tim’s, we talked a bit about category theory and similar stuff, as one does, and we realized that what we had done in the REPL was…
Coffee is a big part of my life. And not just any coffee, I prefer espresso based drinks with steamed milk. So when Einar challenged me to write a blog post on milk in coffee, how could I possibly not do that? Milk in espresso based drinks is a facinating topic. The first part of it, which I’m not even up for discussing is the type of milk. IMNSHO opinion the best milk to have in your coffe is the…
Some things fit into a tweet, some things don’t. This doesn’t A topic for another day could be what my hobbies are, and how I approach them, but for the sake of this post, I’ll say that one of them is windsurfing. Living in Oslo, Norway, which is at the end of the Oslo fjord, it means that a bit of driving is required to get favourable conditions. And what I tend to do when I drive is to listen to…
As one of the maintainers of the various repos over at clj-commons , it’s often on me to deploy new versions of the libraries to clojars . This used to be a pain, as deploying libs tended to include a bunch of manual steps. Also, even though almost nobody cares, I tend to sign the artefacts, which meant (since gpg has a rather unique user experience) that I only had one computer I could do the…
Ardoq is a multi-tenant SaaS application. This means that we have, well, multiple tenants (organizations in Ardoq parlance) to which users are connected. The important bit here is that we need to guarantee data isolation between our organizations. This has been solved by having in MongoDb terms, a database pr organization. So when we get a request from a browser, we figure out which user this…
In the previous post in this series, I tried to outline some of the problems I see when using Component based libs in Clojure. In this post, I’ll look at a couple of problematic areas I discovered in our codebase related to how we do configuration in conjunction with Component. In this post I’ll use external config to mean configuration which is provided from the running environment, and internal…
This is, what I hope, the first of a series of blog posts where I explore the design of the Ardoq in terms of its use of Stuart Sierras Component System . It’s important to me to stress that this series is not a critique of Stuarts fine library, nor is it going to propose some alternative, as there are several, like Mount and Integrant . It is simply a series where I explore how our codebase has…
When you write applications, and in my situation, multitenant SaaS applications, both authentication and authorization are important parts of the system. Authentication, which will carry the story in this blog post, is about establishing who someone is, authorization is about what that person is allowed to do. We’ll leave authorization behind for now, and focus on authentication in a multitenant…
In my previous post I contrasted two different ways of approaching JSON (de)serialization. In this post Eric Normand discusses different ways of doing CSV parsers. Basically, these are two posts are about the same thing. It’s about where you draw the line. I think that in Einars words, you’d say that it’s about drawing the line between the bounded and the unbounded problem. So listening to David…
So, Einar Høst has been a bit frustrated about JSON serialization lately. In fact, he’s been more than a bit frustrated. I’ve made some fun of these problems, because they seem like problems I haven’t had since the last time I programmed in Java. But instead of just making fun of this on twitter, how about looking at how we deal with the problem of JSON serialization in the Clojure app we have at…
Hillel Wayne has a newsletter that you should absolutely subscribe to. Todays edition is called “Why Python Is My Favourite Languge”, and describes all the hurdles you need to jump in order to solve your $PROBLEM in a new language. So in this post, I’ll try to look at these hurdles, and see how they are overcome in my favourite language, Clojure: How do I install the thing? Hillel didn’t actually…
I really enjoy performance tuning. It’s a bit like debugging, you are presented with a problem (this thing is too slow), and you need to figure out where the slowness is hiding, and then how to fix it. Luckily the slowness I was working on today was reproducible and consistent, so it was just a matter of profiling the code. Previously, and especially when working with Java, I’ve been using Yourkit…
One of the hardest things of trying to write a post each day is to start again once you’ve missed a day or two (as I have). Yesterday I decided to prioritize writing a patch to tools.analyzer.jvm that I’d wanted to submit for quite some time. At work, we use Eastwood for linting. Having a 60KLOC pluss code base, linting takes some time, so I decided to look into where it spent its time. So this…
So yesterday, life got the better part of me, so I didn’t prioritize writing a post, but today I’m on it again. One of my great frustrations is how we try to “configure” things, using languages like XML, JSON, and YAML. This approach works great for smaller things, but once you’re into something of significant size, these languages show their limitations: No loops, no conditionals, no variables,…
This morning, a tweet came across my time line: Strongly recommended for all the people who position themselves as a software professionals. Thanks again @ChristinGorman https://t.co/DMY4Fsc1vm — Pavel Savinov (@Pavel_Savinov) December 3, 2019 and watching the talk I was reminded of what a great speaker Christin is, in my opinion she’s clearly one of Norways best. But as you’ll see from the…
Last Tuesday, The Unicorn Project was finally launched. This followup to The Phoenix Project doesn’t disappoint, and is as much a must read as its predecessor. There are a couple of things I’d like to mention. The first thing is that the author Gene Kim has really fallen in love with Clojure and applies the principles of Clojure to the larger organization. As a side note, I’m wondering if The…
So Lambda Island has this challenge of writing a blog post for every day of December until the 24th. I figure I’ll give it a shot. This will most certainly be in the spirit of not letting perfect be the enemy of the good, so consider yourself warned. What I want to mention briefly today is one of the less obvious ways that Clojure has helped me become a better programmer. If you’ve ever tried to…
Johannes Brodwall posted Dirty Code Monday on his, eh, blog, to show some of the dirty code he let through, which he otherwise would not. In this he also highlighted what about the code he thought was dirty. This lead me to make an unfortunate tweet What scares me most about the code you’re showing is how tightly coupled the logic is to its environment. A bunch of the values you use in your…
On hiring Clojure programmers I’ve been in a position for the last five years where I’ve been involved in the hiring process at various companies. As an architect/senior-dev, I’ve been involved in writing the job-descriptions, reading resumes, interviewing candidates, and onboarding the ones that got through. And this for positions as Javascript, Java, and Clojure programmers, as well as general…
Not really sure what this is, but it might just be something I’m starting. It’s basically an outsiders view of what’s going on inside Clojure. I’ll be looking at what tickets moved in the Clojure Jira, the last seven days, and also comment on any commits done to the github-repo. Anyways. The issues updated the last seven days were: CLJ-2060 Add support for undefining a spec CLJ-2082 Improve…
So, @technomancy asked on twitter: Leiningen users: how do you feel about checking the bin/lein shell script into project repositories so everyone uses the exact same thing? — technomancy (@technomancy) March 14, 2017 My answer is no, I don’t see the need for that, but I thought I’d elaborate. I think the project.clj s that I’ve made/used have been fairly simple stuff, mainly declaring the…
At work we have this concept of “Fun Fridays” - every other Friday we get to work on whatever we want. It’s a plus if it’s work related, but that’s not required. This is nothing new, Google has had it for years. So, what do you do on a Fun Friday? Very often it seems like stuff that’s in category of “stuff I want to do with our product/project that never gets prioritized” or maybe “I really wonder…
As mentioned before, one of the key reasons I love Clojure is the language itself and its many ways of expressing the same thing. This lets you tinker with an expression until it feels Good(TM). Of course, there are many different versions of Good, but in general, they can be partitioned in two: My version and all the others. This leads to at least two things. One thing is that I generally spend…
So Clojure is a dynamically typed language. So is Javascript, but Javascript feels so much more insecure to me than what Clojure does. I think one reason for that is that Clojure does a bit more thorough job when it’s compiling. Consider the following piece of Js-code function foo () { return bar ; // bar is undefined } When evaluating this in the console, all is fine and dandy, but when you try…
It’s important to know where I’m comming from. I’ve been programming professionally for about 20 years now. I started out using Perl, switched to Java because reasons in ‘99 and been missing the fun of emerging myself in the language as I did with Perl. In Perl there’s TIMTOWTDI , and I certainly like working on a function or a piece of code until it looks nice, for some (my) definition of nice.…
So, today I had my first day at Telenor Digital . Not much exciting stuff to report, but a couple of things worth noting: 1) It felt really good to be browsing the sourcecode in emacs, and discover that they’re using Hugsql , Om , Figwheel and a dash of core.async along with Kafka . I guess I’ll be re-watching One Million Clicks per Minute with Kafka and Clojure a couple of times 2) The tooling.…
Today I had my last day as a consultant at Iterate As . After almost exactly two years I’m ready to start what should be the job I’ve been wanting for the last almost three years: A full time job programming Clojure. On October 5th I’ll be starting at Telenor Digital on their analytics/data-insights team. I’m very curious to see how programming Clojure in the large will play out. Having worked on…
My twitter feed is full. Over a couple of years, I’ve curated a bunch of people to follow. Some tweet often, some not. Some retweet links to relevant articles, some write the articles. Some are just funny, others are very serious. And I have this fear of missing the one really important/cool/funny tweet, so I spend a lot of time skimming through all these tweets. So what I’d be willing to…
Lately I’ve been playing around with Planck , a commandline bootstrapped ClojureScript REPL for OS X based on JavaScriptCore. There are two reasons for this, one, I’m trying to write as much Clojure(Script) as possible and one way to do that is to try to automate as much as possible using Clojure(Script), and two, it’s fun to contribute to some opensource projects. Planck consists, as far as I can…
I don’t quite remember how I found the post, but anyways I landed upon this blog by @mbcrump about how automator now supports Javascript as a language. I don’t even remember how I got the idea of playing with clojurescript to get it to automate tasks, but definitively read it somewhere. Update: Now I was reminded: @borkdude retweeted (let [mail (new js/Application "com.apple.mail") inbox (.. mail…
Yesterday I tried to do the bownling kata by @unclebobmartin . After reading the intro, it must be clear to everyone that the scoring rules of bowling were not designed by a programmer. Where I failed As you can see from the presentation, Uncle Bob starts out with some design, which he does before doing anything. So apparently, he draws up this (big) design before he starts coding. I didn’t quite…
Alfresco has this notion of activities, which basically is stuff that’s happened in a room in which you are a member. There is an activity feed, and there is an email which is sendt out every so often which tells you what has happened since the last time the email was sendt. The latest activity you received news about is stored in the EMAIL_FEED_ID property on your person object. So every time an…
It seems to me that there are three dimensions of working with Clojure. #The elegance The first, and most obvious dimension is the elegance in the language itself. It is such a pleasure working in a language which lets you do suff like: ( distinct ( map :foo bars )) It’s just like little pieces of functionality waiting to be put together. Like Lego. #The higher order This is where I’m at right…
@odinodin pointed me to @neal4d talk on Introducing Clojure to the enterprise . Having watched it I want to bring forward some of my own thoughts on the matter. #Guerilla tactics Neal (I hope he’s okay with my using his first name, Mr. Ford sounds so formal, and people might confuse him with Harisson) talks about Cat burglary in his talk, where you let unknown tech piggyback on known tech, as a…
This is a short summary after having written my first 1000 lines of Clojure. It all started when I was assigned the task of importing some stuff into our stuff and nobody cared to specify which language to write the importer in. First I thought I’d write it in Scala, but when push came to shove, I couldn’t be bothered learning a new syntax, so I figured Clojure would be a good fit. I’ve always…
@mfeathers wrote an article back in 2008 about Unit Testing in which he, if I understood him correctly, amongst other things say that it doesn’t matter too much if you unit-test or not, as long as you think carefully about your code. But that’s not the point of this post. The reason I bring up Michael Feathers article is that it talks extensivly about mocking as a good thing. And I’ve been…
#The CleanerUpper @jessitron wrote a post on some refactoring she’d done in Scala. But it was not the neat refactoring that got me thinking, it was the name of her class class CleanerUpper ( broom : Broom , rag : Dishcloth , wiper : MicrofiberTowel , config : CleanConfig ) { } ##OO and naming Naming has been a problem for me ever since I started programming Java. I don’t know how many Managers,…
##The things I love ###REPL Working in the REPL is just amazing. It lets you experiment with stuff, redfine functions on the fly, assign stuff to variables, work with them, and it’s just great. Working in Java, the closest thing I can come to is running unit-tests in your IDE. But still then, it’s just way more complicated. The REPL, combined with the fact that you normally start out implementing…
Last night I tweeted Seems to me that refactoring-tools are much less needed when programming #clojure — Erik Assum (@slipset) March 1, 2014 to which I got a couple of responses. First from @mikera which contained a link to a really nice post he’d written outlining some good points about Java vs Clojure: @slipset I've found the opposite - lack of refactoring support is one of my (very few)…
Christian Johansen tweeted What's your favorite API documentation? — Christian Johansen (@cjno) January 28, 2014 this morning to which I answered @cjno The source — Erik Assum ( @slipset ) January 28, 2014 He obviously was not impressed by that answer, so that got me thinking, what do I want out of a good api (documentation) First and foremost, I want an api which lets me do what I need to do…
As a mainly programmer working in mainly in Java, but also using Ext.js for frontend development, most of our code is object-oriented, that is stuff like: Ext . define ( ' app.model.room.Room ' , { extend : ' Ext.data.Model ' , ... isFooEnabled : function () { return !! this . get ( ' fooEnabled ' ); }, }); Which, when you code in a normal, oo/imperative style, leads to code like this:…