Programming Triva Thread



How would you optimize this statement for web scale?

print eval('+'.join(map(str, [1, 1])))
 
i got one, which lang is better? Python or Ruby or PHP?

i'll cheat and give you the answer:


















































































1. The one that fucking makes you bank
 
couple questions i used to ask in interviews:

describe three methods of implementing coroutines in C (with asm obviously).
estimate performance of lock-free vs traditional b-tree implementations in a multithreaded context on a modern x86 architecture

not expecting answers here, mind you ;)

-p
 
couple questions i used to ask in interviews:

describe three methods of implementing coroutines in C (with asm obviously).
estimate performance of lock-free vs traditional b-tree implementations in a multithreaded context on a modern x86 architecture

not expecting answers here, mind you ;)

-p

Interviews for what position?
 
^^ looks like OS/Embedded Systems engineering.

close. i'd ask those too, but they wouldn't be first on my list, primarily because they address userspace stuff. i did do kernel dev, just never hired for it (might have provided comic relief in a couple interviews, but i was never at work when other people were awake ;) )

the coroutine q is good at determining whether an engineer
* has thought about concurrency models, especially as they apply to high-perf networking code
* likes to know what goes on under the hood of, say, a modern vm implementation *and* has the chops to understand it

the locking vs lock-free q determines if someone understands algorithmic complexity in the real world, under real workloads and most importantly on a real platform, rather than just reading knuth in undergrad. things get turned upside down quite quickly as soon as you stop pretending memory access is instant, memory writes are free because caches don't exist etc. i was never looking for a correct answer (doesn't exist anyway, speaking in a vacuum), mind you, just for someone to show me they understand some of the factors.

i would ask these when hiring for perf/scal work and a few low-latency networking things

-p