341 reputation
212
bio website malcolm-soft.com
location New York, United States
age 24
visits member for 2 years, 11 months
seen 3 hours ago

Mobile application developer who freaking loves what he does - that's the most apt description for me. I mainly spend time writing something for Android, but I also play a lot with other technologies as well.


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
Aug
18
awarded  Nice Answer
Aug
18
awarded  Commentator
Aug
18
comment Should UTF-16 be considered harmful?
@niXar If some software is ignoring surrogate pairs, then it isn't using UTF-16 and therefore is non-Unicode. You wouldn't call a program which works only with ASCII as supporting UTF-8, right? I think you misunderstood my point a bit, maybe I should clarify this in the answer. I say that there's nothing wrong with the UTF-16, but there's a lot of legacy software, which was designed for UCS-2, and therefore happens to be mostly compliant with UTF-16. But mostly compliant is not compliant, and this causes problems. I also doubt that if UTF-16 didn't exist at all, it would get fixed sooner.
Aug
16
comment Should UTF-16 be considered harmful?
@tchrist I never said that Unicode and I18N are the same, though thanks for the info.
Aug
16
comment Should UTF-16 be considered harmful?
@tchrist Do you have a source for your statistics? Though if good programmers a scarce, I think this is good, because we become more valuable. :) As for the Java APIs, char-based parts may eventually get deprecated, but this is not a guarantee that they won't be used. And they definitely won't be removed for compability reasons.
Aug
13
comment Should UTF-16 be considered harmful?
@tchrist One must be a very ignorant developer to not know that UTF-16 is not fixed length. If you start with Wikipedia, you will read the following at the very top: "It produces a variable-length result of either one or two 16-bit code units per code point". Unicode FAQ says the same: unicode.org/faq//utf_bom.html#utf16-1. I don't know, how UTF-16 can deceive anybody if it is written everywhere that it is variable length. As for the method, it was never designed for UTF-16 and shouldn't be considered Unicode, as simple as that.