Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Pick a different job. (Score 1) 548

Embrace mediocrity and find another outlet for your creativity.

This is among the worst advice for programmers I've ever read. And it's pointless advice because it's where the majority of programmers already are.

Oh, I certainly agree that clever code is a bad idea, but you should never stop thinking creatively about how to make your code better. Focus it on finding ways to structure your code that are elegantly simple and obvious, on finding the perfect name for that variable, function or class, one that precisely captures the meaning and intent -- and if there is no such perfect name, focus it on finding ways to refactor your code so that there is a perfect name. Programming -- done right -- is an inherently creative task, and the scope for beneficial creativity is vast.

This even applies at the micro level. It's almost always the case that any handful of lines of code that contains branching logic can be structured in several different ways. Take the time and try each of them! See which is most concise, which is most readable, which highlights one aspect of the logic flow or another... and then spend some time deciding which aspect will be most important for the next programmer to read it. Think about how you can write code a little bit differently to eliminate -- and visibly eliminate -- important classes of functional or security bugs.

One of the more important insights I received, after nearly 20 years as a professional programmer, was that comments are evil. Comments are a hack to work around the failure to write code which is sufficiently clear and expressive (note that I'm talking about inline comments, not comments used to generate documentation). When I find myself typing a comment, I step back and look for ways to improve naming, or refactor, until the comment is no longer necessary.

Those are just a few examples, there are many more. Programming, like any art, is a never-ending opportunity for learning and improvement, because perfection is unachievable. Doesn't mean you shouldn't try, though. I can already hear the complaints "But I don't have time for that crap, I have deadlines, and..." that's just another set of constraints to be optimized. When time is tight, I focus on simplifying and making absolutely sure that my code is bug-free and has thorough automated tests, because there isn't any time for extended debugging.

Never, ever settle for mediocrity. One of my proudest days was when another programmer whose skills and code I highly respect called my code the cleanest and clearest he's ever read. I strive to impress my colleagues (and I work with some of the best) with clarity, simplicity and elegance. Sometimes I succeed, mostly I fail... but I always learn in the process. After 25 years, I think I'm learning more every day now than I did when I started. The lessons are more subtle and far less obvious, but I think they're more valuable.

Comment Re:The Real question then is... (Score 2) 233

Detroit got fat and lazy, and as a result foreign automakers ate their lunch. Japan in particular had cheaper, harder-working workers, coupled with more focus on efficiency and -- eventually, after they built enough capital and experience building cheap crap cars -- design and build quality. Detroit didn't believe they could lose, either the management, or the unions. In order to stay competitive, both would have had to make serious changes... almost certainly including some reductions in labor costs and some labor re-training.

Comment Re:The Real question then is... (Score 3, Insightful) 233

IMHO, it's both.

Yep. And, frankly, it was and is obvious that it would be. I've been saying for years that globalism was ultimately a good thing, though in the short term it was going to be painful for the wealthy countries, as standards of living equalize. If this article is correct, the pain may be much less, and much shorter, than I'd expected. Not that there isn't still pain ahead, but if we're already getting to the point where overseas labor costs have risen enough to be offset by domestic education and infrastructure, then the future looks pretty good.

At the end of the day, though, I'm no more entitled to my job than some programmer in China. If he can do the job as well and will do it for less money, then he should have it. Cost of living differences make this painful in the short term, but if we just keep competition open, the field will level -- some of that leveling may come from decreases in my standard of living but most of it will come from increases in his. That's too bad for me, but great for him, and it's fair because he's no less a human being than I am.

Comment Re:Oh it'll happen... (Score 1) 727

"The day that the various desktop environments decide to cut out the middlemen."

Right. Because a Window Manager is the OS. All that threading, management of processes, filesystems and the like are just uneeded cruft!

He's not entirely wrong. The underpinnings are critical of course, buy they're also sort of generic. But even as someone who primarily uses a CLI the Window Manager is still my primary point of interaction. Application switching, clipboard style, aesthetics, etc, I see the effects of the WM every time I interact with the machine.

"Then I can say to my relatives "Linux? Just go get KDE" and there'll be no confusion anymore. If it's KDE compatible, it's KDE compatible."

You have what you are asking for available today. You just don't know which distribution to recommend. Your recommendation to relatives should be: "Find someone with a clue and they can help you." Your problem is that you are pretending to have when, when you actually don't

Give your relatives a computer sans OS and try recommending : "Just go get Windows!" and see how far they get before they ask Which version? Home? Premium? 7? What is this Server 2008? Or should I get Server 2012? Maybe I want MS-SQL? What's the difference between 32 bit and 64 bit? How many Gigabytes should be CPU be? The Hard Drive is the box with all the cables coming out, right?

Here I agree, I've never seen the plethora of distros as an issue. In fact I see them as a strength as they can very easily tailor and market for a specific audience without diluting their brand. I mean how well does apple actually do in the server space? They shouldn't have any trouble with their Unix underpinnings but I think a lot of people have trouble taking Apple seriously as a server because of their home user market focus.

If someone asks me for advice on installing Linux I generally recommend Fedora or Ubuntu depending on how bleeding edge they want to be (or for a laptop how well the LiveCD works). From a novice user's perspective the distro's are pretty generic.

Comment Re:Is he a scientist? (Score 1) 179

Is he an actual scientist? Did he do any scientific research? Did he merit a the title of university professor? Sure, he did make money, but that doesn't automatically mean he should earn a title that few people get after working very hard, usually without extreme luxury or profit.

He's not teaching science, he's teaching business, a subject that as the former CEO of Microsoft he should know a lot about.

And so what if he didn't earn the title the same way a PhD did? (though he won't be a full Professor)

