'Apple' Articles

Apple text emboss


Back in the days of OS X 10.1 I wasn’t a really big fan of the striped backgrounds, overblown transparency, and over-the-top animations Apple was using to show off their new desktop. However, in the last few releases they’ve tightened up the look of their OS, made it much more consistent, and have ended up with a really nice design that I find very inspiring. The OS X aesthetic has of course translated over to the iPhone, where it’s even more elegant.

One of the little touches that I really like is that label-style text on a gradient or colored background has a slight emboss effect that really makes it pop off the background and gives everything a nice 3D physicality without being too overt. You can see examples on the iPhone, in button and header text as well as the icons on the top bar:

iPhone button emboss

I fiddled around in Fireworks for a while trying to replicate the effect, but I couldn’t quite get it right until I asked a friend at work, who quickly pointed out that it’s really just a simple drop shadow, not any sort of emboss effect. I guess my eye had seen a more complex effect than what what actually there. Anyway, it’s pretty simple: you add a drop shadow with no fuzz, 50% opacity. If you have light text, you add a black shadow that is cast straight up, and if you have dark text, a white shadow that’s cast straight down. That’s all there is to it!


I went ahead and applied this effect to the “BRH.numbera.com” text on the top of my site, and I really like the way it makes the text pop off of the background.

Now that I knew how to do it, I decided that the low-contrast menu text on my site could also benefit from such an effect, but I wasn’t going to go and replace every bit of text in the menu with images. So instead, I used a CSS3 property that’s supported in Safari 3, Opera 9.5, and the upcoming Firefox 3.1: text-shadow. I’d already used text-shadow to put some soft drop shadows on the links across the top of my site and the section header, so it wasn’t too hard to add them to the links. All that was required is:

text-shadow: 0 1px 0 #C9DFF3;

So that says to make a shadow straight down (0px right, 1px down), 0 fuzz, and the color #C9DFF3. I had to pick that color because text-shadow doesn’t have an opacity property built in. Of course, using another CSS3 feature, HSLA colors, I can make a shadow that works on any background:

text-shadow: 0 1px 0 rgba(255, 255, 255, .5);

And for light-colored text:

text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);

I ended up keeping the hand-chosen background color in addition to the HSLA version since Opera supports text-shadow but not HSLA. So now I have a cute little enhancement to my site that users of cutting-edge browsers will get to enjoy.

Comparison of Apple Text in different browsers

Note that Google Chrome, despite being based on the same WebKit core as Safari, doesn’t support text-shadow since Google had to provide their own rendering layer (Apple uses their own proprietary renderer).

Posts I haven't written

, , , , , , ,

I haven’t been updating this blog too much recently. I never meant for this blog to run on a schedule, but I did intend to post more frequently than this. My original idea was that the blog would serve two major purposes. First, it is a place for me to announce new projects or updates to software and websites I’ve already released. It’s done that quite well, though I haven’t had much to announce recently. My job has been taking the majority of my development time, and most of the projects I’ve been working on at home are either private or haven’t been released in the form I’d like to because my employer hasn’t approved them for release yet.

The second major purpose for my blog is as a place for me to record the solution to problems I run across while developing software, so that others won’t have to spend hours Googling or using trial and error to come to the same conclusion. I didn’t intend to rehash things that were easily found or that had already been discussed - only to post when I felt it was something that added value to the internet that hadn’t been there before. So a lot of the blog posts are not really a narrative or running commentary - they’re not meant to be subscribed to, but found individually. It’s for this reason that my most popular posts tend to include the exact text of error messages. This type of post has suffered both because I haven’t been doing as much development, because I can’t discuss a lot of what I’ve learned due to the nature of the projects I’m working on, and because I’ve been learning new stuff (like Ruby on Rails) and haven’t done enough to have solved problems others haven’t already posted solutions for.

The third reason I have this blog is to occasionally talk about my thoughts on different technical topics, from web development to video games. Again, I don’t like to make a post unless I think I’m adding something new, and most of the topics I’ve wanted to talk about have already been covered. I had a lot of draft posts sitting around about web development, web standards, and the evolution of browsers, but then I discovered Alex Russell’s blog and it turns out he’s already said most of what I wanted to say, and better than I could. Other stuff, like my impressions of Windows Vista, critique of stackoverflow.com and suggestions for the Xbox Live Arcade lineup, have been covered to my satisfaction in plenty of places. Maybe some of them will end up posted, but probably not.

