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
Nov
21
comment Is there an excuse for short variable names?
I usually don't write i, j, k, I write something like personPos because then I won't forget what I'm iterating on and what the index represents.
Nov
20
comment Why aren't more desktop apps written with Qt?
@BillyONeal If you compare the amount of code, then you may give an edge to the languages that exist for a longer time but not necessarily are popular now. And also code in open source projects doesn't necessarily reflect the languages used in production. There is no accurate measure, you just have to select some parameter and stick to it.
Nov
8
comment Why does Java use UTF-16 for internal string representation?
Here is a quote from the Unicode FAQ: Originally, Unicode was designed as a pure 16-bit encoding, aimed at representing all modern scripts. (Ancient scripts were to be represented with private-use characters.) Over time, and especially after the addition of over 14,500 composite characters for compatibility with legacy sets, it became clear that 16-bits were not sufficient for the user community. Out of this arose UTF-16. At the time of Java release UTF-16 hasn't yet appeared, and UTF-8 was not a part of Unicode standard.
Jul
28
awarded  Yearling
May
23
comment Who was the first programmer?
It always seemed a little strange to me that Babbage himself is not considered the first programmer. How can you design a machine and not make some algorithms for it in the process? Of course, this is a beautiful legend, and I'm kind of trying to make things more prosaic, so I'm sorry about that.
Apr
30
answered Writing commit messages as a solo developer?
Apr
1
comment Is there a language between C and C++?
@Giorgio Actually I share your point of view. Personally I would rather have several more specific tools rather than one all-encompassing. I use Java every day myself and find it very consistent (at least, a lot more so than C++). But some people prefer it the other way, and this can also work if they know how to use the vast array of features properly, as you have correctly put it.
Apr
1
comment Is there a language between C and C++?
@DeadMG "Good" is a rather subjective term. As for the usefullness of C++, I think no one will argue with that. A useful language can be unpopular, but it's hard to imagine how a useless language can reach high popularity. The discussion in the comments has become too long already, so going back to the point, complex tools can be a good or a bad thing depending on the given situation.
Apr
1
comment Is there a language between C and C++?
@DeadMG If it were an unequivocally bad thing, C++ wouldn't be so popular. But since it is, then we can deduce that the cons are balanced by the pros.
Apr
1
comment Is there a language between C and C++?
@DeadMG You put too much emphasis on this particular example, this is just an illustration to the general point. Also I think you misunderstood what I'm talking about. I never said C++ features shouldn't have been added, I'm just saying that they make the language more complex. It's just natural: the more universal the tool is, the more complex it becomes. The generics you mention is a tool. In C++ templates allow metaprogramming, a complex universal tool. In Java generics are a way to eliminate runtime errors, a tool with a much more precise purpose (far from being not very useful, though).
Apr
1
comment Is there a language between C and C++?
@DeadMG Yes, but you have to learn it somehow. How do you know which feature is used often, and which one is not? As you put it, good teachers are a must (books probably should count, too). And in Java you just have to know what a String literal is. The point is that while new features get added to C++ for a reason, this unavoidably makes the language more complex. And also there is this: programmers.stackexchange.com/questions/85732/…. Together this makes the language definitely harder to learn.
Apr
1
comment Is there a language between C and C++?
@DocBrown I'm mostly talking about the vastness of features you have to learn if you are to call yourself someone who really knows C++. This is about not only using multiple paradigms, but also doing rather mundane things. Say, as of C++11 there are several kinds of string literals, whereas in Java there's only one. This requires at least understanding of how each works and when to use which. Sticking to the old C ways in C++, of course, doesn't make much sense.
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
18
awarded  Enthusiast
Feb
17
awarded  Critic
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.