Friday, July 17, 2009

FTP server down

FYI, the FTP server will be down for about 2 weeks.

Sunday, July 12, 2009

More stuff for Fundamentals volume 2...

Sigh. It never ends. I think I will add a chapter on weak collections and ephemerons to the second volume of the Fundamentals book. As if having a chapter on optimization wasn't enough risk of having to write a third volume already...

Book progress

Now I have two editors working in parallel. They are doing a great job of keeping me busy, which is good. Just today, I rewrote about 25 pages so far. I managed to make some progress at the leading edge, too. The draft is 344 pages now. Moving along...

Saturday, July 11, 2009

Boolean expression simplification question

Would anybody be so kind to provide a direct proof of the following identity?

x · y + x · z + ~y · z = x · y + ~y · z

Thanks in advance.

PS: finally, I think I found a derivation using "integration factors" so to speak... but I am still interested in alternatives!

Wednesday, July 08, 2009

Real hacks worth mentioning

Check it out... using a VHS recorder as tape backup with no additional hardware. Up to 130mb/hour of tape! The last hack here is amazing...

Sunday, July 05, 2009

Swine flu...

You know, in some countries there's major paranoia about swine flu. Don't go out, buy tamiflu, buy masks, cancel schools and large events, impose mandatory vacations, etcetera. Is that reaction reasonable? Let's see...

  • This article states there have been 263 deaths due to swine flu in the world so far.
  • This other article states there are ~1 million infected people. Half of world infections are in the US, and therefore, there must be ~2 million infected people in the world.
What's the morbidity rate so far? 0.01315%. In other words, the odds of death by swine flu are 1 in ~7605. Well. How does that compare to other risks we take everyday?
  • Risk of death in a motor vehicle accident in the US during 1 year, 1 in ~6500 (source, 2005).
  • Risk of death due to intentional self-harm during 1 year, 1 in ~9100 (source, 2005).
  • Lifetime risk of death due to intentional self-harm, 1 in 121 (source).
  • Lifetime risk of death due to natural forces (heat, cold, storms, quakes, etc), 1 in ~3350 (source).
  • Lifetime risk of death due to electrocution, 1 in 5000 (source).
So, really, if you don't care about just one of the above, you cannot possibly worry about swine flu right now. Here are some far more serious illnesses with their yearly mortality rates.
Do you hear about those in the news? Should we shut down the piercing and tattoo industry to stop the spread of hepatitis C? And how about this?
  • Lifetime risk of maternal death in developed nations, 1 in 2800 (source).
You better cancel those plans to have children, because it's ~1.3 times more likely that you will die due to giving birth than due to swine flu.

Seriously. Do you worry about any of these things as much as you have panicked about swine flu? Most likely, no. Then, knock it off with the fear already! At least, do the responsible diligence of monitoring swine flu's mutations without seeing death around every corner.

Assessments 1.10

I didn't put out a notice for the new versions of Assessments. So... I fixed a small problem with resource failure notifications, an issue with one test that improperly scanned for the presence of optional code, and deleted a subclass of the evaluation context. I made the design decision that, in an evaluation context, the evaluation itself should be subject to a policy. I will create a couple evaluation policies later.

What about the to do list? I want to add a new checklist evaluator that sorts checklists / testcases by bundle and package. I also plan to add some (simple!!!) extensions to the RB. Finally, I want to redo how failures and errors leave the evaluation result window frozen while waiting on a semaphore. Hopefully I will feel inspired later this month. Nevertheless, the book still has priority over Assessments enhancements right now.

Hash Analysis Tool 3.26

I just published an update for the Hash Analysis Tool. I deleted some dead code. Also, I temporarily disabled the block count tests because they can fail for ad-hoc data sets.

Notes on including Windows screenshots in LaTeX documents

So, the Fundamentals book now has figures. I had to take a few screenshots, and I noticed a few things.

  • If you don't disable font smoothing, then the resulting PDF looks like garbage. The color screenshot is particularly nasty when magnified. Why do we put up with this on monitors? We already have CCD cameras that use stacked color pixels. Can't we make monitors with stacked color pixels too? Please?
  • VisualWorks' topic boxes are drawn in an almost invisible gray under the XP look. I fixed this at a customer site years ago, grr!!! Oh well, back to the Windows 2000 look. In any case, the Windows 2000 screenshots look nicer on the PDF because the layout is simpler and there are less bells and whistles to get distracted with.
  • Using LaTeX and MiKTeX, the behavior of \usepackage{graphicx} depends on the driver you use to compile the document. So, for example, if you want dvi output for fast editing because you are using yap, then you have to write \usepackage[dvips]{graphicx} and include encapsulated postscript files. But, if you want to create a PDF you can send to others, then you need to use the pdflatex driver instead of the dvips driver. Hence, you need to change to \usepackage[pdftex]{graphicx}, and include PNG instead. I wrote some macros that choose to append .eps or .png to filenames depending on the compilation environment so I only have to change things in one place. But why isn't this automatic yet? Is there a way to compile with either dvips or pdflatex and have everything work the same?
  • Of course, you don't include JPG with the graphicx package because of the visual artifacts. Moreover, you don't include PDF because using GhostScript to convert the .eps to .pdf results in a .pdf that thinks it's a whole page and that throws layout off (also, if you use PDF, you also have to be careful to tell GhostScript not to crunch the .eps you made from the .png because otherwise you get visual artifacts just like with JPG). Using .ps instead of .pdf results in more or less the same layout issues. Did I miss something here?
  • Including .png files works great, but including .eps failed at first. The error was cryptic... "TeX capacity exceeded, sorry [.1=200000]". Eventually I figured out that ".1" is shorthand for the "[m]aximum number of characters simultaneously present in current lines of open files and in control sequences between \csname and \endcsname". MiKTeX's configuration file parameter for that amount is conveniently called buf_size. Well, yeah... that makes sense now. The .eps files are about 1.7mb, which is more than 200k. Bumping buf_size by a factor of 100 took care of that problem.
  • Finally, why do dvips and pdflatex appear to work, but the result is a white box with the name of the file instead of the actual screenshot? Because the compilation environment for the LaTeX document is draft, and therefore graphicx decides no graphics should be included. However, I'd rather see what's going on to make sure things look good. Fortunately, you can use draft for the document and final for graphicx, like this: \usepackage[final]{graphicx}. It sounds so simple after you find what's going on...
Ok. Now, back to writing. 332 pages so far.

Saturday, July 04, 2009

Getting there

Finally, I can feel it. I am getting close to finishing the first volume of the Fundamentals book. The draft reached 330 pages today, and it's growing very quickly. I should point out that the book will include the first printed material about the Hash Analysis Tool and Assessments. In particular, the Fundamentals book will cover (some of) their sophisticated use of polymorphism. I think the book should be done at 400 pages or so.

Gotta go... I need to write some more now.

Update: 332 pages now, and with figures.