Skip to content

Instantly share code, notes, and snippets.

View lazywithclass's full-sized avatar

Alberto Zaccagni lazywithclass

View GitHub Profile
@lazywithclass
lazywithclass / blog-post.md
Last active February 9, 2021 06:22
On whiteboard interviews

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.

@lazywithclass
lazywithclass / blog-post.md
Last active May 3, 2017 23:23
[RC Diary] Interviews back to back (-27)

[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
@lazywithclass
lazywithclass / blog-post.md
Last active May 1, 2017 22:21
[RC Diary] Idris (-29)

[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

good

@lazywithclass
lazywithclass / blog-post.md
Created May 1, 2017 01:01
[RC Diary] Idris (-30)

[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.

@lazywithclass
lazywithclass / blog-post.md
Last active April 29, 2017 23:47
[RC Diary] Scheme interpreter, lambda calculus, and wtf is this (-32)

[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
@lazywithclass
lazywithclass / blog-post.md
Created April 29, 2017 23:40
[RC Diary] Mock interviews and the little schemer (-33)

[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

@lazywithclass
lazywithclass / interp.rkt
Created April 28, 2017 21:13
Racket interpreter v2
#!/usr/bin/racket
#lang racket
;; https://www.cs.indiana.edu/cgi-pub/c311/lib/exe/fetch.php?media=pmatch.scm
;; pmatch included here ******************
(define-syntax pmatch
(syntax-rules ()
((_ v c ...) (pmatch-who #f v c ...))))
(define-syntax pmatch-who
@lazywithclass
lazywithclass / blog-post.md
Last active May 3, 2017 18:55
[RC Diary] Interviews and exercises (-34)

[RC Diary] Interviews and exercises (-34)

Soft skills

I've done quite a few interviews today. One of which I don't think went that well, strangely enough it was the first informal interview where I performed badly.

Technical questions

I've got a few questions but the most interesting was the one that I'm about to present, I've changed the wording and

@lazywithclass
lazywithclass / blog-post.md
Last active April 26, 2017 02:29
[RC Diary] Implementing a trie in Racket (-35)

[RC Diary] Implementing a trie in Racket (-35)

Man do I feel sick today.

I also pair programmed on implementing a trie in Racket, really entertaining stuff. This is the result of us pairing on it.