Reputation
360
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 12
Newest
 Pundit
Impact
~79k people reached

  • 0 posts edited
  • 3 helpful flags
  • 113 votes cast
Feb
1
comment What do you name functions/variables/etc when you can't think of a good name?
I prefer thinking once again harder...
Feb
1
comment How do you name your private variables in C#?
The argument about the number of characters is debatable. You don't have to type this every time, only in the methods where a local variable with the same name is present. However, you are required to write an extra symbol every time if you use an underscore. With what I agree is that sticking to your local code style agreement is always important.
Jan
27
revised When learning Android, should I focus on the latest and greatest?
Added a point about supporting tablets and handsets
Jan
27
answered When learning Android, should I focus on the latest and greatest?
Jan
26
comment Should I use default access modifier or not — Coding practice?
In Java default access is a separate kind of accesss, so if you add an access modifier, you don't restate the accesss, you change it to something else. That's why if you really need explicit default access, the only way to make it explicit is to use a comment.
Jan
26
comment Never use Strings in Java?
@DeadMG Yes, I thought that you could justify creation of such a small class by reducing the number of checks, but it depends on the overall design. Maybe ids are a part of a larger class, which can handle all the validation combining the functionality of all the small classes-validators. I'm not saying that having OrderId instead of String is always bad, it's just something I wouldn't do by default.
Jan
25
comment Never use Strings in Java?
With order ids I would still probably prefer adding a check in the code accepting ids and leaving the String. The classes are supposed to provide methods for operating with data. If some class only checks the validity of some data and then does nothing, this doesn't seem to me proper. OOP is good, but you shouldn't overdo it.
Jan
19
awarded  Student
Dec
22
comment Correct alignment when outcommenting code
I'd also leave a TODO in this comment to ensure that you come back to this piece of code.
Dec
22
comment Correct alignment when outcommenting code
NetBeans does this by default, I leave it as it is. I don't think there's anything wrong with such indentation.
Dec
11
comment Proper use of classes
@LordZardeck Data. Classes are also a lot about data. If you have some piece of code, where the data for the operation and the operations themselves can be self-contained, then it is a good candidate for a separate class.
Dec
10
comment What's the term for “while(true)” loop with “break” inside?
There's nothing wrong with break in the middle of a loop. If you need to carry out some operation at each start of the cycle, you will have to either duplicate the code or stuff these operations into the condition. Either variant clearly has disadvantages. goto also had valid applications, e.g. emulation of a try...finally block in C.
Nov
23
awarded  Citizen Patrol
Nov
9
comment Is deprecating a real commitment?
Thread.stop() and Thread.suspend() are still alive and kicking though they were deprecated since Java 1.1, if I remember correctly. They are not used anymore since they are inherently unsafe, but they are still present in the API.
Oct
8
answered I don't understand the arguments against operator overloading
Sep
27
comment Why is Java considered more portable than other languages like C++?
Portability is not a myth. Perfect portability is.
Aug
20
comment Switch from C# to Java, which “gotchas” I should care?
Now you can switch on String in Java SE 7.
Aug
18
awarded  Editor
Aug
18
revised Should UTF-16 be considered harmful?
Expanded and clarified the answer
Aug
18
awarded  Teacher