Forgot your password?

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

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) 210

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) 210

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:Google should be wary (Score 1) 155

by swillden (#47721633) Attached to: Google Receives Takedown Request Every 8 Milliseconds
Interesting. What do you mean by "operate the engine in private"? Who would use it? And given that information derived from what you search for is the primary source of information for ad targeting, and given that the search engine is the primary place the ads are displayed, how would that work?

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

by swillden (#47717329) Attached to: Qt Upgrades From LGPLv2.1 to LGPLv3

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) 101

by swillden (#47717073) Attached to: Interviews: Bjarne Stroustrup Answers Your Questions

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) 665

by swillden (#47716485) Attached to: Linus Torvalds: 'I Still Want the Desktop'

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:which turns transport into a monopoly... (Score 1) 271

by swillden (#47715307) Attached to: Helsinki Aims To Obviate Private Cars

count me out... this sort of stuff just makes me want to live on a remote tropical island and spend my days fishing.

Do you also insist on owning your own elevator?

I insist on living and working in locations where I don't need an elevator... a remote tropical island would work well for this.

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

by swillden (#47714911) Attached to: Google Receives Takedown Request Every 8 Milliseconds

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 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

by swillden (#47714817) Attached to: Google Receives Takedown Request Every 8 Milliseconds

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

by swillden (#47714799) Attached to: Google Receives Takedown Request Every 8 Milliseconds

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.)

Comment: Re:Its been done (Score 1) 468

by swillden (#47714525) Attached to: Google's Driverless Cars Capable of Exceeding Speed Limit

Yes. Traffic jams happen because interchanges/intersections get saturated.

Actually, the study in question was on freeways, and it didn't necessarily have anything to do with interchanges, which are all rate-controlled in the area. One spot they found regularly jammed was just a rise in the road. The partially obstructed vision was enough to cause a few drivers to slow just a bit, which snowballed and then created a jam which moved backwards from the rise at a fairly constant rate of precession, two or three mph, IIRC. So after the jam moved away from the rise, there was *no* cause for it. It just self-sustained as drivers bunched up when approaching the jam.

There was a /. article on it. It was fascinating.

Comment: Re:Its been done (Score 1) 468

by swillden (#47709115) Attached to: Google's Driverless Cars Capable of Exceeding Speed Limit

I don't have a link handy, but a group (from Stanford, IIRC) did it as a study, rather than to make a point. They found that by driving slow (perhaps even below the speed limit) in a line, they could fix traffic jams. Not because of anything to do with speed limits, but rather just the dynamics of heavy traffic which can cause self-perpetuating jams, even though there is actually plenty of road capacity, no obstructions, etc. By creating a moving roadblock for a few miles and creating a gap that allowed the jam to unjam, they could quickly get traffic flowing smoothly.

Comment: Re:you must not have done well in math class (Score 1) 212

by swillden (#47707713) Attached to: Figuring Out Where To Live Using Math

Maybe because places that don't have a problem with crime in the first place don't care about making laws to restrict access to weapons?

Perhaps. Assuming you're right, it leaves open the question of whether the restrictions actually affect the level of violence and in what direction. The assumption of the cities with high violence and tight restrictions is that the restrictions reduce violence. Though that assumption seems logical, history calls it into question. For example, both DC and Chicago saw massive increases in violence after they enacted their draconian restrictions. The rest of the country also saw rising violence at the same time, but nowhere near in the same degree. So perhaps the city leaders were prescient, saw the coming wave of violence and acted to mitigate it, or perhaps their action actually exacerbated it. Or maybe the restrictions made no difference at all.

My money is on restrictions increasing the violence, mainly because the restrictions only affect the law-abiding, which gives criminals an advantage, and eliminates their single biggest worry (per FBI studies, in which violent criminals overwhelmingly report that their biggest fear when committing a crime is that the target might be armed). We'll get a chance to see over the next few years, since DC and Chicago have been forced by the courts to loosen their restrictions dramatically.

The generation of random numbers is too important to be left to chance.