« first day (598 days earlier)      last day (3717 days later) » 

15:05
@rolfl That is a nice answer!
(also, Monking)
Now if my tests could all work at once!
Yeah... ugh, thanks brain.
this.fizzBuzzRules = Collections.unmodifiableSortedSet(new TreeSet<>(FizzBuzzRule.comparatorOnDivisor(builder.fizzBuzzRulesComparator)));
this.fizzBuzzRules.addAll(builder.fizzBuzzRules);
And... it works!
Is there a specific notation I should add to a question that is heavily inspired by another question?
As my new question is going to be a heavily modified version of
13
Q: Extensible and testable FizzBuzz

janosThere seem no end to fizzbuzz implementations. Something I rarely see is an implementation that's easy to extend with more name-divisor pairs. Another thing that usually annoys me is the lack of testability. Printing to standard output and verifying by reading is less than ideal. This FizzBuzz c...

And I still need a name for it...
Thinking about Even more extensible and testable BuzzFizz
15:29
@skiwi You can just post a link within the question, to the original, and tag I guess
@Phrancis What's the whole idea?
32
Q: Let the CR Games begin!

Mat's MugJune is about to end. Summer's here (well, if you're in the northern hemisphere, that is.. otherwise, ... yay, winter!), and with it, vacations. We need a new community-challenge. Let's play. I mean, let's find a game to play. The game... Has to revolve around reviewing code, or posting code ...

@skiwi ^^
@Phrancis Okay... posting now
This melted my brain more than enough for now!
0
Q: Even more extensible and testable BuzzFizz

skiwiInspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such complicated code for such simple jobs! Now the basic requirements of the code: Should be capabl...

0
Q: function to combine list elements

DanielI was working on a little project that at the end of the script would write to a csv. I had to create a function that would combine multiple list elements of the same size into a single one. I would like to see if there is a more efficient way of doing this since i feel the way i did might not be...

15:44
Also... have I gone too far in my descriptive variable names?
Map<Integer, String> fizzBuzzIntegerWithReversedComparatorAndBlankStringJoinResultMap = new HashMap<>();
@skiwi I'm sure someone will point it out if you have :)
> [...] with [...] that should be a problem of the past in the future.
I have a feeling that's not a correct sentence
Can something be a problem of the past in the future?
Yeah, why not? Atleast in German that's possible.
0
Q: Calculating percentages in arbitrary number of columns

janosGiven this sample input: ID Sample1 Sample2 Sample3 One 10 0 5 Two 3 6 8 Three 3 4 7 I needed to produce this output using GNU AWK (awk in Linux, gawk in BSD): ID Sample1 Sample2 Sample3 One 62.50 ...

2
Q: Even more extensible and testable BuzzFizz

skiwiInspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such complicated code for such simple jobs! Now the basic requirements of the code: Should be capabl...

If you finish something tomorrow and refer to it at a point in the future.
15:54
Somehow I always manage to post questions at times when there's barely people around :p
1
Q: Validating user's input before creating graph using TChart

Alec RobertsonThe user enters coefficients into input boxes on a form, called GetFunction. Upon clicking an 'OK' button on said form, the input is validated using TryStrToFloat. If all the input boxes are valid, CreateGraph is called. As soon as an invalid input box is found, CreateGraph should not be called a...

@skiwi Please tell me you're joking.
@SimonAndréForsberg Nope, not even joking!
@skiwi Please tell me you're joking.
@SimonAndréForsberg Nope, not even that is a joke!
16:02
@skiwi Please tell me you're joking.
0
Q: Cardshifter website meta-tags for SEO

PhrancisI have written the following meta-tags for SEO, please let me know if you think this could use any improvement. I have used this article to help me put it together. I have left out the page content on purpose, if you wish to see it I posted it here on CR and on Github (note the following updates ...

OMG, it is not a joke!
2
@CaptainObvious Hoping this is not off-topic here, but if the community thinks it is please just VTC and let me know :)
I'm on it.
-1
Q: Merging Notepad++ Documents with UDL Development in Komodo Edit

HabatchiiI am working on a project with Notepad++ and Komodo Edit that will compile NP++ documents using Komodo's UDL extension editor without operator overload. I cannot complete the build because Komodo does not read NP++ syntax. Any suggestions?

16:19
@CaptainObvious Clearly off-topic
> You've earned the "trusted user" privilege! Learn more about it in the help center.
3
Shiny 4,000 reputation!
0
Q: Conversion Helper with support for enumerations and Nullable<T> - The Remix

PatrickI recently wrote this code as a more versatile stand-in for Convert.ChangeType. I very recently posted an earlier version, for which I received some good feedback. I've incorporated that feedback and further refactored in an attempt to streamline the flow of the method. /// <summary> ///...

1
Q: Project Euler #7 - 10001st prime

Mehdi.SqalliI just finished the Project Euler #7 in Swift, and since there is not any version yet on Code Review, I would like to have some comments on what I did to try to improve it. import Foundation func isPrime(number:Int) -> Bool { if number == 1 { return false } else if number <...

Can someone edit problem description into that Q please?
@Jamal
@Phrancis There you go. Note that I'm pretty careful on the SEO topic, because there is mostly misconception revolving around that on the interwebz.
@CaptainObvious Is that the code I think it is?
16:34
@kleinfreund Nice answer, thanks for writing it!
0
Q: A ViewModel using ReactiveUI 6 that loads and sends data

DetroitproMost of the Rx Compelling Examples™ load and store data locally which I don't find that Compelling. I spent some time coming up with how to best perform the following actions but want to make sure I am not Doing It Wrong™. Here are the cases I am trying to solve: Load data from cache and remo...

Monkey is now only 50 from 50K (and maybe also the rep cap).
3
0
Q: Perfect number Java

199346chenPerfect numbers are strictly positive whole numbers of which the sum of their positive divisors equals a multiple of the number itself. An example of a 3-perfect number is 120. The sum of all divisors of 120, namely 1+2+3+4+5+6+8+10+12+15+20+24+30+40+60+120 = 360 equals three times 120. My code ...

0
Q: Arduino C++ explanation of part of code

BSheepI am using this code from this link http://playground.arduino.cc/Code/PCD8544 but I do not understand some things and would like someone to help me with. What is happening here on this part of code? static const byte ASCII[][5] = { {0x00, 0x00, 0x00, 0x00, 0x00} // 20 ,{0x00, 0x00, 0x5f,...

16:58
Does anyone know a good way to convert an Excel table to HTML-formatted table? (other than writing all the <tr><td>foo</td></tr> by hand?)
Reason I'm asking is I have a fairly large spreadsheet I need to display into a web page
0
Q: Reading and processing integers from a file in C

GeorgeGkasI had a school project to solve, which I did. The basic focus of the project was to create the simpliest code possible to solve it, which I did it. This topic was created just to ensure, if I wrote the code correctly. The problem is the following. We have declared a dynamic array which will tak...

Welcome to Code Review! I would recommend that you post your entire code to get the best out of a review. Reviewing just a snippet usually doesn't make for a great review. — Phrancis 14 secs ago
@Phrancis Perhaps try to find a Javascript plugin that accepts .xls(x) files?
6
Q: Even more extensible and testable BuzzFizz

skiwiInspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such complicated code for such simple jobs! Now the basic requirements of the code: Should be capabl...

y u no go hot?!
17:15
@skiwi It turns out Excel has a built in "Save As -> Web page" which is nice and convenient!
anyone want to help me decide who get's this bounty? one of the answerers created the account the day of their answer and hasn't been seen since
13
Q: TI-BASIC interpreter for Fishstacks

TimtechFishstacks is a deadfish derivative based on a stack the stack can only hold four elements when a fifth element is pushed the bottom element is kicked out and eventually printed out to the screen. I've come up with an interpreter in TI-BASIC for my calculator. However, I fell slightly guilty abo...

Thanks @Phrancis
1
Q: Retrieving stock prices

pexpex223It takes around 5-8 seconds for me to retrieve a previously-closed stock price and a dividend rate from US Yahoo! Finance. If I wanted to retrieve 10+ stock prices, it would take me more than a minute with the below VBA code. Is there any other way to speed up or improve the code? I input multi...

0
Q: A souped up random walk terrain generator

Ethan BierleinI started learning Python a couple of weeks ago, and to test my new knowledge of Python, I decided to use Pygame to code a random walk terrain generator. # Basic random walker program import random import pygame import sys # Screen width and height WIDTH = 900 HEIGHT = 900 # Initalize pygame...

@Malachi FlyAwayBirdie gets that.
17:26
DV removed / upvoted
Don't you dare award that to me.
@RubberDuck that user only exists on this site and Area51 nowhere else. they haven't been active since... I feel bad about wasting that rep.... but I agree that they should get the bounty
And it might motivate them to come back.
I hope so!
You have been Awarded the Bounty! Thank you for Dropping in to answer this question, we all hope to see more of your reviews in the future. — Malachi 9 secs ago
how is this a bad answer to the discussion? --> discuss.area51.stackexchange.com/a/19095/95902
@Malachi Isn't there a way of formatting posts on SE to have content revealed selectively? Like a spoiler thing?
BTW I don't think it's a bad answer at all, myself
17:35
@Edward: If you haven't found anything else to say about my OpenMP question, then I can go ahead and accept my self-answer.
monking
monking
monking
I'd like to pimp this guy's awk answer:
2
A: Calculating percentages in arbitrary number of columns

glenn jackmanIt's quite good. I can only slightly simplify it: NR==1 {print; next} { label[NR] = $1 for (i=2; i<=NF; i++) { sum[i] += $i; val[NR,i] = $i } } END { OFS = "\t" for (nr=2; nr<=NR; nr++) { $1 = label[nr] for (i=2; i<=NF; i++) $i = sprintf("%.2f", 100*val[nr,i]/sum...

he's a pretty nice fella, it would be great to see him more around here
hope you can give him some "encouragement" ;)
@Phrancis Oh, cool
hey @janos
17:43
hey @skiwi
Did you see this?
6
Q: Even more extensible and testable BuzzFizz

skiwiInspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such complicated code for such simple jobs! Now the basic requirements of the code: Should be capabl...

looking now ;)
and thank you Santas for appreciating Glenn!
Right, back, and I see that Santa has been busy!
Thanks Santa!
Congrats on 50,000 @rolfl!!!
13
congrats @rolfl!!!
17:46
Thanks @Phrancis ;-)
Congrats.
Thanks @all
Congrats @rolfl!
It seems like you'll win the race to 100K!
I wonder if there are 5 people here to review a prime number generator in C++?
Not sure there is a race to 100K....
@Hosch250 I can probably throw in something on a prime number generator.
17:47
With an average of 50 reputation per question, I only need to ask 820 more FizzBuzz questions to catch up
May 22 at 17:00, by rolfl
@rolfl 35564 @skiwi 9321 - and the 100K race begins
Since I posted many palindrome reps.... here's another one:
Oh, seemed to be site-wide though!
0
Q: Javascript "snow" code improvement

Lukas HäringI have worked for a few hours and this is the result: http://codepen.io/LukasHaring/pen/azNYZK?editors=001 the thing is when It has more than 1000 particles It becomes laggy, all the code is written in javascript, what should I improve?

There's now a big gap between me and both you and 200. ;-) But at least that's not all due to site participation.
17:52
1
Q: Stack Snippet Editor Code Indentation