Another part of the reason I haven’t posted much is the sheer weight of unfinished posts I have. Right now I have 64 drafts and only 52 real posts! So I’m going to attempt to clear things out by writing a little about what I haven’t posted. A lot of this stuff wasn’t posted because it fell under that third point above, but some of it I was just too lazy to flesh out into real posts. Some of it’s just random stuff. So here’s what’s been happening in the last year:

I got on the bandwagon and picked up iPhone 3Gs for myself and my wife. Everything good you’ve heard about the iPhone is true. Also, almost everything bad you’ve heard about them is true. I really like the device, the UI, and the web browsing, and now that the NDA over the SDK is gone, I might even try to write an app if I get an idea.

I built a new computer in March of ‘07 to replace the machine I had built for college. The new machine is set up as a developer machine primarily, with the additional goal of being as quiet as possible. I can’t say I’m entirely happy with it, since I’ve had some trouble with the hardware and overheating issues mean I have to run the fans above “totally silent” mode. It does its job well enough but I might just buy a Dell next time. The huge CPU heatsink I used is awesome, though.

I’ve been running Windows Vista x64 since my new machine came online. While I think it’s a disappointing release given the 5-year gap between it and Windows XP, I generally like it. It’s certainly better than Windows XP and I wouldn’t go back. I’ve hit some trouble related to using x64, but overall it’s pleasant.

Before that, I was getting pretty sick of the aging Windows XP, so I bought a Mac Mini and ran it, using OS X 10.4, on a second screen next to my XP machine, joined via Synergy. I liked it a lot, but never moved much of my work over there. After getting set up with Windows Vista, the difference between OS X and Windows wasn’t so great, and I unplugged the Mac so I could have both screens for Windows. I moved the Mini up to my TV and used it with Front Row as a media center. Then the Xbox 360 got the ability to play DivX videos, so I stopped using it for that and brought it back downstairs. I was using it for browser testing, but then Apple released a Windows version of Safari. Now it mostly stays off, except when I want to use Handbrake (which won’t work on Vista x64). I still like it, and I really miss having an OS with a real command line, especially now that I’m doing Rails stuff and spelunking through a lot of badly-documented libraries. I’m not sure I’ll ever make the switch though. That said, my trusty old Thinkpad finally died last week, and if I can’t revive it I might look towards the rumored lower-priced MacBooks that should come out soon.

I got two awesome cats named Ozette and Skagit. A lot of my time at home just involves relaxing and petting the cats these days.

After years of using Thunderbird, I switched to GMail as my main mail client so I could use it from the web and use IMAP on my iPhone. I set it up to read all my old POP mailboxes, and I use Google Chrome’s application mode (I used to use Mozilla Prism) to make it look like a standalone app on my desktop. It’s an OK mail reader, especially since I get a lot less email to my personal accounts these days. The main annoyance is spam - I used to use POPFile to filter spam, and it was perfect, with almost no false positives. In contrast, I get maybe 50 pieces of spam leaking through on GMail a week.

Spam has not been limited to my inbox: my support forums are basically nothing but spam and people complaining about stuff I’ve given them for free. It takes a lot of maintenance, and I’m thinking of either trying to transition them to something less attractive to spammers, or just shutting them down entirely.

Back when IE7 was in beta I wrote a handful of bug repro’s for problems I found with it. Recently I’ve been running across all kinds of crazy things in both Firefox and IE, so I’ve been cataloguing them with little examples. Most of them have been fixed with the latest release of each browser, but I figure they’re still useful if anybody’s seeing those problems happen.

I went to Southeast Asia for two and a half weeks. We toured Vietnam, Cambodia and Thailand. It was incredible.

I finally got so sick of CSS that I decided to write a processor that would take an “evolved” CSS syntax that supported named constants, nested selectors, arithmetic, mixins, and such and spit out real CSS. I had it all sketched out and was ready to start implementing when I found SASS, from the same guy who awesome-ified HTML with HAML. SASS is feature-by-feature the exact same thing I wanted to do (except for the whitespace-significant thing, but I can deal). I love it.

I’ve been pretty disillusioned with ASP.NET as a web platform - the web forms are too inflexible and unfriendly to clean markup and unobtrusive JavaScript, and C# feels too rigid and verbose for what I’m doing. LINQ and the other 3.5 features help a lot, but my host is stuck on 2.0. I still haven’t found any templating system that trumps Web Forms, which is why I’m still stuck on Windows hosting for the most part - a lot of my sites are built on ASP.NET for nothing more than the templating. While I’m keeping my eye on ASP.NET MVC, I’m more interested in cross-platform web technologies that give me a bit more choice in hosting.

