Friday, June 6, 2014
I could watch these ads all day...
70 years ago today...
Here are some things you probably didn't know about D-Day (I only knew a couple of them!).
Thursday, June 5, 2014
Hardware support for integer overflow trapping...
Hardware support for integer overflow trapping... Hear, hear! I've spent way too many hours of my life tracking down this type of bug – and it looks so easy to do away with!
California leads the way...
California leads the way ... in Republican gains? This is an epic flying-pig moment, and I'd be willing to bet you that Democratic strategists around the country are worried. Very worried. In the land where Democrats have complete control, where their policies romp freely over the citizenry's freedoms and pocketbooks, and where regulations are a major component of the very air they breath ... the Democrats lost ground. That's not supposed to happen, you know. Them there citizens appear to be getting a mite uppity!
Did low fat diets promote obesity?
Did low fat diets promote obesity? This book makes that claim, and at least one reviewer finds that it makes a plausible case...
The rollback of my ignorance, however slight, is sufficient to complete my morning...
The rollback of my ignorance, however slight, is sufficient to complete my morning... Friend and former colleague Doug W. (who actually understands the math that I dabble at the edges of) explains the “magic” p^2 - 1 factoid. He writes:
You had a blog entry yesterday about the fact that p**2 - 1 is divisible by 24 for any prime p > 3. It's actually very simple to derive the result. Assume that p is an odd number, not divisible by 3 (in the problem as stated, we know that p isn't divisible by 3, since p is prime :-).He's right, it is simple! Assuming, that is, you're facile enough with math to be able to work it out :)
Now, p**2 - 1 = (p+1)(p-1). Note that these two factors are consecutive even integers. Thus, exactly one of them must be multiple of 4, so when you multiply the two factors together you get a multiple of 8. That is, we know that p-1 is either of the form 4k or 4k+2, in which case p+1 would be of the form 4k+2 or 4k+4, respectively. So the product is either of the form 4k*(4k+2) or (4k+2)(4k+4), each of which is divisible by 8.
Further, since p is not divisible by 3, and since in any three consecutive integers there is exactly one multiple of 3, then either (p+1) or (p-1) must be divisible by 3. Thus, the overall product is a multiple of 8*3 (i.e., 24).
Wednesday, June 4, 2014
A really bad spam mail...
A really bad spam mail... Got this one last night:
Obviously, I did not run that jar file. For the non-geeks out there, a “jar” file contains a program written in Java that can do just about any damn thing it wants to on your system. Running a jar file that you got from someone you don't know is a really, really bad idea. It could ruin your whole day. Actually, a lot of whole days...
There are enough red flags for anyone reading this (poor English, missing name, unlikely monetary pitch, etc.) that I think it's unlikely they'll fool many people. At least, I hope that's the case! On the other hand, I can imagine that there are a lot of people who don't realize that running a jar file can do really bad things...
DearAttached is a file named “331,000 $ SWIFT.jpg.jar”
Today we have transfer the advance payment USD331,000 into your account. Find below the swift copy and please kindly let us know when the shipment will be ready.
NB: Open the attach file with java application.
Hope to hear from you soon.
Regards.
Sales manager
alfouad-trading co.
Obviously, I did not run that jar file. For the non-geeks out there, a “jar” file contains a program written in Java that can do just about any damn thing it wants to on your system. Running a jar file that you got from someone you don't know is a really, really bad idea. It could ruin your whole day. Actually, a lot of whole days...
There are enough red flags for anyone reading this (poor English, missing name, unlikely monetary pitch, etc.) that I think it's unlikely they'll fool many people. At least, I hope that's the case! On the other hand, I can imagine that there are a lot of people who don't realize that running a jar file can do really bad things...
Hiccups...
Hiccups ... are still a complete mystery. The philosopher in me says that this is evidence that if there is (or was) a Creator, he (or she) had a sense of humor. The software engineer in me says: “Bug!”
Tuesday, June 3, 2014
Trials and tribulations, and some progress...
Trials and tribulations, and some progress... This morning I took my new lawn and garden sprayer out for it's maiden voyage. It worked great ... but only for about five minutes. After that, a bolt I forgot to tighten fell out, the sprayer boom fell off, and a small (but essential) plastic part broke. Dang it! I called the manufacturer's customer service line, and inside of 30 seconds they identified the broken part, verified that they had stock, and promised to ship it out later today – for free, under warranty. Can't beat that with a stick!
Last week I dealt with a very rare shipping problem for an Amazon order – a hand truck I'd ordered a month ago had never arrived. Amazon said they'd ship me a replacement via one-day shipping. Great! Except that when I got the confirmation, it listed my mom's address instead of mine. Not so great. I called Amazon again, and they said they'd change the shipping address and I should have it by Monday (yesterday). It didn't arrive. So this afternoon I called Amazon again, and they said that Federal Express had reported it as lost. Somebody doesn't want me to have this hand truck! Amazon now has the second replacement order placed for me, also via overnight delivery, and I just checked that it's going to the correct address. I wonder what will happen next?
On the positive side, the painters made more progress today – we now have a number of rooms that are completely finished, and things are looking very nice indeed. Also today the new railing and handrail for our basement entrance-way arrived. These were designed and fabricated by a local metal worker, and they are far better made than the bent and broken original. The hand railing needs some minor modification, so it went back to the shop. The rail, however is now completely installed. I watched the process, which was far more interesting than I expected it to be. Instead of the crappy fasteners and worse glue that held the old rail in (which the installers just yanked out!), the new one is anchored in super-strength concrete. To do this, the installers drilled 3" diameter holes 4" down into the concrete (see photos below), then inserted the new railing and poured the super-strength concrete to make solid footings. This new rail isn't going anywhere!
Last week I dealt with a very rare shipping problem for an Amazon order – a hand truck I'd ordered a month ago had never arrived. Amazon said they'd ship me a replacement via one-day shipping. Great! Except that when I got the confirmation, it listed my mom's address instead of mine. Not so great. I called Amazon again, and they said they'd change the shipping address and I should have it by Monday (yesterday). It didn't arrive. So this afternoon I called Amazon again, and they said that Federal Express had reported it as lost. Somebody doesn't want me to have this hand truck! Amazon now has the second replacement order placed for me, also via overnight delivery, and I just checked that it's going to the correct address. I wonder what will happen next?
On the positive side, the painters made more progress today – we now have a number of rooms that are completely finished, and things are looking very nice indeed. Also today the new railing and handrail for our basement entrance-way arrived. These were designed and fabricated by a local metal worker, and they are far better made than the bent and broken original. The hand railing needs some minor modification, so it went back to the shop. The rail, however is now completely installed. I watched the process, which was far more interesting than I expected it to be. Instead of the crappy fasteners and worse glue that held the old rail in (which the installers just yanked out!), the new one is anchored in super-strength concrete. To do this, the installers drilled 3" diameter holes 4" down into the concrete (see photos below), then inserted the new railing and poured the super-strength concrete to make solid footings. This new rail isn't going anywhere!
| The old railing - note the bend in it! |
| The "core" drill bit... |
| That's a serious drill! Note the water cooling... |
| The drill in action... |
| The "core" removed by cracking after drilling... |
| The new railing after installation... |
| The super-strength concrete footing... |
I bask in my own ignorance...
I bask in my own ignorance... Just ran across a bizarre but easy-to-understand mathematical factoid, which led me to this post that I don't understand at all.
Here's the bizarre factoid: take any prime number other than 2 or 3. Square it, then subtract one. The result will be an even multiple of 24. For example, 1,373 is a prime number; 1,373^2 - 1 = 1,885,128 – which, divided by 24 is 78,547. I have no idea why this should be so, and it seems mighty odd to me that it is. What the heck is so special about the number 24?
One slight addendum: the starting number doesn't actually have to be prime, it just has to be relatively prime to 24 (which is another way of saying that it can't be divisible by either 2 or 3). For example, 25 is not a prime number, but 25^2 - 1 = 24 * 26...
Here's the bizarre factoid: take any prime number other than 2 or 3. Square it, then subtract one. The result will be an even multiple of 24. For example, 1,373 is a prime number; 1,373^2 - 1 = 1,885,128 – which, divided by 24 is 78,547. I have no idea why this should be so, and it seems mighty odd to me that it is. What the heck is so special about the number 24?
One slight addendum: the starting number doesn't actually have to be prime, it just has to be relatively prime to 24 (which is another way of saying that it can't be divisible by either 2 or 3). For example, 25 is not a prime number, but 25^2 - 1 = 24 * 26...
One scarcely knows what to say...
Good citizen...
I don't know how many people have the level of concern and gumption it would take to do something like this, but ... I suspect it's a lot more likely in Utah than in some other places (say, California).
Good job, citizen. Good job...
Monday, June 2, 2014
Sprayer...
Sprayer... Well, I just received the “tow-behind” lawn & garden sprayer I'd ordered – and it was basically a big box of parts (see photo at right). I almost decided to refuse delivery, as the box was completely beat up, held together with about 20 rolls of tape, and all the (heavy steel) parts were just banging around loose inside. But the UPS guy patiently waited while I opened the box, inventoried the contents, and decided that everything was there and unbroken – so I accepted it. Right after he pulled out of the driveway, I discovered that there was something missing – the assembly directions!
What followed was something Debbie would have gotten a kick out of: it took me several trial assemblies and disassemblies before I finally figured out how the thing was supposed to go together. At least I think I figured it out! :) At left is the finished sprayer. I haven't had a chance to try it yet, as my mower has a flat tire that I'll be fixing later this afternoon, if the air compressor I ordered actually shows up...
What followed was something Debbie would have gotten a kick out of: it took me several trial assemblies and disassemblies before I finally figured out how the thing was supposed to go together. At least I think I figured it out! :) At left is the finished sprayer. I haven't had a chance to try it yet, as my mower has a flat tire that I'll be fixing later this afternoon, if the air compressor I ordered actually shows up...
Spring repair...
Spring repair... The “development” for the spring that supplies our home in Paradise with drinking water was in desperate need of repair. The old development (no “before” photos, sorry) was broken up by erosion under its apron, and it had a not-very-lovely concentration camp style chain link topped by barbed wire fence around it. The workers started fixing it up on Friday, and they've already made a lot of progress. All the broken up older structure has been removed, they dug deep around it and backfilled with 1/2" rock, and now they're getting ready to pour a new apron. Devon (the older fellow) and Coulten are doing a bang-up job. Some photos, taken just a few minutes ago:
Positional distribution of letters in English usage...
Positional distribution of letters in English usage... It's amazing how many different ways there are to analyze data. I've done rather a lot of analysis of English writing, mostly in the '90s when I got interested in identifying an author by their writing style. I also did some, just for fun, when working on decryption (for some kinds of cyphers, knowing letter frequencies, letter pair frequencies, etc. can be very useful). This is one kind of analysis I'd never thought of!
For any given letter, how often does it appear in various positions within words (at the beginning, somewhere in the middle, or at the end)? The distribution for the letter “z” is shown at right. This is one of the letters that surprised me – I wouldn't have guessed that it appeared more often in the middle of a word than anywhere else.
The first thought I had upon seeing these graphs was this: it's very useful information for a Scrabble player!
For any given letter, how often does it appear in various positions within words (at the beginning, somewhere in the middle, or at the end)? The distribution for the letter “z” is shown at right. This is one of the letters that surprised me – I wouldn't have guessed that it appeared more often in the middle of a word than anywhere else.
The first thought I had upon seeing these graphs was this: it's very useful information for a Scrabble player!
Subscribe to:
Posts (Atom)


