Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Easier to Analyze or Change == More Maintainabl (Score 3, Interesting) 247

I once took over 30,000 lines of code that had been written by a subcontractor and trimmed it to around 4000 LOC. And you better believe it ran faster! Not because refactoring is magic, but because once all the mind-numbing almost-repetition was mucked out you could actually see what the code was doing and notice that a lot of it wasn't really necessary. Ever since then I have always maintained that coders should never ever copy and paste code. I've had people disagree, saying that a little bit of copying and pasting won't hurt, but I say if it's really such a little bit then you shouldn't mind re-typing it. Of course if you do that very soon you start putting more effort into devising ways to stop repeating yourself, which is exactly the point. Repeating yourself should be painful.

That's I think a reliable litmus test for whether you should refactor a piece of software. If it's an area of code that's been receiving a lot of maintenance, and you think you can reduce the size significantly (say by 1/3 or more) without loss of features or generality you should do it. If it's an area of code that's not taking up any maintenance time, or if you're adding speculative features nobody is asked for and the code will get larger or remain the same size, then you should leave it alone. It's almost common sense.

I don't see why anyone would think that refactoring for its own sake would necessarily improve anything. If an automotive engineer on a lark decided to redesign a transmission you wouldn't expect it to get magically better just because he fiddled with it. But if he had a specific and reasonable objective in the redesign that's a different situation. If you have a specific and sensible objective for reorganizing a piece of code, then it's reasonable to consider doing it.

Comment Necissary, not sufficient. (Score 4, Interesting) 99

Granted, the biggest problem with the patent system has been that the criteria for patentability has been so loose, and the recent Supreme Court rulings will certainly do more to fix that root cause than the recent patent reform bills. Hopefully going forward these new rulings will improve the quality of patents approved and upheld in court, which is by far the single most important reform needed in the long run.

But in the meanwhile there are more than 20 years of bad patents that have been granted, and the costs of defending against a patent lawsuit is still far greater than the cost of settling. We need to make it less expensive to challenge existing patents if we don't want them to continue to be a burden for the next 20+ years. That is exactly what the reform bills were about. They were designed to be complementary to the Supreme Court rulings, addressing a different parts of the problem.

Comment The sound sucks because your gear sucks. (Score 1) 95

Get management to pony up for real AV gear. The problem is your gear is garbage and not designed for the use. There is no magical CHEAP thing you can buy.

Now get a biamp or BSS DSP and 4 boundary mics hanging from the ceiling on some 18" diameter glass plates... I can make a meeting room cover all voices in there perfectly for video and teleconference.

Comment Totally meaningless paper (Score 2) 247

Sorry, but it has absolutely nothing to do with the real world. They're giving twenty people - ten in experiment group and ten in the control group 30 minutes to do a bit of analysis. And they measure minutes to apply a few changes, without any qualitative measure on how the code is growing. There's very little proof that the refactoring they did made any sense, the sample size is so low you'd never get reliable results and pretty much what you can conclude is that refactoring doesn't make hackjobs easier. Never thought so, that just involves finding the place something's happening and hack it. If it's a good idea, well... it works there and then.

Comment Re:Hmmm .... (Score 1) 127

Well somebody has to be the first at discovering something before somebody else can confirm it. And yes, in human years it might take a while to build another billion dollar project to do that. Science works on incomplete information, otherwise there wouldn't be anything to do science on. Has anybody independently verified the Higgs boson yet? All the exoplanets discovered recently? Probably not. That's always how it will be at the leading edge of science.

Comment Re:Bad idea (Score 2) 671

Well, this is the thing about civil disobedience. The classic formula is to keep up awareness of your issue by forcing the government to go through the embarrassing and drawn-out process of prosecuting and punishing you. I'll bet they had to drag Thoreau kicking and screaming out of that Concord jail cell when some joker finally came along and paid his poll tax for him. Holding court for his admirers in the town pokey no doubt suited his purposes nicely.

In that spirit, this announcement is very effective. When was the last headline you read about Edward Snowden? If he comes back for a long and drawn out trial that'll show he's pretty hard core about this civil disobedience thing -- if leaving a cushy, high paying job in Hawaii with his pole-dancing girlfriend to go to fricken' Russia wasn't enough.

It occurs to me, though, that this situation is a lot like what I always say about data management systems: the good ones are easier to replace than the bad ones. Likewise the better governments, the ones with at least some commitment to things like due process, are much easier to face down with civil disobedience than ones where being a political threat gets you a bullet in the head, like Ninoy Aquino or Boris Nemtzov. If Snowden *does* come back, and if he ends up "detained" in limbo somewhere, then it'll be time for everyone to go into the streets and bring the government down.

Comment Re:C++14 != C++98 (Score 1) 407

If you want to use auto, go to a dynamically typed language. Strong typing is a feature, it prevents bugs and saves time and effort in maintenance. If you use auto, you're a shitty programmer. Auto solves NO problems except the number of characters you need to type when declaring stl iterators. Its a bad feature used to patch over other poorly designed features. Which basically describes almost all of the additions in the last 10 years to C++.

Slashdot Top Deals

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...