« first day (1030 days earlier)      last day (3284 days later) » 
00:00 - 21:0021:00 - 00:00

21:00
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Sharing $scopes across Controllers with ScopeFactory
@nhgrif the logic itself looks awful
but the language looks magic
-(id)init{} wat
[super init] wat
@Phrancis ಠ_ಠ
(I know that [super init] is sending the message init to super)
0
Q: select the element out of the array if its index is a fibonacci number

Joe AinsworthI've some questions for an exam and wondered if somebody could take a look at my Fibonacci sequence that is supposed to answer this question: "select the element out of the array if its index is a Fibonacci number" def fibonacci_sequence(max_num) sequence = [1, 2] loop do fibonacc...

21:17
This question may be better suited on SE CodeReview site. — AtheistP3ace 13 secs ago
@DanPantry Strictly speaking, it should probably be instancetype rather than id, but other than that, the normal pattern for initializers in Objective-C looks like this...
- (instancetype)init {
    self = [super init];
    if (self) {
        // set up self
    }
    return self
}
Alternatively...
- (instancetype)init {
    if ((self = [super init])) {
        // set up self
    }
    return self
}
Probably do better putting some sample code on codereview.stackexchange.com . Question is far too broad for this site as it stands now — charlietfl 37 secs ago
People say code review a lot..
21:32
Indeed.
Can we borrow duga for PPCG?
:p
Talk with @SimonForsberg
21:50
45k and he consistently posts the worst answers...
high rep means someone has spent much time on a site
Ugh. And he does stupid things like this too: stackoverflow.com/q/35683813/2792531 That's not really helpful. He's right. The question HAS been asked a million times... we don't need a NEW question to post the canonical answer. The canonical answer might even already exist somewhere...
@JohanLarsson It's not purely that always. I have 27.5k rep on Stack Overflow. I also average 2-4 upvotes per post in my top 3 tags. This user averages barely 1 upvote per post in his top 3 tags.
I mainly use SO as a gist service :)
If I have a snippet I want to find later then sometimes I google for an SO question about it. Not a good way to get rep.
Just noticed this:
Attention programmers: you are supposed to tell the duck your problems. Do not rub the rubber duck. It is not a lamp; there is no genie.
@Phrancis
22:05
0
Q: First solution to FizzBuzz

P. FernandezI'm a first year college student, Computer Science major. This is my crack at the FizzBuzz interview question in Java. What kind of improvements could I make? //Prints numbers 1 - 100, 25 values per line. //Numbers that are multiples of 3 are replaced with Fizz //Numbers that are mulitples of 5 ...

