300 reputation
112
bio website google.com/search?q=recursion
location Washington
age 30
visits member for 2 years
seen Dec 11 at 6:41

Jun
27
comment Continuous integration policy problems
I doesn't help that there are several pretty long documents for this. None of them state what the overall intent it, just the particulars of each process - branching strategy, CI, and there's actually no official document for what goes to whom. I'll try and make a diagram, heheh.
May
24
comment Minimize travel distance of n people to n locations
This sounds like the travelling salesman problem. Edit: See programmers.stackexchange.com/questions/123189/…
May
23
comment Should I follow the normal path or fail early?
+1 for throw foodAtMummy XD
May
22
comment Sharing source code of my online game?
I suggest migrating this to gamedev.stackexchange.com
May
22
comment Measuring “novelty” of data
While not ideal, I think this is a good enough starting point.
May
22
comment Didn't do too well on a Java IKM test, advice?
You might try actually writing things like a compiler and a garbage collector. Not for any specific purpose, but to stretch your mind and give you a sense of what kinds of things need to be taken into account. Trying to do something will help you remember, or at least guess, at the fine details.
May
22
comment Why is there no deterministic object destruction in Java?
The point is that running out of memory should be an edge case, not something you have to worry about all the time. Unless you're working with extremely large amounts or sizes of data, memory requirements shouldn't even enter into your mind.
May
22
comment Why is there no deterministic object destruction in Java?
@Doval Yes, in practice there's no such thing as infinite memory. But the goal is to allow things to be compressed, moved, removed, or recycled without interrupting the programmer's intention for writing the application. When someone writes a program without garbage collection, they also need to write a memory manager that will not only be mixed in with the business logic of their code but is likely to be much less effective than one that can adapt to conditions at runtime. So instead we act as if there is unlimited memory and handle runout as an exceptional case.
May
22
comment Why is there no deterministic object destruction in Java?
@Doval Yes, if you run out of memory then you're out. But we shouldn't need to worry about how much memory we have, because the available memory is something that can be optimized at runtime according to system state. For example, in a variation of GC, large underutilized objects could be jogged to slower media depending on usage to make room for new objects, and then restored to faster media when necessary. It just so happens that (in normal GC) unused objects are moved to oblivion, and sometimes we recreate them exactly the same when needed.
May
22
comment Why is there no deterministic object destruction in Java?
@Andris Yes, as I said the GC must know when an object has the potential of being called on again in order to prevent "programmer forgot X was still in use" errors. Object pooling is something that has to be programmed, using things like weak references and such. By indicating to the GC that objects may be reused, the GC can still dispose of them if it needs the space or they can be rehydrated and strongly referenced again without incurring an allocation cost.
Feb
14
comment Measuring “novelty” of data
Possibly, although that leads me to wonder about how white noise would be treated. If the stream is just totally random, ie incompressible in the usual sense, then my definition for novelty would fall apart. Taken as a whole, there would be nothing statistically significant about the stream, but sections of the frame could appear to be very "novel."
Nov
11
comment Advise how to write a simple test for this javascript snippet?
Of course, it can be helpful to mess around writing your own unit testing api as a learning exercise. Just remember the programmer's virtues ( c2.com/cgi/wiki?LazinessImpatienceHubris ) if you start to think about using them for a project, and use a library instead.
Nov
11
comment Is the Observer pattern adequate for this kind of scenario?
It would be nice if the absolute values were only updated when they were accessed, maybe keyed off of a frame counter. That way you wouldn't be processing the entire subtree every time its root moved, only the bits you care about for that frame.
Nov
11
comment How to ensure that a member variable is initialized before calling a class method
Something else to ask yourself: why are you offering a way to set the variable outside of the constructor if it needs to be initialized anyway?
Jul
9
comment Writing unit test only for applications that requires them
Generally, applications that don't need unit testing are either A) already so specific/complex that you can't unit test, or B) so simple that unit testing would be more complicated than the subject of your tests. IOW embedded systems, existing "enterprise level" cludge, and bash scripts.
Jun
11
comment Should I use parentheses in logical statements even where not necessary?
Yup, you're right. Fixed it.
May
23
comment Is there something which can write the function for me given the pattern?
You mean en.wikipedia.org/wiki/Supervised_learning ? Sure, lots of algorithms...
Feb
21
comment Code reuse via inheritance
@MrFox To be clear, you're referring to multiple inheritance, correct? I'd also add that even abstracts or interfaces can present problems as well, if like me you've ever had to use an API where in order to get to IWheel you first have to cast IEngine to ICar (paraphrasing). How things got that bad is a long story involving contractors, don't let it happen to you!