×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

Why ATM Bombs May Be Coming Soon To the United States

lgw Re:Positive pressure? (351 comments)

The chip requires a PIN to be entered. If you don';t do that correctly within three times, the card is rendered useless.
And this does not have to be three consecutive times.

So even if you have the card, you are unable to do any purchases with it.

Turns out: not so much. As was predicted by the security community, there are flaws, and after a couple years the flaws were exploited, and the PIN is retrievable. This cycle has repeated (is chip-and-PIN in its 3rd generation now? it's at least the second).

Chip-and-PIN means only that the bank makes you liable for your stolen money, claiming "the card couldn't possibly have been stolen because magic". It solves a problem for the banks, and makes it worse for the consumer - shocking, I know.

yesterday
top

Adobe's Latest Zero-Day Exploit Repurposed, Targeting Adult Websites

lgw Re:Maybe if Adobe fixed their broken updater... (195 comments)

Just because the shady back-alley freeware does it, does not in any way make a good excuse for a AAA software vendor to do so

And AAA vendors don't. Adobe products are simply shady back-alley freeware as proven by their installer. Java too, of course.

yesterday
top

Anonymous No More: Your Coding Style Can Give You Away

lgw Re:okay (218 comments)

Newfags can't triforce

Slashdot supports too few entities to do this right, and forget about UTF8. But you can get sorta close.

  *
* *

Unless someone can do better?

2 days ago
top

Anonymous No More: Your Coding Style Can Give You Away

lgw Re:Up next, automatic intelligence rating... (218 comments)

For lack of mod points let me just say: beautiful!

It's like this in any engineering discipline:
* The apprentice doesn't do things by the book, for he thinks himself clever
* The journeyman does everything by the book, for he has learned the world of pain the book prevents
* The master goes beyond the book, for he understand why every rule is there and no longer needs the rules

Or put another way - the apprentice thinks he knows everything, the journeyman known how little he knows, the master knows everything in the field, and still knows how little he knows.

2 days ago
top

Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize

lgw Re:Poor Alan Kay (200 comments)

It's a problem when the default ASSERT macro expands to code with such #ifdefs (no joke - that was the norm everywhere I worked with C/C++). At one place it got so bad that we made using the ASSERT macro a firing offense (not sure why we couldn't just fix the macro, some corporate thing no doubt).

And I've been there and done that with the "no resource leaks" in C++. When you provide library code that's easier to use than doing it the wrong way, it's easy to enforce the standard in code reviews (since then it's only the new guy who hasn't seen how easy the tools are yet).

For example, if you have a good FileHandle class, it's simple to educate people to write FileHandle foo = fopen(...); instead of FILE, and then that's it, the file closes when you exit scope. Works perfectly as a member variable as well - no need to remind people that the destructor isn't called if the constructor throws, as members are always cleaned up.

2 days ago
top

Computer Chess Created In 487 Bytes, Breaks 32-Year-Old Record

lgw Re:Incredible! (195 comments)

