Throwback to DevTalks Romania @Douglas Crockford - Numbers - DevTalks Romania

Throwback to DevTalks Romania @Douglas Crockford - Numbers

DevTalks Romania @Douglas Crockford - Numbers

Douglas Crockford is father of JSON and the inventor of Tilton! Also, he is best known for being the author of the book “Javascript: The good parts”. He was part of our DevTalks Romania 2017 experience, with a great talk on Web & Mobile Stage presenting “Numbers”.


Here is a sneak peek down below from his session, but also check you can the entire speech right here.

The evolution of number systems and their advantages/disadvantages.

Now, from our current perspective, the biggest advantage, well, let's look at everybody together. So, this is the number of 609 in all of those systems, and again, all of the systems worked. So there's no sense of inevitability that any of them weren't good and had to be replaced by something else. They all worked great nations, and sometimes empires, were very successful with all of these numbers systems.

The advantage that the Indian system had, was that it was possible without using an abacus to add a column of numbers correctly, just using a pen and paper. That's not an advantage anymore. Because computers are doing all our arithmetic, I find for myself, I can't do arithmetic anymore. The computers have just taken that over. And so, I trust them to do a better job of it than I can.

Computer arithmetic and floating-point numbers.

So let's look at overflow. What should happen. If you try to add something and it's too big to fit into a number, what should happen. There is one school that says you should store the null value, which I think is an entirely reasonable thing to do. Another possible answer is store the largest number that make that can fit. This is called saturation. And it's sometimes done in computer graphics and in signal processing.

But you don't want to do anything like that in financial applications, right, that's just, you don't want to do that. There's one school that says you should fault that you'll throw an exception or you know, have an interrupt something should happen to stop the normal flow. Because the programs and a source of in a state of error and it needs to be repaired.

That's reasonable. There are some people who say the machine should halt, which I think is a little drastic, but at least you won't produce incorrect results. But suppose what you want to do is to maximize the creation of errors. Okay, in that case, you will discard the most significant bits without notification. And in fact, that is exactly what Java does.

For more tech content, don’t forget to save your seat for DevTalks Romania 2024 and get your tickets here: https://www.devtalks.ro/tickets

DevTalks 2024 Powered by Main sponsor