News for hackers. Stuff that matters.

tictac-toe

Re:WWDC21 on Monday May 24, 2021 @01:52PM (#27267515)
> It feels like a mixture of the good parts of Scala, Kotlin, and Rust.

Indeed, I think at the moment it's hands down the best language available for general application programming. The problem is the lack of libraries on non-apple platforms.

You can use a dynamically sized thread pool. E.g. remove a thread with a certain probability once it's idle for more than X seconds.
All data is relational. If you think some data model is not relational then you haven't thought about the problem space enough :p

The only valid reasons to choose non-relational databases are scalability and performance.

Re:Ask HN: Earning 100k EUR in Berlin? on Sunday December 20, 2020 @11:36AM (#25487436)
You could go into freelancing. For normal developer gigs in Germany you'll usually get 70-80€/hour. Contracts are often for 6 months and will get extended in 6 months steps. Depending on how much you work you can make 150k+. Still not comparable to SV salaries, but better than being a permanent employee in Germany.
Re:How to Interview Engineers on Monday October 12, 2020 @02:08PM (#24757456)
> Then, give them a problem. The one I gave for years is to write a program that plays every possible tic-tac-toe game, and then prints the number of valid games.

There must be people he interviewed, they should be able to answer your question.

Re:How to Interview Engineers on Monday October 12, 2020 @01:48PM (#24757180)
Ok, took me 20 minutes, and I forgot to count the draws–I only counted the games when there is a winner.

But I think his math doesn't work out. The solution is only about ~100 lines. If typing speed was the bottleneck, it would only take 2 or 3 minutes from start to finish.

> The most talented candidates will think about it for a few seconds, then write the program as fast as they can type (and they'll type fast). You can almost sense their frustration because they think way faster than the keyboard allows them to interface with the computer. Typing speed is their bottleneck. (...) The whole process will take about 10 minutes from start to finish.