Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

Tuesday, September 22, 2009

Quicktime X A/V Controls

I've been (very slowly) working my way through Stanford's CS193P iPhone development course available on iTunes U.

iTunes is a pretty good client for watching the lectures. It keeps track of where you were and if you're like me and your lecture viewing is frequently interrupted (i.e., kids), that can be a pretty useful feature.

But one of the things that it won't do is allow you to speed up the playback (at least I don't think it will). So when the instructors are talking about due dates, late assignments, and other housekeeping that doesn't really apply to you, it can be frustrating to watch through it in realtime. So if you can live without iTunes' ability to track progress, simply go find the movie on your hard drive (right click and select "Show in Finder") and open it up in QuickTime Player.

In Leopard open the "A/V Controls" window in QuickTime 7 and set the playback speed (up to 3x). After installing Snow Leopard I was sad to see that the A/V Controls window was missing from QuickTime X so I assumed you had to use the optional QuickTime 7 installation. But tonight I tried option clicking the fast forward button in the QuickTime X Player and discovered that instead of increasing the playback speed to 2x, 4x, or 8x when you repeatedly click the button, it incrementally increases the playback speed by 0.1x up to a maximum of 8x!

So there you go. Save some time and learn some iPhone development too.

Sunday, March 09, 2008

The iPhone SDK

I don't own an iPhone and since I'm in Canada I can't even buy an iPhone from Apple even if I wanted to, but that hasn't tempered my enthusiasm for the new iPhone SDK.  Like so many thousands of others I downloaded the SDK as soon it was available, installed it, and then started coding away.  I'm sure more experienced Cocoa developers were able to quickly bang out something cool, but not me.  It took me a bit longer to get the mandatory "Hello World" running, but nonetheless, my previous Objective-C/Cocoa investigations definitely came in handy.  I think one of my mistakes was thinking that the videos Apple put up would help me.  IMHO, don't bother.  Go right for the developer documentation in XCode instead.

