zw

Posts tagged mac

Direct link to redeem a Mac App Store promo code

I saw a blog post by tap tap tap a while back with a way to create user friendly links for redeeming iOS app promo codes. This is so much easier for the user than sending them a code and giving them precise instructions on the way to redeem it, especially if they’ve never done it before. You can send a link and they can get a free version of your app with one-click.

I hadn’t come across a way to do the same thing for the Mac App Store until yesterday, when I was downloading the Mountain Lion preview and saw how Apple did it. You can use the following format to send out promo code links for your MAS apps:

macappstores://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/redeemLandingPage?code=YOUR_PROMO_CODE

Obviously, replace YOUR_PROMO_CODE with your promo code. If you don’t include the “?code=” portion, it will just open the redeem code landing page, which is pretty handy as well. Digging a little deeper, it seems the Mac App Store has two different URL schemes: “macappstore:” and “macappstores:”. The latter—with a trailing s—is for secure URLs. If you’re trying to direct link to something in the Mac App Store, and you get a “Cannot Connect to the App Store” error, try it with “macappstores:” instead.

Working without a clock

For the past 4 years or so, I’ve worked without ever having a clock in sight. I don’t wear a watch, I removed the clock from the menu bar of my computer, and I cover up any clocks I can’t remove. I realized that watching the clock, even subconsciously, is stressful. You’re always aware of the time ticking by, wondering if you’re getting enough done or if it’s time to eat lunch yet. But you can’t fully focus if part of your mind is keeping track of the time, so I decided to experiment by going clockless. Four years later, and there is no going back. Sure, sometimes I accidentally forget to eat lunch, or stay up until 3am when I meant to go to bed at 10pm, but I think of that as a feature, not a bug. If I was able to skip those things without noticing, I was probably in the zone, and 3 hours of zone time is equivalent to about 8 hours of fractured time, so it’s well worth the trade.

I only recently came across this quote:

I owe my success to the fact I never had a clock in my workroom

– Thomas Edison

So I feel even more like I’m onto something. And at least if someone thinks it’s weird, I can say, “Well, it worked for Edison”. I recommend you give it a try and see for yourself, especially if you’re a bit bored with your job.

Of course, sometimes you need to know the time. Even if you don’t care about it, there are still meetings, appointments, plans, and schedules. To that end, I wrote a little clock app a while ago and use all the time. I’ve released it in case someone else might find some use of it. It’s called Clock and it’s a clock. Really. It just overlays the current time on the screen and is meant to be opened with Alfred (or QuickSilver or Launchbar or whatever). It’s super lightweight, so I can open it instantly, check the time, and then close it.

But, your mileage may vary. Please don’t blame me if you lose friends and alienate people because you keep missing all your meetings and appointments.

Fixing Twitter for Mac’s Spaces bug

Twitter for Mac (2.0.2) has a bug where it remains on every space when you change spaces. Even worse, it remains on every space even if you have it set to always stay on a particular space. The only fix I found was to go into the Spaces preferences, and change it’s space to a random space, then back to the one you actually want it on after it’s running. It only takes a few seconds, but it’s really annoying. I wrote a AppleScript to automate this which I run from Alfred, quick and painless.

You’ll have to modify it slightly for your own setup. Hopefully this will be fixed in the next release. Also, I never ever use AppleScript and just managed to throw that together, so please let me know if there is a better way.

Update: The spaces bug was fixed in Twitter for Mac 2.1 so make sure to update to the latest version if you’re still having issues.

Marching Ants

Yesterday, Apple donated the source code for MacPaint into the Computer History Museum. MacPaint was a bit before my time, but learning more about it, it’s amazing the influence it’s had on every graphics program since.

When Bill Atkinson was writing MacPaint, he had to figure out how to do rectangular selection. The solution he came up1 with was the—now standard—animating dashed border rectangle, which his colleague dubbed “Marching Ants”. The rectangular selection tool looks and works exactly the same today. In fact, if you look at the entire user interface for MacPaint (1984) compared to Fireworks CS5 (2010), they’re really not much different.

MacPaintFireworks CS5

The lasso, the paint bucket tool, the rectangular selection tool, and floating tool palette all first appeared in MacPaint. Incredible, 26 years later and the same exact solutions are in place today. For all intents and purposes, Bill Atkinson solved most of the problems around creating a graphics program in 1984, and it’s just be refined ever since.

I feel like most programmers today don’t really solve problems. We just find existing solutions and put them into place. In many ways, this is good. We don’t want to reinvent the wheel for every project as we should focus on the unique challenges in each app. But at some point, the wheel needs to be reinvented because its design was limited by the constraints of its time. Marching ants is a simple and elegant solution to the rectangular selection problem, but if Bill Atkinson had 2GB of memory, instead of the 128K he was working with, would he arrived at the same solution? Maybe he would have done some sort of semi-transparent overlay that wasn’t possible on that hardware. Maybe not, it’s probably still the best solution, but it’s worth thinking about.

1 You should read all the stories of the creation of the original Macintosh on Folklore.org, they’re great

Introducing Extract

Often while I’m working, I’ll watch a video of a talk or presentation. Usually, this involves jumping through a number of hoops to try to get a window that only shows the video. I’ll open it in a new browser window, resize it, hide all the toolbars and status bars, and adjust the scroll bars until it’s just right, and only the video is showing. Then I try to position the browser window so I can watch it while I do other things without obscuring the other apps. Needless to say it’s a pain, and I can never get it just right.

So I created a little Mac app - Extract - to handle this. With Extract, you can just copy and paste the embed code from a video and you can have it displayed in it’s own window, with minimal chrome. Extract will also modify the embed code so that the video will expand as you resize the window. Then you can have it as large or as small as you want it. Another feature I added was “Keep on Top” to the window. This will, not surprisingly, keep the window on top of other windows at all times. Why would you want this? Well, a lot of the time I can live with a small part of my main app window being blocked, but it’s annoying to have to keep selecting the app to keep it in the foreground.

Here’s a 1 min screencast (no audio) showing Extract in action. You can see how Extract will stay in the foreground, even if another app is activated when the “Keep on Top” option is selected, and how the video resizes with the window.


Hit the Extract page to download it.

Update: Version 1.0.1 is now available. It fixes a bug that caused Extract not to work on some computers running 10.5. If you were having problems, hit Check for Updates from within the app or re-download it.