Bugfixes are good

Well, that was a nice surprise. I just updated my Mac to OS X 10.2.8, and on restart, discovered a bug fix.

I’ve had an issue for a while now with my iPod where if I restart the machine with the iPod plugged in, it doesn’t behave correctly after the restart. It will mount to the Finder fine, but iTunes and iSync don’t recognize it at all. The only fix is to unmount and unplug it, shut down the machine, and then unplug the machine’s power cord and let it sit for five minutes before powering it on again — apparently this will clear a frozen FireWire port.

I forgot to unplug the iPod after installing the update tonight, though, and was pleasantly surprised to see iSync and iTunes launching after login, indicating that they saw the iPod without a hitch. Nice!

PCs are Voodoo

Well, that was entertaining. In roughly the same way that playing rugby against a team of rabid hyenas is entertaining, but entertaining none the less.

I just spent most of the past hour deciphering IDE cables, master/slave jumper settings, and USB vs. serial keyboards in order to get my PC configured the way I wanted it. The end result is good (the 6GB drive is C:, a 4GB drive I had in my closet from when my iMac died is D:, and the 2GB drive is E:, which should make the CD-ROM F:, I suppose), and I’m in the process of getting Windows 2000 installed (for the third time in three days) on the 6GB drive. Success — but quite a few headaches in the process. And people keep trying to convince me that Wintel PCs are “as easy as” Macs these days?

Puh-leeeze.

However, in the midst of all this, I did figure out my issue with the 2GB drive from yesterday. It turns out that if you boot off the Windows 2000 CD-ROM, the setup utility will let you wipe a system partition. The problem I was having was that since the DOS level didn’t have USB drivers, I couldn’t “hit any key” to tell the BIOS boot menu to boot from the CD, so it was always booting off the drive — which explains why it then refused to nuke the drive. Once I found and plugged in my “old-school” serial keyboard, I was able to hit the “any” key, boot from the CD, and proceed with everything I wanted to do in the first place.

Once I did that, while I was poking around in the BIOS menus, I found an option to “enable USB in DOS” (or some such wording) that may allow me to use the USB keyboard at the DOS-level menus…but I discovered it too late in the process to know for sure. Still, it might help in the future if I have to go through all this again.

But for now, Windows 2000 is installing, and I’ve got one Meat Lovers’ and one Hawaiian pizza sitting on my bed calling my name.

Update: Things I learned that I want to record here for future use…

  • Special IDE cables are needed to use the ‘cable select’ jumper setting on IDE devices. I don’t have those cables. ‘Cable select’ doesn’t work.
  • When two devices are on an IDE bus, the master device should be at the far end of the cable, and the slave device should be at the middle of the cable.
  • Windows 2000 (and, presumably, other versions of Windows) needs to write some boot information to the first available drive — usually the master drive on the first IDE bus (drive 0 on bus 0 in my BIOS screen) — even if you’re trying to install Windows on a different drive. It’s best to make sure that you’re installing the OS on that first drive. If you install the OS on a different drive, then when you use fdisk to format the first drive on the first IDE bus, then Windows will fail to boot as you’ve just nuked those boot files. This is a bad thing™.

New PowerBooks!

Well, it finally happened — Apple has finally updated their PowerBook line (Apple’s page isn’t updated yet, though — Steve’s still onstage giving the keynote speech at the Europe Apple Expo).

~~Since the keynote is still in progress, details are a bit sketchy, but~~

Here’s some key points of what MacRumors has posted so far:

  • The G5 will hit 3Ghz by the end of summer ’04.
  • iChat is based on standards and should be compatible with Windows software soon.
  • New 17\” PowerBook: 1.33GHz, 2GB RAM Max, \$2999. Mobility Radeon 9600. 2x Superdrive.
  • New 12\” PowerBook: 1GHz with 512k Cache, \$1599. GeForce FX GO, USB 2.0. Both available today. \$1799 12\”/Superdrive.
  • New 15\” PowerBook: Aluminum. Slot Loading Drive. Backlit Keyboard. 15.2\” TFT. 1.25GHz, G4. Up to 2GB DDR RAM 333MHz. Radeon Mobility, DVI, FW800, 2 USB, Airport Extreme. \$1999 Combodrive model. Superdrive for \$2599. One config has 1GHz, 60GB, 256MB. 1.25GHz has 512MB RAM and 80GB HD.
  • A New mouse and keyboard. No wire, but bluetooth. adaptive frequency hopping – a new technology to keep a better connection. 128-bit encryption.

Update:

Added links to Apple official product info pages and replaced Euro pricing with USD pricing.

A question for Windows experts

Or at least, people who are more familiar with the intricacies of Windows 2000 than I am.

Here’s the short version: Why can’t I delete a partition from within the Windows 2000 setup utility?

