Friday, October 24, 2008
iPhoto Performance
So, let's begin. In our household, the main photo library lives on Mac Mini that we have in our living room. It has beautiful matching external HDD from Lacie (when I bought it, 250G seemed so large number. No, after almost two years, we are constanty searching for something to be deleted in order to have some space left) where we store photos, music and movies. iTunes is still rocking - it handles more or less finely about 80G of music, and I just see how it evolves with every version. Unfortunately enough, iPhoto is not automatically updated in the same way as iTunes, so I am forced to cope with iPhoto 06 version (unless I am ready to buy iLife '08 - and I think I could use that money wiser).
Note: iPhoto'06 is installed by default on all Tiger machines. Leopard comes with iPhoto'08 by default. So, this post is for Tiger users. Leopard users have more advanced iPhoto not only in terms of features, but also of internal structure, so the following recipe will not work for it anyway.
In 4 years we got about 20 thousands photos. Finally, iPhoto started to use all resources of machine when used. Computer started to swap frequently and become barely responsive for some times during the day. It clearly needed some action.
First very quick googling on subject suggested splitting a library into several parts and showed some software titles for helping with this. I downloaded some and started playing. Freeware or not, software was not able to pick up photos for moving to new libraries by any useful criteria except album-by-album. This one is great, but I wanted to split libraries by year. That was not possible. Selecting albums that belong to one year or another would be a tough task, and besides that, not every picture from the library ends up in some album.
So, I went a hard way of not using third-party library splitters. In the end, this way was not very much harder in terms of work to be done. If you have the same problems that I had, then read further, but before specify the criteria, by which you will split your library. Sticking to these criteria is the only thing that you really need. I selected year of making a photo to be the only criterium.
Before you split your library, I would recommend to back it up somewhere. DVDs will not suffice, so youd better copy iPhoto lirary to some external USB drive of reasonable capacity.
The process of splitting the iPhoto'06 library in two parts consists of the following steps:
1. Find out where is your iPhoto library located. This should be a folder for the library that holds all the information (photos, their midifications, tags, thumbnails, albums etc) inside. You will need to memorize where this folder is located (you will need it in futher steps. You also need to find a place for a new library (since you are splitting the old library, it means that you will just move some of information to a new library) - memorize or right it down for use on next steps. Locating iPhoto folder is easy - right-click on whatever photo in your library, and choose "Show File" from the menu. Finder window will open with the file selected. Now if you right-click the title bar of the finder window, you will see the full path of the image file, which will of course also include the iPhoto library folder itself. On this step, you might also want to do the backup of the old library as I suggested above.
2. Create new, empty library. You don't need any third party software for that - just hold the Alt key while starting iPhoto. This will not start loading the whoe library, but gives a simple dialog, that has allows either choose a different library, or create a new one. Choose "Create Library...". You will be asked where to put it. After you provide a name and path for new library, you will have a new folder where all library files will be stored. If you divide your library by year, just give a name like iPhoto2006. New empty library will be loaded and presented to you. That's ok. Now, close iPhoto.
3. Run iPhoto with holding Alt key again - this time press "Choose Library... " button and navigate to the folder you memorized during the step 1. You can see your old library - now take a look at the very top of the list of albums, where we have photos already sorted by year by iPhoto. In brackets after the year number, you can see how many photos you have from these years. If you are like me, you might have 2-5 thousands of photos per year. That's the amount of photos that iPhoto easily handles, and that's why it would be a great idea to have just one year per library. If you are a photomaniac, and have more than 10 thousands of photos in one year, I would still recommend to create a separate library for each year, and then divide them even further until the sizes of libraries will be ok for iPhoto to handle. Write down how many photos are for each year, and decide if you will put some years together. Close iPhoto.
4. Now you are ready to split the library in two parts. If you created a new library for photos of year 2006 during the step 2, you need to copy these copies to a new iPhoto library folder. For that, copy all files except Data, Modified and Originals folder to a new library's root folder. For these excluded folders, create their empty counterparts in new library's root folder, and then copy only 2006 subfolders from old library to a new one. Be sure you are not moving the files - if both old and new libraries locate on the same hard drive, then OSX will by default move files if you drag and drop them. Since you created a new library with iPhoto, there were already some files in new library's folder - it's ok to overwrite them.
5. Now you have all the photos for the year 2006 copied to a new place, as well as information about ALL photos of your old library. So now, we need to fix this mismatching. Run iPhoto with holding Alt key and choose the new library. It will open as if it would have all the photos from the old library, but instead of thumbnails, you will see empty boxes for each photo which is not made in 2006. And that's ok, because we copied all iPhoto files from the old library. Now return to the sidebar where you have information about distribution by years. If you click any folder except 2006, all you get is set of empty boxes. Mark all empty boxes with Cmd-A and press Delete. This will remove _references_ to photos that should lay at Data, Modified and Originals folders. After we remove these references, albums listed below will be updated with real number of photos. If you see that album is empty (zero in brackets after the name of the album), you can safely delete it, too. After you did this, you are done with making a new library
6. Now after new library is ready, you might clean up your old database from photos that were moved to a new library. Remove 2006 folder from Data, Originals and Modified folder for old iPhoto library and then clean library from the references in the same way as I described in 5.
7. Repeat steps 2, 4, 5 and 6 for all other years you want to fork to new libraries. You can even skip step 2 if you create a folder for new library manually. You can just create a library root folder in desired location, and proceed with copying files. When copying files, be sure that you take them from the library that knows everything about photos that will be moved to a new library.
That's it. I hope this instruction helped someone
No news is good news
Really, I have been out of reach for some months - but that's actually very good to explain my MacBook experience. It is became a really handy working computer, which allows me to do everything that I need in my daily work. I just use it so extensively that I don't have any time left to share this with outer world.
I think I have no anything new to add about my experience with hardware - it is still fast enough after so long time, it is still in good condition (I have just my keyboard a bit dirty and touchpad and some keys on keyboard too much polished with my fingers), it is still quiet (my PC-laptop started to be very noisy after month or so of usage). Windows is still working happily inside the virtual machine. Everything is just fine.
So, probably they won't be too much of hardware posts in the future. Come back to read my adventures in Mac's software world. :)
Wednesday, July 23, 2008
PHP development
I was so eager to test how PHP development looks like that I even started re-design of the framework, throwing out the only part that wasn't programmed by me (and it was an MVC framework knows as Fusebox). Before, I had my development on hosting server. Now, I have ultra-fast development environment with all the components running on my own machine. I even started to think about such things as performance (oddly enough, my own MacBook executes my scripts much faster than my hosting server does).
XCode is great tool, especially for its price tag, which is, as you know, zero. IT may be lacking some features of Eclipse and Visual Studio, but I would not use those features anyway, they are too difficult for me. There are no intellisense, breakpoint debugging and refactoring for PHP, but ultra-responsive IDE with code folding and syntax coloring covers all my needs. The one thing that bugs me a bit is that I did not find a way to have Tabbed interface for open documents, the way like Eclipse and Visual Studio are doing, but I used to this. I am now much more creative than on Windows before.
Appearance and built quality
Well, using the machine for 8+ hours a day, I can now tell you guys how machine withstands my usage. In brief: pretty fine, but I can notice it's not brand new anymore. Touchpad became shiny in the center, buttons of the keyboard are a bit grey instead of white, and some plastic next to keyboard degraded and a small chink emerged. Other than that, chassis is still solid, details are attached to each other as on the day 1, there are no arbitrary detaching accumulator as on my estonian-made PC laptop. There are no even ugly scratches on the chassis, despite the fact I don't have a fancy bag for it and put it straight to my backpack.
What is great, is that battery life is still normal. Even with Wifi turned on, MacBook achieves 4+ hours of working time. I never take my AC adapter with me when I go home. I just don't spend enough time behind the computer screen at home so its battery life never ends as a surprise.
Monday, March 17, 2008
Tiger to Leopard
I like new sidebars in Finder and Mail. I love the new Preview with Cover Flow. I kinda like how the new Dock looks like. Transparent menu bar is reminding me Vista's Aero, but it is still less annoying. I don't use a Time Machine, because with standard hard drive it is meaningless (and I suppose that synchronizing VmWare's virtual machines is not what I really want). But some new features are really, really slick.
As much as I was addicted to Exposé and Dashboard in Tiger, I was instantly hooked by Spaces and Stacks. These two concepts are not at all new, they were done many times before Leopard, but in Leopard, they are as polished as only Mac app can be. No bloat, maximum comfort, aesthetic pleasure. Now if they only could implement something Quicksilver-like ;)
And out-of-the-box support for Ruby and RoR in Xcode is really surprising. It makes the fact that RoR developers are mostly Mac users pretty unsurprising :)
QuickTime? Thanks, I have already got VLC!
If you are a power user who likes to do boring things in style, and if you are happy with those features that cover needs of 95% of all users - then you can live with all titles from Apple. But if you are a fresh switcher, or if you belong to 5% of people who always needs more than they got - then you definitely need replacement to some Apple software.
I am something in between those who belong to 95% and those 5%. I can live with most things I have, but I open to alternatives if they can offer better value. In case of software that comes pre-installed with a new computer, you should be quite motivated to look for something else that can beat something provided for free. This is why Microsoft gets accused in abusing the monopoly. But exactly as in case of Microsoft, there are some free alternatives which in most regards are better than programs provided together with operating system.
While it is questionable whether Firefox is really better than Safari, Apple's own browser, it is a safe bet to assume than anyone who ran Firefox on other platform, will do it on Apple, too. Anyone who is in love with Firefox's plug in system, will miss all the functionality that comes with extensions. But for most tasks, Safari is just as great. So, if sites you are usually viewing, are not hostile to "small browsers", then you are fine with Apple's own offering.
iTunes, iDVD, GarageBand, iCal, Mail - all these are fine things you will hardly need to replace. But QuickTime, in my humble opinion, is not that friendly as Mac program could be. You can add codecs to enable playback of different files, but this is ot what average user will do. I was wondering if Apple really forces people to switch to QuickTime Pro, for-money version of its media player, until I found a beautiful program called VLC. This is freaking awesome media player. It plays everything right out of the box. It is surprisingly lightweight for an application that is ported to several platforms. It even plays DVD of any region, if you just specify where VIDEO_TS folder is. Just great.
MacBook Battery
At first, battery life is well over 4 hours in normal mode. You can see how many time you still have - straight from system menu bar. If you plug AC adapter, the numbers show you how long laptop will be charging the battery.
Hardware wise, battery compartment is absolutely flat at the bottom of the laptop. There are simply no things that can get broken. In my Ordi laptop's chassis, the latch that holds accumulator was broken in less than one months, and because of that computer is not really portable any more.
I always thought that energy saving tricks (like switching off monitor after some period and auto-hibernating) are annoying, but now I changed my point of view. If monitor instantly goes to working mode, and if system instantly goes awake, it does not any more matter how and when it goes to sleeping mode.
And watching movies and working with wireless somehow do not drain battery as much as they do on most PC laptops - I guess it's because of system being so much optimized for the hardware on which it is supposed to run.
Speech service
So, when you use an application that shows list of files, you can use Services from Finder for a selected file. You can send selected file or selected text to mail recipient using Services provided by Mail application. If you installed Skype, you can send file or selected text from any application to someone form your contact list. It's like Automator tasks that get available from any scriptable Mac OS application, but you should not really script anything - it's just one action and you can do it right away using Services menu.
But let's return to the topic of the post - the Speech Service. As you can imagine, it allows you to sit back in your chair and listen to computer-generated voice that reads aloud the text you have selected in any other application (well, not every single ones - I guess that only "native" apps are supported, for example Firefox, built with its specific framework, is not capable to trigger this service). I tried it on Safari, listening to synopsis of 22-nd episode of Lost 3 :)
It is by far the best generic audio-generation I ever heard. Not without glitches, but definitely much more human than what I have heard some years ago. It knows about punctuation and intonation, which is just amazing. Unfortunately, text is always spoken using English pronounciation rules so forget about listening your favourite Russian blog, news from Le Monde, or gossips from your Portugues-writing frinds on Orkut...
But it stil something that shows power of Mac OS and the beauty of siplicity, with which complex things are integrated into the system!
Virtualization
In practice, Parallels 3 out of the box did not like itself being installed on Leopard. The very first run threw me an error message saying that application has unexpectedly quit. After restart it worked, and I excitedly tried to run XP off BootCamp partition inside the virtual machine. It worked beautifully and I thought all problems are gone. But the next time I started Parallels Desktop, the same error message appeared.
And it kept coming and coming all the time. No update for version 3 is available from Parallels website... In forums, noone seems to have the same problem... I found a pattern of having virtual machine in runnable state the very first double-click on virtual machine's shortcut that appeared on the desktop after creation, but mostly started to boot straight into windows partition. Then the next problem came.
The problem is called Windows activation. When you boot once from Windows partition when starting your Mac, and next time running it in Parallels, Windows gets sick and complains that hardware was changed significantly since last run and therefore Windows should be activated once again. The same thing when you boot next time from Windows partition. Pretty annoying.
And then I decided to give VmWare a chance and downloaded it with serial number for 30 days trial period. The very first run of XP off BootCamp failed miserably - system hanged and I can't remember how I managed to finall kill VmWare processes. I was really upset having two non-working virtualization software titles. But I gave VmWare another chance and installed XP inside the virtual machine. It totally changed the game field.
Not only it installed quickly and without problems, it also automatially installed VmWare tools (software that is installed in guest operating system that enables painless release of control to host system when mouse is rolled out of guest OS window) - Parallels still tried to install its counterpart to VmWare Tools with every run of virtual machine.
I did not notice any significant difference in performace of virtual machines in Parallels Desktop or VmWare Fusion, and Parallels' own Coherence and Fusion's Unity work pretty much the same way - but Full Screen mode in Fusion is way better - it automatically adjusts to screen resolution of host system. To be honest, I liked Unity more as well - it shows the right icon for the application in Dock. In single window mode, I found Fusion's controls to enable/disable virtual devices to be ore convenient, too.
Now I can impress my co-workers with Full Screen Windows running in one of Spaces in my Leopard, and change to Mac OS X spaces with just single Control+Arrow keystroke. Slick transition makes people wow. In such moments you are really happy you have a Mac :)
Leopard Mail
One of nice things in Leopard is updated Mail program. My first thing when exploring it, of course, was setting up my GMail account. And it did not succeed automatically - I went to Gmail help and read their howto. Well, at least it was easy to do.
The next small trouble was organizing folders - but mostly because Apple reworked the structure of a sidebar in order to make it more Leopard-like. But after I figured out how to create rules that work, applying them worked like a charm, and I found my mail sorted into the folders I wanted. Nit-picking in me wants to warn,however, that there's no way to create a folder when you create a rule, it should already exist...
But "all the small things" is where the Mac shines, we all know that. And the little things begin from integration with AddressBook, one-click saving of attached files to Downloads (and it is very convenient to have them all in that brand-new pre-build Stacks in Dock!), ability to send a folder of photos with Dragging that folder onto Mail icon in Dock...
Should I say a word about built-in RSS reader, Notes and ToDo list? Well, maybe next time...
Friday, February 22, 2008
48 hours of MacBook'ing
It's about two days after I joined the army of MacBook-enabled people of this little Blue Planet. Since it's a workstation, and I am working in IT department of a company with diverse environments - it's not surprise that it got BootCamp'ed the same moment it was received. Maybe I chose a little bit small partition for my Windows things - just 20 GB. But I hope it will keep my Windows sessions under control, and 20 GB will be enough for all my Windows programs...
And by the way, this is a first post ever for me created in some sort of Blog-publishing software. This one is called Qumana, it is freeware and it looks laconical and polished, just as I could expect from a Mac app. Let's hope it also works in the way I expect. At least I checked source code created for this very post, and it contains nothing I wouldn't like to see there :)