Forgot your password?

Comment: Re:Simulations are limited by imagination (Score 4, Interesting) 119

by swillden (#47734021) Attached to: Google Wants To Test Driverless Cars In a Simulation

The problem with simulator testing is that you can't test scenarios that you didn't think of. This is particularly important to find problems arising from multiple simultaneous situations. For example, you might test the scenarios "front camera obscured by rain", "car ahead of you performs emergency stop", and "dog runs into street", but that doesn't necessarily tell you how the car will respond to a combination of the three.

Real life is far more creative than any scenario designer.

Which is why you should do both. A simulation can test millions of permutations -- including arbitrary combinations of events, and in far more variety than could be tested in a reasonable amount of time on real roads -- and can verify that software changes don't introduce regressions. Real-world testing introduces an element of randomness which provides additional insights for the simulation test cases.

Ultimately, governments should probably develop their own simulators which run the autonomous car through a large battery of scenarios, including scenarios which include disabling some of the car's sensors. Then autonomous vehicles from different manufacturers could be validated on a standard test suite before being allowed on the roads, and when real-world incidents occur in which an automated car makes a bad decision, those incidents can and should be replicated in the simulator and all certified vehicles tested. They should also do real-world testing, but I suspect that in the long run simulations will provide much greater confidence.

Comment: Re: Jurisdiction 101 (Score 3, Interesting) 366

by turgid (#47727669) Attached to: UK Police Warn Sharing James Foley Killing Video Is a Crime

Errr... the UK still has an reasonable approximation of a well-functioning court system. That the police say something is illegal isn't enough to get you thrown in jail.

It is under Tony Blair's Anti-Terror Laws. You only need to be suspected of something that could be vaguely related to terrorism to be locked up. No jury trial involved, just the police, some politicians and a few judges.

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

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:That model really helped Cable TV (Score 1) 537

by mdielmann (#47724905) Attached to: Study: Ad-Free Internet Would Cost Everyone $230-a-Year

Sadly, this is also the case in Canada. It's one of the main reasons I prefer to torrent or use Netflix. I'm sure that if I put in the effort I can blame the US, but it's at least as much my nation's fault as theirs. Now, if only Canadian content was required to stand on its own merits, and not required to be played, maybe we would get something that could replace the American drivel that is so much a part of what is broadcast.

Time to watch some old and/or foreign shows on Netflix, and reminisce about my youth.

Comment: Re:Code more.. (Score 1) 529

by turgid (#47723461) Attached to: Ask Slashdot: What Do You Wish You'd Known Starting Out As a Programmer?

Very wise words.

I'd add to that: write unit tests for your code (preferably before you write the code). You'll understand how it works and where it's broken quicker and better and free up your brain cycles more for the creative design part.

You will learn and improve much more quickly with much less stress.

Comment: LISP (Score 1) 529

by turgid (#47723383) Attached to: Ask Slashdot: What Do You Wish You'd Known Starting Out As a Programmer?

Back in the day (80's 8-bit micros) I started on BASIC and Z80 machine code followed by a little FORTH.

The one thing I really wish I'd known about - or understood - was what LISP really is. It was often described in the popular computing press as a language "for processing lists."

How very wrong. The reality is so much better.

I didn't seriously look at the lisp family of languages until about 6 or 7 years ago. I really wish I'd looked 25 years sooner.

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

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

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

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

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

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

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

Never say you know a man until you have divided an inheritance with him.