Skip to content

Posts tagged ‘mac’

11
Apr

Introducing FastSocket

FastSocket is a fast, synchronous Objective-C wrapper around BSD sockets for iOS and OS X. Use it to send and receive files or raw bytes over a socket very quickly. This is the class to use if fast network communication is what you need. An asynchronous API might be better if you want to do something else while your network operations finish.

UPDATE: Now available as a CocoaPod

I wrote FastSocket a couple years ago, and put it up on GitHub, but don’t think I ever mentioned it. There are classes for both clients and servers. It’s available under the MIT license. Please feel free to let me know if you have any problems, questions or suggestions.

To create and connect a client socket:

FastSocket *client = [[FastSocket alloc] initWithHost:@"localhost" andPort:@"34567"];
[client connect];

Send a file:

long sent = [client sendFile:@"/tmp/filetosend.txt"];

Receive a file of a given length:

long received = [client receiveFile:@"/tmp/newlyreceivedfile.txt" length:1024];

Send raw bytes:

char data[] = {42};
long sent = [client sendBytes:data count:1];

Receive raw bytes:

char data[42];
long received = [client receiveBytes:data limit:42];

Close the connection:

[client close];

Please check out the unit tests for more examples of how to use these classes.

4
Aug

How To Type Curly Quotes In Mac OS X

Mac OS X has an easy way to type “curly” quotes and apostrophes instead of "straight" versions. I used both versions in that sentence to show the difference. Here is a bigger version to make the distinction more visible:

Many people think “curly” quotes look better than "straight" ones.

