Day 88 - Clojure driven finance startup and 4Clojure
Another 4Clojure challenge, this time #9 covering sets in Clojure. I like working with sets and like other main data structures they can be used like a function.
I had what will probably be the weirdest and most pointless interview of my life. The first half started well and I quickly built a positive rapport with the founder and CTO. They had ambitious plants.
The interview quickly went weird as soon as I met the 'developers' who were interviewing me. They both projected inexperience and one was incredibly nervous all the way through.
The 'lead' developer decided to completely change the approach of the interview without actually letting me know in advance. I had submitted a solution to a take-home test which I had spend a few hours on, but they completely ignored it and wouldn't let me walk through it.
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 well and there definition of the role was clear to me. Unfortunately the follow-on interview with two developers when poorly. they seemed to be interviewing me for a completely 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 relieved to not spend any more time 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 🤯
4Clojure Challenges¶
4Clojure Challenge #9 introduction into sets
A quick bit of coding to experiment a little with sets.
A set is data structure in Clojure that represents a unique set of values.
The order of the values in the set not guaranteed and is irrelevant, as its the uniqueness of the set that is generally useful important.
Should order of the values be important, the sorted-set returns a sorted version of the set with unique values.
The contains? function returns a boolean result if a value is within the set.
Or use the set as a function which returns the value if its present or nil if not present. nil is treated as false value in Clojure.
4Ever Clojure #9 Intro to Sets - Design Journal
Design Journal
(ns four-clojure.009-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.