Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

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:This should not be on the front page (Score 4, Interesting) 245

by dgatwood (#49178521) Attached to: Study: Refactoring Doesn't Improve Code Quality

About 5600 lines. However, because it was a glorified case statement, you were really only debugging a single case at a time, each of which was about the length of a sane function, so splitting it into functions would do little to improve readability. I like to trot out that example to terrify people, but the function itself was really quite sane and easy to maintain.

You did, however, have to fully understand the state machine as a whole, which in total was almost twenty kloc, had almost 200 instance variables in the state object, and leaned heavily on a tree object with about 30 instance variables. That's the point at which most people's heads exploded.

Either way, 4,500 lines is the size of a fairly straightforward iOS app. Most folks can dig into that and figure out enough to maintain it without spending a huge amount of time, even if the organization isn't ideal. When you hit tens of thousands of lines, that's where you have to start thinking about how you organize it and document it, because with such large projects, if you jump into the middle without a complete picture, you're likely to be hopelessly lost.

Comment: Re:This should not be on the front page (Score 1) 245

by dgatwood (#49177285) Attached to: Study: Refactoring Doesn't Improve Code Quality
Seriously. I've written single functions longer than that. If your code is so confusing that you can't maintain it without refactoring it by the time the entire app hits 4500 lines, either your code is some of the worst in the universe or you have insufficient working memory. Just saying.

Comment: Re:Should come with its own football team (Score 1) 102

You're confusing cause with effect. Programmer wages aren't high in the Silicon Valley because of having a lot of programmers. There are a lot of programmers because the wages are so high that CS majors come here in droves after college.

The reason the wages are so high here is because of basic supply and demand at work. Silicon Valley has only about a 3.6% unemployment rate among programmers, and a lot of the unemployed either want to be unemployed or are unemployed because their specific skills aren't in high demand. Programmers may be common in the Silicon Valley, but the demand in the Silicon Valley far exceeds the number of qualified programmers who are available and looking for jobs. Thus, the entire market is a zero-sum game, and the high wages are a result of the need to buy people away from other companies.

As a result, any sudden increase in the number of programmers drives down salaries for new hires, and fairly dramatically at that. For proof, you need only look at what happened to programmer salaries outside the Bay Area during the dot-com crash, when droves of people suddenly were looking for more affordable places to live. In some areas, salaries for programmers dropped almost in half because of that exodus.

Is it realistic to believe that there will ever be enough programmers to satisfy the Silicon Valley's voracious appetite? Hard to say. But that's a separate question.

Comment: Re:Should come with its own football team (Score 4, Insightful) 102

Yes, it is pretty silly for them to expect the government to educate people. It is not like an educated population is some kind of public good.

Well, it is a benefit to the public as a whole to a large degree, but there is a dark side, too. The main reason that companies want to increase enrollment in CS is to get a larger pool of people to draw from so that they won't have to pay employees as much.

Mommy, what happens to your files when you die?

Working...