It's not about granting him some privilege, it's about giving the students the best business education and I have to think he's in a good position to do that.

Comment Re:What about OSS license that respects other righ (Score 1) 117

It's not a popularity contest.

You missed the point. You can make such a license if you like, indeed many people have made them. But it is a popularity contest in that unless a significant number of people agree with your priorities and therefore choose to adopt your license, you won't have accomplished anything.

And, of course, the GP disagrees with your priorities and wouldn't use your license. I see both sides, but I think I'd probably shy away from a license with such vague and potentially far-reaching restrictions.

Comment Re:Good questions - interesting answers (Score 1) 102

Maybe that's the problem? Can't we have the power of the sharp kitchen knife without the four years of training from Tibetan monks?

Sure. What we can't have is the power of the sharp kitchen knife, plus the compatibility with existing code and libraries without the four years of training.

I can teach a novice to use a nice, pleasant, safe and very powerful subset of modern C++ in a fairly short period of time... as long as the novice is only working on code written in that subset. If the novice starts looking at and modifying other code, though, all bets are off until he's done his years on the mountain top.

The way I see it, C++14 is a very nice language with a bunch of baggage you should just ignore... except when you have to use because you're working with code that already does. This means given a clean, modern codebase you should be able to hire a bunch of smart novices and get them productive fairly quickly. Just keep an old salt around who can answer their questions when they step outside of the nice subset.

Comment Re:It's not a kernel problem (Score 1) 727

The problem is the GUI. People don't like X

Non-sequiteur. X has nothing to do with the GUI, at least not any part of the GUI users care about. X is merely the tool used to draw stuff on the screen; it says nothing about what gets drawn. Everything users care about, including what windows, buttons, fonts, etc., look like, how applications interact with one another, and whether or not all of the above is nicely integrated and looks like it belongs together has nothing to do with X.

Comment Re:or they could just NOT do it (Score 1) 155

The DMCA doesn'y say anything at all about search results. It's about hosting allegedly infringing material.

Courts in the US have held that linking directly to infringing content constitutes contributory infringement. Linking to another site isn't infringement just because the other site doesn't want you to link and benefit from their material (Tickemaster v Tickets.com established that), but linking to infringing material on another site does.

(Disclaimer: I am not a lawyer nor am I a Google spokesperson.)

Comment Re:Google should be wary (Score 1) 155

While that may be true, the shareholders would riot in a damned hurry if the stock price were to tank because Google becomes less relevant.

Which would be relevant only if Larry, Sergey and Eric decided to allow it to be. As long as the three of them stay united, they outvote the rest of the shareholders combined.

Comment Re:Google should be wary (Score 2) 155

These monopolies have billions in cash reserves to run them profitless for a very long time. Like decades.

Aside from the rather questionable assertion that Google is a monopoly, the company's cash reserves are nowhere near that large, or, rather, the company's expenses are much larger than you believe. Last I heard, Google has cash reserves of ~$60B (which, note, aren't actually cash; you don't leave that much capital sitting idle), and annual operational costs of about $40B. How long Google could continue to operate with hugely decreased revenues depends on just how far the revenues declined, and how much economizing the company could do, but I strongly doubt that it would be "decades". If all advertising revenue derived from the search engine disappeared and Google didn't economize at all, it would be bankrupt in maybe three years.

(Disclaimer: I work for Google, but I don't speak for Google. Everything in this post is derived from public information.)

Slashdot Top Deals

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...