I just bought gray cards. I had a gift certificate, I needed them, and it’s probably good to buy gray cards if you’re going to be using them a lot. They’re low-reflectivity, they’re sturdy, and they hold their color. But it hurts me to pay money for carefully colored cardboard, and I probably wouldn’t have purchased any without a gift certificate. But not white-balancing will hurt your photography. What to do? You could always hack your own… the results will almost certainly not be as good as a professional gray card, but they will be free. This is a photochop tutorial, so here goes.
Now, I know that gray cards are usually called 18% gray cards. And I know that they are 18% gray because, when you take a scene that is equal parts 0% black and 100% white, the 18% gray is the resulting color. I don’t know why that is–ask a physicist. And I don’t know enough about how printing works to do anything useful with that 18% number, so I’m going to cheat.
1. Make a new file, 2px by 2px. May as well set the background color to be white.
2. Zoom in to the maximum extent allowed (do this automatically by double-clicking the hand tool). You’re going to need to see what you’re doing.
3. Using the Rectangular Marquee tool, mask off the top left pixel and fill it with black. Repeat for the bottom right pixel.
4. Select the entire image (Edit > Select All) and turn your image into a pattern (Edit > Define Pattern). Name it whatever you’d like.
5. Create a new file, the actual dimensions you want to make your gray card. I find that it’s helpful to switch to “inches” here from pixels… for example, 4″ x 6″
6. Select your entire new image (Edit > Select All); we’re going to fill it (Edit > Fill…) with the pattern that you defined in step 4. Select “Pattern” from the “Use” drop-down list, and then choose your pattern from the “Custom Pattern” drop-down list. Note! If you are using an analog monitor, the resulting image may exhibit frightening moire effects.
7. We have cleverly constructed an image that consists of equal parts 0% black and 100% white. If only there were some way to average the two… (Filter > Blur > Gaussian Blur…) Oh look! 18% gray… see what I mean by cheating?
8. For added utility, I like to add strips of white and black at the ends of the card.
9. Our histogram shows we’re ready to go out and kick some butt! Just make sure to print this on a printer configured for ColorSync (if you can) and on the least glossy paper you can find (important!).
Some day soon I’ll have a tutorial about what to do with a gray card.
I have spent most of this past weekend working with Kristy on a stylin’ redesign of kristyland (go for the glitzy makeover, stay for the excellent writing and humor), but before that I’d spent a large part of the past week playing with my newest favorite toy.
With my trusty iBook looking more and more like it was destined to spend the rest of its working life on a desk with an unreliable display connection that its hinge exacerbated, I followed the latest MacWorld keynote with great interest—I’d already resolved to pick up a new MacBook Pro (on credit, naturally, how much do you think I make?) if the great AAPL would only update the line. Alas, the sexy but overpriced MacBook Air dominated the conference, and as it doesn’t really meet my needs, I went with a cute newcomer that Kristy and I had been courting the few days prior: the remarkable Asus eeePC.
At somewhat less than 9″ x 6.5″, a svelte 0.82″ thick, and weighing in at a scant 2.02 lbs, sporting a small but speedy solid-state hard disk, the eee is clearly intended to redefine the ultra-portable market. Although there are many entries that outclass its 900mHz processor, its tiny SSD hard disk, its stock 512mb of RAM, or its 7″ 800 x 480 screen, none can compete with its price point: $400. Replete with a webcam, wireless, several USB 2.0 ports, and an integrated MMC/SD slot, this little gadget handily outclasses my hapless Mac, and has become somewhat a totem for hardware and software hackers in the brief few months since it became generally available. I had intended to pursue some of the more exciting mods (an internal 3G card for constant cellular internet access, a touch screen, Bluetooth) but already find it hard to picture life without my little pal, which I’ve named Soyuz.
Left to right: my eee; my hand (for scale); an eeeXubuntu screenshot
It comes with a pretty decent operating system, a customized variant of Xandros, but in the end it didn’t give me enough flexibility. Fortunately, hackers fond of my Linux of choice, the much-ballyhooed Ubuntu, were kind enough to come up with a custom version of my favorite Ubuntu, the lightweight Xubuntu, specifically for the eee, replete with a full complement of drivers and a detailed install guide. Awesome, amirite?
I installed an entire development environment on the 4Gb drive, occupying most of the space (but who cares? I have lots of SD cards) but squeezing in an office suite, a database server, a web server, and interpreters for basically all of the languages I’m interested in playing with (ok, I ended up removing Erlang to make space, but I’ve still got OCaml, CLISP, Haskell, Python, Ruby, c++, and Obj-C). Plus a LastFM client I’ve been using heavily, a nice picture browser for when I want to check out some photography while mobile, and plenty of internets toolz. Not to mention compiz, which was a serious revelation—the eye candy it provides is at least equivalent to OS X once you tweak it up enough, and it gives me my much-longed-for Expose functionality (hint: they call it “Scale”). In fact, as the screenshot will show, I’ve basically managed to turn it into an OS X-alike.
The small keyboard is at least tactile and responsive, more than I can say for the chiclet keys that Apple for some reason brought back with the MacBooks and with which they’ve saddled the Air. I’m already typing almost as quickly as on my Apple Extended keyboard, although it’s not anywhere near as comfy as my Microsoft Natural Pro ergo keyboard that I brought to work.
I couldn’t be happier with this little piece of tech. I’m delighted to have passed on the Air and purchased this budget notebook out-of-pocket, and Kristy likes it so well she’s considering buying one herself. Still to come: RAM upgrade (not a hardware hack, they provide easy access to the DIMM slot) and actual productive work!
For some time now, I have been touting my offsite backup solution, using a free (as in speech) software gem called rsync to keep a remote backup of some of my most important files on a server at my web host. This works out great for me, because I get wayyyy more storage space and bandwidth there than I actually need.
The best things about this solution are:
On the other hand, setting it up was a little bit… complicated. The initial setup, my photo and personal stuff backup, took about two days. I have added instructions on how to back up shares from other machines; figuring that stuff out took about a day as well. So not exactly intuitive, although now that it’s done I can just forget about it completely.
I took some time to document the process, and I put up a tutorial at http://intargc.com/rsync.html. The software I used to write up the tutorial, TiddlyWiki, is a bit idiosyncratic. Very useful, however! I suspect that one day there may be a blog post about that as well. Anyways, the point of that remark is that there is one very large file to download initially, but be patient–that’s all the downloading you’ll need to do. Hope your computer does OK with Javascript, too
Anyways, I realize that this is totally uninteresting to a decent percentage of my readers (such as may still exist). So sorry about that–I’ll try to have something more generally-appealing next time, although odds that it will be music-related are good.
I don’t want to brag too obviously about my awesome new toy, but I do want everyone i know who doesn’t have one to be jealous. What to do? I’m going to try to pass this post off as keyboard practice for this strange touch-screen business. But lest you think that I have discovered some leprechaun-style pot of iPhones, I should mention that I was only able to acquire this marvel through Unca Steve going back one day farther than I had expected with the full $200 refund. What else could I do but plow that cash (and, of course, a little more from my newly-minted paycheck) back into the Apple Inc coffers?
Not that the phone is the only geekery I’ve been immersed in. There is also the torrid love affair that I have consummated with rsync, allowing me to use Dreamhost for automated offsite backup even over a crappy DSL line. But that is a topic for another post, one I hope to make on a keyboard I know slightly better. Adgffsgg.
… part I.
I actually received this error in an email from our legacy application today:
Nested Exception
Exception: [NameOmitted].Core.Exceptions.[NameOmitted]
Message: Database Exception occurred: Line 1: Incorrect syntax near 'brien'.
Puzzle on that for a while. When you figure out why it happened, you will laugh, you will cry, you will be moved.
Earlier today I stumbled upon something I was working on for fun last fall. One of my side ambitions has been to master Haskell, a really cool functional programming language. When Kristy was taking a requirement-fulfilling intro-to-java class, she had an assignment to write a program to count the number of vowels in an input string. At the time, I wondered how good Haskell would be at it. As it turned out, there were several really interesting ways to solve the problem in Haskell, and for no apparent reason, I here present some of my experimental solutions, many of which rely on language-specific features like laziness and list comprehension; each one is a function that will return the number of vowels in an input string. C++, eat your heart out.
cv1 s = length (filter (\c -> (toLower c) `elem` "eaiouy" ) s)
cv2 = foldr ( \c -> if ((toLower c) `elem` "eaiouy") then (1+) else (0+)) 0
cv3 = length . filter ( (`elem` "eaiouy") . toLower )
cv4 [] = 0
cv4 (x:xs) = (if (toLower x) `elem` "eaiouy" then 1 else 0) + (cv4 xs)
cv5 s = length [ c | c < - s, (toLower c) `elem` "eaiouy"]
cv6 = foldr ((+) . fromEnum . (`elem` "eaiouy") . toLower) 0
You can take my word for it that they're all neat, or, if you're programmatically inclined, you should visit http://www.haskell.org/ and learn about a really cool language.
The trouble with my computers, at least, is that they always go on to break my heart.
I’m typing this post (as I typed the others, and as I set up this blog) from my iBook. It’s the computer that’s gone the longest without letting me down.
In the past, despite levels of abuse that can only be described as gratuitous, my hardware has performed heroic feats of endurance. However, in the past 6 months, I have been afflicted with (2) NIC failures, (1) graphics card failure, and (3) hard drive failures–the first three hard drives I’ve ever lost.
Hard drive #1 survived long enough for me to lift my data; long enough for me to get complacent about a backup scheme. Hard drive #2 took with it into the bit bucket my entire mp3 collection–nearly 100Gb. And hard drive #3 was the hard drive in my desktop computer.
I haven’t replaced hard drives #2 and #3. I don’t even have a desktop computer anymore–I just plugged my hard-working little iBook into my monitor, mouse, and other assorted cables. It’s in the nature of a manifesto. I’m not buying any more hardware for the time being. There must be better ways to spend my time and money than on little pieces of computer hardware that always need upgraded and that are always failing. I’m out of the computer parts business, and I’m out of assembling computers. Since I’m po, that means I’m out of hardware in general for the time being. I intend to replace HAL with a NAS appliance. I intend to ride this iBook until it’s dust, and I intend to replace it with another prebuilt system. My new credo is this:
My time and data are too valuable for commodity hardware.
I’m officially considering jumping off the Firefox bandwagon. Yes it’s fast, yes it’s great, yes, I love its standards support. But why, precisely, firefox, did you consider it necessary to dump a year’s worth of bookmarks when I ran your last urgently-demanded upgrade?
You suck.
A little note on the concept of SCOPE, for the creators of C#:
...
while(...)
{
int iCtr;
...
}
//this isn't supposed to be an error!
int iCtr;
Block-level scoping, mothafucka! DO YOU SUPPORT IT?
Please try to fix this for C# 2.0. Thx!
So I’m working on building these DAV queries for ADO to get information about Exchange contacts out of the exchange store. For one of these, I need to sort by the company the person works for. Now, given that the fields are stored in a namespace called “urn:schemas:contacts” (even though the content class is “urn:content-classes:person,” don’t even get me started…) you might expect the field name to be something like “urn:schemas:contacts:company” or “urn:schemas:contacts:organization”. Especially the former, since you set the value in CDOEx with iPerson.Company. If you guessed either of those, like I did, you’d be wrong… although the second guess would be closer. The CORRECT name, according to MS or whoever built this hellish DAV standard, is “urn:schemas:contacts:o”. O?! Jesus, I learned not to use one-letter names in what, CS101?!
Microsoft, what the fuck?
My new theory is that these guys are too busy trying to remember how to use their own friggin’ schemas to actually make their products secure.