You don't always have to put things at the global scope. I don't know why the global scope and singletons is always your default go-to, Duncan... — nhgrif 13 secs ago
Learning programmers think it makes their job easier. They have no clue what mess they are creating.
Well, I'm not sure he'd self-describe himself as a "learning programmer", I mean... other than the notion that most smart people always describe themselves as learning.
with 45k SO rep..
Part of me hopes that he somehow ends up applying to a company I work for some day so I can just immediately tell hiring people we have zero interest in talking to him...
22:38
Based on the comments, this question should be closed.
23:02
Do we hace some Java gurus around?
I'm wondering about how to implement a list of FizzBuzz words with corresponding integers... Something like: { (3, "Fizz"), (5, "Buzz") }, and how to iterate over this the easiest way.
Why don't you make a class that has an integer and a string
And make an array of them
for fizzBuzzer in fizzBuzzersArray {
    if value % fizzBuzzer.value == 0 {
        stringbuilder.append(fizzBuzzer.string)
Hmm... That is the structure, but how to do it in Java?
I can write it in Python, but not in Java...
     public class FizzBuzzRule {
         public const int value;
         public const String string;

         // constructor
     }
ArrayList<FizzBuzzRule> rules = new ArrayList<FizzBuzzRule>();
rules.add(new FizzBuzzRule(3, "Fizz"));
rules.add(new FizzBuzzRule(5, "Buzz"));
for(int i = 1; i <= 100; ++i) {
    // make a string builder
    for(FizzBuzzRule rule: rules) {
        if (i % rule.value == 0) {
            // append rule.string to string builder
        }
    }
    // if none of the rules matched, append the number itself
}
Java is still extremely verbose, but that should do the trick I guess
In Swift... we'd write...
23:13
You are now almost ready to providing a much better answer to the first Java FuzzBuzz question... :-D
for rule in rules where i % rule.value == 0 {
    // append rule.string
for i in 1...100 {
    for rule in rules where i % rule.value == 0 {
Or... more realistically, I'd expect...
func fizzBuzzify(value: Int) -> String
which has the for rule in rules where value % rule.value == 0 logic
then I'd write something like...
let fizzBuzzifiedArray = (1...100).map { fizzBuzzify($0) }
 for i in range(1, 101):
    fizzy = ""
    for value, text in [(3, "Fizz"), (5, "Buzz")]:
        if i % value = 0:
            fizzy += text

    print fizzy if fizzy != "" else i
That is a complete Python 2 example...
I am in fact worried about the quality of the code I wrote. I would be grateful if you could give me some advice at Codereview -> codereview.stackexchange.com/questions/121393/…Caridorc 8 secs ago
func fizzBuzzify(value: Int) -> String {
    var string: String?
    for rule in [(3,"fizz"),(5,"buzz")] {
        if value % rule.0 == 0 { string = (string ?? "") + rule.1 }
    }
    return string ?? String(value)
}

let array = (1...100).map { fizzBuzzify($0) }
0
Q: Convert oOo to Brainfuck and viceversa

CaridorcThis program was inspired by a Code-Golf challenge that I wanted to do properly. It simply converts oOo to Brainfuck and viceversa. The oOo language basically uses UPPER / lower case information in groups of 3 to encode a Brainfuck program. For further info see the Esolang wiki page of oOo The ...

23:21
But this is the real way to do FizzBuzz:
17
Q: Ultimate FizzBuzz

nhgrifSwift's SequenceType is a useful means of generating a sequence of values, and it makes it particularly useful iterate over these values. I don't really have much experience with these SequenceType types, so I wanted to implement my own for some practice and learning. What better sequence to ta...

I didn't fully read all of it, but that looks like you are taking it to the extreme... Very understandable why you call it the "Ultimate FizzBuzz". :-D
@nhgrif wow, 45k so rep recommend a global variable
with 2k answers in iOS and an average score of 1 upvote per answer
:S
@holroy Importantly, holroy, I wrote it in a way that you can make whatever rules that you want.
whatever rules.
Not just "is a multiple of"
Is it okay if I minify my code and post it because it's too long to post
@TogaDown No.
23:24
You could have isPrime be a rule.
Do not post minified code.
@TogaDown Narrow down the section you want reviewed.
@nhgrif ok
You won't get any useful rules if you post that much code.
Focus on specific areas of your code base.
Post the section you think is most important, get it reviewed.
Come back a few days later after taking the reviews into account, update your code base, and post a new section of the code.
If this code is working, you should probably be going to codereview.stackexchange.com. We are here for helping you solve bad code. — zondo 49 secs ago
23:38
1
A: Why C# compiler implicitly converts a double to int and further uses casting from int to user type?

Jeroen VannevelI believe this is layed out in section 6.4.3 of the C# 5 Language Specification. A first hint is given in section 6.2.8 User Defined explicit conversions (emphasis mine): A user-defined explicit conversion consists of an optional standard explicit conversion, followed by execution of a user-...

LANGUAGE LAWYEEEEEEEEEEER
also: HNQ, mark my words
Lippert approved. My life is complete again
3
23:56
nice!
morning
00:00 - 21:0021:00 - 00:00

« first day (1030 days earlier)      last day (3284 days later) »