To that effect, I’ve started a personal project on Ruby on Rails, mostly to learn the platform. So far I’ve really been liking it - having a functional, dynamic language is great, and the structure Rails gives you really helps to quickly get things running. Hopefully I’ll be able to show what I’m making at some point, assuming it works to my satisfaction.

I actually went through a big comparison of different web platforms and different languages, trying to gauge what would be the best for me to develop for. I’m not sure I’ll ever publish my full results, but Ruby on Rails was obviously up there, and Django / Python looked good too.

Speaking of languages, before I discovered jQuery I didn’t really do much JavaScript if I could avoid it. Now I’m writing tons of JavaScript to produce some really nice interactive web apps. I have never been as impressed with a library or platform as I have been with jQuery.

I’ve actually been using Eclipse a lot lately, both for Aptana and for straight Java development, and while it’s slower and buggier than Visual Studio, a free copy of Eclipse plus all the free plugins make it much more compelling than the Visual Studio Express products I use for C# work. Stuff like the outline view, refactoring support, quick fix mode, and real unit testing and source control plugins make all the difference.

I think that’s about all I wanted to get off my chest for now. Hopefully I’ll have a chance to flesh some of that out into full posts sometime, but at least I won’t have so many unwritten drafts staring at me every time I log in to Wordpress.

Why you can't access Mac file shares from Windows Vista


Update: It does work! See the note at the bottom of this post.

I’ve had this post in my “drafts” for about a month now. Originally it was titled “How to use Macintosh shares from Windows Vista”, but I was waiting to actually figure out how to get them working. Unfortunately it looks like it’s simply not going to happen.

Here’s the problem. You’ve got a Vista machine, and you try to visit a network share on a Mac OS X machine that has been shared using Windows Sharing. This share worked just fine with your XP machines. However, in Vista, you try to log in and it just spits back, again and again, that your username and password are incorrect.

The problem lies with the fact that in Vista, Microsoft made the gutsy but correct decision to go hardline on security. One of the targets on their list was the weak Lanman and NTLM network authentication schemes that were the default on earlier versions of Windows. The main problem with these authentication schemes is that, if a hacker can get ahold of your password that has been hashed for Lanman or NTLM (and it’s just sitting there on the drive, by the way), they can connect to remote machines using your credentials without even having to know your unhashed password. Pretty scary. So in Vista both of these schemes are disabled in favor of the much more secure NTLMv2 scheme.

There’s a problem with this on the Mac’s side though - it doesn’t support NTLMv2. Rather, the version of smbd that ships with MacOS X, even 10.4, does not support NTLMv2. You should be able to configure your smbd.conf file like Jon Belanger explains in this forum post, but it doesn’t actually work.

The problem with this is that if you do a Google search on why your Mac shares don’t work in Vista anymore, the suggestions that come up all tell you to simply decrease the security of your Vista machine. That’s really not the best idea - it just brings you back to the old insecure XP level. Unfortunately, until Apple ships a new smbd, this isn’t going to be fixed. So far I’ve just mounted my Windows shares from the Mac and it’s good enough, but I hope (and expect) that Apple will fix things in 10.5.

Update (7/16/07): In the comments, Osvaldo points out that by entering your username as “machinename\username”, with machinename being the name of the remote Mac, it works. So for me, logging in from Daedalus (my Vista machine) to Samus (my Mac), I need to type “SAMUS\brh” and it works! Thanks Osvaldo!

Windows Vista leads me to the Mac


I’ve been meaning to write about my impressions of the various Windows Vista previews since I first tried it out in January. My thoughts (and my feedback to Microsoft’s beta site) have been piling up since then, but I never got around to putting virtual pen to even more virtual paper. However, Paul Thurrott’s recent article on where Vista fails really sums up a lot of my feelings here. Thurrott’s always been the type who’ll try his hardest to find the positive in even the worst Microsoft releases, but as a long time reader, I can tell that he’s very, very frustrated with Vista, and as a Windows journalist it really pains him to see something that promised so much deliver so little. He’s not alone. I’ve tried my hardest to like what I’ve seen of Vista so far, but it’s nearly impossible, especially when Mac OS X is out right now, and in many respects better than Microsoft’s late update to XP.

This is going to be a pretty long rant, so if you want more you’ll have to click inside.

