Reputation
726
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 11
Newest
 Pundit
Impact
~26k people reached

21h
comment Why are floats still part of the Java language when doubles are mostly recommended instead?
@phresnel My company didn't need any kind of optimization. If you are experienced in computer graphics as you say you are, then you know that all that microoptimized code exists inside the OpenGL and DirectX libraries already. The number crunching occurs all under the hood, but it occurs nevertheless. You specifically mention mobile where it actually IS needed to save on battery power, even if the developer doesn't ever deal with it. It's abstracted into very low level libraries and never gets touched by devs, but there is a LOT of number crunching even for simple games.
Apr
27
comment Why are floats still part of the Java language when doubles are mostly recommended instead?
@phresnel as a former VP Operations of a game development enterprise, I assure you almost every game there is a ton of number crunching. Note it's usually contained in libraries and 100% abstracted away from the engineer, I would hope they understand and respect that all that crunching is going on. Magic inverse square root, anyone?
Apr
20
comment How specific should the Single Responsibility pattern be for classes?
Your second sentence looks like "Damn, teacher said this needs to be 4 pages... 'generates motive power' it is!!"
Apr
13
comment How to return warnings alongside result of calculation to caller of a Java method?
@kai I agree unless the calculator was only ever spawned to perform one calculation. I find this unlikely since the OP said "latest" calculation.
Mar
23
comment Team constantly fails to meet sprint goals
Having worked in a one-product-shop before, there is more pressure to "fill the bucket" than there is in a bigger place with different and shifting priorities. It's possible the devs are afraid to say no even though the things that should go in plus the 'flavor of the month' things from management are more than they can deliver on. It takes a lot of guts to tell the CEO no, no matter the size of the company.
Mar
14
comment Java need to call many methods systematically
Being an amateur game designer and ex-professional developer, I can tell you this idiom works for more than just games! Making your algorithms and business logic generic and adaptable will save you tons of maintenance in the long run and force your stakeholders to really think about their processes before cutting IT a check to automate them. If I had a dollar for every process they wanted me to automate before they had figured out the manual processes and the patterns between them, I could buy us a rather nice steak dinner.
Mar
14
answered Is it okay for a class to use its own public method?
Feb
26
comment Scrum - Dealing with failed sprints and deadlines
Is a representative from Money Bags taking time every week to see the result of the Sprint (which, being Scrum, was a shipable product minus some features)? Did he relay to his management doubts about making the deadline?
Feb
24
comment Arguments against error suppression
What do you mean "throw exceptions where they should work for you"?
Feb
24
comment Arguments against error suppression
My problem with that is that the comment is stuck inside that code. As a consumer of the function, I might never get to see that comment.
Feb
7
comment Encrypted content in games
In your "absolute simplest case" your "game" is not solvable by a human. That's the whole point of the password to the encrypted files. And any clues or constraints to the password that are available in the game are also available by examining its source, which in turn become constraints to ripper.exe. I promise you a couple graphics cards will brute force the password before a human can solve the "game".
Feb
6
answered Encrypted content in games
Feb
5
comment Better to have 2 methods with clear meaning, or just 1 dual use method?
I'm generously assuming this is example, illustrative code and that you aren't using floating point math to store monetary values. Otherwise I'd have to get all preachy. :-)
Jan
25
comment Should we avoid language features that C++ has but Java doesn't to increase maintainability?
There was a question recently about developers reviewing code in a language they don't normally write. I think the wisdom there applies here: a good developer will spot many basic mistakes in just about any language, but each language has so many gotchyas that maximum benefit is achieved when in-language developers do the review. This is even true if your C++ is "Java features only".
Jan
21
comment Is it good practice to avoid warnings and notices?
I work in Java/eclipse, which is different than php obviously, but I usually find the warning is raised by either 1) something that compiles but I made an obvious mistake or 2) something that is fine now but will be bad down the road
Jan
8
comment Given a herd of horses, how do I find the average horn length of all unicorns?
If you have 10 horses, two of which are unicorns of length 4 and 6 is your average 5 or is it 1?
Dec
27
comment Doesn't “always initialize variables” lead to important bugs being hidden?
This is exactly what I was thinking when I read it. It's not sweeping things under the rug, it's sweeping them into the dustbin!
Dec
25
comment Is it a good idea to define one big private function in a class to maintain valid state, that is, to update the object's data members?
@site80443 Based on what I see, that's the wrong approach. Try to model your data such that only data that is validated against it self is included. For example the price of an item can't be negative only relies on itself. If an item is discounted, don't factor the discount into the price - decorate it with a discount later. Store the $4.99 for the item and the 20% discount as a separate entity, and the 5% tax as yet another entity. It actually looks like you should consider the Decorator pattern if the examples represent your real life code.
Dec
24
comment Is it a good idea to define one big private function in a class to maintain valid state, that is, to update the object's data members?
You point out the biggest disadvantage: relying on people remembering to do things is rarely a good solution. About the only thing you can rely on a human to do is that they will forget to do something.
Dec
23
comment At what point is it taboo to have loops within loops?
If you read the whole document, he takes the time to call some people heretics and some people prophets. Just because Linus Torvalds is the High Priest of his Church and gets to decide who sits in what pew doesn't mean you have to follow his hokey religions and use his ancient weapons.