Hosch250I do not know JavaScript, but as I was reviewing an HTML/CSS/JavaScript question, I ran the JS through http://jslint.com/ to see if there were any obvious errors, like missing semi-colons. The JS in the question used 2-space indentation, and the validator told me that JavaScript should use 4-spa...

OK, preparing to post!
@Phrancis there is another answer that suggests that actually. but people don't like that question.
@Malachi I could see why it could be controversial. I love the idea for the site though!
@Phrancis Here is the link to that question about the spoiler formatting --> discuss.area51.stackexchange.com/q/19068/95902
Use the spoiler tag: >!
Like this:
>! This is spoiled.
Only it doesn't work in chat.
17:56
I like the question as well @Phrancis. it makes sense that we, as a community should protect ourselves as well as our future.
@Jamal @janos @Phrancis @Malachi @rolfl codereview.stackexchange.com/questions/74657/…
Grrr... Excel when exporting as Web Page uses all old HTML crap.
Be quick, I want Pizza.
 <tr class=xl7615660 height=20 style='height:15.0pt'>
  <td height=20 class=xl6715660 width=241 style='height:15.0pt;width:181pt'>name</td>
  <td class=xl6715660 width=0>name</td>
  <td class=xl7215660 width=273 style='width:205pt'>flavor_text</td>
  <td class=xl7215660 width=0>flavor text</td>
  <td class=xl8215660 width=315 style='width:236pt'>effect_description</td>
  <td class=xl8215660 width=0>effect_description</td>
  <td class=xl6515660 width=62 style='width:47pt'>type</td>
  <td class=xl6515660 width=0>type</td>
