Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:Idiot (Score 1) 1067

Imagine a cruise control in a car. Let's say that speed is measured (this may be the way it is really done, but it is speculation) by monitoring a point on the wheel and every time it passes the vertical a subroutine runs that calculates the time difference by using the system clock time now and the last time the subroutine ran and then the speed by dividing the circumference of the wheel by the time difference.

If on two runs, the system clock reports the same time, I can think of two possibilities:

- the system clock is broken
- the wheel is rotating so fast that the system clock does not have enough resolution.

Would you prefer the subroutine to report the speed as 0 thereby causing the cruise control to put the pedal to the metal; "really really fast" thereby causing the cruise control to slam on the breaks, or at least cut all power; or "I don't know how fast we are going" thereby causing the cruise control to disengage, perhaps with a warning to the human driver?

Comment Re:Simple (Score 1) 1067

Sales chart lists all sales broken down by department. Electronics, hardware, etc. It also breaks it down further, hammers, table saws, etc. Hardware sold nothing last month. What percentage of that was hammers?

100%? 0%? 53.7%? The question is meaningless if you didn't sell anything at all. If your code doesn't handle the case where itemsSold == 0, it is bad code.

Comment Re:Idiot (Score 1) 1067

They are regions of space-time from which even light isn't fast enough to escape. Einstein's General Theory of Relativity predicts a singularity at the centre of a black hole i.e. a non zero amount of mass is squished into zero volume. This seems impossible so most people think that GR breaks down in such extreme conditions and we need a new quantum theory of gravity.

i.e. the division by zero is an indication that the model is wrong.

Comment Re:15 years in the embassy (Score 1) 262

Do you honestly think that would actually happen to a man who has had as much publicity as Julian Assange?

This is all about avoiding the rape charge, nothing else. Assange clearly thinks that there is a chance he might get convicted.

That last sentence is speculation, but it is a more credible story than that the UK or Sweden would collude in a CIA kidnapping of a public figure.

Comment Re:Frustrating type conversions (Score 2) 337

Trust me, when I assign a double to an int, I know I lose the mantissa. .

Since it's actually the exponent you lose (and maybe also some or all of the mantissa depending on what the value of the exponent was), I really think you need to start using a language that gently reminds you that converting from a double to an int is not necessarily a trivial exercise.

Comment Re:Apple Developer Program now all inclusive (Score 3, Insightful) 415

Wait, you guys (Apple developers) have to pay *licenses* to Apple to write programs and apps on their platforms?

No.

You can get Xcode and all the SDKs for free either through the app store or by registering as a developer (free). You pay $100 for the ability to sign your compiled applications. On OS X this means people who download your compiled binaries won't get a warning that the code is unsigned.

On iOS you can't put unsigned code on any device, not even your own, without the signing cert so to do serious development, you need to pay $100 (your code will run in the simulator without signing, but the simulator runs x86 binaries so it's not a proper test of the code's behaviour on a real device). This isn't really a big deal because to develop for iOS you must have a Mac and some sort of iOS device so you can probably afford $100.

The $100 also gives you early access to all betas, so I could install El Cap now, if I wanted (I don't), however, over the last year or so, for me it's been most useful for access to Swift betas. The early versions of the Swift development environment were tragically unstable and produced code that was quite slow. You had to be on the bleeding edge to get all the bug fixes.

Slashdot Top Deals

UNIX is hot. It's more than hot. It's steaming. It's quicksilver lightning with a laserbeam kicker. -- Michael Jay Tucker

Working...