1,717 reputation
410
bio website johansens.us
location Michigan
age
visits member for 3 years, 8 months
seen 12 hours ago

Apr
17
comment Why do I need to map arguments to instance variables?
I don't see how it throws away type safety. Most of the rest of what you said I agree with and conceded above. It works in situations where many constraints apply, i.e. none of the above issues come up. But that's actually a pretty large number of cases that I come across. If an object calls for a long parameter list in a constructor, odds are that most of that data is of the in-and-out type, i.e. the object is a place to hold bunches of data about a customer or a product or whatever, and most of that data doesn't affect the logic, it just gets read, stored, and updated.
Apr
17
comment What do you think about a CMS similar to WordPress but implemented in Java?
@RobertHarvey Quite true. If the person making the decision is a developer or if he knows that he'll need extensions or customization and consults developers, such information may be relevant.
Apr
17
comment What do you think about a CMS similar to WordPress but implemented in Java?
Is there a market for a new and better CMS? Probably. Would it be hard to get a foothold in the market? Yes. Could you accomplish it? Depends on how good you are and how much work you put into it. "Work" here including both development and marketing. I would emphasize that even if you really did build an "unquestionably better by any standard" CMS, that people are not going to beat a path to your door begging for copies. You'd have to put considerable effort into pushing it.
Apr
17
comment What do you think about a CMS similar to WordPress but implemented in Java?
@RobertHarvey Very true, but possibly misleading. The end users care about functionality, usability, and cost. If your development techniques result in a higher ratio of functionality and usability to cost, they will like it, regardless of whether they understand the technicalities.
Apr
6
comment Why are people making tables with divs?
@DavidW Exacty. And I'd add: the design of HTML, CSS, and JavaScript came about through a series of fits and starts and divergent goals and changes of mind. Just look at the number of deprecated tag attributes in HTML 5! If the thing had been cleanly designed from the beginning, maybe some of these issues would just never have come up. As is, we have to work with what we have. (PS I don't say this to demean the people who invented these tools. There had to be some real geniuses in there. That's just how life is. Nobody knew where it was going when is started.)
Apr
2
comment Enforcing open source software license
@MichaelT True. Such a compare would only work if both people used the same compiler with the same options set. I was being too simple-minded. So I suppose it MIGHT work, if the test passed they are from the same source, but there would be lots of false negatives.
Apr
1
comment Enforcing open source software license
Hmm, I wonder if anyone has ever built a software product to examine two sets of binary code to try to determine if they have sections that were compiled from the same source? Obviously even a minor change would make all the addresses different, but if a program had all the same opcodes in the same order, and only the addresses were different, that would be awfully suspicious. But maybe I'm being too simple-minded there.
Apr
1
comment Enforcing open source software license
Identical text strings or other constants in the code would also be a clue. Of course the fact that two programs both have the message "Error - retry" would prove nothing. But as messages get longer, we'd expect there to be differences in wording, even if the basic idea is the same.
Apr
1
comment Why are people making tables with divs?
... "because it's the rule". I have had a number of conversations with such people over the years, on this particular issue and on many others. People who refuse to even discuss the pros and cons of a rule, because it's the rule, end of discussion.
Apr
1
comment Why are people making tables with divs?
Hmm, seems to me that I said something like: "Someone sees a problem and proposes a rule to prevent it. Others see the value of this rule. Then they insist on blind devotion to this rule without regard to the original problem it was supposed to solve and/or regardless of what other problems it creates." I don't deny that there is reasonable thinking behind the rule. I just don't agree with the conclusion. Surely I can say, "You have a good point there, but nevertheless I disagree." And surely you do not deny that there are people who don't understand the pros and cons and say ...
Jan
30
comment Leaving intentional bugs in code for testers to find
I'm guessing that Patton meant that you should have rigorous training and field exercises during peace time. The analogy would be to have rigorous classes in IT school or post-degree training. I'm pretty sure Patton didn't mean that officers should be instructed to shoot at their own troops from behind to keep the troops on their toes!
Jan
28
comment Leaving intentional bugs in code for testers to find
"incentivized to find the bugs you know are there" Excellent point. If an organization is doing this, it likely means that someone is breathing down the QA folks necks to make sure they find the planted bugs, so that will be their top priority. What if they get together and figure out, say, "Hey the planted bugs are almost always that it fails to save one field on an edit screen with a bunch of data" (or whatever). Then they'll spend an inordinate amount of time looking for that one type of bug, and increase the chance that they'll miss other types of bugs.
Jan
25
comment Throw exception or let code fail
@MarcvanLeeuwen RE the potential race condition: True. I find that a more persuasive argument.
Jan
25
comment Throw exception or let code fail
@MarcvanLeeuwen Why is efficiency not important in the case where there is an error? I don't think that's necessarily true at all. If in the error case the program will display an error message to the user and stop, while in the success case it does a bunch of additional work, it might be relatively less important. But at this level you don't know that. Maybe when there's an error the caller selects a different NAME and tries again, and keeps trying different names until if finds one that's a success -- for example in a function that's trying to assign a unique name.
Jan
23
comment What is negative code?
@Synetech Sure ... to a point. If by replacing clear, readable code with something hopelessly cryptic I shave 0.01 seconds off the time it takes the screen to respond to a button press, almost certainly not worth it. If an easier to read function means that a screen that used to return in half a second now takes half an hour, no. But I agree that most of the time, readability and maintainability are more important than speed, because in real life, speed gains are usually -- not always, but usually -- trivial.
Dec
31
comment What is negative code?
@Synetech Sure, brevity achieved by using some obscure construct is not a plus. But brevity achieved by eliminating redundant code is a huge plus. Brevity achieved by eliminating code that is never executed is a big plus too. Brevity achieved by simplifying the algorithm requires case by case analysis: If by simplifying it you have made it easier to understand but take longer to run, that could go either way.
Dec
31
comment What is negative code?
A more serious analogy would be that measuring software productivity by lines of code is like measuring progress on an auto repair job by counting the number of grease rags used. This could be accurate to an extent: the more work the mechanic does, the more grease rags he'll use. But it counts mistakes and wasted effort as much as effort that actually leads to a goal, and a big mistake -- like accidentally breaking an oil line and having to clean up a huge mess -- gets counted as major progress when it's really the opposite.
Aug
26
comment What is negative code?
@Nav: Reminds me of a similar story that begins the same way. Then the coach throws a ball in the air, swings and misses. He throws it in the air again, swings and misses. He throws it in the air a third time, swings and misses. Then he says to the team, "See, THAT'S how you should be pitching!" (I have no idea what this story might have to do with software development.)