@RubberDuck Want to review this? codereview.stackexchange.com/questions/74657/…
I'm trying for pizza.
18:03
c++? I'll try....
3
Q: Prime Number Checker

Hosch250This is my prime number checker in C++. I know that calculating the square root of a number can be very costly, so I don't do it unless the number is larger than 10k, where we would have to check 2450 extra values (5k - sqrt(10k)) / 2. void primeChecker(std::vector<int> &primes, int val) { ...

I'll let other answerers give the other points.
OK.
Thanks for the answer.
I knew that magic constants were bad, but guess I'd forgotten it temporarily.
@Hosch250 I got nothing sorry, I don't speak C++ :(
18:08
Hint: primeChecker() is performing some additional tasks.
Did my best @Hosch250.
@RubberDuck Thanks.
sorry I can't help this Pizza run, I have to go get my daughter from school she has early release from school today @Hosch250
0
Q: Attemped Sieve of Eratosthenes in Java

connor0728I've just done Project Euler question 10: Find the sum of all the primes below two million.. I get the correct answer and it takes about 3.5-4 seconds to run. I tried to use the Sieve of Eratosthenes to find the solution, but am not sure if my solution is using the method correctly, or if it cou...

0
Q: Project Euler #3 in Haskell

wei2912The code is as follows: module Main where isDiv :: Integer -> Integer -> Bool n `isDiv` k = n `mod` k == 0 fullyDiv :: Integer -> Integer -> Integer fullyDiv n k | n `isDiv` k = fullyDiv (n `div` k) k | otherwise = n intSqrt :: Integer -> Integer intSqrt = floor . sqrt . fromIntegral ...

@Malachi No problem.
18:16
pizza done and it's on the way
3
Yup. Thanks, everyone.
0
Q: Project Euler #4 in Haskell

wei2912The code is as follows: module Main where import Data.List (sortBy) import Data.Ord (comparing) palindromes :: [Integer] palindromes = [calcPalindrome a b c | a <- [1..9], b <- [0..9], c <- [0..9]] where calcPalindrome a b c = 100001 * a + 10010 * b + 1100 * c is3Digit :: Integer ->...

Dang, missed two questions
Some newish user is picking them up though
Seems to be converting perhaps from the Stack Overflow world: codereview.stackexchange.com/users/19769/cyberspock
@syb0rg That would be a good thing! I showered some encouragement :)
My first python answer:
1
A: Souped-up random walk terrain generator

Manny MengThis is a short answer to your question about line 81. Instead of all the False, you can do this: add_village = random.randint(1, n) == 1; where n is how many false you have. random.randint(1, n) generates a number between 1 and n, and == 1 checks if it is one. It has a 1 in n chance of retur...

Also my first time writing in python.
18:26
Napalmed ^
The Stack Exchange app is incompatible with my 2nd generation iPod touch :/
0
Q: Scala Case Classes

Dušan RychnovskýPlease take a look at the following Scala program and give me suggestions for improvement. I'm sure there would be plenty. This is my very first Scala code, so please don't be frustrated because of it's low quality. abstract class Expression { def eval() : List[List[String]] = this match { ...

0
Q: Shorter way to write a checkbox with jquery

