Recovering lost skills

Started by
12 comments, last by ranakor 11 years, 1 month ago

I see you had an hard time. Welcome back dude. I wish you the best!

Previously "Krohm"

Advertisement

Due to the unreadability i don't think this will spoil it to anyone who can't write it :

<3 LINQPad

Enumerable.Range(1,99).Select(i=> (i%3 == 0 || i%5 == 0) ? ((i%3 == 0 && i%5 == 0 ) ? "fogbuzz" : ((i%3 == 0) ? "fog" : "buzz")) : i.ToString()).Dump()

I think you underestimate the legibility of that code. although it is a very nice one-line for the solution.

also, that problem just seems to be an exercise in understanding the mod operation, I think any programmer who understands it's use would understand how to write a trivial solution.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

that problem just seems to be an exercise in understanding the mod operation, I think any programmer who understands it's use would understand how to write a trivial solution.

Seemingly so, yes.

However in the hundreds of places it has been posted online and the thousands of responses by people who cannot resist posting their solution attempts, it has shown to be much more difficult in practice than it seems at first glance.

It is surprisingly easy to get your solution wrong on the first attempt.

It's a bit of a specific problem as i can see it being obvious to game programmers but many other programming fields deal surprising little with any form of operations on numbers, even the most trivial ones (most LoB apps for exemple).

I'm fairly sure if i asked my previous coworkers some of them wouldn't even know about the % operator.

This topic is closed to new replies.

Advertisement