Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Get HideMyAss! VPN, PC Mag's Top 10 VPNs of 2016 for 55% off for a Limited Time ×

Comment View from on high (Score 5, Insightful) 233

I used to make firmware that goes into aircraft instruments. The FAA has some guidelines on this.

Unnecessary code is generated machine code, and the rule is that you can have none of it. Source code doesn't matter, if it's ifdef'd out it's the same as commentary.

The theory is that if execution takes an unexpected jump, it can't land in anything that isn't specific to the purpose of the device. Some people take this to extremes, writing new versions of printf() that omit the floating point and pointer output formats when they're not used in the system.

However, if a buffer overflow causes the program to jump, it can't land in the middle of the pointer formatting section and send a pointer to the airspeed computer instead of the decimal altitude.

What the OP is talking about is unnecessary source, which is a different matter.

IBM did studies of bug frequency, and concluded that the number of bugs in a program depends on the number of source lines a programmer can see at any one moment. Big screens allow the programmer to view more lines of code at once, little screens require reading the code through a soda-straw.

Their studies showed that simple code-tightening techniques reduced the number of bugs. Placing the brace on the if-statement, for example, allows one more line to be viewed in the window. Omitting braces altogether for single-statement "if" saves another line. Using 120-char width lines instead of 80 allows fewer wrapped lines, and so on.

There is a competing goal of readability, so tightening can't be taken too far. The complex perl-style or APL-style "everything on a single line" construct goes the opposite direction - too much info and it becomes hard to understand at a glance.

Typical C-like syntax with line-tightening techniques is easy to read, and presents probably an optimal view of code to the engineer.

Braces on their own act like vertical whitespace. Requiring one-and-only-one exit from a subroutine leads to convoluted and chevron code (where the code looks like a big sideways "V" and the hints of indenting is lost). Requiring all definitions at the top of the module requires the reader to flip back-and-forth, and requiring Hungarian notation makes the code look like gobbledy-gook.

Dump it all.

Name your variables clearly, using nouns for objects and verbs for actions. Name your subroutines after their functions. Tighten your code to make it terse, but keep it readable.

Comment Re:Probably Trump (Score 1, Insightful) 180

Tell me, why do you want to encourage the election participation of people who are too irresponsible to come up with $35* every five years? Is it because your platform sells well with people who can't think past tomorrow?

I'm a conservative, so encouraging poor people to vote actually hurts my party goals.

The problem is that I'm also a staunch defender of rights, and I feel that everyone should be allowed to vote as a right, and not some based on some arbitrary cutoff of responsibility.

[...] but go ahead and keep making the case that it's absolutely vital that people too stupid to get an ID every 5 years should be encouraged to vote.

To quote Malcom Reynolds: "who will speak for these people?"

Comment Do the math (Score 1, Interesting) 1130

Ok... aside form the possible tax implications we may or may not have to deal with...

We've de-funded NASA, the National Endowment for the Arts, education in general, and the state university system.

All we'd have to do is fund those items fully- and ten years later we *might* be able to consider some form of UBI. But not before the infrastructure needed to support it is in place. And it's probably a bad overall idea.

This seems a better investment to me: Make education easier, fund creativeness (a singular American strength), fund science, and fund space exploration.

That's a winning combination for any economy.

UBI is a nice idea for countries who have their economy in order with the goal of long term prosperity. The USA does not manage it's economy for long term goals. It simply tries to survive....

(As a note I do support social security and disability benefits for those who qualify for it.)

Assume that a basic income is $50,000.

Deposit $1 million in an index fund and expect 7% annual return averaged over 40 years.

Discount 2% for inflation, that means the original $1 million deposit will yield $50,000 in perpetuity.

Do this incrementally.

Example: We have 10 aircraft carriers, and 2 under construction. Suppose we fix on only having 10 carriers, and at any one time one is under construction (to trade the older ones out due to obsolescence).

That's $6.5 billion savings in hardware costs, which would pay for 6,500 UBI accounts. Have a lottery, start taking people out of the workforce.

It costs $7 million per day to maintain any one carrier. Saving that money would provide for 2,500 UBI accounts annually.

Any savings in federal spending - any of it - could be funneled into the UBI lottery system. It doesn't need to give everyone a UBI right now, it only needs to go incrementally towards that goal.

Note that companies are testing autonomous tractor trailers in Nevada right now. By my estimate, autonomous vehicles will put 5 million Americans out of work almost immediately.

Note that Hillary wants to enforce Obama's executive order granting amnesty to illegal immigrants, which would put 7 million more job seekers into the market almost instantly. (And we'd have a massive influx of illegals after.)

Note that Amazon and WalMart are experimenting with automated order fulfilment and delivery. That will put a bunch more Americans out of work.

Note that fast food restaurants are automating their process right now. That will drop another 3.6 million job seekers into the market.

Fewer people starving for lack of a job means less chance for armed revolt.

Do the math.

Comment Re: Probably Trump (Score 2) 180