I’ve been assured that under the hood, Vista is a vast improvement over XP. Rewritten kernel, better network, revamped graphics, etc. The problem is that nobody really cares. Even for the hardest of the hardcore, Vista’s myriad annoyances, design snafus, and general clutter are what’s going to make the biggest impression. For example, UAP (User Account Protection), is at best infuriating, and at worse useless as users quickly learn to ignore (or disable completely). Even within an hour of using the Vista previews I’m about to tear my hair out at the frustration of having to click away three and four dialogs just to install an ActiveX control. While UAP is the most egregious of the user experience blunders, it isn’t the only one. As Thurrott points out, the “Aero glass” look is terrible, and confusing. Even Apple has backed away from their overused candy bubbles and transparent menus, settling on a more mature, restrained look for OS 10.4 Tiger. Aero glass just looks amateurish, though I wouldn’t know firsthand - I’m stuck with the “Scrap Metal” theme on my laptop, which is a step down from the very pretty Royale theme for XP. And don’t get me started on the new Media Center - even for a company with a reputation for screwing up their branding, the new Media Center is bad. I liked the old blue/green look of Media Center, and the new dreary color scheme doesn’t hold a candle to the Xbox 360 Dashboard. While we’re at it, the new Windows Explorer interface is godawful - it’s so full of differently-colored bars and panels and buttons that it’s almost impossible to look directly at it.

Vista's Windows Explorer

What I don’t understand is why they’re working on making file browsing more complicated when there are some existing scenarios that need a lot of improvement. Installing and uninstalling programs still sucks, and it isn’t improved much in Vista. Installing and uninstalling applications is a pretty basic PC function. Why not focus some development time on making installs/uninstalls one-click (or one-drag, in the style of Mac OS X)? Why not let Windows handle checking for and applying updates to applications, instead of the hodgepodge of custom update schemes. That’s not the sort of thing that should be left to individual applications to handle. Will this be another area where we’ll have to rely on third-party applications to perform a basic function of the desktop environment? Or what about notifications? That’s another thing developers have to roll on their own. I remember when this was even rumored to be a part of the Windows Sidebar concept. Mac OS X users have Growl, which not only provides good-looking notifications, it gives the user control over when and how they’re notified. I’m surprised Apple hasn’t built this into OS X yet - it’s certainly miles above the Navi-style bouncing dock icons. Or maybe we should focus on little things - it’d be worth my $200 just to have keyboard shortcuts everywhere - especially for creating a new folder.

And that isn’t all Vista is missing. WinFS is out. The Monad shell, while promising, won’t be mature when Vista launches. Virtual Folders have been abandoned. Virus scanning is AWOL. Basically all we’re getting is Windows XP with Microsoft’s idea of a shinier shell, and fixed file search (OK, and the cool new RSS engine, but that’s coming out for XP too). Even more disappointing, it looks like Vista won’t launch with WPF (formerly Avalon) or WCF (formerly Indigo) right out of the box. That means that when other people get around to using these cool technologies to make real next-generation apps, they’ll have to get their users to download a whole bunch of stuff just to get the experience that Vista was supposed to be synonymous with.

So after a long wait, I’m ready to give up on Vista. It’s just impossible to stay excited about it, especially when Mac OS X Tiger is out right now. Some history: I’ve never been a fan of the Macintosh. However, ever since OS X debuted, with its slick UI, UNIX backend, and total disrespect for legacy applications, I’ve been intrigued. But Apple’s smug marketing and zealous acolytes have kept me from really trying OSX, and honestly, I grew up building PCs and configuring Windows - the Mac seems more like a consumer electronics device than a real computer. Having a sealed box that “just works” seems like easy mode. That said, the 5-year-old Athlon T-Bird box I built for college is still humming along just fine. My plan was to upgrade when Vista shipped, but even as Vista’s release date has gotten pushed back, my trusty PC has failed to become obsolete. Being a tech geek, I still want a reason to get a new computer, though. The Mac Mini seems to fit my bill. I get a well, designed modern OS with all the “comforts” of a UNIX command line. The only software tying me to Windows at all is Visual Studio and .NET (sad, really, that I need to keep Windows around just to develop Windows apps, but .NET is just so much fun). So I think I’m going to hop over to Amazon and pick up a Mac Mini. Who knows, maybe I’ll switch. If I do, it won’t because of Apple’s advertising or gorgeous product design. It’ll be because Microsoft seriously dropped the ball.

Apple Finally Speaks to Me with BootCamp

The big news out of Cupertino this morning is BootCamp. It’s Apple’s beta bootloader for Windows on their previously-closed Mac platform. Now you can dual-boot Mac OSX and Windows XP, complete with drivers for the important bits of the system.

