I just completed a feedback form regarding my AppleCare warranty experience. Question 12a gave me a chance to bitch. Question 12b made me smile at my ridiculous expectations:
12a Is there anything else you would like to tell Apple about your recent in-store repair experience at the Apple Retail Store? (NOTE: 2000 character limit)
Replacing the optical drive on a Mac Mini is a simple procedure that takes fifteen minutes, requiring a screwdriver and a putty knife. That I should have to drive to a God damned mall and explain to a “genius” that he doesn’t actually need my password to log in to OS X, wait for twenty minutes as the “genius” engages in manual data entry, then wait “seven to ten business days” for the part to be replaced is FUCKING SAD.
(Note: Hold down command+s during boot, run to the appropriate init level and type “passwd” to reset the password. Even someone who isn’t a “genius” can pull that off!)
[NOTE: For some time I have been considering a series of short “Deathmatch” style articles, contrasting similar-but-different words. This post is the “Pilot” for such a series.]
His big point is that programmers need to stop fretting over moving things between memory and disk themselves. He explains that on a modern computer system, RAM is backed by disk, and disk accesses are buffered in RAM, and a lot of work goes in to the kernel to ensure that the system behaves effectively. By managing your own RAM-or-disk conundrum, you end up making a mess of things, because when you go to move an unused “memory” object to disk, the kernel may already have paged the memory region to disk, and what happens is the object then must move from virtual memory on disk, to RAM, to a disk memory cache in RAM, and then back out to disk. It is simpler and more efficient to just ask for a big chunk of memory and let the kernel page things to disk for you.
He then explains some clever things you can do for multi-processor programming. It seems to boil down to trying to give threads their own stack space wherever practical, and managing worker pools as a stack, so that you are most likely to find yourself processing on the same CPU at the lowest level of cache, and least likely to need to pass memory variables between CPUs.
Not that I write multi-threaded applications, but if I ever do, I’ll try to keep this understanding in mind.
(I like what Yelp have done with their down page.)
The short story is that an underground transformer exploded downtown, and the 365 Main data center failed to automatically start their generators, and had to start them manually, cutting power for nearly an hour for some customers, many of which are smaller, trendier web sites like Craigslist, LiveJournal, Yelp and others. (I have interviewed with half of the companies mentioned in Scott’s post.)
You do not want to lose power across a production-class network. This can cause equipment failure, servers to delay boot because they need to run disk consistency checks, servers to stall boot noting a missing keyboard, disk errors, or whatever. Some services may wedge up because when they started they couldn’t talk to the database . . . in some cases you may have had machines running for a few years, which may have last rebooted three SysAdmins ago. The running state may be subtly different from the boot state, with no documentation . . .
A few years ago I had a chance to rebuild a production network from the ground up, with a decent budget to do everything the right way: redundant network switches, serial consoles, remote power management . . . I remember talking to my manager as to whether we might want a UPS in each rack. We figured that the data center is supposed to keep the power running, or else. Also, if the data center loses power then we lose our network access anyway . . . perhaps the whole point of this post is that data centers do lose power, so a UPS can be worthwhile. If nothing else, it may leave your systems up and ready to go as soon as the network is restored.
Data centers have UPSes too. Huge ones that you may get to walk through on a tour. The purpose of the UPS is to provide battery power between the time utility power fails and on-site generators begin to provide energy. I don’t know enough to comment on this particular case, but I do recall touring a data center in Emeryville, and the guy explained that batteries become less effective over time, and a lot of data centers fail to test their batteries regularly. When wired in series, one bad battery brings down the entire UPS, and so even though you have a generator on-site, the UPS can fail before you manage to transfer to generator power. While this stuff is beyond my expertise, I’m inclined to believe that this is what happened at 365 Main yesterday: a data center should not only test its failover-to-generator procedure on a regular basis, they need to ensure sufficient battery capacity to keep systems running during the time it would reasonably take to switch to generator power.
On the weekend of July 22 and 23, I and about 400 other folks attended WordCamp 2007 in San Francisco. This is a conference about WordPress blogging software, and blogging itself. I am usually a bit wary of killing my weekend by spending the bulk of it with a bunch of nerds. Especially bloggers. But then, I am a nerd, and this is, I admit, a blog . . . that and registration was merely $25 and covered my food for the weekend. That’s a pretty compelling deal for the unemployed! Added value was found at the open bar on Saturday night at one of my favorite bars: Lucky 13.
Here are notes I compiled during the Saturday presentations. (more…)
So, I am pretty good at keeping on top of my Inbox. Every so often I plow through, and I “delete, delegate, defer, do” which means that mostly I delete or archive messages that require no action, or I’ll make entries in my calendar, then delete or archive, or I’ll write a reply, perhaps a lengthier reply. Or, I’ll transcribe the notes somewhere to work into an article, or whatever. When I’m done plowing, I sometimes have an empty Inbox. E-mail is triage and when that plate has cleared you can close it and go on to other things.
Delete, Delegate, and Do, are all really easy. They even map to the e-mail buttons fairly well:
Delete
“Delete” or “Archive” buttons.
Delegate
“Forward” or make an entry in a bug / ticket system.
Do
“Reply” with an answer or note that things got done..
Defer
??? . . . make an entry in your calendar? Tagging?
Some casual poking reveals that this may be doable in Outlook, which really isn’t my style. Have any of my geeky readers thoughts or recommendations along these lines?
I recall Tom Limoncelli giving a presentation called “Time Management for System Administrators” and he explained how, as part of his routine, he would walk over by his customers–his users within the company he worked at–and check in at a regular time. Some days, they might ask questions that would reveal to him potential improvements in the systems architecture, and other times they might ask simple technical support questions. Either way, by dropping in at regular intervals, the users came to feel good about their Systems staff. This can be damned handy when, as they occasionally do, the systems go down hard, staff scramble to fight fires, and users are left out in the cold with little more to work with than their innate feelings about the Systems staff. If they like you, they will feel sympathetic in your hours of stress. If they don’t like you, they hope the present outage may be a nail in the coffin of your tenure.
I was put in mind of this by the story presented in today’s Daily WTF . . . the user, who could be described as “dim” had been following a really complicated, error-prone process. She had no idea that a trivial change to the system could be made to make her life easier. The hero of the story happened to be walking by, hear her frustration, politely inquire, and five minutes later, make betterness happen:
Still, there’s a good lesson here that’s often missed; pay attention to what users are doing with the provided system and by unblocking minor bottlenecks you can become the hero.
BUG: Uhm, actually, if you have pretty permalinks this plugin will break unless your post slug is photos . . . I just tried to fix this but failed. Sorry about that.
I just spent a fair amount of time wrestling with Apache on my Macintosh. The problem is that it simply refused to read the .htaccess file in my user directory.
My First Approach
I took the “Unix Guy” approach and edited /etc/httpd/httpd.conf to ensure that Apache was configured to consult my user’s .htaccess file. I changed this bit:
I had planned to “ship” this version last Friday, but it was a little more adventure than I had anticipated.
Photos Flickr is an early version of a plugin that I am developing for WordPress blog software to display a user’s Flickr album within their blog. The result? Someone with a WordPress blog can now have a basic interface to let readers view their Flickr images, using their own web site and design.
Changed: Fixed the tag-listing function to drop the last comma.
Changed: A bunch of internal work for functions to understand the current “context” appropriately when navigating through a photostream, versus a set …
New: Added photos_photoset_title() and photos_photoset_description()
Changed: is_photo() returns current photo ID.
New: Added photos_photo_date_taken()–support date format manipulation.
New: photos_photo_tag_list() and photos_photo_photoset_list() return lists of tags and photosets for a photo.
Changed: Functions photos_photo_(next|prev)_(href|url|title) wrap around new private photos_private_getContext().
New: New functions photos_photoset_(next|prev)_(href|url|title) wrap around new private photos_private_getContext().
Changed: Disabled ALT and TITLE attributes on image links due to not-escaping-quotes issues.
Changed: Renamed photos_index() to photos_photo_index() and photos_pageindex() to photos_photo_pageindex() with stub functions for
backwards-compatibility.
Added: New is_index() returns photo, tag, or photoset to tell us what index has been requested.
New: Added photos_photoset_index() function to display a “pretty” index of photosets.
New: Added photos_photo_index_href() and photos_photoset_index_href() functions to refer to photo index and photoset index pages.
I have had my sleeves rolled up . . . and I am having a blast! It is with some joy that I announce the release of the latest development version of my WordPress Flickr plugin, Photos Flickr 0.5:
Photos Flickr is an early version of a plugin that I am developing for WordPress blog software to display a user’s Flickr album within their blog. The result? Someone with a WordPress blog can now have a basic interface to let readers view their Flickr images, using their own web site and design.
I wanted to print an article from my web site, but the printing was ugly. I had previously tried to fix up my printing by adding some @media print stuff to my stylesheet, but I found it wasn’t working. Since I have free time, I spent a bunch of it thrashing my head against the wall trying to figure out what’s up researching the correct approach. Finally, I found a wordpress.org article: “Styling for Print”.
To specify a “print” stylesheet for WordPress: (more…)
I successfully upgraded WordPress to 2.2. I don’t bother with WordPress upgrades that often, because even the simple “Five Step” procedure can get a bit hairy. I’m still grinning at “Step 3: Overwrite Files” . . .
Step 3: Overwrite Files
Get the latest and greatest WordPress and upload it to the WordPress directory, overwriting all the files that exist there only after you have delete the old files, which is explained as follows (do not overwrite your wp-content directory or wp-config.php). Important: when upgrading from 2.0.x to 2.2, or from 2.1.x to 2.2, you will need to delete old files on the server, because several file names have changed. What if something goes wrong, you ask? Well, did you not create a backup of all files in Step 1? You can fall back upon them in the worst case scenario. Deleting your old files on the server and uploading the newer files from the new version you downloaded is an alternative which will ensure that the files on the server have been replaced for sure.
According to my “worklog” file, the process took 25 minutes: (more…)
Systems Administrators can be an uptight bunch. In the past few weeks I have twice spent some time amidst my fellow professionals. Most are nice people, a good many are inoffensively undersocialized, and a noisy minority are just flamingly obnoxious. (I have, at times, been flamingly obnoxious.) Two nights ago one of my fellows recommended Cory Doctorow’s mind-churning post-apocalyptic masterpiece “When SysAdmins Ruled the Earth” . . . I dare you to read it!
Not long ago I joined a professional mailing list, and today I thought I would chime in on the topic of mobile phone reimbursement. I received a polite note from the list moderator: my message had bounced, could I please re-sends the message as plain text only. These days I am using Gmail, which sends messages in the ubiquitous multipart/alternative format, which leads with text that is followed by a potentially-prettier HTML “alternative”.
I dug around in the preferences to see where I could set “text only” but couldn’t find anything, and took that as a sign that in 2007, even Google doesn’t care about supporting this antiquated preference. I have since noticed that you can just click “plain text” right in the tool bar while you are sending a message. But . . . well, I felt inclined to engage in the time-honored tradition of obnoxious computer experts and impose upon the guy my social-technological criticism of the status quo in the form of a well-crafted flame: (more…)
So, I have a few gazillion things I would like to do, and some free time to play with. In terms of “professional development” I am looking for work, but more interesting to me is to have some time for education. I know an awful lot of things, especially about systems administration, and there are plenty of things that I don’t know, some things you would think I have done, but haven’t, and then there’s adding new stuff like learning Ruby on Rails, which could be danged handy if I choose to pursue contracting. To that end, I’ve had the “Agile Web Development with Rails” book collecting dust for a while . . . and a Macintosh desktop, to keep Unix confusing.
I’m into Chapter 3: Installing Rails, and the instructions for me don’t quite cut it, and a link they provide to Lucas Carlson’s blog no longer exists. But that needn’t stop us, because Google found me a very handy tutorial from Hivelogic: Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X. It is from February and it does an excellent job of walking through the steps to fetch, build, and install the various pieces on a Macintosh, in /usr/local, like a real Unix system, and explaining all the important bits like fixing your $PATH and installing Xcode, and what the heck is sudo anyway. Stepping through the article is a breeze and you are left with a working Rails server, backed by MySQL, and the beginnings of a clue as to contemporary “best practices” like deployment-via-Capistrano. Huzzah!
In my case, I had to complete one other hurdle along the way. The “gem install rails” bit was erroring out for me when I followed the book and again with the Hivelogic article, with an error like: “Could not find rails (> 0) in any repository” . . . Google again found me an answer from Army of Evil Robots that basically boils down to:
gem update
Anyway, now I have a working Ruby setup on this computer, and I can hitch along to the next chapter, where I’ll learn to hop a freight.
I’m not sure what I might want to do with Rails, but “re-implement lnk.to” seems sort of obvious. If you are reading this and happen to have feelings about lnk.to, or link-shortening services, I welcome any thoughts, suggestions, wishes . . . thanks! -d