New Hampshire DL renewal costs $50, and lasts 5 years IIRC (couldn't find the expiry term in a quick search).

Note that presidential elections happen every 4 years, so that comes out to $40 to vote in any one election.

Using your numbers, voting in any presidential election would be either $35 for that year, or $7 x 4 = $28 for each election.

Comment Re:Probably Trump (Score 3, Informative) 180

Voter restrictions of various stripe tend to affect poor and minorities more than other groups.

What restrictions would those be? I'm not American, but from a quick google, it seems that all you need are:

1. Citizen of at least 18 years old
2. Driver's license # or last 4 digits of SSN

Why would this be troublesome for any particular group of people?

Getting an ID costs money in the US, so requiring an ID puts more strain on the poor than the working class.

The annual fee for a drivers license is around $35, a state-issued ID is around $30, and a passport costs $100.

When you're poor, that $35 could pay for 7 meals frugally made.

Social security cards are given out and replaced at no charge, but aren't generally accepted as an ID because they lack pictures.

Comment Probably Trump (Score 5, Insightful) 180

(1) what have they got to hide by not being transparent ?

(2) who gains by restricting observers ?

At a guess, from recent political decisions (disjoint from the election), it will benefit Republicans. Indirectly, that means Trump. I'm not suggesting that Trump has anything to do with this, only Republicans in general.

Voter restrictions of various stripe tend to affect poor and minorities more than other groups. Those groups typically vote Democratic.

This election there will be much wailing and gnashing of teeth, lots of voter fraud, but nothing will be done about the election results. The people in charge will publish boilerplate politically correct statements about things being "regrettable", no one will take responsibility or blame, everyone will promise to fix the problems for the next election, and the issues will be dropped.

Such as the Democratic primary voter fraud (unrelated to Hillary or her campaign).

I remember 8 years ago, people wanting to vote fro Ron Paul in my state were told that he'd dropped out of the race (this was for the actual election).

Then some town published vote tallys showing 0 votes for Ron Paul, seven people called in and complained that they had voted for Ron Paul, the town released a statement saying "oops, it was a typo, the correct number is seven".

There's a ton of voter fraud in the US, and the only reason it stays anywhere near fair is because the winner wins by more than the margin of fraud.

At least, statistically that seems like it's *probably* the case...

Comment Assassination drones (Score 1, Interesting) 95

A friend who does a lot of contract work for the government(*) told me that we, the US, are developing a small gliding-bird drone that can deliver poison through a dart where a normal bird's beak would be.

The use-case is for the bird to perch somewhere waiting (possibly hanging and recharging from power lines), then when the victim is spotted it glides silently towards the person and sticks beak-first into the neck.

It's got perfect deniability - even if someone catches the drone, it doesn't have "made in the USA" anywhere on it, and even if it did you'd still never find out who was controlling it.

It's one facet of our "asymmetrical warfare" plans.

(*) This is a 2nd hand rumor from someone you don't know on the internet, take it with a grain of salt.

Comment Re:Other things we don't know (Score 1) 142

The summary touches on most of your points.

The resolution of measurement is 1mm. Far finer than a human observer or security footage is going to give you and probably finer than you can get facial recognition software to differentiate reliably.

It sounds like the point is to prove that facial recognition software works and even though it sounds like junk science to me there is still "one study that showed there was only a one in a trillion chance of a false positive." which may well sway a group of 12 people that weren't clever enough to get out of jury duty.

A very good point.

This study might be laying the groundwork for visual "fingerprinting" of faces, a technique to be used as evidence in future trials.

Comment Other things we don't know (Score 1) 142

I was thinking the same thing. If I calculate it correctly, that means it only takes a group of about 1.2 million people to have a 50% chance of having a single doppelganger pair.

I couldn't find the paper in a quick search, but this smacks suspiciously of poor journalism.

The researcher probably stated "1 in a trillion that *you* have a doppleganger", and the journalist extended it erroneously.

There's a further complication, in that we don't know the distribution of values within any measurement, nor the granularity.

Measurements of distance between eyes might be gaussian, so their system could have a range of 100 values, but a handful in the middle are much more common than the outliers.

You can only "just multiply the ranges" of measurements if they are evenly distributed, as in an N-sided die.

(And of course features may be conditionally related, which reduces the odds even further.)

Resolution is probably also a factor. If their measurement system is accurate to 1/10 millimetre, it might *seem* as if features mismatch, when in reality the human observer can't distinguish to that level of granularity.

And we don't know how much the human visual system weighs any of the measurements he took. Shape of the nose might be rated highly in the human recognition system, but distance between the eyes less so (because your friend might not be facing you head-on). Some of the measurements might not contribute to the human recognition system at all, and we wouldn't know from this study. The human system might use measures that the researcher didn't take in his study.

The right way to do it is to measure the descriptive distance between one face and another, then define an arbitrary lower limit that signifies being a doppleganger.

If the amount of extra description needed to describe one face in terms of the other is smaller than the limit, then you can say "they look alike". You can even identify a probability (or amount) of "look alike" from the differential number of bits.

That lower limit for dopplegangerness sounds like it's arbitrary anyway.

Comment Indepent thinker (Score 4, Insightful) 410

Yeah I am sure you hate Obama because of his "flip-flop on telecom immunity". You guys are so transparent. You hate Obama because of "flip flopping" but Bush was great, right?

Actually, I hate Bush more.

Taking the country to war under false pretences, torturing prisoners... that's a lot of sin to wash away.

Obama caved to the establishment and is generally ineffective, but he hasn't done anything that rises to that level of evil.

I'm an independent thinker, not a party hack.

Comment The only good thing (Score 3, Interesting) 410

I keep coming back to the time when Obama flip-flopped on telecom immunity during the run-up to the 2008 election.

People kept pointing out that this one act caused the telecoms to donate more money to him, which got him elected. Given the closeness of the 2008 election, it's plausible that if Obama *hadn't* done this that he would not have become president.

People also pointed out that: "it was necessary to get elected - he can't implement hope and change unless he wins".

It was a rationalization based on "the ends justify the means".

I shudder to think that Pence was chosen simply for this reason - an expedient choice to increase the odds of Trump being elected, and not for his opinions, competence, or experience.

My soul is fading, I am become like the Democrats.

Slashdot Top Deals

"If a computer can't directly address all the RAM you can use, it's just a toy." -- anonymous comp.sys.amiga posting, non-sequitir