JenniferIs there a way to write the code below in a shorter version? What it does is, if the checkbox is clicked, it will be added to the total, if not, it will be deducted or ignored. (the total checkbox I have in real is 25.) function function tblcheckboxes(){ var a, b, c, d, e, f, g, h, i, j, k,...

wow... lol
I seriously hope that that was not serious
I think it was...
4 more rep until 1000!!!
welcome to 1K @MannyMeng!
3
Yay!
I edited and voted to re-open:
0
Q: Javascript "snow" code improvement

Lukas HäringI have worked for a few hours and this is the result: $(document).ready(function(){ var canvas = $("#snow-collision")[0]; var stats = new Stats(); stats.setMode(1); // 0: fps, 1: ms var debug = $("#debug"); var pi = Math.PI; var hpi = pi / 2; var tpi = hpi * 3; // align top-left...

18:40
@MannyMeng would it work with an executable stack-snippet?
hmm @janos in all fizzbuzzness, you are serous about the SRP there?
yes :)
Do you have any general rules which you follow to not fall into the SRP-trap?
@MannyMeng Ctrl+M when editing/creating a post (answer or question) and you can enter Javascript code that's executable right there on-site :)
like this one:
43
Q: Celebratory fireworks animation

200_successTo celebrate an important event, I hastily cobbled together an HTML canvas-based animation. A few concerns I have include: Performance: Does it run reasonably smoothly on most modern machines? How can I make it more efficient? Portability / Compatibility: Does it work correctly on all modern ...

18:46
@Hosch250 Your timing happens to be awful for me... just been dealing with my daughter who's been throwing up .... it's been a crazy day. I missed your posting window.
@Hosch250 oh no, no pizza?
I don't think it can be run just like that.
@janos Hmm ok, what about the trade-off of complexity vs easy-of-use when violating/adhering to the SRP?
@rolfl Sorry, that is too bad.
@janos I had 5 answers easily within the time frame (counting mine), but no hat yet.
@Hosch250 I guess yours doesn't count
18:50
Booo.
@skiwi what's the trade-off exactly?
@Hosch250 Yeah, it sucks for you as well, my daughter had some surgery last week, we had to make a trip to get a follow up appointment today, but she got sick at 3am? ish.... we still did the trip, etc.
@rolfl That is worse - that hat doesn't really count.
I hope she gets better soon.
@janos That as user you need to be aware of all classes that are present as utility classes
@rolfl I think his comment was for a response to me, not to you
18:51
@Hosch250 Thanks, me too, we're supposed to be on holiday ;-)
@rolfl "Holiday" and hospital unfortunately don't really mix :/
posted on December 23, 2014 by Kozby

The question asks me to take a string and return a hash mapping each letter to its frequency. Do not include space. The answer given was: def letter_count(str) count = {} str.each_char do |character| next if character == " " count[character] = 0 unless count.include?(character) count[character] += 1 end count end Can someone please tell me how t

Nope ;-) But kids do that sort of thing
@skiwi when that becomes a burden, and not a minute sooner, you can use something like the JDK does with Collections.*
or whatever makes sense in a concrete situation
@janos So like FizzBuzz and FizzBuzzes for utilities? :p
18:55
FizzBuzzUtils, FizzBuzzKitchenSink, ...
FizzBuzzards
for now, your concern seems a bit hypothetical to me
Blast, now I need to post another question.
I have a question about the Refiner badge
Yes?
18:57
do I need to edit the question first before answering?
I think so.
if I edit after answering it doesn't count?
I don't know for sure, but the blog post made it sound like the edit was first.
I really wish someone would put a bounty on a question
Besides myself anyways lol
@syb0rg Sure, I'm going to post a bounty on UTC Dec. 25.
18:58
@janos Well, your FizzBuzzStream suggestion seemed to indicate that multiples of utility classes may arise around FizzBuzz, which then would be hard to all know by hard
@syb0rg send me a link and I can put a bounty on it on the 25th
There were none I had in mind, I'm just saying in general
I am putting a bounty on a random question as well on the 25th
@skiwi I thought of only that one for now. What else do you have in mind?
Well, not completely random, one that I see fit
^^^ glad you said that :)
19:01
@janos No concrete examples, was just my initial feeling as it is named FizzBuzzStream rather than FizzBuzzUtils
But no worries, it's clear now
@skiwi did you get Code Complete yet?
Actually, I think I'll bounty this: codereview.stackexchange.com/questions/1493/…
@janos Nope..
I'm not planning to buy it honestly... Maybe I can get it in some other way
Do you guys think a Fibonacci generator would get 5 answers fast?
No, that is too simple. Maybe an HTML/CSS/JS Fibonacci generator?
@skiwi I did say "get" too ;-)
19:05
@janos :)
I had my workplace buy it for our team
0
Q: Text-based Tetris game - follow-up - final