You can use the following keyboard shortcuts to type a single or double curly quote:

  1. Single quote open (‘) — option ]
  2. Single quote close (’) — shift option ]
  3. Double quote open (“) — option [
  4. Double quote close (”) — shift option [

However, I think it makes more sense to use [ and ] for open and close versions instead of the shift key. I found myself constant typing “mismatched‘ quotes. I also wanted to use the shift key for double quotes since that’s how the normal keyboard button works.

  1. Single quote open (‘) — option [
  2. Single quote close (’) — option ]
  3. Double quote open (“) — option shift [
  4. Double quote close (”) — option shift ]

Since OS X supports custom key bindings, I looked for a way to fix this. The trick is to create a file called DefaultKeyBinding.dict in the KeyBindings folder inside your Library folder. You can use this file to override the default key bindings for most applications.

Here are my changes. Please feel free to copy the settings below and save them to your own computer. You may need to create the KeyBindings folder if it isn’t already there.

/*
 Updates Apple's default keybindings for curly quotes.
 See http://www.danandcheryl.com/2010/08/how-to-type-curly-quotes-in-mac-os-x

 Save this file here:
 /Users/<name>/Library/KeyBindings/DefaultKeyBinding.dict
*/
{
    "~[" = ("insertText:", "‘");
    "~]" = ("insertText:", "’");
    "~{" = ("insertText:", "“");
    "~}" = ("insertText:", "”");
}
21
Dec

The New and Improved Mozy for Mac 1.6

Of course, it can’t really be both new and improved. Logically, it has to be one or the other. It’s just that I’m excited about the 1.6 release of Mozy’s Mac client. It was finished last week and the response has been very positive.

It seems that with #Mozy for #Mac 1.6 it’s finally reliable. Awesome! — @donut2d

Latest Mozy update (1.6) on Mac OS X is a major improvement – it actually works, and doesn’t suck out all of your RAM. — @mmetcalfe

Our last few releases, while making improvements in many areas, seemed to have lingering and subtle problems. With the 1.6 version, we hope to have finally put them behind us.

We turned on auto-update today. If Mozy hasn’t updated itself yet, please feel free to grab the latest version of MozyHome (or MozyPro) and let us know what you think.

Official List of Changes

You can see the official list at the pages linked above. Mozy only makes the list of changes available for the current release, so I’ve copied them here for the future. You can see the changes in Mozy for Mac 1.4 and Mozy for Mac 1.5 too.

Enhancements

  • Removed dependency on Spotlight since Spotlight queries are unreliable under certain circumstances
  • Changes to backup selections are now saved automatically
  • Reduced memory usage
  • Decrease size of SupportFiles.zip file
  • Improved the performance of the Configuration window
  • Improved support for Snow Leopard and fixed issues caused by Snow Leopard’s 64-bit architecture
  • Improved interaction between Mozy’s preferences and Snow Leopard; Mozy’s preferences no longer require System Preferences to be re-started
  • Improved the use of temporary files
  • Improved reports in Admin Console for Pro users
  • Improved support of our external drive feature by addressing edge cases that can cause stability issues
  • Improved feedback when setting a preference to an invalid value
  • Improved error handling when an auto-update fails to download successfully
  • Added support for nine non-English languages
  • Added the ability to delete a Backup Set using the keyboard
  • Added the ability to undo and redo configuration changes
  • Added the ability to sort Backup Sets by file count or total size
  • Added history information to main Configuration window
  • Added “Install updates automatically” checkbox to dialog which prompts user to upgrade
  • Added ability to manually check for an update
  • Added ability to back up network drives using the NFS protocol for Pro users

Bug Fixes

  • Fixed issues which caused the “Show status in menu bar” preference to not work properly
  • Fixed the link in the Readme file for downloading the software
  • Fixed a computer name display issue in the Setup Assistant
  • Fixed an issue causing the Configuration window to crash when browsing a folder with lots of files
  • Fixed an issue which caused the file exclusion warning to not show up properly
  • Fixed an issue which caused network connection errors
  • Fixed an issue which caused several duplicate warning dialogs to appear
  • Fixed an issue which prevented the use of certain non-Roman characters in a password
  • Fixed an issue which caused a file to be accidentally excluded
  • Fixed an issue which caused the Backup Set Editor to display the wrong file size
  • Fixed an issue which caused files to be re-uploaded unnecessarily
  • Fixed an issue which caused files in Trash to be backed up

Languages

One of the two major changes in this release is support for nine languages in addition to American English:

  1. German
  2. Greek
  3. British English
  4. Castillian Spanish
  5. French
  6. Italian
  7. Dutch
  8. Portuguese
  9. Slovenian

If you have chosen one of those languages in System Preferences, Mozy will use it automatically. No assembly required. If you find spots where the translation doesn’t make sense, please let us know.

File Scanning

The other major change — the one I’m most excited about — is the new file scanning engine. This is how Mozy finds all your files and decides which ones to back up.

In the past, we’ve depended on Spotlight, Apple’s file scanning feature in OS X, for about half of our scanning. Backup Sets that searched for files of a certain type used Spotlight. Backup Sets that matched a folder (and selections made in the Files & Folders tab) scanned the hard drive directly. We kept finding that Spotlight returned inconsistent results in some cases. So we decided to stop using it.

While we were making the change, we simplified how things work and made everything but the initial scan much, much faster. Mozy now uses far less memory, even when backing up millions of files. There are still some improvements we want to make, but the new file scanning engine makes Mozy feel rock solid.

Conclusion

If you’ve gotten this far, thanks for reading. Please feel free to drop me a note (dan at mozy dot com) with any comments or suggestions. Oh, and Mozy for Mac 1.6 has two new easter eggs. :-)

If you’re new to Mozy, you can try our 2GB-for-free, no-strings-attached version here.

30
Sep

Changes in Mozy for Mac 1.5

After a two week beta period, the 1.5 release of Mozy for Mac was released today. We’ve made a lot of improvements over the last few releases. If you’re new to Mozy, you should try our 2GB-for-free, no-strings-attached version here.

The official announcement is on our blog. Here’s more details about what changed in this release:

Enhancements

  • Consumer and business versions of the software can now run simultaneously on the same machine.
  • Added a file scanning progress indicator in the Configuration window.
  • Added a warning that appears when a backup is started before the product is fully configured.
  • Added a warning to prevent changes being lost when the Configuration is closed without saving.
  • Simplified the list of options in the menu bar.

Bug Fixes

  • Improved memory usage during backup and restore.
  • Improved the way network encryption keys are retrieved.
  • Improved the ability to restore default backup sets in the Configuration window.
  • Improved the efficiency of the log file collector.
  • Improved the handling of temporary files.
  • Improved the handling of database corruption.
  • Eliminated unnecessary API calls to improve performance.
  • Fixed an issue that prevented some Mac 10.4 (Tiger) users from backing up properly.
  • Fixed many instances of potential configuration corruption.
  • Fixed an issue importing a personal key into the decryption utility.
  • Fixed a potential root exploit security issue.
  • Fixed an issue that prevented some files with aliases in their paths from being backed up.
  • Fixed an issue where Status would get stuck if the backup process was not running.
  • Fixed an issue that caused Restore to crash for some users.
  • Fixed a rare issue when restoring files with resource forks.
  • Fixed an issue where the uninstaller missed some files.
  • Fixed an issue with handling email addresses containing a “+” sign.
  • Fixed a display defect in the Files and Folders tab.
  • Fixed a display defect with the “Temporary Files Location” in the Preferences window.
  • Fixed the display of exclusion notifications.
  • Fixed a display defect which appeared after saving changes in the Configuration window.
  • Fixed a rare issue which forced user credentials to be reentered.
3
Aug

Changes in Mozy for Mac 1.4

The Home and Pro versions of Mozy for Mac 1.4 are out. We’ve been working on this since January, and it feels great to finally get it out the door.

The major change in this release is the new file scanner. We’ve greatly improved how Mozy looks for and keeps track of files that need to be backed up. The release has been enabled this afternoon for new customers and existing customers which manually upgrade using the links above. Auto-update will be turned on for all existing Home and Pro customers shortly.

Since we don’t have an official place for showing our Home users a list of what’s changed, I’m including the full list here.

Enhancements

  • Improved overall performance and stability for file selections and backups
  • Added menu option to automate the collection of log files
  • Moved Preferences to global System Preferences
  • Improved sorting of the Files and Folders Configuration window
  • Improved the behavior of saving and canceling in the Configuration window
  • Added a new icon to indicate partially backed-up folders in the Configuration window
  • Added menu item to start a backup from the Configuration window
  • Added the ability to create backup sets to exclude files
  • Added the ability to sort by column in the Backup Sets window
  • Updated online guides
  • Added menu item to send product feedback or suggestions
  • Improved appearance of menu bar icons and other graphics
  • Improved speed of file preparation
  • Added the ability to use the escape (ESC) key to close the Configuration window

Bug Fixes

  • Fixed rare case of file changes not included in backup
  • Fixed several “database is locked” and “database disk image is malformed” errors
  • Fixed memory leaks
  • Increased the accuracy of the bandwidth throttle
  • Fixed creation date issue for restored files
  • Fixed problem with excluded folders being backed up
  • Fixed an issue limiting the amount of custom backup sets
  • Fixed an issue when the user restarts the computer before completing installation
  • Removed redundant column in the Backup Sets window
  • Fixed an issue restoring a file with a resource fork
  • Fixed an issue restoring a file with identical copies being backed up
  • Fixed the occasional “ClientError15” error caused by stopping a backup in progress
  • Fixed “no files selected for backup” message from mistakenly being displayed in the Configuration window
  • Fixed some Snow Leopard compatibility issues

UPDATE: We’ve got an official announcement on Mozy’s blog. I updated the links to point to the 1.4.3 release, which has fixes for OS X 10.4 and Time Capsule.

20
Jun

Review: AppleTV

I’ve been using an TV (also known as AppleTV for those who lack Shift-Option-K goodness) for about a year now. It’s a great little device with a couple of really annoying flaws.

The Good

I like that It’s small, about an inch tall and eight inches on each side. It has an HDMI video output, and both optical and analog sound outputs. It can play almost anything in my iTunes library.

The best thing is probably the screensaver where pictures from your iPhoto library float up the screen. We hardly ever look through our “digital albums” on the computer, and it’s nice to have an easy way to see all those pictures.

The Bad

In order to play properly on the TV, movies have to be below a certain quality. iTunes will play high-quality movies that the TV ignores. The TV handles most mainstream movie formats, including H.264. But it is not upgradable unless you’re willing to tinker a bit. I’d like to see support for Netflix, Hulu and others built-in.

The parental controls option prevents purchases, but does not hide anything nor prevent previews. I assume the only reason to include that feature is for kids, so why not just hide filtered content completely? If I want to watch something else, I’d be happy to put in my passcode to see the filtered content. Since the filtered content is not hidden, the whole feature seems nearly useless for me.

The Ugly

The TV never sleeps. Which means it always seems hot enough to roast an egg. I would really like an option to “sleep after so many minutes.” Or at least have it turn off the hard drive. It’s hard on the drive and wastes energy. Unlike the TV, I do sleep at night.

The worst thing is how slow the navigation feels on occasion. Even with the most recent software update, there is way too much stuttering and jumping. I suspect this occurs because I am streaming content from my iTunes library on another computer.

I could avoid streaming if the hard drive in the device was bigger. Or if it was semi-easy to put in a new one. Or if it supported external drives connected via the USB port. It doesn’t happen all the time, but waiting even 3 seconds for it to respond is really annoying.

Conclusion

Overall, I like my TV. It’s really easy to setup, and gives me a simple way to watch or listen to media stored on my computer. A Mac mini would work too, but is more expensive. It also lacks an HDMI output. And I worry that my kids would be confused if it ever dropped out of Front Row, the TV-like software that comes with Macs.

On the other hand, a mini is a computer which makes it easy to customize. It would allow me to watch streamed movies and rented DVDs (the TV lacks a DVD player). I wonder why Apple doesn’t allow the TV to play DVDs that are in another computer sort of like they do with the Macbook Air.

If I had my purchase to do over again, I’d certainly get an TV or a mini. Just not sure which one. What I’d like is a mini with an HDMI port.

25
May

Mac vs PC

My aunt is in the market for a new computer and asked me for a recommendation. She said she was really tempted by the new Macs and wanted to know why I liked them. Since I wrote out my reasons for her, I thought I’d share them here too.

Stability

The thing I like most is that I no longer think about the operating system. Crashes, viruses, security software, instability caused by service packs — all have pretty much gone away. I just don’t worry about that stuff anymore.

I used to look forward to reinstalling Windows on my computer about every six months. I loved the feeling of having a fast computer again. Now I can’t imagine what I was thinking. With Mac OS X, I hardly even think about the OS anymore.

Included Software

The second thing is that Macs come with lots of included software. There is software for managing pictures, editing home movies, making DVDs, recording and mixing songs, publishing web pages, chatting, email, playing music, calendaring, local backup and more.

Some of that comes with Windows, though I don’t find it as easy to use. All of it is available with Linux, but getting it all set up is not for the faint of heart. With a Mac, it’s all there ready for immediate use.

Plug and Play

Another thing I like is that, if you limit yourself to their supported hardware, everything works without any setup or drivers required. When I plug in my camera, iPhoto launches and takes me to the import screen. When I plug in a new printer, it just shows up and can be used immediately. That sort of thing.

The list of supported hardware is pretty long. I just check the list of cameras, video cameras and printers before buying stuff. Given how nice things are when using the supported hardware, that’s one concession I’m okay with.

Windows

One of the best thing for Mac newcomers is that if you decide you don’t like OS X, you can just install Windows, which runs perfectly. I reboot into Windows to play computer games a few times a month but am happy to go back to OS X when I’m done.

Momentum

Over the last two years my company has become predominantly Mac. Most people still use Windows too, either virtually or by rebooting when necessary. Even a couple of our Windows programmers use Macs.

Of course, Apple has their own reasons you should buy a Mac. And I highly recommend watching Apple’s ads, which are hilarious. My favorites are Elimination, Bean Counter and Out of the Box.

I’ve been using Macs for five and a half years now and have never found myself looking back.

2
May

Boot Camp and Snow Leopard at the Same Time

I use Boot Camp to play computer games for Windows on my Mac. Recently, I decided to try out the new version of OS X, called Snow Leopard. It hasn’t been released yet, as it’s still under development, so I wanted to keep my existing installation. I had hoped to find a way to get all three systems (OS X 10.5, OS X 10.6, and Windows) installed at the same time. However, Boot Camp requires there be two and only two partitions on the disk. Initially, it looked like I had to choose between Boot Camp and Snow Leopard.

Then I ran across an application called Winclone that will backup and restore Boot Camp partitions. Since OS X supports resizing disk partitions without losing data (non-destructive partitioning), I came up with a solution that allows me to switch between Boot Camp and Snow Leopard fairly easily.

I use the following procedures to switch from Boot Camp to Snow Leopard and back again without losing data on my Boot Camp partition or my normal installation. If needed, I suspect Disk Utility could be used to backup and restore a Snow Leopard partition. For now, I’ll leave that as a homework assignment. I don’t mind a fresh install of Snow Leopard each time.

To Switch from Boot Camp to Snow Leopard

  1. Open Winclone
  2. Choose the Boot Camp partition as source
  3. Click the Image button
  4. Close Winclone
  5. Open Disk Utility
  6. Delete the existing Boot Camp partition
  7. Add an 8GB partition for the Snow Leopard installer (skip this step if you burn a DVD instead)
  8. Add a partition for Snow Leopard and name it something you’ll remember
  9. Use Disk Utility to restore the Snow Leopard installer disk image to the 8GB partition
  10. Reboot and hold down the Option key during the boot process
  11. Select the “Mac OS X Install DVD” partition
  12. Go through the Snow Leopard install process
  13. Install on the larger partition created earlier (be careful NOT to erase your current installation)
  14. Rebooting at the end of the installation will take you into Snow Leopard
  15. If desired, change your default partition in System Preferences under Startup Disk

To Switch from Snow Leopard to Boot Camp

  1. Open Disk Utility
  2. Delete the Snow Leopard partitions
  3. Change the remaining partition (your normal system) so that it fills the whole disk
  4. Close Disk Utility
  5. Open the Boot Camp Assistant
  6. Choose how big you want to make your Boot Camp partition (pick the same size each time)
  7. Click the Partition button
  8. Choose the option to Quit and Install Later
  9. Open Winclone
  10. Select the Restore tab
  11. Drag or select your Boot Camp backup
  12. The destination partition should be called BOOTCAMP (be careful NOT to erase your current installation)
  13. Click the Calculate button to verify that your backup size matches your partition size
  14. Click the Restore button
  15. Close Winclone
  16. If desired, reboot into Windows normally

I’ve gone back and forth now several times without any problems. It takes about 10 minutes to backup or restore a Boot Camp partition, but I don’t mind as I only switch a few times each month.

I do, however, highly recommend backing up your computer before trying this as it is easy to erase the wrong partition. Mozy (use code DANCHERYL for 15% off), Time Machine or SuperDuper! will all work. Because I’m paranoid, I use all three. :)

