27,322 reputation
656110
bio website brazzy.de
location Munich, Germany
age 37
visits member for 3 years, 7 months
seen 9 hours ago
Software developer by profession, smalltime hacker and gamer by interest. Look at my website to learn more about me

Jul
1
comment using this in a constructor, why does it work?
@Mark: It's safe to do inasmuch as there is no undefined behaviour; the worst you can encounter (if you make a mistake) is object states (mostly null references) that are not possible according to your class contract. It's not a good practice because in maintaining that code, it's easy to lose track of the fact that you're handling a partially initialized object and introduce weird bugs.
Jun
1
comment Is this simple XOR encrypted communication absolutely secure?
I think it's worth stressing that "theoretically secure" means that it's mathematically proven to be unbreakable, provided that the keys are truly random and not reused. That's pretty much the strongest guarantee you can get anywhere in cryptography.
May
24
comment What is software maintenance?
@Prog: that is different for every app, but for large applications adapting to a changing environment is usually the biggest factor (because it often requires big changes and large apps have a larger environment). Bugfixing is probably in the second place (first for smaller or self-contained apps).
May
22
comment For web apps (vs web pages) why not put scripts and css inline?
I think people are misunderstanding the point that you imagine a webapp where the "main page" is completely static. In that case yes, you can get away with inlining everything.
May
18
comment Japanese Multiplication simulation - is a program actually capable of improving calculation speed?
@Blrftl: the fact that hardware is just another implementation of an algorithm and the best multiplication algorithm we know is slower than O(n), let alone constant time. Using hardware you can trade space for time by parallel execution, but that doesn't matter unless you postulate self-replicating hardware.
May
18
comment Japanese Multiplication simulation - is a program actually capable of improving calculation speed?
This is not about machine vs. human. CPU instructions work with fixed length integers; they are irrelevant to this question, which is really about working with arbitrary length numbers. And there have been substantial advances in multiplication algorithms as late as 2007.
May
18
comment Japanese Multiplication simulation - is a program actually capable of improving calculation speed?
I will immediately and without thinking about the technical details offer you a 100:1 bet that you cannot improve computing speed that way. Algorithms for doing arithmetic are a thoroughly researched topic. There is no chance whatsoever that you're the first person to think of implementing a well-known "manual" algorithm in software.
May
7
comment Is often using int constants as parameters in communication between objects considered bad design?
@Prog: Yes, I would consider it OK, for pragmatic reasons. I don't think it's useful to be dogmatic about this. The point of decoupling in MVC is to improve maintainability by separating concerns. As long as the view's "touch" of the business logic is restricted to choosing which aspect of it to call, this separation is achieved.
May
7
comment Is often using int constants as parameters in communication between objects considered bad design?
@Prog: good question, but artificially decoupling it wouldn't really achieve anything. It would make sense if the controller did more than just pass through the command. If you want to technically decouple it, you could use a map (MessageEnum -> CommandObject) and replace the if cascades with a lookup.
May
6
comment Is often using int constants as parameters in communication between objects considered bad design?
@Prog: yes, exactly. Ideally, you'd find that there are other places where you need style-related behaviour or data, and can collect all this in the Style classes.
May
6
comment Is often using int constants as parameters in communication between objects considered bad design?
@Prog: see update.
May
1
comment Pair programming. How?
@JoshuaCarmody: that tends to make me suspicious.
Apr
29
comment How should I handle exception that *should* never be thrown?
You can avoid having to deal with the UnsupportedEncodingException by using the overloaded methods that take a Charset Object instead of a String to specify the encoding. And I actually once ran into an UnsupportedEncodingException for UTF-8. That was a long time ago, though, and it turned out the machine ran some beta release of the Java 5 JDK.
Mar
31
comment How to distribute, one virtual token to each person in this world, and make sure nobody gets more than one?
@ZacharyK: from the same country?
Mar
9
comment Would this interpreter be considered a Virtual Machine?
@NPElover: Exactly!
Mar
9
comment Would this interpreter be considered a Virtual Machine?
@NPElover: No, I'm saying that you need an implementation-independant specification of how this machine works. Then you can claim that your JVM-based interpreter is just the prototype implementations of the spec.
Mar
9
comment Would this interpreter be considered a Virtual Machine?
@NPElover: in that case, I'd say that they interpreter by itself would not be considered a VM - it's an interpreter running on the JVM. You might have a case for calling it a VM if you ad all the stuff I mentioned exactly specified independent of the implementation and the JVM, so that it would be possible to implement your interpreter using, for example, C++ and still have programs work exactly the same.
Feb
14
comment Is it a bad practice to include all the enums in one file and use it in multiple classes?
@kevincline: I wouldn't say "almost all" - just those that are based on convention-over-configuration, and typically, those also have a module concept that allows grouping code functionally.
Feb
3
comment In Scrum, who verifies “Done”?
@Derek: I think you're having a misunderstanding based on unclear terminology. There is both a "Scrum Team" and a "Development Team", with the latter being a part of the former, as well as the Product Owner and Scrum Master.
Jan
30
comment How to convey your approach is faster than the built-in, alternative approaches?
"orders of magnitude faster" implies per definition a speedup of at least 100x.