MORTALPrevious question Text-based Tetris game - follow-up 2 Summary of improvements: Removed unnecessary functions print() and gotoxy() Added Scores Added Utility header file Utility.h #if defined(__linux__) || defined(__APPLE__) #include <sys/time.h> #include <termios.h> #include <stdlib.h>...

0
Q: jQuery Condensing multiple conditionals into function

Delmon YoungI feel like I'm repeating a ton of code here and there's got to be a better way to do this but am just completely spacing right now. I basically have an else if clause that if their conditions are met repeat the same code but I'm also repeating the same code in the else statement along with a few...

@Hosch250 Have you considered writing an SEDE query? Almost everyone here knows SQL and many know SEDE well. I had 5 answers within like 15 minutes. Plus, SEDE queries are useful beyond just being code
19:24
@Phrancis I don't even know what SEDE is.
data.stackexchange.com
everything you ever wanted to know about how your favorite site is doing
SEDE is awesome
Almost done with a Fibonacci HTML/JS/CSS program.
@janos I think I've exacerbated a fiasco by putting a bounty on a question:
Next time please include the code to review in the question! (I just copied it now from your link.) — janos Dec 14 at 21:11
That's not the proper procedure at all.
16
A: Is editing code into the question good practice?

Winston EwertI agree with seand, but I'd also point another facet. Why doesn't the poster edit their question to put the code in? They don't want their code in that question, (seand's case) in that case we shouldn't override their wishes. They never came back to look at the question, and so don't see the c...

31
A: Can I put my code on a third party site and link to the site in my question?

Simon André ForsbergNo. We require the code to be contained within the question, for the following reasons: To avoid dependency on third-party hosting services. These links tend to go away after a while. To prevent review requests of huge projects. To make it easier to see the code and so it can interest more revi...

0
Q: System needs to get lighter

Hermann IngjaldssonI am making this computer system: http://visebackend.videntifier.com:9876/ What bothers me is that its a bit too heavy on the CPU. I am moving the carousel at the top by changing div.style.left in a setinterval loop. but the big movements, such as how the lower rows move when the top carousel has...

19:33
@200_success I shouldn't have copied the code myself, or what's the problem?
Read the policy.
19:49
LOL!
7
Q: Even more extensible and testable BuzzFizz

skiwiInspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such complicated code for such simple jobs! Now the basic requirements of the code: Should be capabl...

Got a downvote on it
Someone must hate FizzBuzz with a passion.
@janos Nice :)
Wasn't me. Honest.
Although, I do hate FizzBuzz with a passion.
New (custom) hat proposal: not posting a single FizzBuzz question in 2015.
5
@Jamal lol
lol
14
Q: Is my code nice and neat for a Tic-Tac-Toe board times 4?

MalachiI am trying to learn kTurtle (slightly different from Logo) so that I can help my daughter learn to write code. I have decided that I would write a program that would play Tic-Tac-Toe with a user. So far, all I have is the Game board, and I make it more than just a single board to add to the in...

I think I might have to look into a follow up question...
the only reason I'm able to not throw up at fizzbuzz questions these days is that I ended up posting one somehow
previously, my involvement in fizzbuzz was an answer that got downvoted to -5
19:54
@janos So how exactly did you end up posting one?
If an employer ever decides to look for programmers who actually understands FizzBuzz, this would be a great place to look at. ;-)
@Jamal I'd never get hired ;(
Anyone know how to get a hat that I don't have?
@MannyMeng Have you put up a bounty during Hanukkah?
If not, better hurry I think today is the last day
facebook share links don't put in the fun link that tells stackexchange that it was my link. you know to get the announcer badge etc. ?
19:59
@Phrancis I don't know where...
You've edited that question, Malachi? I guess my answer may eventually get Good Answer, then. :-)

« first day (598 days earlier)      last day (3717 days later) »