Alas, I can't really say that much about the SDK.  I clicked through one of those license agreements and I'm sure that there's something in there that forbids me from revealing anything too juicy.  But I think it suffices to say that I'm still enthusiastic about where this is going.  I think the iPhone (even though I don't have one yet) is a great bit of technology and once in the hands of people in the enterprise who suffer at the other craptaculous mobile devices out there, they'll definitely start demanding stuff.  And that's where I fit in.  I'm excited to see how this all evolves and hope I'm ahead of the curve at least momentarily. ;-)

Sunday, October 28, 2007

Leopard Installed

It's my second day running with Leopard and just about everything has gone smoothly.  I installed it without too much trouble on my MacBook and my PowerMac G5.  I say not too much trouble because not everything was perfect.  

Twice since installing Leopard on my G5 it's not gone to sleep on demand.  Instead it goes into a coma and starts snoring.  By that I mean all the USB devices shut off, the video signal goes away but the computer doesn't quite sleep.  Instead, all the fans start to spin up. For anyone that's never heard a G5's fans go nuts... it's like a small jet engine.  The only recourse is a hard restart.  I installed the first Leopard update and it hasn't repeated this stunt but I'm keeping an eye on it just in case.

The second thing is that MySQL won't start.  I've read a few things on the Internet and it just doesn't look the MySQL project is ready for Leopard. They had bug reports before 10.5 shipped but decided to just wait until it went gold. I guess I'll just have to patiently wait for an update.  No biggie.  I'll just use the built-in SQLite instead.

The third thing that I wasn't prepared for was the retirement of Classic OS 9 support.  I don't personally use any OS 9 apps  but my kids used to play the occasional game.  Sorry Rolly McFly.  Your days are over.

The last thing that isn't too big of a problem but a big disappointment is that the Java 6 SDK is MIA.  I guess I never really saw official mention of it, but I really expected Java 6 to ship with Leopard.  C'mon Apple!  I was there when Steve Jobs and Avie Tevanian stood up at JavaOne and said they'd have the best Java implementation on any platform.  You're definitely letting me down on this one.

Now onto the good news.  Everything else just works!  Mail is cool.  Safari is blazingly fast.  Dropped network connections don't mean a frozen finder anymore. Quick Look is sweet.  And Ruby is built-in.  I just deleted my old custom Ruby installation and everything (other than MySQL) continues to work.  My IDEs function properly (Eclipse & NetBeans) and despite the lack of Java 6, Java 5 on my Mac is still noticeably faster than Java 5 on Windows at work.  I don't mind the translucent menu bar and Cover Flow in the finder is nice but mostly unnecessary for me.  

The biggest shock to the system was the developer tools.  I've built the occasional Mac app, and while I'm no wizard at it, I got along just fine thanks.  So naturally I wanted to try the Ruby/Cocoa integration.  Then I opened Interface Builder.  Yikes!  That certainly  got a major overhaul!  Looks better, but now I see that I need to spend some time trying to figure out what's what.

So if someone asks whether they should upgrade or not.  I'd definitely give it the thumbs up.  Just make sure you don't need classic and if you're a geek like me, be prepared for a little bit of adjustment to the changes under that spiffy new exterior.

Tuesday, April 03, 2007

Objective-C 2.0

Being a bit of a Mac-head and programmer to boot I've taken various looks at writing native Mac OS X apps withe XCode (the IDE), Cocoa (the frameworks), and Objective-C (the language). In general I've come away relatively happy with the toolset. But I must admit, I've filed my own share of enhancement requests with Apple. The top of my list was refactoring support in the IDE. I know it probably sounds lame to the hard core coders but after developing with Java for so long I just expect it and perhaps more embarassingly I feel I need it. Global regex search and replace just doesn't cut it. Secondly, I dislike all the boiler-plate "noise" that appears in your code to declare properties (instance var & accessor/mutator methods) and all the manual memory management.

Well Apple's been looking around at the competition and listening to feedback and judging by their website (here and here) and a few message boards (like this one), Apple has a lot in store for developers. Objective-C 2.0 sports Garbage Collection for the first time, some syntactical sugar for iterating over collections, and a nice simple way of declaring properties. XCode provides refactoring (YAY!) and more enhancements to keep your eyeballs on the code while editing and debugging. And even Interface Builder got cleaned up a bit and exposes nice simple ways of using core animation in Leopard. I'm looking forward to seeing it all in action.

BTW: I read on the RubyCocoa mailing list a few months ago that it might be bundled with Leopard too. Writing Mac OS X apps with Ruby... very cool... Have to wait and see if that one happens.

Thursday, March 22, 2007

My MacBook

Over the past few weeks, the developers at work have been taking turns bringing in their laptops... It wasn't something we planned but just started happening spontaneously. One guy brought his Centrino laptop running Linux, another guy brought a 17" screen Dell that he uses for CAD, one guy brought his shiny new Vista laptop and a couple days ago it was my turn to take in my MacBook.

In general my little black MacBook received a fairly warm welcome. People were surprised at how thin it was and the usability of a relatively small 13.3" screen. They liked the built in webcam and although the single button touchpad attracted a bit of grief they quieted down when I showed them that a two finger tap brought up contextual menus. I gave them the flashy demo with Exposé, the magnifying dock and Dashboard and gave them the super abbreviated tour of the iLife and iWork applications.

But in the end the one thing that seemed to get the most attention was the MagSafe Power Adapter. From the magnetic connector to the little brick with "wings" for winding the cord and a removable AC adapter, people definitely liked the design. But having just checked the Apple Store comments on this little item I'm hoping that my little white brick lasts a little longer than everyone else's. Yikes!

But other than the black finish which picks up fingerprints like nothing else I've ever owned, I'm very happy with my laptop. And now my co-workers don't think I'm so crazy for owning a Mac.

Tuesday, December 19, 2006

Mac OS X & Windows in Parallel

The first most natural reaction for a Mac guy like me is "Ick! Windows on my Mac?!". And yeah, it is a bit disgusting. After all we all know that Mac OS X is obviously the superior operating system, right?

Well even if you don't necessarily agree with that assertion, you have to agree that if you're any kind of web developer you can't ignore Internet Explorer. Despite all its warts and laughable standards adherence, it is the browser that most people use. So if you care about giving those users the best experience when visiting your site you need to view it in IE.

My solution was to use Windows 2000 (with SP4 and IE6 installed) within Parallels and I've been pretty happy. W2K runs very well and being able to seamlessly run my webapps in IE while continuing to work in Mac OS X gives me exactly what I need. So here's the recipe:
  1. Install Parallels (get a demo from Parallels to try it out). You might also want to give the beta 3036 version a try (I did). It has some great features like the "coherence" view that lets you mix the W2K windows in with your Mac OS X windows.
  2. Create a Windows virtual machine and install Windows (take a deep breath its a little surreal)
  3. Once you have the VM open go to the Parallels Action menu and choose "Install Parallels Tools...". This improves performance, mouse support, the graphics capabilities and lets you drag files to the Windows desktop (and probably a bunch of other stuff too).
  4. Set Windows' screen resolution, colour depth, font antialiasing, and be sure to set "Show window contents while dragging". The last option is important if you use Parallels' coherence view.
  5. Start up your web server in Mac OS X, and be sure to open the necessary ports in your built-in Mac OS X firewall to let Windows see your server (e.g., Tomcat is 8080 by default and WEBrick is 3000 by default).
  6. Type in your Mac's IP address in IE and enjoy! (Well hopefully enjoy, IE has a tendency of frustrating a lot of developers).

Tuesday, August 08, 2006

Rails and Apple together in Leopard

David Heinemeier Hannson notes in his blog that Ruby on Rails will ship with the next major release of the Mac OS, Leopard (a.k.a., Mac OS 10.5). As a Mac user and Rails admirer I have to say that these two seem to go so well together... Not sure how to explain that... It's just that they both have a great aesthetic, and are two of the most elegant software products I've used in years.

Friday, April 21, 2006

MS Mac Lab

A friend of mine just sent me a link to a tour of Microsoft's Mac lab. Thanks Aaron... Thought I'd file it here under the category of "Holy Macs!".

Monday, December 12, 2005

Buying Mac Software

With the popularity of the iPod, the fortunes for the Mac have been looking brighter too and with that, more retailers are carrying Macs. In Calgary, BestBuy and London Drugs are recognizable chains that carry the Mac. So with that in mind, I went shopping for a game for my son for Christmas. Well it wasn't a terribly pleasant experience. While the shelves are loaded with software for Windows PCs, Mac software is far more difficult to come by. BestBuy was the worst. They had NOTHING. London Drugs faired a little better but only had a few titles like "Mac OS X Tiger". I went to these stores first because their locations are more convenient to my place of work.

But in the end I went to WestWorld Computers on Centre Street in Calgary and was greeted with a recently rennovated showroom. There was lots of hardware and software on display and some knowledgable salesmen walking around. I immediately found what I was looking for and made my purchase. My lesson? Forget the big box stores and go for the focussed reseller.

PS: iPods are very hot Christmas items. People were buying them at all three locations.

Thursday, December 01, 2005

Digital Cameras

iPhoto on the Mac was first released in January, 2002 and nearly four years later I've finally joined the party by buying the Canon PowerShot SD450 digital camera. I learned that size is a pretty big consideration when buying digital devices and generally the smaller the better. The less of a hindrance it is to take with you, the more likely you are to use it. That's certainly been my experience with my iPod shuffle. I sometimes wish I had the features and storage of the larger model but the size is perfect. The feature I like best about my new camera is its ability to rotate the image according to orientation of the camera when I'm playing back existing shots. Very cool!

Thursday, October 20, 2005

Right & Wrong

Back in August I commented on Microsoft's aggressive moves against Adobe. I also mentioned that Apple could also make a move with it's new Core Image technology built into OS X. But at the time I didn't think it was all that likely. Well I was right that they could but I was wrong because they did.

Apparently Apple wants a piece of that image processing market. They just introduced Aperture. And although they're going to some pains to say it's complementary to Photoshop, I think it's definitely a competitor.

Apple really is becoming quite a software powerhouse... Fortunately for most software companies, they can feel secure that the only software they produce that isn't Macintosh-only is iTunes and Quicktime. But then again once somebody (like me for example) gets a taste of Mac, all that Microsoft stuff just feels like rubbish. With all the Apple stores around the U.S. with their little built in theaters, the brand new Quad PowerMacs will show this stuff off very well.

Monday, August 08, 2005

Tiger Development

After installing Mac OS X Tiger, and restoring applications and user data, my next job was to install development tools.

Java

On the Java side: I'm a bit perplexed why Apple doesn't ship their Java 5 implementation with Tiger. As far back as I can remember they've always shipped the latest and greatest. But this time I had to download. No big deal, but it's hidden on their website. I expected to be able to go to connect.apple.com (their developer website) click on "Downloads>Java" and it would be there. But no, only the Java 5 docs are there. Instead I had to go to the general Mac OS X website and go to the downloads section in there and search for it.

Anyway, that was only a minor annoyance. I was able to download it and install it without any trouble. My next problem was that Java 5 wasn't made the default VM. So I had a little more googling to do before I discovered a couple symlink changes would make everything happy. In the end I have all my Java apps and IDEs (i.e., Eclipse) working with the new Java 5 VM and all is well a week later.

Cocoa

Next thing was a move to XCode 2.1. I downloaded it and installed it without any issues (there was a nice big link on the Apple's developer connect website). I was able to open all my Cocoa projects, recompile and run without issue. So then it was time to move onto seeing what's new in Cocoa in Mac OS X. There's quite a bit, but the one that instantly attracted me was the visualization tools in XCode.

I've always been a big fan of modelling tools and the diagrams they create. I always find it easier to express ideas in a picture and it's always easier to look at a diagram rather than gobs of source code to figure out what someone else was thinking. Well apparently Apple feels the same way. XCode now gives you the ability to generate class diagrams from your source code (Java, Objective-C or C++). And these diagrams aren't static either. As you change things in code the diagrams reflect those changes. Fortunately, they look and behave like UML class diagrams so the symbols are pretty familiar.

Apple also uses this new diagram facility in something they call CoreData. Essentially you create an entity relationship diagram that describes the data that your application maintains and then at runtime, the core data framework will use this metedata to store and retrieve user data in an XML file or a SQLite database. Couple this with the Cocoa Bindings framework, which allows you to bind object properties to UI widgets, and you have some great facilities for building data-centric applications. Now that the persistence and UI parts of the application are taken care of by the Cocoa frameworks you are left to concentrate on the business logic. The big limitation in CoreData right now is that it's XML and SQLLite only. That means if you want to create a multiuser application with an enterprise database server you're out of luck. Secondly, even if it did allow you to go against an Oracle or Sybase server I don't think the tools are really designed for fine grained control over the object relational mapping or the queries that are generated. But I don't want to diminish the productivity of this framework in addressing the the single user data persistence problem. If I was developing a desktop Mac OS X application, I'd be all over this. Here's a nice little tutorial that you may find interesting.

There is also a nifty little feature that allows you to drag and drop an entity from the diagram into a window in Interface Builder and generate a default UI. Apple says you can use this feature to quickly create a starting point for your application or to quickly generate an application to exercise your data model. I was impressed that I could create a fully functioning application that maintained data with no code in just a few minutes!

Monday, August 01, 2005

Tiger!

Well I took the leap and bought Mac OS X 10.4 Tiger today. I also followed the recommendations on the web (kinda of a herd mentality) and erased the hard drive and reinstalled "fresh". That second internal SATA hard drive definitely came in handy for backing up applications and the stuff in everyone's accounts. A few hours later I have everything back to normal (I think). My first impressions is that the Dashboard is pretty cute but I'm not sure how useful (although the calculator came in handy once already). Spotlight is definitely nice (and fast too). Searching for anything across the disk is pretty wicked! Well it's late, and time for bed. I'll post info about the ugly stuff once I come across it. ;-)

Tuesday, July 26, 2005

Halo

I remember watching the 1999 MacWorld keynote webcast where Steve Jobs introduced Bungie Studios. They demoed a new game called Halo on a G3 Mac. It was Bungie's followup first-person-shooter to their other Mac-only hits, Marathon and Myth. After Microsoft's purchase of Bungie (to make Halo an XBox exclusive), the enormous Halo 2 sequel, and six years, they finally came full circle and released a Mac demo that I can download and play. It may not be as revolutionary as it would have been in 1999 but it's still a good game.

Thursday, July 21, 2005

Bundles

Last night I upgraded my versions of Firefox and Thunderbird on Mac OS X. And then at work I did the same thing on Windows XP. The installation went pretty smoothly on both so maybe to most users the differences wouldn't be that significant but for someone like me who cares about little things like this, it showcased what I think is a pretty big features of Mac OS X, Bundles.

From Apple's developer documentation:
A feature integral to Mac OS X software distribution is the bundle mechanism. Bundles encapsulate related resources in a hierarchical file structure but present those resources to the user as a single entity. Programmatic interfaces make it easy to find resources inside a bundle. These same interfaces form a significant part of the Mac OS X internationalization strategy.

Basically it's a folder that looks like a file. It's a very simple but extremely effective method of hiding the details from the user. Most of the time, when you install an application in OS X you open a disk image and drag the application icon, the bundle, to some location on your hard drive. Then you double click it to run it. If you don't like where you put it then you drag it somewhere else. If you decide the app sucks you throw it (the one thing) in the trash. You don't use an installer or uninstaller.

On Windows on the other hand, it's never that simple. You almost always run an installer and then god knows what happens. While it's true that some Mac apps require an installer, especially if they need access to protected areas on the disk, it's the exception rather than the rule.

Like I said at the beginning, maybe most people wouldn't think this is a big deal but there is something quite satisfying about the installation/deinstallation process on a Mac. It's simple and obvious and you know what happened.

Friday, June 17, 2005

GIMP, BSD, Linux and Mac OS X

Let's start by talking about GIMP, the GNU Image Manipulation Program. I've used a few other graphics tools in the past including Adobe Photoshop (LE edition) and Paint Shop Pro and the height of awfulness, Windows'Paint brush. So I can say from this position of authority (not) that the GIMP is pretty good. It runs on Mac, Windows and Linux equally well. It supports layers, each with independent opacity values to dynamically composite an image. Text is treated as an object that can be easily changed. Bezier paths can be used for creating smooth paths and image selections. And I think the whole thing is scriptable (via Scheme) but I haven't gotten into that.

So the GIMP is pretty cool but what I recently discovered is that it's related to Mono... When I was messing around with Mono's implementation of WinForms (the C#.NET way to create Windows applications) I found myself using Fink to download and compile the source code for GNOME. Apparently Mono's WinForm implementation is tied to GTK+ and GNOME uses GTK+ as its base widget set which in turn is an offshoot of the GIMP project. (Starting to talk in circles here).

Now when I think about GNOME I think about Linux, but here I am running the GNOME desktop on my Mac. What's up with that? What exactly is Linux anyway? Well apparently what many people tend to call Linux (like a Red Hat distribution for example) isn't really just Linux. Linux is the kernel and the rest, the compilers, the bash shell, the command line applications, GIMP, and the GNOME desktop, are part of the GNU project. In fact, the GNU project was started in 1984 and Linus Torvalds didn't start work on Linux until 1991. The GNU project was working on a kernel too but Linus got there first. The Free Software Foundation even prefers people more accurately call it GNU/Linux with the GNU in front because they (quite accurately) are the major contributors.

So now I'm thinking well what the heck? How does BSD (Berkeley Software Distribution Unix), the base for Mac OS X, fit into all this. Well today's FreeBSD (from which OS X most heavily borrows), OpenBSD, and NetBSD distributions are descendants of the original AT&T Unix of 1970s. At some point in 1990s the BSD project attempted to free itself of AT&T copyright entanglements with replacements for all original AT&T Unix code. It was at this point that BSD came under legal scrutiny. It was under this legal ambiguity that Linux was created and prospered. In 1995 everything was squared away and BSD became truly free. And that's how we come to have two competing Unix-like open-source kernels. And it's probably because NeXT came before Linux that Mac OS X uses BSD.

Now if you throw out the kernel issue then I'm left with the impression that Mac OS X (sans Quartz, Cocoa, and all the other good Apple layers that sit on top) is more like GNU/Linux than I originally thought. Apple bundles a lot of the same GNU project stuff (like the compilers, the bash shell, the command line applications, etc). I'm even of the impression that because OpenStep ran on a host of other Operating Systems that if Apple were so inclined they could even put the Mac OS on top of Linux if they wanted. Ahhh Unix... I feel like such a newbie sometimes ;-)

Next time maybe I'll talk about all these crazy open source licenses: BSD, Apache, Copyleft/GPL, etc... Ahhh maybe not... ;-)

Monday, June 06, 2005

Mac on Intel

Well that one was a difficult rumour to believe. I've been pretty happy with my dual-processor 2GHz G5 since I bought it about 20 months ago. It's a well engineered machine with lots of memory headroom, a fast front-side bus, a decent graphics card, etc... and with Apple optimizing its OS for the past few years, things have even gotten faster than when I first bought my machine. So why switch?

Well apparently Jobs made the announcement that Apple will begin shipping Macs with Intel processors next year.

On the one hand I'm a bit disappointed that Apple will lose some of its distinctiveness. Will it just be a pretty box with the same guts as everyone else?

On the other hand, I'm happy that Apple will no longer have to try and prove that it's machines are as fast or faster than everybody else's. As long as it uses the latest and greatest from Intel, people can finally put that argument away (for the most part). Instead they'll have to focus on what counts, the user experience. That was my reason for buying Macs anyway.

Finally, as a developer, I'm very interested in being able to run Windows applications at full speed on a Mac once in awhile. Being able to do .NET development with MS tools if needed would give me the ultimate flexibility without sacrificing my ability to run the Mac OS and Mac applications for the majority of my computing needs... Maybe it's not such a bad thing... We'll just have to see how this whole thing works out.

Thursday, May 05, 2005

NeoOfficeJ

I've been using OpenOffice for a couple of years now but the thing I dislike most about it, is that it runs under X11 and just doesn't look or feel like a Mac app. It looks all gray and Windows95-ish and worse, the command keys are all messed up. So I finally tried NeoOffice/J and I'm quite a bit happier. It still looks more like a Windows app than a Mac app BUT the menus are at the top where they should be and the command keys are correct. It's fast, the fonts look better, it has a double clickable application icon and it doesn't use X11. So far so good. And its free. :-)

PSync to the rescue

PSync is a little Perl command app written for Mac OS X that synchronizes two directories. Perfect for doing backups. I finally put my second drive to work as a backup volume. Now when the time is right I can upgrade to Mac OS X 10.4/Tiger and see for myself what all the good press is about.