Here’s the long version:

I’m in the midst of nuking and paving (wiping and reinstalling) my Windows box, running Windows 2000. The machine has two physical hard drives in it — a 2GB drive and a 6GB drive. Under my previous setup, I had the 2GB drive mapped to C:, and the 6GB drive partitioned into 4GB for D: (for documents and downloads), 1.5GB for E: (for applications), and 500MB for F: (for a scratch/temp disk). The thinking at the time (since I’m far more used to the Mac) was that I’d be able to reinstall Windows on the C: partition if it had issues, and I wouldn’t risk either losing my documents or having to reinstall my applications, as they were on seperate partitions. Of course, on Windows, it’s not that easy, as so many applications tie into the registry, so over time, I decided to ditch that scheme.

So now I’m working on the reinstall. While in the Windows 2000 setup utility, I’m given the option of deleting and recreating partitions on my drives. My plan was to essentially flip-flop things around — use the 6GB drive as my Windows 2000 system and application partition, and the 2GB drive for documents and downloads. So, I happily nuked all the partitions on the 6GB drive and created one single large partition across the entire drive. However, for some reason, the 2GB drive seems to be locked down — I can’t delete that partition at all.

Okay, so I figured maybe that was because I’d started the reinstall process by booting off that drive, and since the installer copied a few files onto the drive for the install before restarting and dumping me into the DOS-based setup utility, it couldn’t wipe that drive as it would end up wiping those files. So, once Windows was installed and I rebooted from the new installation, I tried reformatting the 2GB drive from within Windows, and it still won’t do it. The 2GB drive (still C:, but not booting from it) has the designation ‘System’ visible in the Drive Manager (or whatever that window is called — I’m going from memory on that right now), and the 6GB drive (D:, booting Windows 2000) is designated ‘Startup’. Obviously, the Startup drive shouldn’t be nukeable, but I’m not too sure why the 2GB drive has the ‘System’ label, or why it’s still locked down.

In one final guess, I went back into the Windows 2000 setup utility, this time starting the process after booting from the new install on the 6GB (D:) drive. I wasn’t sure this would work, but I figured it was worth a shot, guessing that the lower-level system hooks of the setup utility would be better able to muck with the drives, and this time it wouldn’t be copying any setup files onto the drive I intended to nuke. Unfortunately, that didn’t make a difference — the setup utility still stubbornly refuses to let me reformat the 2GB drive. And, once I’d started the setup process, I couldn’t get out of it, so now I’m starting over from scratch (which is why I was going from memory in the previous paragraph).

So, now I’ve got a 2GB drive which is essentially useless to me, as I can’t remove the installation of Windows 2000 from the drive to either just put the new install of Windows 2000 on that drive (which I’d rather avoid, as these days 2GB is fairly limiting for both the system and applications) or to use it for my documents and downloads.

Anybody out there know how I can reclaim those 2GB of space?

Updates, updates, updates

As it’s been having issues for a while, I started the process of nuking and rebuilding my PC last night. I just managed to get it online (after having to search out the drivers for the motherboard’s on-board ethernet port, since it wasn’t auto-detected), and Windows Update has just notified me that I have 33 “critical updates” to install to my copy of Windows 2000 SP 2.

Oh, joy. I’m so glad I have broadband — but even so, there are enough of them that have to be installed on their own so that they can trigger restarts that this is still likely to take all night.

Update:

After the first update was installed and the computer restarted, the next trip to Windows Update actually increased the count to 34. If this keeps up, I’ll have the computer up to date round about the time Longhorn is released to the public in…oh, 2007 or so.

Print-friendly pages with CSS

Printing often seems to be the bane of web publishing doesn’t it? All this information scattered across the ‘net, and so many times, trying to get a decent hardcopy printout just results in frustration. Sites that are beautiful in a browser may fail when printed — text disappears into background colors if you’re printing black and white, ads take up tons of unnecessary space on the printed page, and if the site uses tables or a fixed-width CSS layout that’s wider than the page, you may end up with having text cut off along one side of the page. Many commercial sites create special ‘print friendly’ pages, but that’s something of a kludge in itself — it’s an extra click, sometimes the link to the ‘print-friendly’ page is difficult to see, and it means having to deal with that many extra pages (and extra bandwidth) to maintain and serve.

Thankfully, CSS allows a remarkably simple way to avoid having to deal with all these frustrations. With a little bit of coding time, you can create a special “print stylesheet” that will determine exactly how your page looks when it’s printed out, without ever having to deal with the problems outlined above. Here at TypePad, you’ll need to be a “Pro” user to take advantage of this (as you’ll need access to the code of your templates), but the same technique will also work for MovableType powered sites, or any other website where you have full access to your code.

