835 reputation
39
bio website
location
age 38
visits member for 2 years, 7 months
seen 4 hours ago

Nov
23
comment Is it normal for a programmer to not have 100% clarity over their own code at times?
To add to other (insightful) answers in the sense that it smells of over-complicated or poor designed code (do not worry, most of us had to pass that phase): Document. Both by giving proper names to variables/methods/classes/modules, by adding a proper description to each function, and by (when you see no other way around) writting a simple inline comment explaining why and how are you using some complex snippet of code.
Nov
22
comment Programmers and drugs are common?
From seeing my predecessor's code, definitely yes. Sadly, I have been searching in all of my desk drawers and it looks like he consumed all of it (which, again, makes sense when you consider what is in the SVN).
Nov
19
comment how can I minimize my ajax calls to the server while creating a dashboard
I agree with the "no improvements" warning. At one in-house app, we pass about 600 records back to the desktop. The transmission of the data, even to a remote site, just takes a couple of seconds, but the browser needs 1+ minute to parse them, update the view, etc.
Nov
19
comment Is software inherently buggy and hence, vulnerable?
AFAIK, Gödel theorems are about systems where you compose all the possible rules/statements (in fact, Wikipedia specifically talks about arithmetic systems, not systems in general). And the result is that you cannot guarante to prove each of the statements as true or false. You could agree that a general programming language would qualify as a Gödel incomplete system, but a concrete program is way more closed and usually predictable. The real issue is that using the tools that calculate formal correction is only done for extreme cases (v.g. power plants) due to the effort they require.
Nov
18
comment Making hard to hack java standalone apps
@Snowman All generalizations are always bad. That said, anything in hardware that you do not control can be cracked; the idea would find the point where it is so complicated to bypass the protection that it is better for most of the users to pay the licence, and assume that you will always have a degree of unlicensed users. The more specific the application, the less likely for it to be cracked (due to less public being interested in it).
Nov
17
comment Null Object Pattern and Input validation - copy real implementation or silently accept everything?
From a strictly logical POV, you could say that since you have no camera, your camera does not reject the WifiEncriptionType so it should not throw the IllegalArgumentException. So, I do not think not throwing it would be a breach of contract.
Nov
17
comment Control (avoid) changing fields with side-effects
Thanks for the feedback. Still I will let the question remain open for a few days; while I feel my option (number 4) is correct I would expect many people to have had the same issue, and I would like to know if the pattern has been identified / named (principally because there I will be able to study possible issues that I am missing)
Nov
17
comment Control (avoid) changing fields with side-effects
@Neil That is an option (covered in point 2). While it looks like the most "canonical" option, I do not like the extra DB accesses. Another option (which I would prefer) would be having an API update method that allows changing all of the "intrascendent" fields, and specific methods (like setDeceasedDate(employeeId, date) for changing "transcendent" fields. But the only way of translating such an API into ORM/JPA I can think of is my last proposal, and as I said I feel I might be overlooking some other solution
Nov
17
comment Control (avoid) changing fields with side-effects
@Neil, thanks for your help. Using an ORM (JPA), I will usually persist/update/retrieve whole objects/entities; I will not create an SQL query like "UPDATE Employee SET Name=?". Also, entities may be persisted indirectly (by using cascading).
Nov
17
asked Control (avoid) changing fields with side-effects
Nov
9
revised Coding style issue: Should we have functions which take a parameter, modify it, and then RETURN that parameter?
added 335 characters in body
Nov
9
answered Coding style issue: Should we have functions which take a parameter, modify it, and then RETURN that parameter?
Nov
9
comment The source is the documentation - part 1
I disagree with the example of the filesystem... after all, the definition of the Posix functions provides an standard API, so it is not like the different file systems are providing different functions (apart from the ones they chose to implement specifically9, just different implementations of the same functions
Nov
9
comment The source is the documentation - part 1
@jmoreno they are different approachs. For a filesystem, the specification would be the POSIX functions. You are building a module that must be used by code already existing (in difference with the usual task of building a module that will be used from programs still to be written).
Oct
29
answered Extending a class for debugging: public API, hidden implementation or something else?
Oct
21
comment A “Composite API” layer
Developers will have to maintain the security of the individual resources in one way, and the security of composed resources in another. How come? When you get a request for a parent, in the parent check the request credentials and, if valid, pass the request along to the children. Each of the children will check the credentials in its own, the same way they would handle an individual request.
Oct
8
answered Typical team size to maintain and improve a 100k line codebase?
Oct
6
comment Java - Is it possible/good idea to reduce chance of crashing by catching Error?
@MichaelBorgwardt actually is quite the opposite, catching an OOME might make some sense at low level (say, I am requesting a 30 MB+ buffer to load a video file). In that case, you can expect and deal with the error easily (just replacing it with an exception/could not load control code). If you just capture the error at high level, the state of the system would be unknown (it is unknown which operations failed), and the only realistic option would be "resetting" all of the program states.
Sep
28
comment Does the games industry use automated testing for visual parts of games/rendering? How?
I would say that probably they just use a well tested graphics library (either third party or developed in house). When they get to designing a game level, they do not check that every object is exactly at coordinates X, Y, Z, or if the perspective is right, but simpler things as ensuring that objects are there and not blocked by walls, etc. And if the graphics library is in house developed, the tests are automated and more basic.
Sep
25
comment Should a developer refuse to access production server?
Notice that part of the rule from "no developers in production" come to avoid developers doing dumb things like hardcoding URLs and other details that should be configurable. As long as you know WHY it is a good idea to keep developers out of production, you can both keep the root access and management and code carefully to avoid these issues. I am at the same position and still I always do DEV -> OSB from SVN -> DEV -> PRE -> PRO, because I know it is slow but I still know that change control is necessary.