A really minimal system, like a virtual machine running a site, can be reduced to far less than that. For instance, Mirage OS (http://www.openmirage.org).

We've seen a web server running on a Commodore 64. Wasn't that a 12 kB OS? It's been a while, but IIRC the OS was in memory from D000 to FFFF.

I've worked on mainframes where the "recovery OS" fit on one tape block - a hard 32 kB constraint (used for disaster recovery - it would load a program that also had to fit in 32 kB which would restore a system from backups). The normal OS wasn't much bigger. Most device drivers weren't memory resident, for example, and shared 4 kB by swapping in and out, which could lead to some mighty odd behavior by today's standards.

2 days ago
top

Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize

lgw Re:Poor Alan Kay (200 comments)

Without exceptions, you would put in an assertion

Oh? You check for errors in code that gets #ifdef-ed out in a production build? What could possibly go wrong with that plan? (Or do you mean first the check, then the assert, following every function call, further hiding the few lines of business logic in a huge function).

It's quite easy to write "all exception safe all the time" code in C++, in ways that even the junior guys can't screw up. It's not obvious what that coding standard looks like. That's the big problem with C++. Many have never even seen it done right - it's very understandable why business largely moved to managed code.

People see RAII and think "oh, instead of allocate at the top and free at the bottom, I'll allocate in the constructor and free in the destructor". No, you're still doing it wrong if you have any non-trivial destructors outside of a bit of well-reviewed library code.

If you're doing it right, the only avenues for screwing up resource management are adding stuff to a global object and forgetting it there, as with every language.

2 days ago
top

Ask Slashdot: Best Medium For Personal Archive?

lgw Re:DVD (250 comments)

The cloud makes a great backup. If what you're archiving is small, encrypt it and upload it to a variety of cloud file companies with free offerings - Cloud Drive, OneDrive, DropBox, etc.

For a moderate amount of data, use (encryption and) Amazon Glacier. If you don't know the trick: Amazon offers mail us a hard drive as an upload format for S3 and Glacier, and it's as good as way to do offsite backups as any.

I wouldn't use the cloud as my only archive, but as the offsite copy it's probably more disaster-survivable than most other choices most of us have available. (And affordable if we're talking a few hundred GB of personal stuff, not the entire multi-TB geek archive of "binaries").

2 days ago
top

Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize

lgw Re:Poor Alan Kay (200 comments)

If you don't check for an error due to sloppy coding, you get a failure sometime later which can be quite hard to debug. If you don't handle an exception, your program exits, and if you can repro the problem under a debugger, any good debugger will break where the exception is thrown - immediately debuggable. Which approach better protects customer data from bugs?

If you check for errors after every call, your program become 80% error checking, 20% business logic. Needless cluster that obfuscates code.

For a large enough C program you re-invent exceptions anyway. The return code from every function becomes the error code. The first thing you do after every function call is check for errors, and either handle the error locally if you can, or return it up the stack if you can't. If you make some handy macros for doing that, you might as well call them "try" and "catch" and "throw", since you're just doing what the compiler does with exceptions, except in a manual, tedious, and eror-prone way.

Really, this was an intelligent argument 20 years ago. The experiment was tried, the data is in, almost everyone moved to languages with exceptions because they make it easier to get it right, not out of some group masochism.

2 days ago
top

Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize

lgw Re:Poor Alan Kay (200 comments)

True, because it is basically terrible for everything, it is terrrible also for using it in the same way as C.

We get it, you don't like C++. I don't like strawberry ice cream.

Yes, RAII is nice. But only *some* memory and resource leaks go away, basically the ones which are trivial, because allocation and deallocation simply follow lexical scope. Ofcourse, this is only trivial in languages which do not have exceptions. Exceptions make this simple thing very complicated, and without RAII it is indeed almost impossible to avoid resource leaks in C++. But without exceptions, it is not so much of a deal. In other words, RAII had to be invented after the fact to make exceptions usable in C++ because - again - some feature were introduced without much thought.

Exceptions are absolutely the right way to do error handling. This was controversial last century, maybe? But it's more than simple RAII - if you have non-trivial destructors, you're likely doing it wrong. Shared_ptr combined with scoped objects fixes the non-trivial ones, and basically everyone uses shared_ptr for everything now. Perhaps over-used, but it gets it right.

This is only a tragedy for people who have to use C++ or think they have to. There is nothing more liberaring than to realize that all this complexity of C++ is completely unnecessary.

I haven't paid much attention to D, but C++ is in a space where none of the othe mainstream languages are. C is quite overused for lack of expertise in C++ - and Java likely is as well.

5 days ago
top

Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize

lgw Re:Poor Alan Kay (200 comments)

You can wrote very fast an elegant code in C++ just as easily as in C - it's just a different tool set. C++ is not for writing code using the same approach one uses with C; It's terrible for that. But once you understand scoped objects, all memory and resource leaks go away (well, you can attach something to a global structure and forget about it, but you can mess that up in any language). That alone is a huge win.

C++ has one terrible, fundamental flaw: the learning curve is too high. There's just about nothing where the "right way" is obvious, or even common. And so few people get to real expertise that there's not a common library that collects all those right ways and makes them easy to learn! It's a tragedy, really.

5 days ago
top

At Oxford, a Battery That's Lasted 175 Years -- So Far

lgw Re:Interstellar missions... (211 comments)

You could set up a mirror array to focus all the light of the Sun into a point. You still couldn't heat up an object there hotter than the surface of the Sun - it would be radiating heat away fast enough to stay at that temperature.

Temperature is a potential: like torque, or voltage difference. It limits what you can do, no matter how much light you focus, just like torque limits the force you can apply no matter how much power you have, or similar with voltage and current. For mechanical and electrical power, getting more potential (with the same total power, less losses) is easy - just add a gear or a transformer.

With light it's also possible, but it's not optics, and it's pretty rare - fluorescent materials which absorb multiple photons of a lower frequency and emit one of a higher actually do exist, and could passively raise the temperature of part of a system, (much to the horror of thermodynamicists). It doesn't violate any conservation rules, any more than a low-temperature heat engine driving a high-temperature electric heater does. But that's not at all what's happening with mirrors and optics, which like are putting your batteries in parallel, not in series.

5 days ago
top

At Oxford, a Battery That's Lasted 175 Years -- So Far

lgw Re:Interstellar missions... (211 comments)

When light pressure is the dominant force, balancing gravity, and the energy of the system is dominated by the energy of the photons and electrons, conduction isn't playing a big role, percentage wise. The difference between 5/2 power and 4th power means the latter dominates at millions of Kelvin, no?

5 days ago
top

At Oxford, a Battery That's Lasted 175 Years -- So Far

lgw Re:Interstellar missions... (211 comments)

Photons also have a temperature in the sense that it's the maximum temp you can raise a blackbody to (or maintain it at) no matter how many photons at that frequency you use (the blackbody curve is for an ideal gas, so the idea doesn't extend well to ionizing radiation).

what exactly the physical mechanism is by which kinetic energy causes photons to be emitted

At the level I understand it: knock two molecules together, and sometimes you get a electron elevated to a higher energy state instead of an elastic collision. The difference between that energy state and the ground state is the energy of the photon emitted, and thus it's color.

But that model is really for gasses - get hot enough and the electrons take their time returning to a ground state, or start flying off, and the rules change - the phase transition to plasma - and the kinetic energy of the nuclei starts to fade as the dominant heat energy. Hot enough and you have a sea of free electrons constantly exchanging energy via photons (which don't get very far at the density required for such temperatures). Those conditions are far, far better insulator than empty space, but at the boundary these very high energy photons simply escape: a very different heat-to-light mechanism than in a gas (and simpler than "normal" plasma, which I don't understand at all).

Empty space is transparent, which is another way of saying it provides no insulation at all for radiative heat. At the center of the Sun it's so opaque that no English word can really do it justice, but it takes millions of years for the heat at the center of the Sun to reach a layer where convection is meaningful.

about a week ago
top

At Oxford, a Battery That's Lasted 175 Years -- So Far

lgw Re:Bullshit (211 comments)

Well, put a AA in a box and come back in 175 years, and try it out. Then we'll see how impressive that is.

Oh-ho, smart guy, see how may of those you'd sell!

It is impressive though. Torpedoes need a high-power battery that can be stored for many years and still be at 100% when needed. They used to cheat, though, and use a wet cell with the chemicals stored separately - mix everything together when it's time to load, and you're ready to go. No leakage unless there's actual leakage. I wonder what they do today - a dry cell with no leakage would be safer and easier.

about a week ago
top

Verizon About To End Construction of Its Fiber Network

lgw Re:I thought they're making money... (200 comments)

You'd think so, but it's a long, slow buildout to get that return, so growth! would be slow. Companies don't much care about stable profits, since that just means a stock price that stays flat, no it has to be about growth! Without growth! how does a CEO prove he's the guy to make your stock price go up?

It's the most infuriating thing about modern America, really - everyone's chasing capital gains, and dividends are often seen as a bad thing. For a long time there was a good tax reason for that - that's largely fixed now - but the culture is stuck on growth! regardless.

about a week ago
top

Disney Turned Down George Lucas's Star Wars Scripts

lgw Re:Good news (420 comments)

Titanic and Avatar had better visuals than Serenity, to be sure, and Titanic had some good performances. I thought Avatar was a bucket of problems and flaws with some pretty colors, but really there's few of it's many, mnay flaws that I'm blame on a director. Bad story, bad characters, bad writing is every possible way, sure, but good direction, and the acting wasn't bad relative to the script (there's little an actor, even with great direction, can do to rescue a horribly trite and shallow character, but no one seemed to be phoning it in.)

I wouldn't want Cameron to make a Star Wars movie, because he wouldn't just direct, he'd control other things. I wouldn't want Whedon either - just the wrong tone. Just like Abrams entirely missed the tone of Trek.

It's really obvious from the directors commentary to the Start Trek reboot that most of the flaws in that film come directly from him trying to make a Star Wars film in the wrong franchise! I look forward to his Star Wars movie, lens flares and all, because he'll at least get the tone right.

about a week ago
top

Dish Network Violated Do-Not-Call 57 Million Times

lgw Re:Suitable Penalties Need To Be Given (246 comments)

Weekly World News had "facts" and photographs too! Some sources are so far from credibility that they actually hurt the credibility of your argument. Zerohedge is one of them.

If it's true, you can find an article about it somewhere credible. If you can't find an article somewhere credible, if it's only on zerohedge, then it's not true.

about a week ago
top

Dish Network Violated Do-Not-Call 57 Million Times

lgw Re:Suitable Penalties Need To Be Given (246 comments)

You do realize that a zerohedge link is about as credible as a timecube link, and less entertaining, right? The timecube guy likely gives better investment advice, as well.

Again, the usual cases are either there is overlap between large shareholders and company officers (almost always founders), which can get a bit dirty but is mostly just a numbers game, or there's a bidding war for the guy perceived as the best for the job (how much difference in skill there really is between these guys is an unrelated matter).

about a week ago
top

Dish Network Violated Do-Not-Call 57 Million Times

lgw Re:Suitable Penalties Need To Be Given (246 comments)

would take an insanely huge fine to scare away investors

Isn't that what I was suggesting. A fine of say $3 billion structured over 10 years wouldn't put them out of business, but it would be an ongoing 30% hit to earnings. Even if you think they were going to double or triple before, that will significantly hamper growth just coping with the need to come up with the outgoing cashflow. You'd likely see a longterm 20-30% hit to the stock price. Pension and mutual funds don't just shrug that sort of thing off -- their analysts and decision makers have to look smart quarter-by-quarter -- and will do something about gross executive incompetence of that sort.

I've worked at 2 different companies where the CEO was fired, along with most of the top execs. In one case, most of the board was fired too. CEOs live in fear of that sort of thing - they give 0 shits about what you or I think, but they know who their actual bosses are.
 

about a week ago

Submissions

lgw hasn't submitted any stories.

Journals

top

Economics in Brief (Internet Flotsam)

lgw lgw writes  |  about 9 months ago

Here's some internet flotsam attributed to a graduation speech by Thomas Sargent (without digging into whether this speech really happened: the content is interesting).

Economics is organized common sense. Here is a short list of valuable lessons that our beautiful subject teaches.

1. Many things that are desirable are not feasible.

2. Individuals and communities face trade-offs.

3. Other people have more information about their abilities, their efforts,
and their preferences than you do.

4. Everyone responds to incentives, including people you want to help. That
is why social safety nets don't always end up working as intended.

5. There are tradeoffs between equality and efficiency.

6. In an equilibrium of a game or an economy, people are satisfied with their
choices. That is why it is difficult for well meaning outsiders to change
things for better or worse.

7. In the future, you too will respond to incentives. That is why there are
some promises that you'd like to make but can't. No one will believe those
promises because they know that later it will not be in your interest to
deliver. The lesson here is this: before you make a promise, think about
whether you will want to keep it if and when your circumstances change.
This is how you earn a reputation.

8. Governments and voters respond to incentives too. That is why governments sometimes default on loans and other promises that they have made.

9. It is feasible for one generation to shift costs to subsequent ones. That is
what national government debts and the U.S. social security system do
(but not the social security system of Singapore).

10. When a government spends, its citizens eventually pay, either today or
tomorrow, either through explicit taxes or implicit ones like inflation.

11. Most people want other people to pay for public goods and government
transfers (especially transfers to themselves).

12. Because market prices aggregate traders' information, it is difficult to forecast stock prices and interest rates and exchange rates.

top

Geothermal vs Solar Power

lgw lgw writes  |  more than 3 years ago

Here are the basic numbers on aailable geothermal vs solar power (since this has come up in discussion more than once).

The surface area of the Earth is about 5.1 x 10^14 m^2. The cross sectional area is about 1.3 x 10^14 m^2 (one quarter of the surface area, of course).

Per this paper found as a cite on wikipedia, the total heat flow out from the Earth's interior is 4.42 x 10^13 W, or 0.0867 W/m^2. Of course, the available power is much less because it's only the subsurface-surface temperature difference that's available.

Total solar irradience is 1361 W/m^2 by NASA's latest estimate (so about 1.7 x 10^17 W across the entire cross section), or about 1000 W/m^2 on the surface at noon on a cloudless day. Averaged over the day-night cycle (surface area vs cross-section, so 250 W/m^2), and taking clouds into account that's about 180 W/m^2 (I can't find a solid source on that yet, but it looks close).

So, total solar power flow is about 4000 times as large as total geothermal flow. I'm not quite sure how to estimate the (ideal) available power as a percentage of the total geothermal power flow, but if we use a WAG of 50%, then the available power from solar is also about 4000 times per square meter more than geothermal - significantly more if we average solar power only across populated latitudes.

top

Global Warming Link

lgw lgw writes  |  about 6 years ago

This is the best summary of the great global warming fraud I've yet seen, and published in the most unlikely of places.

To be told, as I have been, by Mr. Gore, again and again, that carbon dioxide is a grave threat to humankind is not just annoying, by the way, although it is that! To re-tool our economies in an effort to suppress carbon dioxide and its imaginary effect on climate, when other, graver problems exist is, simply put, wrong. Particulate pollution, such as that causing the Asian brown cloud, is a real problem. Two billion people on Earth living without electricity, in darkened huts and hovels polluted by charcoal smoke, is a real problem.

Although I feel Harold Ambler makes some good points, he misses what I've always felt was the most important. Given that the climate will change (as it always has), do we want it to be warmer, or colder? As glaciers covering Europe (the norm for the ice age we've been in for the past 100M years) seems to me far worse than rising sea levels, I've never understood why we'd want to fight warming in the first place.

I think the whole global warming fraud started by ignoring all of the available evidence and blindly asserting that the climate is naturally stable, so therefore if man did something to break that stability we'd be creating an otherwise-avoidable catastrophe. What BS. The only thing historically unprecedented is the inexplicable stability of the climate for the past 10K years. Change is unavoidable, with or without the actions of man.

top

Some quotes I like

lgw lgw writes  |  more than 9 years ago

"Congressmen who willfully take actions during wartime that damage morale and undermine the military are saboteurs and should be arrested, exiled, or hanged." - Abraham Lincoln

"Pacifism is objectively pro-Fascist. This is elementary common sense. If you hamper the war effort of one side you automatically help out that of the other. Nor is there any real way of remaining outside such a war as the present one. In practice, 'he that is not with me is against me.'" - George Orwell

Slashdot Login

Need an Account?

Forgot your password?