7,636 reputation
1331
bio website
location
age 32
visits member for 3 years, 8 months
seen 2 days ago
C:\>If you're happy and you know it, syntax error!
Syntax error

C:\>If you're happy and you know it, syntax error!
Syntax error

C:\>If you're happy and you know it, then you really ought to show it.  If you're happy and you know it, syntax error!
Syntax error

Project Euler Status


Jul
10
comment How to model a one-mandatory-of-many relationship
I agree. If a part is to be treated specially, Part table should have a flag column indicating as such.
Jul
9
comment Should we always create web application scalable?
@RuchirShah Not saying you should, simply that you should at least clarify for the sake of clarity. If you choose not to, do so at your own peril. Most clients don't understand the difference between a web application and an application in the traditional sense, much less scalability.
Jul
9
comment Should we always create web application scalable?
I disagree that simple systems are often easy to scale. Perhaps scalability could be easily implemented to such systems. Is that what you meant?
Jul
9
revised Should we always create web application scalable?
added 84 characters in body
Jul
9
answered Should we always create web application scalable?
Jul
8
comment Why isn't there a next operation on enums?
@proskor The numerical equivalent of the enum value is very important if you must save/load it from a database. What I meant by my example with the day of the week was to emphasize that it is not really practical to shift days of the week just once or twice at a time, since you may equally require to shift years at a time and you want to know what day of the week it is. This sort of thing is very specific to this particular usage, and doesn't really fit with common usage of enums in general in my opinion. More often than not, you use enums to differentiate states, not to compare them.
Jul
8
comment Why isn't there a next operation on enums?
@proskor It is important to make the distinction between dealing with enum numerical equivalent and order. Due to the lack of direct support in Java and in most languages, it could be said that enums aren't meant to give too much importance to this. For example, if it is Monday, and I wanted to know what the next day is, I'd convert to day of the year, and then add one to it. If you then need the day of the week, you should convert back. Consider also that not everywhere in the world uses the days of the week as we know them, thus maybe a better system would be appropriate.
Jul
8
comment Why isn't there a next operation on enums?
No, I think he really is talking about enum, not Enumeration. He mentioned days of the week. Such a thing is commonly handled using enums.
Jul
8
comment Why isn't there a next operation on enums?
I would argue that this type of situation comes up rarely, like when you're dealing with days of the week or months of the year. In most cases, including uses of enum as flags, you don't need to know what order or what value they hold in order to program something using it properly.
Jul
7
comment Is reading+modifying existing code better than making your own?
Yes, please don't misuse code. It would be the metaphorical equivalent of pushing your perfectly functioning car in order to get to work.
Jul
4
awarded  Enlightened
Jul
4
awarded  Nice Answer
Jul
4
comment Is serialization better done in instance methods or static methods
@Mark There is nothing stopping you from making a non-static version that simply returns the static serialize call, if that's what you prefer. Honestly it would bother me too to pass an instance to a static method within its own class, but I do think the actual work should be done in the static method.
Jul
3
revised File exists vs. File does not exist. Is there a difference in performance?
added 6 characters in body
Jul
3
revised File exists vs. File does not exist. Is there a difference in performance?
added 1085 characters in body
Jul
3
comment File exists vs. File does not exist. Is there a difference in performance?
@Doval You make a good point. I'll make a point of it in my answer.
Jul
3
comment File exists vs. File does not exist. Is there a difference in performance?
@delnan The reason behind doing it this way was once very much real. Although that's not really true now, that has also been the cause of the convention of putting the more probable condition first, so I don't think it is irrelevant.
Jul
2
answered File exists vs. File does not exist. Is there a difference in performance?
Jul
2
comment What is a good practice to push notifications in a “near real-time” delay in this case?
If you want a guarantee that it will be persisted, you absolutely positively must wait until the database transaction is finished. I honestly think it is overrated. Send the confirmation immediately. Should it fail, you can always retry. Should it continually fail, you could always remove the confirmation later with an error of some sort, though this will almost never happen.
Jul
2
revised Structuring a storage system for a game
added 6 characters in body