1) Write an algorithm (choose the language you prefer) that given a character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of characters appearing at least 2 times. In this specific example, it would return {‘a’}. Afterwards, comment out the cost in terms of space and time.

// I've left out validation to concentrate on the algorithm itself, I hope it's ok

// O(n) time

Learning Vue.js - lazyblog

A lot of time has passed since I willingly wanted to learn a frontend JS framework, I am doing it again because

  • Vue's docs seems to be detailed enough
  • there's a nice and easy way to start
  • I've used it for a take home assignment as part of a job interview and loved how it all came together easily and almost painless
  • enriches HTML the Angular.js way, so that's something I already know

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.