Skip to main content
14 events
when toggle format what by license comment
Jul 14, 2014 at 21:10 comment added Cary Swoveland I understand your motivation, but that is beside the point. Inserting the word, "around" makes the question unnecessarily vague. It's like me asking, "what is six plus seven, approximately?". Is fifteen close enough? Ten? Who knows?
Jul 14, 2014 at 21:04 comment added pgreen2 The percentage wasn't very important for my use case. I had a large file of data that I was running unit tests against and it was taking a long time to run. My solution was to use a portion of the file (around 10%) to speed up the tests. Since I am learning ruby right now, I took this as an opportunity to see how best to write the script.
Jul 14, 2014 at 20:59 comment added Cary Swoveland "...pull out around 10% of the lines at random" will not do. You must define precisely what that means. You could say, for example, 8%-12% of the lines, but that still doesn't do it, because it lacks the criterion for choosing the percentage in that range. That's your job. You could say a random percentage based on a particular probability distribution (e.g., uniform between 8% and 12%), but what's the point? Better to ask for a specific percentage selected at random (e.g., 10%), and you determine that percentage elsewhere in your code.
Jul 13, 2014 at 18:15 history edited Jamal CC BY-SA 3.0
edited body; edited title
Jul 13, 2014 at 18:05 answer added Cary Swoveland timeline score: 0
Jul 7, 2014 at 18:03 history edited pgreen2
edited tags
Jul 4, 2014 at 13:59 answer added steenslag timeline score: 0
Jul 3, 2014 at 17:06 history edited 200_success
edited tags
Jul 3, 2014 at 17:03 history edited pgreen2 CC BY-SA 3.0
remove final answer to follow rules
Jul 3, 2014 at 11:33 history edited pgreen2 CC BY-SA 3.0
added refactored code
Jul 3, 2014 at 11:29 vote accept pgreen2
Jul 3, 2014 at 11:28 history edited pgreen2 CC BY-SA 3.0
added refactored code
Jul 3, 2014 at 4:11 answer added addison timeline score: 6
Jul 3, 2014 at 1:47 history asked pgreen2 CC BY-SA 3.0