- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I think I had a Blakeyrat's Law about that fizzbuzz thing didn't I? I can't recall now.
Admin
That should be a project for you: a website codifying Blakeyrat's Laws where we can all gaze and admire them.
Filed under: Or something anyway.
Admin
Oops, I found a problem in mine, I fixed it though. Of course, no one in there right mind would do it this way, but so what?
OTOH, if I ever get Thelema going, I might be able to do this:
(In Thelema, the optional ':domain' and ':co-domain' specifiers are generalizations of parameter and return types; all functions and procedures are generic, and at runtime the arguments are filtered to go to the most specific sub-routine that they match.)
Filed under: Not as if anyone gives a shit anyway...
Admin
This is my surprised post.
Admin
wait.... you....
Goddess preserve us, you're abusing recursive exec calls that self modify their own source code!
Filed under: Please excuse me, i need to go hide under a rock to avoid the monster you unleashed
Admin
Admin
And left a lot of it.
Filed under: with friends like you, scheme doesn't need enemies
Admin
Well, yeah, I was having fun rather than really solving it in the easiest way possible.
Admin
Reminds me a candidate (actually, a PhD candidate, from Texas) whom I interviewed when I was in Google.
She said in her resume she implemented binary internet search. When I asked for details, she explained that she was looking for binary files on the internets.
Admin
Inexperienced developer can't do FizzBuzz. So?
Admin
Inexperienced developer does crazy arsed shit instead of even attempting to solve it logically.
Meanwhile, Jeff is preaching that we shouldn't use FizzBuzz as a test of developer competence.
Admin
Looks like multimethods.
Admin
Basically, it is, except that it can be applied to any function or procedure, not just those specifically marked as generic, and can dispatch by a predicate criterion as well as by type.
The questions now are, can I make it work, and how much of a performance hit will it cause?
Admin
I think Discourse won. The world is ending. Run for the hills!
Admin
It depends on what you mean by competence. FizzBuzz is there to tell you if the candidate is on the same level as Paula Bean. Further tests are needed to determine if the developer is competent.
Admin
So every function is a multimethod? I've considered that before. Not sure how necessary it is.
You mean you're implementing a language with this feature?
Admin
That's my eventual goal, yes.
Admin
I hate every person that does this version (no real rhyme or reason why, i just feel like hating them).
Now for the obligatory asshat js/jquery version (lacking pretty fizzbuzz formatting, but accomplishing the goal):
Admin
Your implementation is faulty. The numbers should not be printed when divisible by 3 or 5, yet your implementation outputs:
+1 for effort ;)
The below modified version should do the trick:
Admin
No, clearly the right way to go about it is to use the first script but then go through it to remove the numbers before the fizz and the buzz!
Filed Under: Had to use Regex for bonus-points but am too lazy to actually test the code. Improvements might be possible!
Admin
I think he was just writing down portions of his thoughts in random notation.
"Loop from 1 to 100" -> "1-100" "..must be divisible by 3" -> "/3"
and so on...
Admin
[image]
Admin
I have all the specs and diagrams at home.
Admin
You do have a reason, probably the same as mine:
Let's say it's not just FizzBuzz in real life, it's FizzBuzzQuackRing, %3, %5, %7, %9.
Now instead of just checking for 15, you're also checking for: 21, 27, 35, 45, 63, 105...
I very much prefer your way.
Admin
But... but we were supposed to be absolutely secure against spammers! YOU LIED TO US, JEFF! YOU LIED TO US!
Edit - PJH:
if you're going to quote the spam posts, at least take the URL's out please? Ta.
Admin
Feature Request: Dislike Button
Filed under: Yeah, I know, it's been requested already
Admin
It does not say they should not be printed in the article. The way I read it implies they should be printed every single line. I am merely following specs.
Filed Under: WORKINGASDESIGNED, CLOSEDWONTFIX
Admin
Admin
Speaking of things you're going to dislike...
Filed Under: BWAHAHAHAHAHA!
Admin
Damn, I entered that thread and immediately began to write a solution in Excel to post. Only after did I realize you need an account to post. Fuck'em.
Admin
last post 21+ days ago... first post 7 years ago... why do you necro? via a screenshot of text (missing wooden table even) Very Much Doing It Wrong™
Admin
Best solution ever.
Admin
Discoursistency!
Admin
Admin
Replying to @riking's post with The FizzBuzz Solution Dumping Ground which at the time of writing can't be quoted via the mechanisms Discourse provides.
Isn't it funny that in the thread solutions #3 and #4 both don't work to spec because the numbers are not printed?
And that #5 seems to be coded in a language that doesn't provide an
else
clause to the standardif
?Also:
for (int i = 1; i = 100; i++)
- If I remember correctly, the ommission of<
in the test leads to an assignment, and the test testing the result of the assignment, resulting in an endless loop?To me that proves that the FizzBuzz test is there for a reason.
Admin
Oh Discourse, why is your handling of the Enter key so wrong ...
Admin
Admin
It's apparently an image sharing site. For memes and such. Probably a good idea to not visit it, ever.
Admin
If you wanna piss everybody here off, following - and using the images from - a memesite is probably the best way to go!
Filed Under: You could also program a forum. That works well, too!
Admin
Admin
Given that I have been known to use the odd meme image and program a forum... shiiiiiiiiiiiiiiiiiiit.
Admin
Only if you also have decrement. It's been proven (CBA to look up the ref) that the combination of increment, decrement-and-branch-on-zero and two infinite-precision unsigned integer variables is turing complete. (I suppose you might also need a literal goto so you can linearise the control state graph into a textual form, but that's trivial.)
Admin
This is amazing. Looks like an individual's attempt to cargo cult software development. How could you have let him go? I wanna see more. He should be put in a fake job position and studied by scientists. Fuck, would that be awesome.
Admin
c# console application implementation of FizzBuzz in one line
Admin
cartman's rule #1: Any discussion where fizzbuzz is mentioned, no matter how tangentially, will eventually turn into a fizzbuzz implementation contest.
Admin
Can i hear it for a fizzbuzz golf competition?
shortest code wins, most WTF code wins runner up.
Admin
By all your powers combined, you become... Alex Papadimoulis!
Admin
Admin
Someone able to read the class name? Can't quite decipher it. Lacste?
Admin
Locate Trust me, I'm an expert at deciphering bad handwriting.