Tag Archives: computers

Tools of The Trade: The Laptop in My Pocket

Last Monday, the night before I was due to cover a big conference, my nearly brand-new MacBook Air died: suddenly, completely, and unrecoverably. After hurling a stream of expletives in the general direction of Cupertino, I paid a visit to the Apple store conveniently located next door to the conference hotel. They confirmed that my MacBrick was really most sincerely dead, but there was no way they’d be able to fix it before the end of the conference.

Before leaving the store, though, I picked up a Bluetooth keyboard. That, plus my iPhone and a few other items I already had with me, became my new laptop. I was amazed at how well the arrangement worked, and also at how many people came over to comment on my setup. Here’s what it looked like:

iPhone: the new laptop.

iPhone: the new laptop.

I used the Pages iOS app ($9.99), a standard tabletop tripod (about $10 at any photo store), a Gary Fong iPhone tripod adapter (ridiculously overpriced at $20, but much better-looking than a duct-taped binder clip), and an Apple Bluetooth keyboard ($69).

Considering its $110 price tag, it’s a surprisingly capable system. The Pages app stores files on the iCloud service, so they’re automatically backed up and accessible from anywhere. The keyboard is very quiet and has a feel I’m accustomed to, and the tripod adjusts to hold the phone at whatever angle I need. Of course it also has a built-in web browser, email client, and the ability to install pretty much any other kind of program one might need.

I’m not sure I’d want to rely on this as my only computer on a business trip, but I’ll certainly pack the components for it in case I need a backup again.

Oh, and my regular laptop is once again among the living – my local Apple store fixed it under warranty after I got home.

The NEC-4 Security Scam

A few decades ago, scientists at Lawrence Livermore National Laboratory (LLNL) in California developed a computer program called the Numerical Electromagnetic Code, or NEC. This set of algorithms allowed researchers to build computer models of radio antennas so they could make realistic predictions about a given antenna design’s performance. As has happened in many other fields, this computer-aided approach drastically accelerated research and development. Instead of building working prototypes and trying them out on elaborate antenna test ranges, then repeating the whole process dozens of times to arrive at a final product, designers could now test and refine their plans on the computer first, and spot-check the results on the final product. LLNL describes the program this way:

NEC (Numerical Electromagnetic Code), written by Gerald Burke, is a popular antenna modeling code for wire and surface antennas and scatterers. Models can include wires buried in a homogeneous ground, insulated wires and impedance loads. The code is based on the method of moments solution of the electric field integral equation for thin wires and the magnetic field integral equation for closed, conducting surfaces.

Like all good algorithms, NEC has grown over the years. The latest release is version 4.1, and it incorporates a huge array of variables that allow users to model all sorts of antennas over realistic terrain. Whether you’re a cellular phone company, a physicist, or an amateur radio operator, this is a tremendously powerful tool.

Antenna Tower. Image courtesy Razvan Caliman.

Antenna Tower. Image courtesy Razvan Caliman.

As computers became faster, smaller, and cheaper, other programmers extended NEC, porting it to platforms beyond its original mainframe implementation and building user-friendly front-ends for it. Many of these ports and interfaces came from hobbyists who released their code for free, a tradition that continues today – the latest open-source Mac version, for example, is here.

However, if you download one of those excellent open source implementations, or even a commercial antenna design package built on NEC, you may notice a discrepancy in the version number: all of these programs use NEC-2, not the much more sophisticated NEC-4. That’s because LLNL, citing export-control regulations, forbids software developers from including NEC-4 in their products. Instead, anyone who wants to use the more advanced version of the algorithm has to submit an application and pay a fee directly to LLNL. The folks at Livermore will then provide a copy of the NEC-4 code, with the stipulation that the applicant can’t give it to anyone else.

I understand and support the need to keep America’s enemies from exploiting American research, and that’s what export-control laws are supposed to do. But it’s very hard to see how LLNL’s licensing policy accomplishes that. Take a look at the NEC-4 application form (PDF). There’s a lot of legalese telling the applicant that the code comes with no warranty, and that he/she/it is not to redistribute this software. Then there are blanks for the applicant’s information: name, address, phone, email. And that’s it. It’s clear that the most important – probably the only important – part of this form is “attach payment.”

How much? Well, NEC-4 will set you back $300 for an individual or academic institution, $500 for non-U.S. academic institutions, $1,100 for American companies, or $1,500 for non-U.S. companies. Considering that the software was developed on U.S. government grant funding, and that much of the heavy-lifting of interface design and code porting was done by others for free, exactly what is this money for? It’s certainly not for a thorough background check – LLNL isn’t collecting enough information to do one, at least not on the main form for U.S. citizens. You don’t even have to enter your Social Security number.