Need a quick example? Just try printing this post out, then compare what your printer gives you to the screen version (Netscape, Mozilla, Firebird, and Safari users will get an extra bonus trick that IE doesn’t support). For all the gory details (which really aren’t all that gory), just read on…

This site without print CSS

For a quick example, I’ll hold myself up to the spotlight (hey, if I’ve going to point out the problems, might as well humiliate myself instead of someone else, right?). The image to the right shows the result of printing this site after my redesign — those nice big white borders that work so well on screen cause definite issues on the printed page, squishing all the actual content into a single really tiny column in the middle of the page. This obviously was not acceptable! So, I got to work.

The first step was to design the print stylesheet itself. The basics of that are essentially the same as designing an on-screen stylesheet, and you can even use a browser to work it all out. I started by copying my stylesheet into a blank text document on my computer and tweaking it piece by piece to adjust it for the printed page. I won’t go through all the changes I made (though you’re welcome to compare the two to see for yourself — feel free to look at the code for either my screen stylesheet or my print stylesheet), but I do want to call attention to a few of the methods I used.

First off, the borders — an easy fix there, all I had to do was adjust the margins for the #content div from 150 pixels to 5%. By using a percentage instead of a fixed value, it ensures that the content area of the printed page will always be 90 percent of the available width, no matter if the person printing the page is in the US or in Europe (as there are different standard paper sizes).

Now for a handier trick. One of the major differences between on-screen display and the printed page are that navigation elements, such as the navigation sidebar across the top of each page on my site, are essentially useless when printed. Obviously, they can’t be clicked, so all they really end up doing is taking up space on the printed page. If that’s the case, then why bother printing them at all?

In my original stylesheet, my navigation bar is contained within a div of its own, like so:

#navigation {
   text-align: center;
   margin-top: 2px;
   padding: 4px;
   background-color: #eee;
   }

So, for the print stylesheet, I simply changed all of that to this simple argument:

#navigation {
   display: none;
   }

And voila! When printed, that entire div just disappears from the page. That little display: none; argument comes in very handy for deciding just what appears and doesn’t appear on your printed page and on screen. I added a class called “screenonly” to my print stylesheet that uses the display: none; argument, and then wrapped the comment entry form on my individual entry pages in a div class="screenonly" tag — bingo, no printed comment entry form. With a little experimentation, it’s very easy to determine exactly what elements on your pages will and won’t print.

The same technique can be used on screen, of course. I added another class to my screen stylesheet called “printonly” that also uses the display: none; property, then added a copyright declaration to the bottom of every page that is wrapped in a div class="printonly". Now that won’t display onscreen, but will appear when printed. Pretty nifty, isn’t it?

There’s one last trick I want to call attention to before I close out, though — while it will only work in browsers that have good CSS support (in other words, almost every browser except Internet Explorer), it’s incredibly useful.

Links are somewhat of a quandry on the printed page — in fact, by default, they’re nearly useless. A slight color change in the text, but nothing else. However, CSS includes ways to work around this, as well. I added the following lines to my print stylesheet:

.postbody a:link:after, .postbody a:visited:after {
   content: " (" attr(href) ") ";
   }

This looks a little complex, but it’s really not all that scary. The first line says simply that within any element that has the class postbody (I’ve wrapped the text of my posts, trackback excerpts, and comments in divs with that class), any a element that is either a link or a link that has been visited is going to have some information added after that element.

The second line is the content that we’re adding: first we add a space and an opening parenthesis, then we add the href attribute (in other words, the URL that the link points to), then we add a closing parenthesis and another space. That’s it — the last line is simply closing the CSS argument.

So what does all that mean? Simply this — when the page is printed, every link will be followed with the target URL of that link in parenthesis. Nifty!

Okay, so those are some of the tricks I’ve used. Now, supposing you’ve done some poking, prodding, and experimentation on your own and you’ve got a print stylesheet all set up and ready to go — how do you get it working? Easy enough! First off, create a new Index Template for your site, name it something like “Stylesheet-print”, and have it output to “print.css”. Now, you’ll need to do a slight edit to each of your templates.

The default line in TypePad templates that calls the stylesheet is in the header information at the top, and looks like this:

<link rel="stylesheet" href="<$MTBlogURL$>styles.css" type="text/css" />

We’ll be adding one argument to that line, and then adding a second, very similar line –here’s what you should end up with:

<link rel="stylesheet" media="screen" href="<$MTBlogURL$>styles.css type="text/css" />
<link rel="stylesheet" media="print" href="<$MTBlogURL$>print.css" type="text/css" />

What we’ve just done is tell the browser that the “styles.css” file should only apply to on-screen display, while the “print.css” file should apply to content that is sent to the printer. That’s it — rebuild, and you’re done!

My site with the print stylesheet

