3 ms·
I had a similar assignment when I applied for a remote Clojure job at a startup in California. Create a REST API in Clojure (which I can do in my sleep at this
by jcadam 9y ago
I had a similar assignment when I applied for a remote Clojure job at a startup in California. Create a REST API in Clojure (which I can do in my sleep at this point). I decided to use a database (in my case, H2) along with HugSQL because it handled some of the requirements for me (unique constraints, etc.), and I'm comfortable with databases. I could have done it in code using a collection (and used filter/map/reduce/etc.), but just using a database and defining a schema seemed the simplest and most fool-proof solution (and I think the proper place for these sorts of checks is in the database, anyway).
During the code review, the interviewer seemed surprised that I used a database, but didn't seem to have much of a problem with it ("you're the only one I've seen do it that way"). In any event, the 'code review' consisted of him saying "Well, um.... I can't really find anything wrong with this, you're definitely a good Clojure developer"
And then they passed on me anyway. I wonder if they ever filled the position?
P.S., not the first time something like this has happened to me, I've had nearly the exact same experience when I applied for a Golang job.
P.P.S., Also I've got the "Pass. We think you'd be bored here." Which is aggravating. It seems I can only find employment at places with nearly non-existent tech screening that under-utilize me and don't care if I'm bored out of my skull.
- scardine 9y agoHugSQL is very handy - used it for my solution also. Coming from Django Rest Framework I felt at home with Compojure-API. Hearing "you are overqualified" is awful.
- ajmurmann 9y agoNot being a Clojure dev I'm curious: Wouldn't a database be the more scalable solution? How would multiple servers share access to the data of it's in memory? What about persistence?
- jcadam 9y agoIt was an 'exercise' for evaluation purpose. In the instructions I was told that a database was not necessary (I'm assuming the interviewer didn't want to have to setup a DBMS just to evaluate my solution). The obvious solution to me in this case was not to eschew the use of a database. Since Clojure runs on the JVM, there are many 'embeddable' databases one can use (H2, Derby, et al) that do not place a burden on the person running your program. Hacking together a poor implementation of an in-memory database myself seemed silly. Indeed, a major use of embedded databases like H2 and Derby is in prototyping - with the intent of moving to a 'real' database in production.