5
May

MozyHome for Mac is Out of Beta

It’s been a long road, but the Mac version of Mozy is finally out of beta. We released our official 1.0 version late last week, and I am a happy developer. It was almost exactly a year ago that Mozy released it’s first Mac software, which is way too long to be in a beta program. We won’t let that happen again.

We are going to release a business version, MozyPro for Mac, later this summer. And we have a lot of performance improvements and interface changes we want to make. There is a lot of work ahead of us, which is great.

So while I was taking some deep breaths, I got a chance to read up on some of what people are saying about Mozy. iDrive, one of our competitors, just released a beta version of their Mac software, so I thought I’d take a look.

They seem to have done some pretty cool things with their software, but it’s clear that they don’t understand the word unlimited. iDrive includes this disclaimer in small text on the bottom of their homepage:

The concept of ‘Unlimited Storage’ is subject to fair usage of the service. This is to facilitate a low one-price plan to backup a PC’s critical data that meets requirement for high majority of consumers; there may be some limits based on what constitutes fair usage. The current limits include 150GB of total storage and 100GB of bandwidth utilization per day. Do refer to Conditions of Use. Pricing structure for business use varies from personal use.

So you get “unlimited” storage for whatever they decide is “fair.” Not really unlimited. I really like that Mozy’s unlimited service has no restrictions on space.

MozyHome does have a bandwidth cap to limit how fast files are uploaded, but in practice very few people have upload speeds that reach this limit. We are always open to customer feedback, however, and reevaluate this decision from time to time. MozyPro does not have this limitation.

In addition to the whole unlimited thing, iDrive’s comparison with Mozy is incorrect in several places.

Still, they have some good ideas in the design of their software. And it’s good for Mozy to have competition. Keeps us all working hard at listening to our customers.

5
Mar

MacNN Review of Mozy

My job involves working on the Mac version of Mozy. It’s good to see very positive reviews of our work. I know there’s room for improvement too, but it’s great to see happy users.