And here we have the final result — the image to the left is how my site prints out with the print stylesheet added. The useless navigation bar has disappeared, borders have been set to values that are far more manageable and readable for the printed page, I’ve brought the font size down a touch, and all links now display their target after the link itself. All in all, a far more readable printed page than what I started with, and all accomplished with a little bit of playing with CSS.

So that’s it! Hopefully this all made sense and is useful for you. As always, feel free to leave any comments or questions below, and I’ll do my best to clarify any places where I may have been unclear. Enjoy!

(Post-link URL display code was found at A List Apart.)

20 Tips for new G5 owners

This one’s mostly just for me — originally from Ken Tidwell and posted on MacInTouch, but as their archives can be difficult to search, I wanted to keep this around. If all goes well, it might come in handy in a couple weeks. ;)

  1. RAM must be added in pairs only…all models. Opinions vary, but 1gb \~ 2gb RAM seems to be a general minimum before these units really shine. […]

  2. Clean the cast aluminum exterior with iKlear from Apple, or a mild dishwashing detergent.

  3. PCI-X (1.8GHz and 2.0GHz G5s only) supports both PCI-X and PCI… but 3.3 volts only… not 5 V.

  4. The case latch can be used as a locking point for a security cable.

  5. Carbon Copy Cloner is a great tool for moving data from another Mac.

  6. Virtual PC (current version…6?) will not yet run on a G5.

  7. The OS shipping with the G5s at this time is an interim OS, and does not yet support the 64-bit capability of this machine. Give it another 2 to 4 months.

  8. FireWire 800 uses a different connector from FireWire 400 (and Sony’s 4-pin connector).

  9. The Sony DVD writer is not capable of handling DVD+R.

  10. The aluminum case inhibits Bluetooth and Airport signals…don’t forget to mount the external antenna(s).

  11. The G5 will automatically reduce processor speed in response to having the side cover(s) removed. There is also a system preference for selective control. From the G5 Developer Note:

    Fan speed control: The speeds of the fans are thermally controlled and are automatically set as low as possible to minimize noise. System performance can be specified by a “high/reduced/automatic” pulldown option provided in the Energy Saver Control pane in System Preferences.

  12. The rear video connector labeled DVI supports both DVI-I and DVI-D.

  13. The rear digital audio connection is a TOSLINK connector…be sure to buy optical cables that use the square (indexed) connector (not round) on at least one end.

  14. The four screws on the interior bulkhead near the drives are spares that are used when installing a second hard disk. [photo]

  15. The analog audio input on the rear can be used for directly connecting a microphone, which must be self-powered. [Apple’s G5 Developer Note, however, says:

    “The audio inputs are designed to accept high-level audio signals: 2.2 Vrms or +8 dbu, which is the standard output level from CD and DVD players. The output level of some consumer audio devices is lower, often 0.316 Vrms or -10 dbV. Sound recordings made on the Power Mac G5 with such low-level devices have more noise than those made with high-level devices.”

    -MacInTouch]

  16. The power supply is auto-ranging, meaning it will switch between two choices of voltages: 100-125V AC or 200-240V AC.

  17. The USB ports on the computer itself are USB 2.0, while the USB ports on the keyboard are USB 1.1.

  18. G5 owners interested or working with ‘High Throughput Computing’ are advised to check out Condor.

  19. G5’ers curious about 64-bit computing can start here: [Ars Technica 64-bit introduction]

  20. A good demo for friends and family is always a movie…stop by the Apple Quicktime site for latest trailers.

Apples for Alaskans

Looks like high schoolers in Alaska’s Denali Borough School District will be getting Apple PowerBook G4 computers for their school year!

When school begins Sept. 15, the Denali Borough School District will become the first in Alaska to provide a laptop computer for every student in grades 9 through 12. A total of 129 laptop computers are being prepared to hand over to high schoolers at Tri-Valley, Anderson and Cantwell schools.

This “one-on-one initiative” is the result of a partnership between the Denali Borough School District and Apple Computer, and is based on programs in other states, particularly in Virginia and in Maine.

(via MacBytes)

Updated iPods and iMacs

Oh, and just in case you’ve been considering upgrading or switching, Apple announced bigger iPods and faster iMacs this morning. The iMac base models are now \$1299 for a 1Ghz G4, and \$1799 for a 1.25Ghz G4. Not bad at all.

Meanwhile, I’m still waiting for my new G5 to show up — which is okay, since I’m also still scraping together the last little bit of cash I need to finish paying for the fool thing!

Feedster IM Searching

Feedster is currently my favorite search engine for finding topical, up-to-the-minute information, and they just released a really nifty new feature today — the Feedbot.

Add ‘feedbot’ to whatever IM client you use, send it a message like ‘find apple imac’, and get the search results IM’d back to you. Very handy!