Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Slashdot Deals: Cyber Monday Sale! Courses ranging from coding to project management - all eLearning deals 25% off with coupon code "CYBERMONDAY25". ×

Comment 4000 is greater than 5000 (Score 3, Interesting) 285

I was working on an embedded system recently that had a 5 minute timer to shut off the machine. We had received customer complaints that the machine occasionally shut off early. The code was a simple while loop that ran some pid controls and every loop checked "If (run_time > 5 minutes): exit;". I ran the machine in the lab for a while and sure enough, it shut off early once in a while. I looked through, and eventually SCOURED the code, assuming there was a subtle bug, such as clock corruption due to interrupts, or some kind of type conversion mistake, I couldn't find anything. I eventually set up a serial printout from the machine so I could see what was happening. And it would run and then print out "5 minutes elapsed, shutting down". No glitches or resets (which is what I was expected). So now I'm staring at this one line "If (run_time > 5 minutes): exit;", pulling my hair out. Finally in a moment of insane desperation, I added another line to the while loop. "if (4000 > 5000): print("Something is very wrong!"); I carry the machine to the lab and set it up, and IT PRINTS. Every few minutes or so it pops up on the display. So now I'm just like "fuck everything" how can I possibly run code if I can't even trust the basic principal that the computer will do what I tell it too. So the first thing I do is add triple checks to all critical comparisons, that eliminates the symptoms for now but I know it's going to cause weird problems forever if I leave it like that. Ok so the execution is buggy, I get out the scope and check the power line and various other things and it looks ok, but I notice at this point that the problem never occurs when the machine is running empty, only when it's loaded, so I clip ferrites everywhere you can possibly fit one and spend half a day putting metal covers on everything. As I run the machine this time I'm practically holding my breath, 1 run good, 2, 3. I'm getting super excited at this point, then bam "Something is very wrong!" prints and I die a little inside. After walking out to my car and screaming at the sky for a while, I get back to it. At least I know it has something to do with noise. Since the machine can't possibly be more shielded a take a look at the schematic, it looks normal, but there's a bunch of funky stuff on the reset line. I ask around and nobody knows why its there. It's got a regular pull up resistor, but somebody added a diode in series, and a ferrite bead right before the pin. Due to the voltage drop the MCLR is only being pulled up the 3.9v instead of 5v, so that's not good. Then I take a look at the ferrite on the board and it's sticking off the board with a coil of wire through it not 2 inches from a brushed motor the size of my fist. It must be acting like a transformer secondary. I shorted the diode and the ferrite and the problem never happened again!

Comment Re:As an RC enthusiast and quad builder and pilot (Score 1) 37

Really $1300?

You've obviously never built a quadrotor that's better than toy quality. The parts alone are around 800 if you buy them non-wholesale. Of course I would expect that price to come down if they seriously mass produce them.

Let's start at the weight 4 lbs. WTF are you guys thinking?

Again,. that's just what a quadrotor that can carry a go-pro weighs. The phantom's slightly lighter than that, but it's underpowered for the job and only flies for like 7min. (that's what I hear, I don't have a phantom).

Completely waterproof so the battery bay is watertight? The motor stators and windings are watertight? The flight control board is also watertight?

Funny thing, brushless motors are inherently waterproof. In the underwater ROV community it's common to use brushless motors as the propulsion. Honestly it's probably IP 66 or similar. It's like your car, protected from water ingress so it's good in rain, but not actually submersible. Why make it water tight? If it falls in the lake it's going to sink anyway.

Comment Re:Damned shame (Score 1) 362

Totally agree. For years my college friends and I have been getting bored of the halo series, but they're the only games that still support split-screen to any decent degree. It's amazing how few titles these days support the basics like 4 players per console, bringing guests online, etc. Call of Duty - no, Left 4 dead - (ironically) no, Gears of War - no.

Our current setup is two lcd's in the living-room, 2 360's, 2 copies of reach, and 8 controllers. No number of new features or game-play improvements can compensate for the ability to coordinate and trash talk with your friends across the couch. The feeling of getting together a full 4's team in one room and crushing superior opponents with sheer teamwork may just be the greatest thing of all time.

Comment Re:I am a Muslim (Score 2, Insightful) 761

So your suggesting that If the people writing the laws tell you and action is wrong, that makes it intrinsically true? He said nothing about ignoring popular opinion, only that his ultimate choice of the correct course of action was not based on the personal consequences of said decision.

I hate to pull a godwin, but if you'd lived in Nazi Germany would you have sided [ethically] with the Nazis, simply because theirs was the prevailing ideology?

Comment Re:Absurd (Score 1) 496

And even if you think this is nonsense: Prison should under no circumstances produce better criminals.

Absolutes like that just don't work in reality. Any improvement in a criminals general aptitude theoretically makes them a more cunning criminal, just as it makes them a more functional citizen. It's unrealistic to think that the two are so distinct.

The citizens that turn to crime are usually those too unintelligent or uneducated to see that even from a purely selfish perspective, serious crimes are almost always a stupid choice.

By your logic, our leaded-gasoline years should have been accompanied by a corresponding drop in crime. For a few years our population collectively dropped a few IQ points, and thus became less apt, criminally and otherwise, yet crime didn't diminish or even remain steady, it skyrocketed.

In the end, I feel like (of the the criminals that could actually be effected) we have to choose between producing a few cleaver and educated criminals, or ten times as many stupid ones.

Comment Re:Bullshit (Score 1) 643

Actually a "truly free country" is an anarchy.

You need rules in human interaction and a combination of a few pretty important of said rules is "you do not hunt down and stigmatize someone for making a sexual joke".

There may be some truth to that, but it doesn't change the fact that forcing an employer to not fire someone is itself and abridgment of someones freedom.

Comment Re:Why stop at evidence (Score 1) 438

The interesting thing is that when this particular type of brain damage is recognized and socially adjusted for, human systems will be a lot less likely to leap into the most stupid behavior sets imaginable.

That's an interesting possibility, but the tinfoil hat wearing part of me still worries where that will lead.

Were not infallible when it comes to deciding what's best for our brains. Remember lobotomies? For a time society agreed those were beneficial as well.

Comment Why stop at evidence (Score 1) 438

If were going to judge people by their brains and whatnot rather than just their actions, why stop at using it as evidence? Why not preemptively imprison or euthanize people with "defective" brain types, or force them to undergo "corrective" surgery? While were at it, why just sociopaths? Why not identify revolutionary or disobedient brain types and "fix" those as well?

We're living in a golden age. All you need is gold. -- D.W. Robertson.