Skip to content

Day 88 - Clojure driven finance startup and 4Clojure

Another 4Clojure challenge, this time #9 covering sets in Clojure.

A lunch with a another company with Clojure roles, cycling to and from the meeting on the Bromptom.

Weirdest Interviewλ︎

The company is called Be-Social, a finance startup that is building an app to make spending money a more social activity and enabling friends and colleagues to share bills and other expenses.

The interview with the Founder and CTO when very well and the role was very clear to me. Unfortunately the follow-on interview with two developers when very poorly as they seemed to be interviewing me for a very different role.

The developers didn't seem at all prepared and were 'trying something different' apparently.

We started with what they called a 'pairing session' where they handed my a laptop (it was a Mac and I had not used one in a long time). I struggled to use the mouse to click and the developers couldn't (be bothered to) explain how they had set it up. I muddled on...

The 'pairing' continued where I struggled to use the Mac and IntelliJ (something else I hadn't used) to try understand a code base using libraries I had never used. I asked questions about the code but the developers refused to answer them, saying I should just experiment with the code.

As I couldn't figure out how the Clojure REPL worked in IntelliJ and they didn't know either, my ability to experiment was severely limited. It wasn't even clear how to start the application so I could see it running or run any unit tests. The developers just stat there and watched the screen or stared at me, without answering any questions.

By this time I was becoming quite disillusioned with the developers in front of me. I was trying not to focus on the question of why I wanted to work with people so closed as this.

You may have noticed that neither of the developers interviewing me were playing their part in the 'pairing' process and watched me struggle instead. Actually one of the developers was feeling so out of their depth that they didn't really engage in any part of the interview, except to say that they were feeling out of their depth when I did ask about their role during our brief introductions.

After 30 minutes of not 'pairing' with me, they proceeded to quiz me on obscure information about REST. One of the developers took great pride in how much they had learned about REST, the four levels of REST and lots of other niche information. This seemed to be the measure of how good an engineer would be, mainly because that is how his previous (and only) tech lead had worked.

I walked out of the interview at the end with the final words that they should talk to their founder about what they are looking for, to save everyone some time. I had no illusions that any kind of follow-up from the interview would be forth-coming. I was pleased not to have to even consider a role there.

Its not the first time (probably no the last) that people within a company have wildly different expectations. Its like they haven't actually talked to each other about the role :shocked_face_with_exploding_head:

4Clojure Challengesλ︎

4Clojure Challenge #9 introduction into sets

A quick bit of coding to experiment a little with sets.

A set in Clojure represents a unique set of values, the order is not guaranteed and is actually not important, its the uniqueness that is important.

You could always pull the values out and sort them if you needed something with there.

The contains? function is useful to return a boolean result as to if a value is within the set, or you can simply use the set as a function which returns the value if its present in the set or nil if not.

4Ever Clojure #9 Intro to Sets - Design Journal

Design Journal
(ns four-clojure.009-sets-conj)

;; #9 Sets: conj

;; Difficulty:  Elementary
;; Topics: Sets

;; When operating on a set, the conj function returns a new set with one or more keys "added".

;; (= #{1 2 3 4} (conj #{1 4 3} __))


;; Deconstruct the problem

;; A simple challenge to show how `conj` works with sets.

;; REPL experiments

;; As discussed in challenge #8, sets do not really care about order
;; it is only the values within the set that is important

;; So if the result we want is `#{1 2 3 4}`
;; then we just need to conjoin the missing number

(conj #{1 4 3} 2)


;; => #{1 4 3 2}


;; Answers summary

;; Most readable answer
2

;; Superfluous answers

;; As conj can take multiple values you could add any of the values already in the set,
;; so long as you are adding 2 also.
;; Extra values will just be stripped out.

;; 1 2 3 4
;; 1 2 3 4 1 2 3 4 1 2 3 4

Thank you.

🌐 Practical.li Website

Practical.li GitHub Org practicalli-johnny profile

@practicalli@clj.social @practical_li