Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).


Comment: Re:Refactoring done right happens as you go (Score 1) 223

by narcc (#49181121) Attached to: Study: Refactoring Doesn't Improve Code Quality

I do think a person who is sure that their religion and holy book is 100% true and that every other belief system has been proven to be fake, is not a person who thinks logically. And logical thinking is an essential skill to writing good code, and understanding code other people write.

So you think a persons religious beliefs affect their ability to program.

That's ridiculous. Even more ridiculous is your "reasoning".

Comment: Re:Easier to Analyze or Change == More Maintainabl (Score 1) 223

by narcc (#49178919) Attached to: Study: Refactoring Doesn't Improve Code Quality

Indeed. By introducing abstractions, you exchange performance and flexibility for simplicity (of one kind or another). More than one unmaintainable mess has been made by abstraction-hungry developers layering one leaky abstraction on top of another in a vein attempt to restore some of that flexibility.

This is why I'm a fan of top-down design. It tends to find the right balance almost automatically.

Comment: Re:Refactoring done right happens as you go (Score 3, Insightful) 223

by narcc (#49178893) Attached to: Study: Refactoring Doesn't Improve Code Quality

Of course part of the reason is that I refactor as I write.

I'm not sure what that has to do with writing "badly formatted code", but I'd still caution against that. Some of the best advice I ever received: "There are no good writers, only good rewriters." I've found this to be true for code as well. It's amazing how much you can improve your code once you've distanced yourself from it a bit.

Comment: Re:Refactoring done right happens as you go (Score 1) 223

by narcc (#49178883) Attached to: Study: Refactoring Doesn't Improve Code Quality

So maybe I am just as bad as he is. But I'll bet I'm a better software engineer.

That doesn't make sense to me. Why would a persons beliefs about religion (or politics, race, potato chip flavors) have any influence on their ability to write computer programs?

Do you think Buddhists write better code than Hindus? Are Raeliens better developers than Shintoists? What could possibly compel you to put forward such a silly belief?

Comment: Re:This should not be on the front page (Score 2) 223

by narcc (#49178863) Attached to: Study: Refactoring Doesn't Improve Code Quality

I'd rather have a readable and maintainable 4500-line function than an unreadable and unmaintainable 45-line function.

I remember, years ago, standard advice to students to break up code in to functions when some process got over some number of lines. Know what we got? A lot of really odd functions of similar length, as they broke things apart at seemingly random boundaries! I'm still deeply suspicious when I hear people talk about a proper length for functions.

It's time to let that one go, and teach students that while shorter is often better, length doesn't really matter that much. They ought to factor out functions when they see them and when it makes the program more readable. I'll suggest this as a new rule-of-thumb: functions should do just one thing and be named accordingly.

(Still, 4500 lines? Damn, that's big.)

Comment: Re:If you hate Change so much...... (Score 1) 514

by narcc (#49157081) Attached to: Users Decry New Icon Look In Windows 10

but I go back far enough to remember the horrible spaghetti code that people used to write

So do I, though I still think Dijkstra was wrong about that. I used to get skewered for expressing that opinion, however. Not that it matters much, I've found most developers are a bit over zealous when it comes to defending their treasured folk-knowledge.

In before the OOP craze, like you were, I thought it was just going to be a passing fad -- like countless fads before and after. I have no explanation for its sticking power, save the early popularity of Java and Microsoft's subsequent clone, C#. I figure it would have been dead before the new century had Sun and Microsoft hadn't tried to cash-in on it. It's a shame MS's ploy to fragment Java failed. It's one evil plan that might have done us some good!

Fortunately for us, It is weakening. Sacred cows are starting to look like the mistakes they always were. The hipster developers are even promoting composition over inheritance. (And not a moment too soon. I've seen a lot of talk about multiple inheritance lately. I thought we'd already learned our lesson about that!) A lot of young developers are even learning what modularity actually entails, and how OOP is inherently anti-modular. (It used to be a popular belief that OOP gave you modularity for free! It looks foolish in hindsight, I know, but that was the marketing buzz.) It gives me a bit of hope for the future.

So I'll keep my fun Dijkstra quote, to lend support to the next generation who will cast-off our mistakes. It looks like they're trending toward an imperative+functional era. It'll be interesting to see what comes out of that.

Comment: Re:different from Cornsweet (Score 1) 412

by narcc (#49153289) Attached to: Is That Dress White and Gold Or Blue and Black?

I'm convinced that this is just a joke that I've missed. I've tried good displays, crappy displays, various lighting, brightness settings, backgrounds, room lighting, viewing angles and probably something I've forgot. I can not get that dress to look white and gold.

It reminds me of "The emperors new cloths".

Q: How many IBM CPU's does it take to execute a job? A: Four; three to hold it down, and one to rip its head off.