But wait, there’s a separate “Customer Screening” form (PDF) that non-U.S. entities have to fill out. Let’s take a look at some excerpts from it to see what kind of heavy-duty security screening the foreigners are getting:

Is your facility involved in any of the following activities?

Research on or development, design, manufacture, construction, testing or maintenance of any nuclear explosive device or components or subsystems of such a device? [] Yes [] No

Will the item(s) requested for export be used in the design, development, production or use of missiles? [] Yes [] No

Will the item(s) requested for export be used in the design, development, production, stockpiling, or use of chemical or biological weapons? [] Yes [] No

The rest of the form is in the same vein. I’m pretty sure that even the world’s stupidest terrorist would know not to check “yes” to any of these items. Even if that level of understanding escaped them, or if their mailing address seemed likely to arouse suspicion (e.g. “Hidden Base, Afghanistan”), they could simply find a U.S. citizen willing to fill out the form and forward the CD-ROM, perhaps in exchange for a small bribe.

It’s hard to see how LLNL is accomplishing anything with this silly sham, besides scamming the public out of some money and preventing legitimate users from accessing a useful tool. The cumbersome but pointless licensing process for NEC-4 is actively hindering innovation, as many users who might otherwise be able to contribute to the development of the next generation of antennas can’t afford the extra tax LLNL has chosen to levy on them. Even those who can pay the fee may run up against technical problems, such as the need to compile the code from source. If NEC-4 were available as openly as NEC-2, developers could not only do the compiling for their users, but also improve the code’s integration into antenna modeling packages.

I think it’s high time to channel some of this geek rage toward changing the situation. The first step is to unmask the scam. Who wants to take up a collection to submit a transparently bogus license application (with a valid payment) and blog about the results anonymously, to prove that LLNL isn’t doing background checks? I’ll put up the first $20.

Wolfram Alpha Gets Its Emotion Chip Installed

When Wolfram Alpha launched, I plugged a few questions into it and was fairly impressed with its abilities. Then I tried to stump it. It didn’t take long: the question “how do you feel?” generated an error. I told a few people about that, and my Mom actually sent Wolfram feedback about it to see what they’d say.

Well, it took them two years, but the creators of Mathematica have finally come up with an answer:

Wolfram Alpha is doing well.

Wolfram Alpha is doing well.

I love the “Related Questions” in the right sidebar, too.

Simple Hack: Magnetic Mac

There are powerful magnets hidden inside the screens of recent-model iMacs*; mine has them all around the edges. I don’t know why Apple put them there, but here’s my favorite use: holding documents while I transcribe them. The picture shows one of my grandfather’s letters to my grandmother (which I’m blogging about here), clipped securely to the corner of my screen while I type it in.

What will you use yours for?

iMac with letter clipped to screen magnet.

My iMac, showing built-in document holder.

* Thanks to fellow science journalist Maryn McKenna for pointing them out.

Displaying a Complete Archive on One Page in WordPress

Today, I tried to solve a seemingly simple problem on the Walter and Ina site. Of course, a seemingly simple computer problem can quickly turn into a huge time-suck, and that’s exactly what happened. I’m betting there’s at least one other person out there who’d like to know how to do the same thing, so I’m posting my solution. If you don’t maintain your own WordPress site, just move along – nothing to see here.

The problem: I wanted a page on the site that would display a complete archive of all previous posts, in chronological order (oldest post first). The Walter and Ina blog, for those just tuning in, is a collection of letters my grandparents exchanged during their forty-year relationship. New visitors wanted to be able to read the whole set from the beginning to the latest posting. Simple enough, right?

Here’s how to do it. First, create a page template – mine is called chronology.php. Save this in your WordPress theme folder. The template code is in this text file. If you download that link instead of copying and pasting it, you’ll need to change the extension to .php before uploading it to your theme directory.

The crux of the matter is this line:

<?php query_posts('order=asc&posts_per_page=-1'); ?>

That says to query the database for posts in ascending order, and load them all onto one page – for some reason, loading “minus one” means loading them all. Following that is the loop to spit out all of the posts, and then the sidebar and footer.

Once you’ve uploaded the page template, just log into your site and create a new page. There’s a pull-down menu in the right sidebar of the editing screen where you can choose a page template. Your new one (called “Chronology” if you just copied the text file) should appear there. Choose it. Give the page a title, but don’t put anything in the content box. Save it.

Now visit your new page. It should be a complete archive of all previous posts, oldest first.

While writing this post, I discovered that the default WordPress options for preformatted and code-formatted text are pretty lame. Should be simple to fix, right?

Maybe I’d better quit while I’m ahead.

Health IT Discovers the Obvious

Computer scientists at UCL Medical School and Warwick University in the UK report that open source medical records software is more secure than proprietary software. In an accompanying press release, the researchers explain:

Critics of Open Source often argue that, because the code is public, an attacker can more easily find and exploit vulnerabilities. But our work at the University of Warwick and UCL shows that the evidence does not bear this out and in fact Open Source Software (OSS) may be more secure than other systems.

Proprietary systems often rely on a ‘security through obscurity’ argument, ie that systems that hide their inner workings from potential attackers are more secure. However security through obscurity alone completely fails when code is disclosed or otherwise discovered using tools such as debuggers or dis[as]semblers. Worse, it has been suggested that the cloak of obscurity tends to encourage poor-quality code. Opening the source allows independent assessment of the security of a system, makes bug patching easier and more likely, and forces developers to spend more effort on the quality of their code.

Now for the real question: why does the medical community need to be told this? An open source web browser is inexorably eclipsing its biggest proprietary competitor by being more secure, an open source operating system now dominates the server market because it’s the most secure, and open source content management systems such as this one, this one, and this one now run most of the highest-traffic sites on the internet because – you guessed it – they’re the most secure. Come on, hospital administrators, get with the program.

Oh My God, That Actually Worked

I just upgraded the site to the latest version of WordPress. Normally, this takes about 15 minutes of careful work, involving a download to my desktop, some FTP monkey business, checking of config files, and so forth. This time, after backing everything up, I went ahead and tried WordPress’s “automatic upgrade” procedure. Honestly, I didn’t expect it to work, but with everything backed up I figured it was worth a shot.

Click, click, done.

Who says open source software is hard to use?

Medication Alerts in, Medication Alerts out

A new report in the Archives of Internal Medicine brings up an interesting problem with electronic prescribing systems. As the authors explain in an accompanying press release:

The researchers reviewed the electronic prescriptions and associated medication safety alerts generated by 2,872 clinicians at community-based outpatient practices in Massachusetts, New Jersey, and Pennsylvania to learn how clinicians responded to the alerts.

Clinicians overrode more than 90 percent of the drug interaction alerts and 77 percent of the drug allergy alerts. Even when a drug interaction alert was rated with high severity, clinicians typically dismissed those for medications commonly used in combination to treat specific diseases. They also were less likely to accept an alert if the patient had previously been treated with the medication.

The high override rate of all alerts, the researchers contend, suggests that the utility of electronic medication alerts is inadequate, adding that for some clinicians, most alerts “may be more of a nuisance than an asset.”

So the medication alerts built into these systems are blaring out annoying warnings when in fact there’s little cause for concern. The authors argue that this is a problem in the software’s user interface, but I think it’s actually more insidious: the software is just accurately imitating the recent behavior of the overworked FDA and the lawsuit-shy pharmaceutical industry, who have slapped some dire warnings on drugs that are actually pretty safe. Consider, for example, the black box warning on antidepressants, which many physicians quite rightly ignore.

E-prescribing will likely save a lot of lives, but we shouldn’t expect it to perform miracles. The electronic systems will always have to rely on the underlying behavior of our drug regulatory system, so the old computing axiom still applies: garbage in, garbage out.

If The Shoe Fits…

Try visiting Typealyzer and entering the address of a blog. You’ll get a Myers-Briggs personality type indicator for that blog’s content. Yes, this is silly, but anyone who maintains a blog is obviously narcissistic enough to try it. Here’s the result for Dovdox:

INTP – The Thinkers

The logical and analytical type. They are especialy attuned to difficult creative and intellectual challenges and always look for something more complex to dig into. They are great at finding subtle connections between things and imagine far-reaching implications.

They enjoy working with complex things using a lot of concepts and imaginative models of reality. Since they are not very good at seeing and understanding the needs of other people, they might come across as arrogant, impatient and insensitive to people that need some time to understand what they are talking about.

Come to think of it, that hits kind of close to home. Typealyzer also suggested that I might like this chick’s music. How did they know I dig goth girls?

Saving My iLife With Applescript and rsync

With a little bit of spare time this week, I finally got myself synchronized – my MacBook now has the same versions of all of my important files as my desktop machine, even down to mirrored libraries in iTunes and iPhoto. I didn’t do it with the surprisingly disastrous MobileMe service, or any of its competitors. Instead, I developed my own set of scripts, which require no subscription and cost nothing. Now I’m posting them for others to pick up and modify, with the understanding that they come with no warranty and will quite likely screw up something important.

The gory details are below the jump, but in a nutshell, I’m using an Applescript and a Bash script (which calls my new best friend rsync) to synchronize everything I care about. If you’re impatient and trusting, you can just grab the scripts here. These scripts assume that the two machines you’re synchronizing are both Macs on the same local network (behind a firewall), and that the target machine has File Sharing turned on. The code is easy to modify for other setups, though.
Continue reading