On tests, take home problems, and a HackerRank bookmarklet - lazyblog

So recently I've been interviewing and as you can imagine that means doing take home problems and online tests.

I am not pointing fingers (so please continue hiring me lol), I am addressing the problem in the industry, because almost everyone is doing it in the same way, so you could say no one is directly responsible. Even though willingness to have a better process should be a thing.


Implementing racket/trace in JavaScript - lazyblog

This is a blog post / diary of my journey through this task, as I'm writing this words I have no idea how and if I will be able to achieve the goal. But, if you're reading this, then probably there's hope.


racket/trace prints calls to a function, that could be useful when dealing with recursion:


It took some time to figure out how to override Skewer's defaults, turns out this is what worked, without the hook it was not working.

(add-hook 'js2-mode-hook #'(lambda ()
                             (spacemacs/set-leader-keys-for-major-mode 'js2-mode
                               "'" 'nodejs-repl
                               "ee" 'nodejs-repl-send-last-sexp
                               "eb" 'nodejs-repl-send-buffer
                               "er" 'nodejs-repl-send-region)))

On whiteboard interviews - lazyblog

What follows is my highly opinionated point of view on the matter, I tried to write the few things I know and think about whiteboard interviews. I hope this helps. If you don't agree with something just comment below, email me, whatever works for you, I want to hear different point of views, me being salty doesn't affect my willingness to listen to people and change my mind.

Also sorry for the wall of text.


[RC Diary] Interviews back to back (-27)

In the first interview I got asked the balance parens question:

You have a string made up of just closed and opened parens, write a function that given that string returns true if parens are balanced, false otherwise

This was my approach outside the interview world:


[RC Diary] You guessed it (-28)

Yes, Idris.

I am going through the exercises, and by the way solutions are here, so the first one is to find if a string is palindrome. So I wrote

palindrome : String -> Bool

[RC Diary] Idris (-29)

Spacemacs integration

So I've added the Idris layer into my Spacemacs config and everything is working perfectly, aaaah. Colors are ok, indentation too, and the REPL works as expected, the only thing that got me thinking was the (Not loaded) message under the buffer in which I have Idris code, but now it makes perfect sense, it says that when you have changes that haven't been loaded in the REPL, I just need to ,r to load it



[RC Diary] Idris (-30)

First I tried with cabal install idris, but that left me there puzzled because of modules depending with each other and failing all together happily.

Then I tried with stack, and stack install idris --install-ghc. The install-ghc flag allows to install the correct version of GHC, which for example on my system was too old.

Which all failed miserably.


[RC Diary] Scheme interpreter, lambda calculus, and wtf is this (-32)

tl;dr: dead

(I'm the second from the left)

We expanded the interpreter to allow more cases:

(define eval-expr

[RC Diary] Mock interviews and the little schemer (-33)

Mock interviews

So I've a mck interview with an developer from Heap he said it went very well, if there's an area in which I have to get better is recognising big Os. I hate that part of CS, I will try to do more exercises on these