8

Luckily this is quite simple to make clear, even if you are steering clear of the IEEE standard. Honestly, even binary is not needed here. I would start by borrowing a page from Scheme, and say that we can't make blanket guarantees about the exactness of decimal numbers. For instance, when we try to express $2/3$ in decimal, and it doesn't work! All the ...


6

Better yet, is there any way I can show the students such an explanation? (Perhaps an online, interactive demonstration of floating point precision etc. - I couldn't find one) Show them these bits of code: float one = 16777291; float two = one + 1; System.out.println(one == two); float one = 1.00000001f; float two = one + .00000001f; System.out.println(...


5

Tell the students they have seven decimal digits of precision in a float, and that the decimal point is placed "somewhere" within those seven digits, depending on the magnitude of the number. Ask them to add 0.01 to 9,999,999 and express the result to seven digits. Ask what the answer would be if they performed the addition a thousand times. Now ask them ...


5

Summary Node.js has an unusually complex ecosystem which you don't get in some other languages. Your students spending time to intelligently pick the best libraries is great, but you might need to stop them from being bogged down. If time is really a problem, simply take away the choice, but keep in mind that you take away a powerful (and necessary) ...


4

How would you do it yourself? If you are already effective at it, then show them how you approach it. Tell them where you look, and tell them how you decide that it is ok to stop exploring further for an individual resource or for the overall search. Otherwise, assuming you are less skilled at this than you'd like to be, give them (paper or electronic) a ...


2

This sounds like a question of vetting. Here are some things I do when evaluating Node.js libraries: Find the package in npmjs.com and view the stats (e.g., daily/weekly/monthly downloads). You can sort of gauge its popularity that way. Look for similar libraries and compare their stats. Look at the package in GitHub. View those stats (e.g., # of ...


2

Actually, it isn't quite so clear. If I run this in Java: // Simple computation with float and double // Increment by a third three times is not the same as incrementing by one // Float can actually be more accurate than Double in limited cases public static void main(String[] args) { float oneThirdF = 1.0f/3.0f; float wholeF = 0.0f; float ...


1

I have a partial answer for you, about why BASIC and home computers in the early 1980's were so helpful to learning: it is how accessible everything was. A kid could look inside the case and see what the parts were, and even do things like plug in a new disk drive or something else hardware related. This is difficult to do now with a phone, tablet or laptop. ...


1

I'd suggest you reconsider. To understand e.g. why Pascal is a nice teaching language you need to have a decent background in programming languages, some notion of teaching programming (the misconceptions by learners are often way, way different than you'd guess in your wildest nightmare), and hopefully some experience teaching. Languages specifically ...


1

Actually, there is no such age for everyone, and it certainly isn't a disaster for many to be undecided. Many people just want to be educated so they study things, formally and informally with no clear "career" goal in mind. I changed my mind pretty often, but in a narrow range. Other people change careers many times throughout their lives. I think it is a ...


1

Simple demonstration of "precision" using handheld calculators. Get a pair of calculators. One cheap model that has a limited number of digits in its display. Models can be found built in to clipboards and other "office" things. One decent model, not necessarily a good model, that has double the digits of the other calculator. If it has exactly double the ...


1

Many compilers will promote floats to doubles, do the calculation, and cast back. I see little or no reason to use floats unless one is dealing with huge matrices of floating-point numbers. I encourage my students to use doubles for most purposes.


Only top voted, non community-wiki answers of a minimum length are eligible