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

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.


Apr
1
comment Is there a language between C and C++?
@DocBrown Maybe it's because it's not so easy to know C++ well enough.
Mar
23
comment Why is verbosity bad for a programming language?
I would say that example with Java is not the best one, too. Such things as the need to define a class and a method matter in code golf, but hardly in real applications. It not like Java requires a lot of code to output a few words, these few lines are required to create a program, and that's different.
Feb
28
comment Help me catch up on what I've missed since Java 1.4.2
@Maxpm Because that's how it's called in Java Language Specification. As per JLS, there are basic for loops and enhanced for loops. I'm not sure why they decided to do it that way. Maybe because the syntax doesn't use a special keyword and sort of blends in with the normal loops.
Feb
28
comment Why does a Java source file bear the name of the public class it contains?
I think that it is great that Java has such a requirement. In C and C++ I often find it very difficult so understand where a particular class or function is, but in Java it is much easier to look for them because files and folders are tied to the code.
Feb
28
comment Will Java catch up with C#?
I'm not so sure about Oracle slowing down Java. Sun were unable to release Java 7 for several years and they absolutely abandoned Java ME. Only after Oracle bought them Java 7 was finally released, and Java 8 is fortunately set to be out really soon. Unfortunately, nothing has been done with Java ME, but that's probably because nobody really beleives this technology can be revived (at least without a total redesign).
Feb
20
comment How do I explain a “Hello World” program for beginners?
@6502 A language can be crappy because it forbids to use global namespace and imposes some requirements on the main method?
Feb
9
comment What's the worst programming book you've ever read?
I don't know, the library reference is not so useful, but the part which described the language didn't seem bad to me. Of course, at the time I read this book I couldn't really estimate it, but I don't remember having to unlearn anything later. I read it in Russian, though, maybe translators fixed something. I just don't know exactly what it is critisized for, the answer is not very specific.
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
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.
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
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.
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
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.