Skip to main content

Timeline for Switch-Bulb GUI program

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Jun 13, 2015 at 15:13 comment added Spikatrix Third edit was done because an edit had to be ad least 6 characters long. Thanks for your help.
Jun 13, 2015 at 15:10 comment added janos I saw 3 changes in your suggested edit, 2 of them were spot on, I only disagreed with 1. It was a good edit! Naming is hard, often subjective. I'd go with SWITCH_COUNT, maybe. And it should be a private static final int.
Jun 13, 2015 at 15:05 comment added Spikatrix @janos , Never mind about the rejected edit. Even I think that is wasn't very good. Ok. I'll try to use for-each loops and better names. Can you suggest a good name for the constant needed to clear "magic numbers"? The first name that sprang to my mind was "number". Doesn't look to good....
Jun 13, 2015 at 15:03 comment added janos Hey @CoolGuy, thanks for the suggested edit, the guys were a bit overly cautious, but it was mostly legit and I applied your suggestions. About for-each, it's a natural way of iterating over elements, without needing to worry about indexes too. Another great benefit is that it works with any kind of collection, for example a linked list, where indexing would be costly. Naming is crucial for future readability. Keep in mind that code is read far more often than written, so it pays to spend time for read-time convenience
Jun 13, 2015 at 14:58 history edited janos CC BY-SA 3.0
deleted 2 characters in body
Jun 13, 2015 at 14:49 comment added Spikatrix @QPaysTaxes , I usually program in C and there aren't any for-each loops in C (which explains why I don't like for-each loops). I'll try to care about the naming.... Thanks anyway.
Jun 13, 2015 at 14:45 comment added anon "I don't like enhanced for loop much" This is worrying. They're a very important part of the language and help readability a ton (at least for people who know Java). Learn to love them. It's gonna be a lot easier in the end. "As for naming, I really don't care" This is incredibly worrying. You should care. Always care about naming. You may get it now and never touch this again, but get into good habits early and you won't have to break them later, when it'll be a billion times harder. CARE ABOUT NAMING.
Jun 13, 2015 at 14:18 review Suggested edits
Jun 13, 2015 at 14:34
Jun 13, 2015 at 14:17 comment added Spikatrix Thanks for taking the time to review my program. What do you suggest a name for the constant needed to clear "magic numbers"? And I don't like enhanced for loop much which is why I'm using normal loops. As for naming, I really don't care.
Jun 13, 2015 at 14:15 vote accept Spikatrix
Jun 13, 2015 at 10:17 history answered janos CC BY-SA 3.0