Win Mini
Putting aside why this is a great move for Apple, this really puts the company in a new light for me. I’ve never liked Apple’s marketing - they’ve always seemed more like a cold white plastic monolith than a warm fuzzy people company to me. To me the Mac, and Apple, is about lack of choice. They give you something, and that’s what you get. It’s good, but things are going to be their way or no way at all. I tend to think a lot of their growing success lies with the fact that their defaults (a stock OSX install and standard Mac hardware) are fantastic, while the default install of Windows or Linux (and the standard OEM boxes) are rather dismal. While this makes a Mac great for most people, I’ve never really cared. I can make Windows do what I want, and aside from my Thinkpad I’ve never bought a computer that was pre-assembled in a factory.

The first thing Apple did that made Macs interesting to me was embracing UNIX with OSX. That was not the sort of decision I expected from a company that had made previously shipped operating systems that show you frowny-faces on error. The fact that the Mac now had a command line suggested that it wasn’t just for playing that sliding-puzzle game anymore. Since then I’ve had a little bit of interest in the Mac, and I even have a rescued-from-the-garbage 350Mhz iMac that I test Safari on. The OS is interesting, but the hardware lockin has always stayed my had mere moments from the “Place Order” button at the Apple Store. Recently I’ve become enamoured of the Mac Mini, whose diminuative size makes it seem more like buying a toy than a computer. Coupled with the fact that it’s the cheapest Mac that comes without a built in display, it seems like the best choice for my tinkering, though the price hike for the new Intel models makes me wish for some additional customization options - do I really need to pay for Airport Express when it’ll be sitting 5 inches away from an ethernet switch?

Today’s introduction of BootCamp really got me though. All of a sudden the guys at Apple HQ are speaking directly to me - they’re letting me make a choice! Not just any choice, but the choice to run software from their sworn enemy, Microsoft, on their pristine white hardware. This from the iTunes company! It’s not really a choice, of course. I wouldn’t dream of putting XP on a Mac Mini when I could build a cheap PC for half the price. It’ll be nice for people who want a great laptop but can’t give up Windows. But for me it’s the fact that they’re opening up and letting me do something as radical as replace the operating system. I feel now that if I were to buy a Mini, I’d be getting it from Apple, a company full of cool engineers with good design sense, not Apple, a company full of snobby elitists who know what’s best for me.

Where does Apple fit into the blog philosophy?

I just heard an interview with Robert Scoble on KUOW (Seattle’s NPR station). I’ve been reading Scoble’s blog for a long time, and I have agreed with most of the things he’s said over the years about the importance of blogging for companies in a world where word-of-mouth can spread a story around the world in minutes. Specifically, I agree that transparency and the “naked conversations” (as the title of Scoble’s book puts it) are beneficial to both the customers of a company like Microsoft but also to the company itself - they recieve feedback and can keep bad spin from igniting the blogosphere (ugh, I can’t believe I just used that word) like a brush fire.

However, I have a big question for Scoble and the other corporate blogging proponents. What about Apple? Apple doesn’t blog at all as far as I know - even Dave Hyatt’s old Safari blog is long gone. Yet people hang on their every word, every product announcement. Even the completely uninteresting launch of the new Intel Mac mini and iPod Hi-Fi was talked about all over the place - I got sick of tabbing through people repeating the story in my RSS reader. Engadget and some other tech blogs had a posts for weeks before the keynote buzzing about the magical products that might be released. You couldn’t hope for better PR. And even after the disappointing keynote, people still had positive things to say, despite some worrying problems with the new Mac mini (I admit, I was stoked to buy an Intel Mac mini when they came out, but I think I’ll reconsider for the time being).

When I interviewed at Apple I asked them why they didn’t blog, why there wasn’t more transparency. They responded that secrecy and surprise are one of Apple’s biggest assets, which I completely understand. But I don’t see Apple employees blogging about Carbon, or Automator, or any of the cool things that people aready know about, the same way I see Microsoft employees blogging about .NET or Microsoft Gadgets. What I’d love to have explained to me is how a company can survive, or rather, be loved so thouroughly, completely, and perhaps irrationally, without the level of transparency Scoble prescribes. Is it that blogging doesn’t really help the way we hope it does, or that it only helps for new companies and companies that already start out reviled by much of the community such as Microsoft?

Update (3/29/06): Scoble and Shel Israel came and gave an enjoyable talk today, and I got to ask them a version of the question I had posted above. I wish I could have talked with them further, but they basically said that while Apple is a PR powerhouse now, their lack of transparency will bite them in the long run. I tend to agree with that, but I think right now blogging is significantly more necessary for companies that don’t have flawless PR or fanatical customers.