My one-year adventures into the Mac world. A public experiment with one post every week!
Friday, September 30, 2011
Final Decision!
My decision on Mac vs. PC (after 2 years of using a MacBookPro and 2 weeks of using my new Dell XPS, and 15 years of Windows/PC in general): There is absolutely nothing significant I gain by paying $1000 extra for a Mac. Performance: Windows is superior. Stability: almost the same. UI: I like Win7 better. Programming: Was there a question at all? Ergonomic design: I like my Dell laptop more. Thickness/looks: MBP is better. CONCLUSION: Mac is good for carrying to a coffee shop and impressing people. For everything else there is PC!
Sunday, January 16, 2011
#37-41
I refuse to accept that this blog is closed. I have plans for it but just can't get to work on them!
I'LL BE BACK!
I'LL BE BACK!
Sunday, December 12, 2010
#29-36
Wow, I can see I've been away for a LONG time, and to add to that, I'm going to be away for a couple of more weeks! It was a busy term with all sort of new things (and a lot of usual stuff) happening at professional and personal fronts, so I didn't get to do much writing, and not much testing and exploring with my MBP. I have been using it regularly and comparing it with PCs but not much of new things to report.
I'm going away for holidays to Australia so that means again not blogging until I'm back but I have some plans for new year which includes more OS and apps comparison and also talking about other operating systems (Linux and Android) and devices (tablets, phones, etc). So stay tued and you'll hear from me soon in new year.
For now, here is a super cool tool I found for Mac:
http://www.ommwriter.com
It's a "zen" tool for text editing ;-)
I'm going away for holidays to Australia so that means again not blogging until I'm back but I have some plans for new year which includes more OS and apps comparison and also talking about other operating systems (Linux and Android) and devices (tablets, phones, etc). So stay tued and you'll hear from me soon in new year.
For now, here is a super cool tool I found for Mac:
http://www.ommwriter.com
It's a "zen" tool for text editing ;-)
Tuesday, October 19, 2010
#27 and #28
I'm not really sure when I can get to do some work on the article management systems I so want to compare. They are particularly important to me as a researcher/scientist but this term is so busy with a lot of projects that I don't get to work on anything other than the school stuff.
Anyway, some friends sent me these links (reviews for Windows and Mac OSX) which I thought I'd share here:
21st century guide to platform trolling: Apple
21st century guide to platform trolling: Windows
I'LL BE BACK!
Anyway, some friends sent me these links (reviews for Windows and Mac OSX) which I thought I'd share here:
21st century guide to platform trolling: Apple
21st century guide to platform trolling: Windows
I'LL BE BACK!
Sunday, October 3, 2010
#25 and #26
There hasn't been much going on these days to report. I haven't had the chance to work on my latest project (paper/article management tools). I did try to run a couple of tools on VMWare Fusion though and had trouble. Web.alive is a web-based tool for virtual environments based on Unreal engine. It's not available for Mac and won't work well on VMWare. Also, I use Allegro for graphics programming in C and it doesn't work with VMWare (but it has Mac version).
On another note, I'm starting to hate OpenOffice. It certainly isn't 100% compatible with MS Office. Somethings like comments and change tracking won't work, paragraph settings and even bullets/numbers are annoying, and it doesn't open some Office files!
Anyway, that's it for now.
I'LL BE BACK!
On another note, I'm starting to hate OpenOffice. It certainly isn't 100% compatible with MS Office. Somethings like comments and change tracking won't work, paragraph settings and even bullets/numbers are annoying, and it doesn't open some Office files!
Anyway, that's it for now.
I'LL BE BACK!
Monday, September 20, 2010
Sunday, September 12, 2010
Sunday, September 5, 2010
#22
I'm working on some document/paper management tools for Mac and PC but no report yet. It'll be the topic for next week.
I'LL BE BACK!
I'LL BE BACK!
Sunday, August 29, 2010
#21, The Ultimate Geek Guide to NYC
I love New York! I know it probably sounds kinda corny or cliche but it's true. I was there from Aug 21st to 29th (with a 2-day excursion to Boston in the middle). It wasn't my first time in NYC and I had done some of the typical tourist things, so when thinking about my plans I said to myself that I should check out some "other" sides of the city. After all, the "city that never sleeps" has something to offer for anyone. I read some of the travel guides online but found most of them very "touristy". Being kind of a geek (and proud of that :-) I wanted to see things that would particularly interest me, like techie stuff, games, comics, etc. So I looked for that type of info online and tried to collect them and make my own geeky itinerary. And I ended up with The Ultimate Geek Guide to NYC (or at least the version 0.9 of it).
You may ask what's that got to do with the PC User in the Mac World. Short answer: nothing. A little longer answer: it'll mention Apple store! But the real answer is that I wanted to diversify the blog and make it more than just a comparison list of features. It's a conversation and I'm not going to limit it as long as it stays within the general topic of information technology and culture.
One quick point: NYC includes five boroughs: Manhattan, Bronx, Brooklyn, Queens, and Staten Island. But when people say "the city" they mean Manhattan and that's what I'm talking about here. One night I went to a German-style pub/restaurant in Brooklyn (in a recently popular area called Williamsburg), and that was my only off-Manhattan experience (and of course trips to Boston and Newark airport in New Jersey).
Anyway, here is what I have to say to fellow geeks going to NYC:
NYC is the model for Gotham City. The head offices for DC and Marvel comics are there and many comic artists call it home. In a way it's one of the best places on earth for comic lovers. And the comics are the origin of many other interactive and non-interactive types of art and entertainment, including of course video games. So that's where I started. You will find plenty of places in NYC to explore if you like comics. I'm going to mention only a few that I visited and are probably the best in town.
* Forbidden Planet on Broadway and 13th Street is one of the most famous ones. It is a rather fancy place with all sort of collectibles, T-shirts and toys, and new publications. You may not find many old and non-mainstream stuff there, though. Still it's a must see.
* Midtown Comics on 200 West 40th, just off 7th Avenue and close to Times Square is probably the biggest comic shop in NYC. It has a very good collection of all sort of stuff (even some "adult" titles), also toys and collectibles on two floors. Since everybody visiting NYC should and will go to Times Square, a trip to MC is easy and necessary. They have other branches too but I didn't go.
* Jim Hanley’s Universe on 33rd Street, across from the Empire State Building is a less-known but worth-visiting place, especially if you are looking for older items, but not toys and collectibles. For the pervert in you, the adult section will be interesting as well ;-)
* Time Machine on 207 West 14th Street (14th & 7th Avenue) is the place for older comics, both buying and trading.
* St. Marks Comics on 11 St. Mark’s Place in the East Village (between 2nd and 3rd Avenue) is a small and typical comic shop but you should go there because it is in the heart of East Village and that is the place to go if you want to have fun! St. Mark's Place is basically East 8th Street east of 3rd Avenue. The neighbourhood used to be for junkies in the old days, but it's the party place right now. It still has a hippie funky atmosphere that makes it different from West Village, another party place but more traditional and typical North American, and of course fancier. I like East Village more but West Village is cool too
* Museum of Comic & Cartoon Art located on the fourth floor at 594 Broadway, between Houston and Prince Streets is a rather unknown gem. It's small but has a good set of examples from comics to comic strips and New Yorker style cartoons. Absolute must see!
After comics, the next category of places to check out is game-related.
* Nintendo Store at Rockefeller Plaza is the obvious first. From life-size game characters to collection of old Nintendo consoles, you'll find a lot to see. You may buy some T-shirts too. I did!
* Video Games New York on 206 E. 6th Street, off Cooper Square and close to St. Mark's Place, is another small but great place. Another reason why you should go to East Village. You will find all sort of old hardware and games in this little place, sure to make you feel good and a little nostalgic.
* Dave & Buster’s, 234 West 42nd Street (between 7th and 8th Avenue), is a pub by Times Square right in the middle of theatres. It has a big game section and supposedly not bad food (I didn't try). After seeing a show or film, you can go there, eat and drink, and play some games.
* GameStop is probably the biggest chain of game stores in NYC. They are everywhere and nothing special about them!
Some of the other geeky stores you need to check out are:
* Apple Store in Upper West Side, 1981 Broadway (at West 67th Street) and the one midtown on 5th Avenue (at East 58th). The glass cube is the big attraction obviously, so the downtown location is less recommended as it's just an Apple Store. I recommend the 5th Avenue location as it is just south of Central Park which itself is a must see (even if you have seen it, the park is a great hang-out place).
* The Wired Store on 15 West 18th Street (in Soho) is supposed to be a great place for all sort of electronic gadgets. Unfortunately it was closed when I went there. It's in Soho which is another great neighbourhood you must check out. South of Houston Street downtown, it used to be a low-class artzy area but now is full of fancy boutiques and stores and so expensive that young artists cannot afford it.
* Evolution Nature is a really cool store in Soho, 120 Spring Street, full of "evolution-themed" items, from fossils to skulls. If you like Darwin and make fun of Intelligent Design theory, you gotta go there :-)
* Hayden Planetarium in Rose Centre for Earth and Space, Central Park West at 81st Street, is another great place you should go. No need to say what you should expect to see there! It is part of the same complex as American Museum of Natural History with all the dinosaurs! Check them out both but expect a long line of kids in tourist seasons.
* Robot Village on 252 West 81 Street was another interesting store for electronics (and robots) but it's out of business now :-(
* If you can manage to go to Boston while staying in NYC, check out the MIT Museum. Boston is 3-4 hours from NYC by bus or train. It's a beautiful city with a rich history and an amazing mix of old and new architecture. Massachusetts Institute of Technology (MIT) is in Cambridge, part of Greater Boston and separated from the City of Boston by Charles River. MIT Museum is not big but has a nice collection of research done in MIT, such as robotics and holography (the ones that were the main exhibitions when I visited).
Last but not least, here are some less geeky and more traditional places that even a geek want to see:
* Museum of Modern Art (MOMA), 11 West 53rd Street (between 6th and 7th Avenue), is the number one art museum you need to go, if you want to learn about modern art. Be sure to check out MOMA Design Store, across the street or in Soho, for amazing products with great modern design, from kitchenware to lamps, etc.
* Guggenheim Museum, 1071 5th Avenue (at 89th Street), also has a focus on modern art and includes more recent and less famous works by contemporary artists.
* Metropolitan Museum probably doesn't need any introduction as every visitor to NYC is likely to have it on the itinerary. It has examples of artworks from almost any civilization that ever existed!
* Carnegie Hall, on 7th Avenue and West 56th Street, has high-class musical performances if you are into that kind of stuff.
* Max Brenner is probably the best chocolate shop in NYC (now is full restaurant). It is located at 841 Broadway (between 13th St & 14th St) in Union Square area. Try going there in the afternoons or other less-busy times as it can be very crowded.
This was my preliminary version of the Ultimate Geek Guide to NYC. Hopefully I can make it better soon. To make this post a little more related to the whole PC-Mac discussion, I'd like to add one thing: I really don't like iPhoto which is a very inconvenient photo gallery software with the annoying need to import/export files and lack of ability to structure your albums. On a second thought, I'd like to add another thing: My MBP screwed up some of my photos. I attached my USB card reader and it wasn't detected. I disconnected it and got a message saying I'd better eject first! Well there was nothing to eject. To make things worse, I checked my photos and many of them were damaged (I know they were ok because I had checked them on the camera before).
Well, it's enough for this week. Stay tuned for more.
I'LL BE BACK!
You may ask what's that got to do with the PC User in the Mac World. Short answer: nothing. A little longer answer: it'll mention Apple store! But the real answer is that I wanted to diversify the blog and make it more than just a comparison list of features. It's a conversation and I'm not going to limit it as long as it stays within the general topic of information technology and culture.
One quick point: NYC includes five boroughs: Manhattan, Bronx, Brooklyn, Queens, and Staten Island. But when people say "the city" they mean Manhattan and that's what I'm talking about here. One night I went to a German-style pub/restaurant in Brooklyn (in a recently popular area called Williamsburg), and that was my only off-Manhattan experience (and of course trips to Boston and Newark airport in New Jersey).
Anyway, here is what I have to say to fellow geeks going to NYC:
NYC is the model for Gotham City. The head offices for DC and Marvel comics are there and many comic artists call it home. In a way it's one of the best places on earth for comic lovers. And the comics are the origin of many other interactive and non-interactive types of art and entertainment, including of course video games. So that's where I started. You will find plenty of places in NYC to explore if you like comics. I'm going to mention only a few that I visited and are probably the best in town.
* Forbidden Planet on Broadway and 13th Street is one of the most famous ones. It is a rather fancy place with all sort of collectibles, T-shirts and toys, and new publications. You may not find many old and non-mainstream stuff there, though. Still it's a must see.
* Midtown Comics on 200 West 40th, just off 7th Avenue and close to Times Square is probably the biggest comic shop in NYC. It has a very good collection of all sort of stuff (even some "adult" titles), also toys and collectibles on two floors. Since everybody visiting NYC should and will go to Times Square, a trip to MC is easy and necessary. They have other branches too but I didn't go.
* Jim Hanley’s Universe on 33rd Street, across from the Empire State Building is a less-known but worth-visiting place, especially if you are looking for older items, but not toys and collectibles. For the pervert in you, the adult section will be interesting as well ;-)
* Time Machine on 207 West 14th Street (14th & 7th Avenue) is the place for older comics, both buying and trading.
* St. Marks Comics on 11 St. Mark’s Place in the East Village (between 2nd and 3rd Avenue) is a small and typical comic shop but you should go there because it is in the heart of East Village and that is the place to go if you want to have fun! St. Mark's Place is basically East 8th Street east of 3rd Avenue. The neighbourhood used to be for junkies in the old days, but it's the party place right now. It still has a hippie funky atmosphere that makes it different from West Village, another party place but more traditional and typical North American, and of course fancier. I like East Village more but West Village is cool too
* Museum of Comic & Cartoon Art located on the fourth floor at 594 Broadway, between Houston and Prince Streets is a rather unknown gem. It's small but has a good set of examples from comics to comic strips and New Yorker style cartoons. Absolute must see!
After comics, the next category of places to check out is game-related.
* Nintendo Store at Rockefeller Plaza is the obvious first. From life-size game characters to collection of old Nintendo consoles, you'll find a lot to see. You may buy some T-shirts too. I did!
* Video Games New York on 206 E. 6th Street, off Cooper Square and close to St. Mark's Place, is another small but great place. Another reason why you should go to East Village. You will find all sort of old hardware and games in this little place, sure to make you feel good and a little nostalgic.
* Dave & Buster’s, 234 West 42nd Street (between 7th and 8th Avenue), is a pub by Times Square right in the middle of theatres. It has a big game section and supposedly not bad food (I didn't try). After seeing a show or film, you can go there, eat and drink, and play some games.
* GameStop is probably the biggest chain of game stores in NYC. They are everywhere and nothing special about them!
Some of the other geeky stores you need to check out are:
* Apple Store in Upper West Side, 1981 Broadway (at West 67th Street) and the one midtown on 5th Avenue (at East 58th). The glass cube is the big attraction obviously, so the downtown location is less recommended as it's just an Apple Store. I recommend the 5th Avenue location as it is just south of Central Park which itself is a must see (even if you have seen it, the park is a great hang-out place).
* The Wired Store on 15 West 18th Street (in Soho) is supposed to be a great place for all sort of electronic gadgets. Unfortunately it was closed when I went there. It's in Soho which is another great neighbourhood you must check out. South of Houston Street downtown, it used to be a low-class artzy area but now is full of fancy boutiques and stores and so expensive that young artists cannot afford it.
* Evolution Nature is a really cool store in Soho, 120 Spring Street, full of "evolution-themed" items, from fossils to skulls. If you like Darwin and make fun of Intelligent Design theory, you gotta go there :-)
* Hayden Planetarium in Rose Centre for Earth and Space, Central Park West at 81st Street, is another great place you should go. No need to say what you should expect to see there! It is part of the same complex as American Museum of Natural History with all the dinosaurs! Check them out both but expect a long line of kids in tourist seasons.
* Robot Village on 252 West 81 Street was another interesting store for electronics (and robots) but it's out of business now :-(
* If you can manage to go to Boston while staying in NYC, check out the MIT Museum. Boston is 3-4 hours from NYC by bus or train. It's a beautiful city with a rich history and an amazing mix of old and new architecture. Massachusetts Institute of Technology (MIT) is in Cambridge, part of Greater Boston and separated from the City of Boston by Charles River. MIT Museum is not big but has a nice collection of research done in MIT, such as robotics and holography (the ones that were the main exhibitions when I visited).
Last but not least, here are some less geeky and more traditional places that even a geek want to see:
* Museum of Modern Art (MOMA), 11 West 53rd Street (between 6th and 7th Avenue), is the number one art museum you need to go, if you want to learn about modern art. Be sure to check out MOMA Design Store, across the street or in Soho, for amazing products with great modern design, from kitchenware to lamps, etc.
* Guggenheim Museum, 1071 5th Avenue (at 89th Street), also has a focus on modern art and includes more recent and less famous works by contemporary artists.
* Metropolitan Museum probably doesn't need any introduction as every visitor to NYC is likely to have it on the itinerary. It has examples of artworks from almost any civilization that ever existed!
* Carnegie Hall, on 7th Avenue and West 56th Street, has high-class musical performances if you are into that kind of stuff.
* Max Brenner is probably the best chocolate shop in NYC (now is full restaurant). It is located at 841 Broadway (between 13th St & 14th St) in Union Square area. Try going there in the afternoons or other less-busy times as it can be very crowded.
This was my preliminary version of the Ultimate Geek Guide to NYC. Hopefully I can make it better soon. To make this post a little more related to the whole PC-Mac discussion, I'd like to add one thing: I really don't like iPhoto which is a very inconvenient photo gallery software with the annoying need to import/export files and lack of ability to structure your albums. On a second thought, I'd like to add another thing: My MBP screwed up some of my photos. I attached my USB card reader and it wasn't detected. I disconnected it and got a message saying I'd better eject first! Well there was nothing to eject. To make things worse, I checked my photos and many of them were damaged (I know they were ok because I had checked them on the camera before).
Well, it's enough for this week. Stay tuned for more.
I'LL BE BACK!
Monday, August 23, 2010
Sunday, August 15, 2010
Sunday, August 8, 2010
#18, Customization
Let me start by telling you what was the reason behind the topic for this week. First, when I discussed the games for Mac last week, I mentioned the lack of choices for graphics card and we had some discussions on Facebook about that and also audio devices. Second reason was related to Centretown Movies Outdoor Film Festival (centretownmovies.org) that I help organize. Last Friday was our first night this year. Our DVD player failed. I brought my Linux laptop and it couldn't play the encrypted DVD (later I installed VLC and got rid of Totem player which didn't work well even after I installed the decryption stuff). I tried to use my MacBookPro but I had forgotten my DisplayPort-to-VGA adaptor and couldn't connect to the projector. Together, these made me think about the whole issue of customization for hardware and software on Mac. But before I go ahead, that night we borrowed a Windows laptop and showed our film, and the next day when I had the adaptor I couldn't get my MBP to detect the projector and so used the Windows on my MBP to show the movie!
Now let's see what exactly I mean by customization. Simply said, it is the user's ability to change hardware and software features. Customization comes with choices and flexibility, and usually goes against simplicity as it can cause different ways of doing things and a more complex experience. Being able to customize, i.e. changing your computer from its default factory setting, also can affect the stability and performance as the system is no longer optimized for a certain configuration known to the manufacturer and OS designer. PCs were originally made by IBM. At that time, IBM PC was kinda like Mac computers because everything was designed (or at least put together) by the same company. But IBM clones changed everything so PCs became very different. This meant cheaper and more customizable hardware and software but at the same time less reliable and stable. This trend has continued to this day, although with some changes.
Macs claim to be very easy to use and stable. To some degrees, this is correct. If the hardware is good enough for what you want to do, and you do typical stuff the way Apple people have in mind, then things are pretty straight-forward. But when you get to changing things, you'll see the problems. PCs on the other hand were on the other side of the spectrum. You could change any hardware component and OS was more customizable, from installing drivers to changing system settings. But that made them harder to work with. Both systems have tried to get closer to a middle ground. Macs allow you to have some limited hardware options and do let you configure your computers (especially if you are a little geeky and can use Unix-based text commands at a terminal window), and Windows is trying to become more friendly by "guessing" things for you. A simple example of this trend in Windows can be seen by comparing Windows Explorer from XP to Win7. It used to have the options of customizing toolbar, and all sort of folder options. Now it sets them based on the types of files in the folder which can be good for less techie users but I find annoying as I like to customize them the way I want.
Anyway, here is a quick look at hardware and software customization issues for Mac and OSX.
Hardware
========
There is really not much to say about this, as it's pretty clear. Some things to note are:
1- You have very limited choices for hardware component. This has become less of a problem considering that Apple is using high-end components like NVIDIA graphics and fast HDDs, but still you face problems such as need for a professional graphics card or audio system, updating your removable disk drive or other parts when new technology comes, adding/changing RAM modules, and CPU upgrade.
2- It is difficult, if not impossible, to use specialized hardware like Analog-to-Digital or other peripheral cards unless designed specifically for Mac.
3- The video out is DisplayPort (not VGA or even DVI or HDMI) and you need an adaptor to connect to common monitors and projectors. Apple claims that this is because VGA is an old standard and DisplayPort is much better. What they don't talk about is "what if you don't want it?" Nobody else seems to be using it, even DVI and HDMI are not that popular yet, and you are stuck with no ability to change.
Software
========
It is true that you can customize a lot of things on a Mac. If you go to System Preferences, you'll see a lot of options. There are also good amount of tricks to change things that are not directly visible there. Here are a few good websites that discuss such tricks:
Apple: Mac101
MacWorld: Customize your Mac
MacGeekery: Customization
Custom Mac
Does this mean OSX is customizable enough, or customizable without much difficulty? No. Here are some things I don't like about OSX when it comes to system configuration:
* My most disliked part of OSX, the Finder. There is not enough customization for the way you view your files and folders. If you go to Get Info for a file, you can set some options like Icon and Showing Extension for that file or files of the same type. But not much more. Things like customizing toolbar and adding/removing the separate tree view pane don't exist. Folder Options are non-existent or hard to set.
* System sounds have more restricted options compared to Windows that allows you to set all the sounds even with your own audio files.
* Display details are hard to change. Advanced settings on Windows, especially the control panel provided by hardware manufacturer, allow you to control much more such as colour setting, 3D parameters, etc.
* Firewall and internet settings are limited in System Preferences, for example allowing or denying access for specific programs.
* Disk Utility doesn't seem to have tools like defragmentation and optimization.
* Last but not least, as we can expect, there is no Device Manager as we have in Windows that allows you to control your devices at low level.
On the other hand, the Unix-based nature of OSX allows you to use typical text commands at terminal to control a lot of things but I haven't really tried that yet. So there are more to say.
I'LL BE BACK!
Now let's see what exactly I mean by customization. Simply said, it is the user's ability to change hardware and software features. Customization comes with choices and flexibility, and usually goes against simplicity as it can cause different ways of doing things and a more complex experience. Being able to customize, i.e. changing your computer from its default factory setting, also can affect the stability and performance as the system is no longer optimized for a certain configuration known to the manufacturer and OS designer. PCs were originally made by IBM. At that time, IBM PC was kinda like Mac computers because everything was designed (or at least put together) by the same company. But IBM clones changed everything so PCs became very different. This meant cheaper and more customizable hardware and software but at the same time less reliable and stable. This trend has continued to this day, although with some changes.
Macs claim to be very easy to use and stable. To some degrees, this is correct. If the hardware is good enough for what you want to do, and you do typical stuff the way Apple people have in mind, then things are pretty straight-forward. But when you get to changing things, you'll see the problems. PCs on the other hand were on the other side of the spectrum. You could change any hardware component and OS was more customizable, from installing drivers to changing system settings. But that made them harder to work with. Both systems have tried to get closer to a middle ground. Macs allow you to have some limited hardware options and do let you configure your computers (especially if you are a little geeky and can use Unix-based text commands at a terminal window), and Windows is trying to become more friendly by "guessing" things for you. A simple example of this trend in Windows can be seen by comparing Windows Explorer from XP to Win7. It used to have the options of customizing toolbar, and all sort of folder options. Now it sets them based on the types of files in the folder which can be good for less techie users but I find annoying as I like to customize them the way I want.
Anyway, here is a quick look at hardware and software customization issues for Mac and OSX.
Hardware
========
There is really not much to say about this, as it's pretty clear. Some things to note are:
1- You have very limited choices for hardware component. This has become less of a problem considering that Apple is using high-end components like NVIDIA graphics and fast HDDs, but still you face problems such as need for a professional graphics card or audio system, updating your removable disk drive or other parts when new technology comes, adding/changing RAM modules, and CPU upgrade.
2- It is difficult, if not impossible, to use specialized hardware like Analog-to-Digital or other peripheral cards unless designed specifically for Mac.
3- The video out is DisplayPort (not VGA or even DVI or HDMI) and you need an adaptor to connect to common monitors and projectors. Apple claims that this is because VGA is an old standard and DisplayPort is much better. What they don't talk about is "what if you don't want it?" Nobody else seems to be using it, even DVI and HDMI are not that popular yet, and you are stuck with no ability to change.
Software
========
It is true that you can customize a lot of things on a Mac. If you go to System Preferences, you'll see a lot of options. There are also good amount of tricks to change things that are not directly visible there. Here are a few good websites that discuss such tricks:
Apple: Mac101
MacWorld: Customize your Mac
MacGeekery: Customization
Custom Mac
Does this mean OSX is customizable enough, or customizable without much difficulty? No. Here are some things I don't like about OSX when it comes to system configuration:
* My most disliked part of OSX, the Finder. There is not enough customization for the way you view your files and folders. If you go to Get Info for a file, you can set some options like Icon and Showing Extension for that file or files of the same type. But not much more. Things like customizing toolbar and adding/removing the separate tree view pane don't exist. Folder Options are non-existent or hard to set.
* System sounds have more restricted options compared to Windows that allows you to set all the sounds even with your own audio files.
* Display details are hard to change. Advanced settings on Windows, especially the control panel provided by hardware manufacturer, allow you to control much more such as colour setting, 3D parameters, etc.
* Firewall and internet settings are limited in System Preferences, for example allowing or denying access for specific programs.
* Disk Utility doesn't seem to have tools like defragmentation and optimization.
* Last but not least, as we can expect, there is no Device Manager as we have in Windows that allows you to control your devices at low level.
On the other hand, the Unix-based nature of OSX allows you to use typical text commands at terminal to control a lot of things but I haven't really tried that yet. So there are more to say.
I'LL BE BACK!
Sunday, August 1, 2010
#17, Myths about Macs & Games
Last week StarCraft 2, the latest RTS game from Blizzard, was released. I naturally bought it and installed it on both Windows and OSX. I said "naturally" because I teach game design and am quite passionate about game technology. I think what we call "video game" is the foundation of a lot of other things in near future, including storytelling, education, simulation, and of course entertainment. I try to get people, particularly my students, interested in games and how they can be designed better and be used for various purposes. My academic research is mostly about how to make games more intelligent and immersive. But as much as I like to read about games and try new ones, I have to admit I'm not a big game player myself. I used to play more but these days I usually play a new game only enough to know what's new in it. That's one of the reasons I like game nights. I get to see levels that I usually don't explore myself!
Anyway, with that background one of my main concerns when starting to use a Mac was to see how good it was for playing games. If you are like me and have anything to do with Macs and games, you've probably heard two important things, or maybe I should say myths:
1- Macs and OSX are not powerful or graphically optimized enough to run high-end 3D games
2- There are very few games (especially among popular titles) available for Mac users
Until a short while ago, I did believe in both these myths. I no longer do. Well, not entirely.
(1) Game Performance
It cannot be denied that Macs have never been the ideal gaming platform. So there is some reality in that myth. There are different reasons for this performance problem, among them I'm sure are (a) inferior development tools and APIs, and (b) graphic cards that may not be ideal for 3D games. There is an interesting fact about Macs: Users are limited to certain hardware choices. There are some advantages to this such as relatively high-quality (but expensive) hardware, and an operating system that is optimized for the known hardware. Windows on the other hand is written for "unknown" hardware. This makes it less optimized and more unstable, but gives the users the chance to upgrade to high-end components such as better graphic cards.
Having mentioned those reasons, I have to say that probably the major reason for lower 3D graphics performance on Macs is the drivers. OpenGL is the core 3D technology on Mac and OpenGL drivers for Mac are less optimized than OpenGL and Direct3D drivers on Windows. See this review for some interesting comparisons that show Windows and even Ubuntu can outperform OSX in 3D graphics:
* Phoronix Graphics Comparison
So does this mean the myth #1 is correct? Maybe it was at some point but it's not anymore (lower performance doesn't mean unacceptable performance), or at least it's changing in favour of Macs. There are a few things causing this change:
1- Better hardware on newer Macs
2- Better OpenGL drivers and support as for example mentioned here:
ArsTechnica: Apple Moves to Improve OpenGL
3- Game developers efforts motivated by growing market, for example the release of Steam for Mac.
My own experience of playing Half-Life 2 and StarCraft 2 on Mac (both Windows and OSX) was generally positive. I did notice lower FPS but nothing too annoying. Here are some user reports confirming my observations:
* EveryMac
* ArsTechnica
* MacRumors: Windows Games On Mac
* MacRumors: Native Mac Games
One interesting point to consider is running Windows version of the games on Mac (using Bootcamp) as opposed to running native Mac version. As expected, the performance can be a little better on Windows in terms of quality and FPS, although better stability is being reported for Mac versions which goes back to general stability of OS due to its optimized nature for a known hardware. Here is another good article:
* ArsTechnica: Gaming Performance and Stability
So what's the verdict? As I said, I no longer think that Macs are too weak for high-end 3D games and apps. The myth is less true for hardware and closer to truth for native Mac software, but certainly not true, and in both cases the situation is improving in favour of Macs.
(2) Available Games
Many Windows users think that Mac games are limited to casual games like 2D puzzles, etc. This myth is completely wrong. There is no denying the fact that Windows gamers have a wider selection of games, but many popular 3D titles have Mac versions. Developers like Blizzard and Valve seem to be committed to releasing Mac version of their games, and we can be sure that the growing number of Mac users will mean more Mac games. Here are a couple of good sites to check out for Mac games:
* http://www.apple.com/games/
* http://en.wikipedia.org/wiki/Mac_games
* http://www.insidemacgames.com
And here is a very short list of some popular games that have Mac versions:
Age of Empires 1-3
Age of Mythology
BioShock
Black & White 1-2
Call of Duty 1-4
Civilization 3-4
Command and Conquer: Generals
Counter-Strike
Darwinia
Diablo and Diablo 2
Dragon Age: Origins
EVE Online
EverQuest
Fallout and Fallout 2
Guitar Hero (Aerosmith and Legends of Rock)
Half-life (series)
Halo: Combat Evolved
Harry Potter (some titles from the series)
Left 4 Dead
Max Payne
Medal of Honor: Allied Assault
Myst (some titles from the series)
Need for Speed: Carbon
Portal
Prince of Persia (2008 and some others)
Quake (series)
SimCity (series)
Sims (series)
StarCraft and StarCraft 2
Star Wars (various games)
Monkey Island (series)
Team Fortress 2
Tomb Raider: Anniversary
Toy Story 3
TRON 2
Unreal Tournament (series)
World of Goo
World of Warcraft
I'LL BE BACK!
Anyway, with that background one of my main concerns when starting to use a Mac was to see how good it was for playing games. If you are like me and have anything to do with Macs and games, you've probably heard two important things, or maybe I should say myths:
1- Macs and OSX are not powerful or graphically optimized enough to run high-end 3D games
2- There are very few games (especially among popular titles) available for Mac users
Until a short while ago, I did believe in both these myths. I no longer do. Well, not entirely.
(1) Game Performance
It cannot be denied that Macs have never been the ideal gaming platform. So there is some reality in that myth. There are different reasons for this performance problem, among them I'm sure are (a) inferior development tools and APIs, and (b) graphic cards that may not be ideal for 3D games. There is an interesting fact about Macs: Users are limited to certain hardware choices. There are some advantages to this such as relatively high-quality (but expensive) hardware, and an operating system that is optimized for the known hardware. Windows on the other hand is written for "unknown" hardware. This makes it less optimized and more unstable, but gives the users the chance to upgrade to high-end components such as better graphic cards.
Having mentioned those reasons, I have to say that probably the major reason for lower 3D graphics performance on Macs is the drivers. OpenGL is the core 3D technology on Mac and OpenGL drivers for Mac are less optimized than OpenGL and Direct3D drivers on Windows. See this review for some interesting comparisons that show Windows and even Ubuntu can outperform OSX in 3D graphics:
* Phoronix Graphics Comparison
So does this mean the myth #1 is correct? Maybe it was at some point but it's not anymore (lower performance doesn't mean unacceptable performance), or at least it's changing in favour of Macs. There are a few things causing this change:
1- Better hardware on newer Macs
2- Better OpenGL drivers and support as for example mentioned here:
ArsTechnica: Apple Moves to Improve OpenGL
3- Game developers efforts motivated by growing market, for example the release of Steam for Mac.
My own experience of playing Half-Life 2 and StarCraft 2 on Mac (both Windows and OSX) was generally positive. I did notice lower FPS but nothing too annoying. Here are some user reports confirming my observations:
* EveryMac
* ArsTechnica
* MacRumors: Windows Games On Mac
* MacRumors: Native Mac Games
One interesting point to consider is running Windows version of the games on Mac (using Bootcamp) as opposed to running native Mac version. As expected, the performance can be a little better on Windows in terms of quality and FPS, although better stability is being reported for Mac versions which goes back to general stability of OS due to its optimized nature for a known hardware. Here is another good article:
* ArsTechnica: Gaming Performance and Stability
So what's the verdict? As I said, I no longer think that Macs are too weak for high-end 3D games and apps. The myth is less true for hardware and closer to truth for native Mac software, but certainly not true, and in both cases the situation is improving in favour of Macs.
(2) Available Games
Many Windows users think that Mac games are limited to casual games like 2D puzzles, etc. This myth is completely wrong. There is no denying the fact that Windows gamers have a wider selection of games, but many popular 3D titles have Mac versions. Developers like Blizzard and Valve seem to be committed to releasing Mac version of their games, and we can be sure that the growing number of Mac users will mean more Mac games. Here are a couple of good sites to check out for Mac games:
* http://www.apple.com/games/
* http://en.wikipedia.org/wiki/Mac_games
* http://www.insidemacgames.com
And here is a very short list of some popular games that have Mac versions:
Age of Empires 1-3
Age of Mythology
BioShock
Black & White 1-2
Call of Duty 1-4
Civilization 3-4
Command and Conquer: Generals
Counter-Strike
Darwinia
Diablo and Diablo 2
Dragon Age: Origins
EVE Online
EverQuest
Fallout and Fallout 2
Guitar Hero (Aerosmith and Legends of Rock)
Half-life (series)
Halo: Combat Evolved
Harry Potter (some titles from the series)
Left 4 Dead
Max Payne
Medal of Honor: Allied Assault
Myst (some titles from the series)
Need for Speed: Carbon
Portal
Prince of Persia (2008 and some others)
Quake (series)
SimCity (series)
Sims (series)
StarCraft and StarCraft 2
Star Wars (various games)
Monkey Island (series)
Team Fortress 2
Tomb Raider: Anniversary
Toy Story 3
TRON 2
Unreal Tournament (series)
World of Goo
World of Warcraft
I'LL BE BACK!
Saturday, July 24, 2010
#16
This week's post is going to be relatively short. I didn't do a lot of testing but I've been using my MBP constantly and for doing non-professional everyday stuff, I find it pretty good especially because it boots, shuts down and starts applications faster than Windows. I've mentioned this before but I'd like to add some details.
When I first started using the MBP with fresh install of OSX and Windows, the OSX side would boot faster (about 40 seconds) while the Windows side was not much slower (about 70 seconds boot time). After a lot of apps and usage, my OSX still boots at the same time, but my Windows boot time is now more than 2 minutes!
The delay in Windows start-up may be related to another issue. When installing VMWare virtual machine, I was told that it may damage the Windows Activation files and vase the need to re-activate. It didn't happen immediately but did happen after a while. Windows detected non-genuine copy (incorrectly) and asked me to re-register using a license key. I was lucky that at school we have academic licenses and I could get a new one for free. But the problem happened for a second time last week and I did the same thing. This by itself is a problem but I also noticed that my Windows start-up is slower since the first time that error happened.
The next set of things I did last week was to install a bunch of apps for OSX. They are quite good and I thought it'd be a good idea to let readers know about them.
TotalFinder is an add-on to Finder. I really dislike Finder as I've said before. It is one of the main drawbacks of using OSX for even casual stuff. TotalFinder gives you tabbed mode and also listing folders at the top! It doesn't make Finder a good tool but it's an improvement. See post #14 for my complaints against Finder.
Miro Video Converter
Handbrake DVD Ripper
Seashore, simple Photoshop-like app
UnArchiver for RAR, ZIP, etc
Xee, a nice image viewer that is much better than Preview, kinda like Windows Image Viewer. If you open a file, you can browse through the next images in that directory. For Preview you have to select them all and then open with Preview.
Sixty Force and Nestopia are Nintendo64 and NES simulators.
For more see: http://bestmacsoftware.org/
I'LL BE BACK!
When I first started using the MBP with fresh install of OSX and Windows, the OSX side would boot faster (about 40 seconds) while the Windows side was not much slower (about 70 seconds boot time). After a lot of apps and usage, my OSX still boots at the same time, but my Windows boot time is now more than 2 minutes!
The delay in Windows start-up may be related to another issue. When installing VMWare virtual machine, I was told that it may damage the Windows Activation files and vase the need to re-activate. It didn't happen immediately but did happen after a while. Windows detected non-genuine copy (incorrectly) and asked me to re-register using a license key. I was lucky that at school we have academic licenses and I could get a new one for free. But the problem happened for a second time last week and I did the same thing. This by itself is a problem but I also noticed that my Windows start-up is slower since the first time that error happened.
The next set of things I did last week was to install a bunch of apps for OSX. They are quite good and I thought it'd be a good idea to let readers know about them.
TotalFinder is an add-on to Finder. I really dislike Finder as I've said before. It is one of the main drawbacks of using OSX for even casual stuff. TotalFinder gives you tabbed mode and also listing folders at the top! It doesn't make Finder a good tool but it's an improvement. See post #14 for my complaints against Finder.
Miro Video Converter
Handbrake DVD Ripper
Seashore, simple Photoshop-like app
UnArchiver for RAR, ZIP, etc
Xee, a nice image viewer that is much better than Preview, kinda like Windows Image Viewer. If you open a file, you can browse through the next images in that directory. For Preview you have to select them all and then open with Preview.
Sixty Force and Nestopia are Nintendo64 and NES simulators.
For more see: http://bestmacsoftware.org/
I'LL BE BACK!
Monday, July 19, 2010
Tuesday, July 13, 2010
#14, Summary 1
So I'm finally back home and can get to do my promised summary #1. But in case you are curious, let me tell what I was up to in the last two weeks. I went to Barcelona for a conference on educational technologies and methods to present our work on virtual educational environments (http://img.csit.carleton.ca/vcher). Barcelona without a doubt is one of my favourite destinations (see my Facebook album). The conference was also an interesting multidisciplinary forum. One thing that I found particularly interesting was that it's not just us in North America who try to make education "fun", and it reminded me of this thought I've been having for a while that we are probably going too far with this "do what you like" "try to have fun" idea for students (from kindergarten all the way up). That's not real life. It's good to have some fun when learning but it's not an educational requirement. What happened to joy of learning and achieving? Well, I'm going to post something on this topic some time soon. My next stop was Vancouver where I moved from 4 years ago, to attend a friend's wedding. I don't want to sound sad but nothing makes you remember you are alone and far from family more than going back for a wedding no matter how fun it is! Not to mention another unfortunate thing in such out-of-town weddings and that is meeting people you like who live far far away from you!
Anyway, I think I'm in situation to have an overall (maybe still preliminary) opinion of the whole Mac vs. PC topic. I'm going to write my #1 summary of evaluations grouped into 5 categories: Hardware, User Interface, General OS Operation, Applications, and Software Development. As we all could expect Mac and OSX don't get the same results on all categories and of course for all types of users, and I try to consider this "user type" matter in all categories.
Overall, I have to say I'm happy with my MacBook Pro. Except for playing Windows-only games, using Visual Studio (Windows development) and sometimes MS Office (because OpenOffice doesn't do all the Office functions), I hardly had to go to my Windows side. I have Photoshop only for Windows but I have Corel Painter on OSX and that usually does the typical jobs I have for Photoshop. There are all sorts of free apps for Mac. But we will talk about all these in details. One thing I can say now is that considering everything, I didn't find the computing experience superior in Mac, especially when we remember the price. Here is the tricky part though, because the experience "may" be superior for some types of users. Of course in some categories, particularly programming, the OSX experience has been without a doubt inferior. Let's go over categories before I try to make some conclusions. In each category, I group items into P (positive for OSX), N (negative for OSX), and X (just different).
========
Hardware (MBP but more or less applies to other Macs too)
========
P
* MBP is a high-quality piece of hardware. You are paying for it, of course, but anyway you'll get high-resolution screen, good graphics card, nice back-lit keyboard, and fast HDD. MBP has all major peripherals like wireless, USB, external monitor, bluetooth, etc.
* MBP had an attractive design. It's relatively thin and light.
N
* MBP has sharp edges! You kinda get used to it but the annoyance never goes away completely when you rest your hands under keyboard.
* The keyboard has missing keys like separate Delete/Backspace, and Page Up/Down. You can use Function key and other combinations for those purposes but it's not convenient, especially when writing text.
* Hardware modules like speaker and CD/DVD drive have software-based controls, meaning that you have to have the OS up and running properly in order to control those devices. Now this may seem like a trivial thing but it's not. Here are my two experiences:
1- I had a CD stuck in the drive but not mounted (i.e. not recognized by the OS). I had no way of getting it out. I rebooted with Windows and used right-click/eject on the drive name. The Eject key is not like the eject button on other drives. It is not directly connected to the hardware.
2- I started my laptop during someone's talk in Barcelona and had no way of stopping the log-in sound because the OS was still booting. My last laptop had a volume knob directly connected to hardware.
It seems that designers have given a higher priority to "looking good" than "being usable".
========
User Interface
========
This category is the most difficult one for me to evaluate, as it clearly depends on "user". There are two key points:
1- OSX hides details which can make it easier to use especially for less technical users. I personally like to customize things and do things the way I want. The "ease of use" thing has no value for me if not being a negative. Window is kinda going toward that direction too.
2- OSX has a different UI style compared to Windows, such the common top menu, window resizing/closing, etc. I don't find either one better, just takes getting used to, but some users may think differently.
If there is one thing that I do find inferior in OSX compared to Windows is Finder vs. Windows Explorer. The Explorer in XP was my favourite. Vista and Win7 changed it for worse in my opinion (for example by removing customizable toolbars) but it still has the typical 2-pane view with tree structure on the left and content on the right. Finder has two options none of them like Explorer. Some difficulties with Finder are moving a file to another directory. In Windows Explorer you simply drag and drop in the same window (to the tree pane) but with Finder you need a second window because there is no tree pane. It is also difficult to create a new folder or paste from clipboard when the window is full and there's no space for right-clicking (you can use keyboard commands though). And why the hell the Cut command is always disabled in Finder?
========
General OS Operation
========
OSX is faster in booting up, shutting down and starting applications. That is the only certain positive I've seen so far.
OSX seems a little more stable but it does crash too (or some apps). When I had a damaged CD stuck in my CD/DVD drive (see the Hardware section), my OSX took forever to load and the keyboard stopped working! Windows doesn't really crash much on me either. The stability issues are usually for applications not OS.
Having to deal with a known standard hardware (the Mac case) allows OS to be a lot more optimized. Windows need to be open to all sorts of hardware and software configuration (some really cheap and low-quality ones) and so it's a lot more likely to suffer from problems. In a way, Mac is faster and more stable and we pay for it!
Because most online threats are for Windows, you are less likely to have that sort of problem on Mac. Does it mean OSX is more secure? I'm not sure.
========
Applications
========
There are more applications (especially games) available for Windows but it's not as bad as I thought before. You can find pretty much everything for Mac maybe except games. I didn't find applications any of the two operating systems particularly better than the other. As I mentioned in my 3D Graphics post, the performance of Maya 2010 and Half-Life 2 were not that different on Windows and OSX.
========
Software Development
========
This is the easiest category for evaluation, and I'm sure anybody who has read my previous posts already knows what I think.
N
- OSX has a weaker 3D API
- ObjectiveC and Cocoa are confusing and harder to use compared to.NET and C#.
- Xcode is an embarrassingly bad IDE.
===========
So what is the conclusion? If you have the money, and are doing the "typical" tasks, and don't want to bother with customizing things, then Mac can be a good option. In other cases, I haven't been convinced that Mac is a better choice worth paying a lot more. Of course if you can afford it and are a technical person doing more complex stuff, then it can still be a good idea especially because you can have Windows on it too.
There's more to do for testing and seeing how things work over time.
I'LL BE BACK!
Anyway, I think I'm in situation to have an overall (maybe still preliminary) opinion of the whole Mac vs. PC topic. I'm going to write my #1 summary of evaluations grouped into 5 categories: Hardware, User Interface, General OS Operation, Applications, and Software Development. As we all could expect Mac and OSX don't get the same results on all categories and of course for all types of users, and I try to consider this "user type" matter in all categories.
Overall, I have to say I'm happy with my MacBook Pro. Except for playing Windows-only games, using Visual Studio (Windows development) and sometimes MS Office (because OpenOffice doesn't do all the Office functions), I hardly had to go to my Windows side. I have Photoshop only for Windows but I have Corel Painter on OSX and that usually does the typical jobs I have for Photoshop. There are all sorts of free apps for Mac. But we will talk about all these in details. One thing I can say now is that considering everything, I didn't find the computing experience superior in Mac, especially when we remember the price. Here is the tricky part though, because the experience "may" be superior for some types of users. Of course in some categories, particularly programming, the OSX experience has been without a doubt inferior. Let's go over categories before I try to make some conclusions. In each category, I group items into P (positive for OSX), N (negative for OSX), and X (just different).
========
Hardware (MBP but more or less applies to other Macs too)
========
P
* MBP is a high-quality piece of hardware. You are paying for it, of course, but anyway you'll get high-resolution screen, good graphics card, nice back-lit keyboard, and fast HDD. MBP has all major peripherals like wireless, USB, external monitor, bluetooth, etc.
* MBP had an attractive design. It's relatively thin and light.
N
* MBP has sharp edges! You kinda get used to it but the annoyance never goes away completely when you rest your hands under keyboard.
* The keyboard has missing keys like separate Delete/Backspace, and Page Up/Down. You can use Function key and other combinations for those purposes but it's not convenient, especially when writing text.
* Hardware modules like speaker and CD/DVD drive have software-based controls, meaning that you have to have the OS up and running properly in order to control those devices. Now this may seem like a trivial thing but it's not. Here are my two experiences:
1- I had a CD stuck in the drive but not mounted (i.e. not recognized by the OS). I had no way of getting it out. I rebooted with Windows and used right-click/eject on the drive name. The Eject key is not like the eject button on other drives. It is not directly connected to the hardware.
2- I started my laptop during someone's talk in Barcelona and had no way of stopping the log-in sound because the OS was still booting. My last laptop had a volume knob directly connected to hardware.
It seems that designers have given a higher priority to "looking good" than "being usable".
========
User Interface
========
This category is the most difficult one for me to evaluate, as it clearly depends on "user". There are two key points:
1- OSX hides details which can make it easier to use especially for less technical users. I personally like to customize things and do things the way I want. The "ease of use" thing has no value for me if not being a negative. Window is kinda going toward that direction too.
2- OSX has a different UI style compared to Windows, such the common top menu, window resizing/closing, etc. I don't find either one better, just takes getting used to, but some users may think differently.
If there is one thing that I do find inferior in OSX compared to Windows is Finder vs. Windows Explorer. The Explorer in XP was my favourite. Vista and Win7 changed it for worse in my opinion (for example by removing customizable toolbars) but it still has the typical 2-pane view with tree structure on the left and content on the right. Finder has two options none of them like Explorer. Some difficulties with Finder are moving a file to another directory. In Windows Explorer you simply drag and drop in the same window (to the tree pane) but with Finder you need a second window because there is no tree pane. It is also difficult to create a new folder or paste from clipboard when the window is full and there's no space for right-clicking (you can use keyboard commands though). And why the hell the Cut command is always disabled in Finder?
========
General OS Operation
========
OSX is faster in booting up, shutting down and starting applications. That is the only certain positive I've seen so far.
OSX seems a little more stable but it does crash too (or some apps). When I had a damaged CD stuck in my CD/DVD drive (see the Hardware section), my OSX took forever to load and the keyboard stopped working! Windows doesn't really crash much on me either. The stability issues are usually for applications not OS.
Having to deal with a known standard hardware (the Mac case) allows OS to be a lot more optimized. Windows need to be open to all sorts of hardware and software configuration (some really cheap and low-quality ones) and so it's a lot more likely to suffer from problems. In a way, Mac is faster and more stable and we pay for it!
Because most online threats are for Windows, you are less likely to have that sort of problem on Mac. Does it mean OSX is more secure? I'm not sure.
========
Applications
========
There are more applications (especially games) available for Windows but it's not as bad as I thought before. You can find pretty much everything for Mac maybe except games. I didn't find applications any of the two operating systems particularly better than the other. As I mentioned in my 3D Graphics post, the performance of Maya 2010 and Half-Life 2 were not that different on Windows and OSX.
========
Software Development
========
This is the easiest category for evaluation, and I'm sure anybody who has read my previous posts already knows what I think.
N
- OSX has a weaker 3D API
- ObjectiveC and Cocoa are confusing and harder to use compared to.NET and C#.
- Xcode is an embarrassingly bad IDE.
===========
So what is the conclusion? If you have the money, and are doing the "typical" tasks, and don't want to bother with customizing things, then Mac can be a good option. In other cases, I haven't been convinced that Mac is a better choice worth paying a lot more. Of course if you can afford it and are a technical person doing more complex stuff, then it can still be a good idea especially because you can have Windows on it too.
There's more to do for testing and seeing how things work over time.
I'LL BE BACK!
Thursday, July 8, 2010
#13
I just came back from Barcelona and will be off to Vancouver tomorrow. So the overall summary has to wait.
I'LL BE BACK!
I'LL BE BACK!
Tuesday, July 6, 2010
#12
I'm in the beautiful city of Barcelona for a conference, and planning my first summarized report for next week.
I'LL BE BACK!
I'LL BE BACK!
Monday, June 28, 2010
#11, 3D Graphics, Part 1
This week I'm going to talk about 3D graphics on Mac. Please refer to previous posts on graphics and programming for some background info. What I did in the past few days was (1) testing some sample 3D applications and (2) writing some basic 3D programs. Short version of the result is that Mac hardware and software don't seem to be particularly weaker than PC, in some cases they even do slightly better, but in some other cases especially for real-time rendering using hardware accelerators they may not be as efficient which can be due to less efficient drivers. The basic 3D API on Mac is OpenGL which is not as good as Direct3D on Windows but is pretty much portable, at least for basic stuff.
Before I get to some details, let's make sure we all know the basics of 3D graphics.
==========
Very Very Quick Intro to 3D Graphics
==========
2D computer graphics is all about images, i.e. two-dimensional arrays of points with different colour values (a.k.a pixels or picture elements). 3D computer graphics on the other hand is about points in three-dimensional space. We call these points vertices. Each vertex has three location values (XYZ) and a colour value. But things are more complicated than this for a couple of reasons.
3D points form 3D objects when connected. The simplest type of 3D objects are polygons, i.e. a set of usually 3 or 4 connected vertices that are on the same plane (surface). Polygons are then connected to form a mesh that is the base for complex 3D objects. A mesh can then have a material (properties like colour and reflection) and/or a texture (a 2D image covering the surface of the 3D object). Materials and textures define the colour of vertices and also the colour of points inside the polygons.
Now here's the second complication. 3D scenes have light sources. This means that the colour of a point in 3D is a function of its material/texture and also the light sources.
Finally we have another new concept and that is viewpoint. A 2D image has no notion of viewpoint. Although physically you can look at it from different points and potentially see it differently, this has nothing to do with how your computer is generating the image. 3D scenes on the other hand need to be transformed to a 2D image before they can be shown on screen (let's not talk about real 3D displays). In order to decide what your 3D world will look like, you need to decide where your eyes are.
The process of creating a 3D world is called modelling. Making the objects in this 3D space move is animation. Transforming your 3D world to a 2D image is called rendering, sometimes called shading. Rendering process is controlled by a series of parameters and is usually done in two steps:
** Vertex Shading transforms all your vertices to points in 2D. This depends on the location/scale/orientation of your objects in 3D world and the location/orientation and properties of your camera (e.g. field of view).
** Pixel Shading is the second step and decides what colour to be used for each pixel based on material and texture of the objects and also the light sources.
Rendering used to be (and still can be) done in software. Graphic Accelerators allowed this to be done in specialized hardware with fixed functions. They then evolved into programmable GPU's with their own programming languages called Shaders. High Level Shader Language (HLSL) is the shader language supported by Direct3D. OpenGl Shading Language (GLSL) is an alternative for OpenGL. These languages have their own versions and different graphics cards are compatible with different versions, or Shader Models.
When you watch a 3D animated film each single frame has been rendered separately. When you play a 3D game each single frame is being rendered in real time.
==========
Application Tests
==========
The first 3D application I tested was Maya 2011.
512x512 render using Mental Ray
Windows, Maya 32-bit, 3.48 sec
Windows, Maya 64-bit, 3.08 sec
OSX, Maya 64-bit, 3.02 sec
For comparison, I tried the same file on my desktop PC (Quad Core, 3GHz, 6GM RAM, Performance Index 5.9) and it took 2.07 sec. FYI, the Performance Index for my Windows 7 installed on Mac is 5.2.
1024x768 render of another scene without Mental Ray and using Maya Software
Windows, Maya 64-bit, 0.07 sec
Mac, Maya 64-bit, 0.10 sec
When I used Maya Hardware both had less than 0.01 sec and I couldn't see any difference. I will try longer tests later for better comparison when using Maya Hardware.
Next I tried a 3D game. I chose Half-Life 2 which is now available for Mac. Valve has released Steam for Mac, and some of their games including Orange Box are now available for Mac. One good thing is that if you have the Windows version, you don't need to buy the Mac version and can download it for free. I tested the Windows and Mac version at default settings (1280x800 for Windows and 1152x720 for OSX). I only tried HL2 on OSX for a short period. It seems to be working fine but even at a lower resolution a slight performance problem could be noticed. The rendering seemed a little slower as you could see the screen being refreshed with a little delay. This was not a big issue at all and hardly noticeable but I'm guessing when we get to more complex scenes it could get worse. Needs more testing.
Overall, Mac (or I'd better say OSX since my Windows is running on Mac hardware too) doesn't seem to have a major issue with 3D. My guess is that OpenGL drivers for Mac are not as efficient as Direct3D drivers on Windows. This can be due to slight inferiority of OpenGl itself, drivers, general difficulty of programming for Mac, and popularity of Windows platform that makes programmers work harder and better for it.
The next step of my test was to compare OpenGL on OSX and Windows.
==========
3D Programming
==========
OpenGL is the basic 3D API for Mac. Even other API's like CL are created on top of it. So to test 3D programming it seems that we should focus on OpenGL. For comparison, we can use Direct3D or OpenGL, and I started with OpenGL on both platforms. Windows and Visual Studio don't come with all the libraries for OpenGL programming but they are easily available. This includes OpenGl itself and GLUT (utility functions for OpenGL). There is also GLAUX which is only available for Windows and I won't use. On the other hand, OSX is completely OpenGL-based and Xcode comes with GL and GLUT frameworks. Here are the basic steps to write a simple OpenGL program on OSX:
1- Start a new project of type Command Line tool with C. Unfortunately this is the only non-Cocoa C-based option. Don't worry you can do graphics with it using OpenGL.
2- Right-click on the project name and select Add and then Existing Framework. Select GLUT and OpenGL.
3- Add the following code:
#include
#include
#include
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
}
int main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(0,0);
glutCreateWindow("simple");
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
Let me explain this code a little bit for those who are not familiar with OpenGL:
** The #include lines allow you to use OpenGL and GLUT. Remember that in C/C++ you need #include for compiler to use libraries. The linker then links your program to actual library code (here the frameworks you added).
** The main() function is the entry point of your C program that initializes OpenGL, creates a window, sets a Display Function and calls OpenGL Main Loop. Display Function draws the graphics on your window. You need to provide a function and pass its name to glutDisplayFunc(). Main Loop processes user commands. If you don't provide your own Main Loop, the default doesn't really do anything special.
** The display() function is what you pass to glutDisplayFunc() and you basically have to have one (it can be called anything). In this simple example, our display function only creates a polygon by defining four vertices in 2D. You notice that OpenGL can be used for 2D graphics as well as 3D. This function will be called every time the window needs to be redrawn.
To run this on Windows, you create a Win32 empty console application, add OpenGL libraries to linker and add a new file with these headers:
#include
#include
#include
You notice that you will need windows.h, and also that OpenGL header files/directories have different names. The rest of the code is the same.
The next step is to add some 3D code. I used a simple Camera class that allows moving camera, I added a Main Loop that allows user to control the camera, and modified the Display Function to create and draw some simple 3D objects. You can find the full code here:
http://www.csit.carleton.ca/~arya/b2cc/opengl/
My Display Function looks like this:
void Display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Don't forget the depth buffer!
glLoadIdentity(); //Load a new modelview matrix -> we can apply new transformations
Camera.Render();
glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
glutSolidSphere(1.0,20,20);
glTranslatef(2.0,0.0,0.0);
glutSolidSphere(1.0,20,20);
glPushMatrix();
glTranslatef(0.0,2.0,0.0);
glutSolidSphere(1.0,20,20);
glPopMatrix();
glTranslatef(0.0,0.0,2.0);
glutSolidSphere(1.0,20,20);
glTranslatef(-4.0,0.0,0.0);
glRotatef(TorusRotated, 0.0,1.0,0.0);
glutSolidTorus(0.3,1.0,8,16);
glFlush(); //Finish rendering
glutSwapBuffers(); //Swap the buffers ->make the result of rendering visible
}
You can see that simple 3D object are being created and then placed in 3D world. Everything is static except a Torus whose rotation value depends on the variable TorusRotated. I used two methods for changing this variable. Look at the main() in the code and locate these lines (we should use only one of them):
glutIdleFunc(Idle);
glutTimerFunc(400,Timer,0);
Both are similar to the one that defined our Display Function but they are defining an Idle function (to be called when the application is doing nothing) and a Timer function (to be called at certain time intervals). Each one of these methods simply changes the TorusRotated variable so the next time the scene is rendered you see the Torus with a different orientation. The timer method is prefered when you want to control how many frames per second you want to have.
For your quick reference here are the Idle and Timer functions:
void Idle(void)
{
TorusRotated += 2.0;
Display();
}
void Timer( int value )
{
TorusRotated += 2.0;
Display();
glutTimerFunc(400,Timer,value); //need to call the timer again
}
It is not very efficient to do actual drawing in Idle and Timer functions but optimization is not an issue here. The code will work with no change on Windows.
For this simple example I didn't notice any particular performance difference for rendering but the Idle and Timer functions don't work the same on OSX and Windows. More specifically, the Idle function on OSX is called a lot more frequently and the Timer function intervals can go as short as 1 millisecond. In Windows you won't get anything less than 10 milliseconds. In Direct3D there are other ways to get higher time resolutions but apparently the OpenGL implementation on Windows doesn't use it and stops at 10 millisecond which is the default for Windows timer.
This week tests don't seem to be very conclusive but hopefully it is a good starting point for understanding how things work and performing more advanced tests, both with existing applications and games, and also developing 3D programs.
I'm off to Barcelona and then Vancouver in a few days, so expect some delays but no worries.
I'LL BE BACK!
Before I get to some details, let's make sure we all know the basics of 3D graphics.
==========
Very Very Quick Intro to 3D Graphics
==========
2D computer graphics is all about images, i.e. two-dimensional arrays of points with different colour values (a.k.a pixels or picture elements). 3D computer graphics on the other hand is about points in three-dimensional space. We call these points vertices. Each vertex has three location values (XYZ) and a colour value. But things are more complicated than this for a couple of reasons.
3D points form 3D objects when connected. The simplest type of 3D objects are polygons, i.e. a set of usually 3 or 4 connected vertices that are on the same plane (surface). Polygons are then connected to form a mesh that is the base for complex 3D objects. A mesh can then have a material (properties like colour and reflection) and/or a texture (a 2D image covering the surface of the 3D object). Materials and textures define the colour of vertices and also the colour of points inside the polygons.
Now here's the second complication. 3D scenes have light sources. This means that the colour of a point in 3D is a function of its material/texture and also the light sources.
Finally we have another new concept and that is viewpoint. A 2D image has no notion of viewpoint. Although physically you can look at it from different points and potentially see it differently, this has nothing to do with how your computer is generating the image. 3D scenes on the other hand need to be transformed to a 2D image before they can be shown on screen (let's not talk about real 3D displays). In order to decide what your 3D world will look like, you need to decide where your eyes are.
The process of creating a 3D world is called modelling. Making the objects in this 3D space move is animation. Transforming your 3D world to a 2D image is called rendering, sometimes called shading. Rendering process is controlled by a series of parameters and is usually done in two steps:
** Vertex Shading transforms all your vertices to points in 2D. This depends on the location/scale/orientation of your objects in 3D world and the location/orientation and properties of your camera (e.g. field of view).
** Pixel Shading is the second step and decides what colour to be used for each pixel based on material and texture of the objects and also the light sources.
Rendering used to be (and still can be) done in software. Graphic Accelerators allowed this to be done in specialized hardware with fixed functions. They then evolved into programmable GPU's with their own programming languages called Shaders. High Level Shader Language (HLSL) is the shader language supported by Direct3D. OpenGl Shading Language (GLSL) is an alternative for OpenGL. These languages have their own versions and different graphics cards are compatible with different versions, or Shader Models.
When you watch a 3D animated film each single frame has been rendered separately. When you play a 3D game each single frame is being rendered in real time.
==========
Application Tests
==========
The first 3D application I tested was Maya 2011.
512x512 render using Mental Ray
Windows, Maya 32-bit, 3.48 sec
Windows, Maya 64-bit, 3.08 sec
OSX, Maya 64-bit, 3.02 sec
For comparison, I tried the same file on my desktop PC (Quad Core, 3GHz, 6GM RAM, Performance Index 5.9) and it took 2.07 sec. FYI, the Performance Index for my Windows 7 installed on Mac is 5.2.
1024x768 render of another scene without Mental Ray and using Maya Software
Windows, Maya 64-bit, 0.07 sec
Mac, Maya 64-bit, 0.10 sec
When I used Maya Hardware both had less than 0.01 sec and I couldn't see any difference. I will try longer tests later for better comparison when using Maya Hardware.
Next I tried a 3D game. I chose Half-Life 2 which is now available for Mac. Valve has released Steam for Mac, and some of their games including Orange Box are now available for Mac. One good thing is that if you have the Windows version, you don't need to buy the Mac version and can download it for free. I tested the Windows and Mac version at default settings (1280x800 for Windows and 1152x720 for OSX). I only tried HL2 on OSX for a short period. It seems to be working fine but even at a lower resolution a slight performance problem could be noticed. The rendering seemed a little slower as you could see the screen being refreshed with a little delay. This was not a big issue at all and hardly noticeable but I'm guessing when we get to more complex scenes it could get worse. Needs more testing.
Overall, Mac (or I'd better say OSX since my Windows is running on Mac hardware too) doesn't seem to have a major issue with 3D. My guess is that OpenGL drivers for Mac are not as efficient as Direct3D drivers on Windows. This can be due to slight inferiority of OpenGl itself, drivers, general difficulty of programming for Mac, and popularity of Windows platform that makes programmers work harder and better for it.
The next step of my test was to compare OpenGL on OSX and Windows.
==========
3D Programming
==========
OpenGL is the basic 3D API for Mac. Even other API's like CL are created on top of it. So to test 3D programming it seems that we should focus on OpenGL. For comparison, we can use Direct3D or OpenGL, and I started with OpenGL on both platforms. Windows and Visual Studio don't come with all the libraries for OpenGL programming but they are easily available. This includes OpenGl itself and GLUT (utility functions for OpenGL). There is also GLAUX which is only available for Windows and I won't use. On the other hand, OSX is completely OpenGL-based and Xcode comes with GL and GLUT frameworks. Here are the basic steps to write a simple OpenGL program on OSX:
1- Start a new project of type Command Line tool with C. Unfortunately this is the only non-Cocoa C-based option. Don't worry you can do graphics with it using OpenGL.
2- Right-click on the project name and select Add and then Existing Framework. Select GLUT and OpenGL.
3- Add the following code:
#include
#include
#include
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
}
int main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500,500);
glutInitWindowPosition(0,0);
glutCreateWindow("simple");
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
Let me explain this code a little bit for those who are not familiar with OpenGL:
** The #include lines allow you to use OpenGL and GLUT. Remember that in C/C++ you need #include for compiler to use libraries. The linker then links your program to actual library code (here the frameworks you added).
** The main() function is the entry point of your C program that initializes OpenGL, creates a window, sets a Display Function and calls OpenGL Main Loop. Display Function draws the graphics on your window. You need to provide a function and pass its name to glutDisplayFunc(). Main Loop processes user commands. If you don't provide your own Main Loop, the default doesn't really do anything special.
** The display() function is what you pass to glutDisplayFunc() and you basically have to have one (it can be called anything). In this simple example, our display function only creates a polygon by defining four vertices in 2D. You notice that OpenGL can be used for 2D graphics as well as 3D. This function will be called every time the window needs to be redrawn.
To run this on Windows, you create a Win32 empty console application, add OpenGL libraries to linker and add a new file with these headers:
#include
#include
#include
You notice that you will need windows.h, and also that OpenGL header files/directories have different names. The rest of the code is the same.
The next step is to add some 3D code. I used a simple Camera class that allows moving camera, I added a Main Loop that allows user to control the camera, and modified the Display Function to create and draw some simple 3D objects. You can find the full code here:
http://www.csit.carleton.ca/~arya/b2cc/opengl/
My Display Function looks like this:
void Display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Don't forget the depth buffer!
glLoadIdentity(); //Load a new modelview matrix -> we can apply new transformations
Camera.Render();
glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
glutSolidSphere(1.0,20,20);
glTranslatef(2.0,0.0,0.0);
glutSolidSphere(1.0,20,20);
glPushMatrix();
glTranslatef(0.0,2.0,0.0);
glutSolidSphere(1.0,20,20);
glPopMatrix();
glTranslatef(0.0,0.0,2.0);
glutSolidSphere(1.0,20,20);
glTranslatef(-4.0,0.0,0.0);
glRotatef(TorusRotated, 0.0,1.0,0.0);
glutSolidTorus(0.3,1.0,8,16);
glFlush(); //Finish rendering
glutSwapBuffers(); //Swap the buffers ->make the result of rendering visible
}
You can see that simple 3D object are being created and then placed in 3D world. Everything is static except a Torus whose rotation value depends on the variable TorusRotated. I used two methods for changing this variable. Look at the main() in the code and locate these lines (we should use only one of them):
glutIdleFunc(Idle);
glutTimerFunc(400,Timer,0);
Both are similar to the one that defined our Display Function but they are defining an Idle function (to be called when the application is doing nothing) and a Timer function (to be called at certain time intervals). Each one of these methods simply changes the TorusRotated variable so the next time the scene is rendered you see the Torus with a different orientation. The timer method is prefered when you want to control how many frames per second you want to have.
For your quick reference here are the Idle and Timer functions:
void Idle(void)
{
TorusRotated += 2.0;
Display();
}
void Timer( int value )
{
TorusRotated += 2.0;
Display();
glutTimerFunc(400,Timer,value); //need to call the timer again
}
It is not very efficient to do actual drawing in Idle and Timer functions but optimization is not an issue here. The code will work with no change on Windows.
For this simple example I didn't notice any particular performance difference for rendering but the Idle and Timer functions don't work the same on OSX and Windows. More specifically, the Idle function on OSX is called a lot more frequently and the Timer function intervals can go as short as 1 millisecond. In Windows you won't get anything less than 10 milliseconds. In Direct3D there are other ways to get higher time resolutions but apparently the OpenGL implementation on Windows doesn't use it and stops at 10 millisecond which is the default for Windows timer.
This week tests don't seem to be very conclusive but hopefully it is a good starting point for understanding how things work and performing more advanced tests, both with existing applications and games, and also developing 3D programs.
I'm off to Barcelona and then Vancouver in a few days, so expect some delays but no worries.
I'LL BE BACK!
Monday, June 21, 2010
#10, 2D Graphics and GUI Programming Summary
I heard last week that Xcode 4 is being released and it has Interface Builder integrated. I found it interesting that Apple calls this (and other Xcode features) "revolutionary" while they are still way behind industry standards for an IDE, but anyway it's good to see this change. I look forward to see some other changes related to problems I have mentioned here. Anyway, today I want to wrap up my quick review of basic Cocoa programming and creating simple GUI and 2D graphics applications. But first let me mention something that I didn't discuss.
Back in the old days (1990's) when I was using Microsoft Foundation Classes (MFC) in Visual C++, I was introduced to the concept of document-based vs. form-based applications. MFC had (and still has) three types of applications: Multiple Document, Single Document, and Dialog-based. The first two types are variation of what in general is called document-based application where you can open an existing document or create a new one. The framework provides programmers with base classes for Document (application data) and View (user interface). Dialog-based or form-based applications on the other hand have a dialog box (or a form) as their main interface although they still may open files, and there is no framework imposed separation between data and UI. In MFC dialog-based application where easier to make than document-based ones, especially because it was easier to define the program in terms of a series of event-handlers responding to UI objects on the form. Visual C# made creation of dialog-based (now called forms) even easier and got rid of document-based application style (you can still make them if you want but have to create the document class yourself). Cocoa does provide similar option. Default application in Xcode is a "form-based" one, but you may select the document-based option and some classes will be added to your code to support document-based architecture.
Just like I didn't like document-based applications in Visual C++, I didn't like them in Xcode. In fact I disliked them even more because they are harder to use and more confusing than their VC++ version). After a short try, I decided to not work with the document-based applications. If you are interested in learning about them, check this page as your starting point:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Documents/Tasks/ImplementingDocApp.html
Now let's focus on the form-based applications and basic GUI and 2D graphics programming with Cocoa. Here are the basic things you need to know:
1- Cocoa and .NET provide more or less similar functionality for creating basic GUI and 2D graphics apps, but Cocoa classes are slightly more complicated to use. As for the IDE, Xcode is A LOT more complicated to use than Visual Studio. Also Objective-C as the programming language is not as convenient as C# for typical C/C++ programmers.
2- Once you create a default form-based Cocoa application, you have a NSApplicationDelegate class made for you. This can be your starting point to add variables and event-handlers. It already has a member that points to your application window.
3- You design your form (user interface) in Interface Builder that can be launched by double-clicking on your xib or nib file in Xcode. In IB, from the Library add the UI objects to your form. Save and go back to Xcode.
4- You add two important things to your AppDelegate class: member variables representing UI objects and methods for UI event handlers. variables representing a UI objet have the type IBOutlet and the method IBAction. You don't need to specify the exact type of the object. Cocoa uses dynamic types. Here is an example:
=======
//TestAppDelegate.h
=======
#import
@interface TestAppDelegate : NSObject {
NSWindow *window; //added automatically
IBOutlet id textView; //outlet for text view
IBOutlet id customView; //outlet for custom view showing images
IBOutlet id textfield; //outlet for a simple text field
}
- (IBAction) clearText: sender; //method for clearing the text view
- (IBAction) setView: sender; //set custom view properties
@property (assign) IBOutlet NSWindow *window;
@end
=======
//TestAppDelegate.m
=======
#import "TestAppDelegate.h"
@implementation TestAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
}
//////////
// This is the part where we implement the methods we added
//
- (IBAction) clearText: sender
{
[textView setString: @" "];
}
- (IBAction) setView: sender
{
//some code here
}
@end
5- Once you add the code in Xcode and UI objects in IB, you go back to IB and link the UI objects to the code. This is done by holding down the Control key and dragging item A (source) to item B (target). For member variables, source is the AppDelegate object in the IB Documents window, and taget is the UI object on the form. For event handlers, source is the UI object and target is the AppDelegate. In both case, once you drop, you get a list of options (class members that you want to use).
6- Instead of using the automatically-added AppDelegate class, you may create a new class based on NSObject and do the exact same thing with that.
7- Another thing that you can do is to add classes to extend existing Cocoa classes. For example we created a new class derived from NSView to control our custom views and make them draw images. It already had some default methods and we added our code to the drawRect method (see previous postings). We can also add member variables and new methods:
=======
TstView.h
=======
#import
@interface TstView : NSView
{
int x; //new variables
}
- (id) setx; //new method
@end
8- Once you have added a new class, you need to go back to IB, select the UI object, and select the new class for it.
9- Finally you use classes like NSPoint, NSColor, and NSImage to do 2D graphics as discussed before and generally in your drawRect method. See previous posts for details.
Hopefully this quick review gave you the chance to learn a little bit about Cocoa programming. It was a good learning experience for me. Although I didn't find any of the two systems significantly superior to the other in terms of functionality, I found the Windows programming frameworks and tools more convenient and effective. Of course I'm not done yet. My next step is to try 3D programming and also test and compare some operations in common 3D programs.
I'LL BE BACK!
Back in the old days (1990's) when I was using Microsoft Foundation Classes (MFC) in Visual C++, I was introduced to the concept of document-based vs. form-based applications. MFC had (and still has) three types of applications: Multiple Document, Single Document, and Dialog-based. The first two types are variation of what in general is called document-based application where you can open an existing document or create a new one. The framework provides programmers with base classes for Document (application data) and View (user interface). Dialog-based or form-based applications on the other hand have a dialog box (or a form) as their main interface although they still may open files, and there is no framework imposed separation between data and UI. In MFC dialog-based application where easier to make than document-based ones, especially because it was easier to define the program in terms of a series of event-handlers responding to UI objects on the form. Visual C# made creation of dialog-based (now called forms) even easier and got rid of document-based application style (you can still make them if you want but have to create the document class yourself). Cocoa does provide similar option. Default application in Xcode is a "form-based" one, but you may select the document-based option and some classes will be added to your code to support document-based architecture.
Just like I didn't like document-based applications in Visual C++, I didn't like them in Xcode. In fact I disliked them even more because they are harder to use and more confusing than their VC++ version). After a short try, I decided to not work with the document-based applications. If you are interested in learning about them, check this page as your starting point:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Documents/Tasks/ImplementingDocApp.html
Now let's focus on the form-based applications and basic GUI and 2D graphics programming with Cocoa. Here are the basic things you need to know:
1- Cocoa and .NET provide more or less similar functionality for creating basic GUI and 2D graphics apps, but Cocoa classes are slightly more complicated to use. As for the IDE, Xcode is A LOT more complicated to use than Visual Studio. Also Objective-C as the programming language is not as convenient as C# for typical C/C++ programmers.
2- Once you create a default form-based Cocoa application, you have a NSApplicationDelegate class made for you. This can be your starting point to add variables and event-handlers. It already has a member that points to your application window.
3- You design your form (user interface) in Interface Builder that can be launched by double-clicking on your xib or nib file in Xcode. In IB, from the Library add the UI objects to your form. Save and go back to Xcode.
4- You add two important things to your AppDelegate class: member variables representing UI objects and methods for UI event handlers. variables representing a UI objet have the type IBOutlet and the method IBAction. You don't need to specify the exact type of the object. Cocoa uses dynamic types. Here is an example:
=======
//TestAppDelegate.h
=======
#import
@interface TestAppDelegate : NSObject
NSWindow *window; //added automatically
IBOutlet id textView; //outlet for text view
IBOutlet id customView; //outlet for custom view showing images
IBOutlet id textfield; //outlet for a simple text field
}
- (IBAction) clearText: sender; //method for clearing the text view
- (IBAction) setView: sender; //set custom view properties
@property (assign) IBOutlet NSWindow *window;
@end
=======
//TestAppDelegate.m
=======
#import "TestAppDelegate.h"
@implementation TestAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
}
//////////
// This is the part where we implement the methods we added
//
- (IBAction) clearText: sender
{
[textView setString: @" "];
}
- (IBAction) setView: sender
{
//some code here
}
@end
5- Once you add the code in Xcode and UI objects in IB, you go back to IB and link the UI objects to the code. This is done by holding down the Control key and dragging item A (source) to item B (target). For member variables, source is the AppDelegate object in the IB Documents window, and taget is the UI object on the form. For event handlers, source is the UI object and target is the AppDelegate. In both case, once you drop, you get a list of options (class members that you want to use).
6- Instead of using the automatically-added AppDelegate class, you may create a new class based on NSObject and do the exact same thing with that.
7- Another thing that you can do is to add classes to extend existing Cocoa classes. For example we created a new class derived from NSView to control our custom views and make them draw images. It already had some default methods and we added our code to the drawRect method (see previous postings). We can also add member variables and new methods:
=======
TstView.h
=======
#import
@interface TstView : NSView
{
int x; //new variables
}
- (id) setx; //new method
@end
8- Once you have added a new class, you need to go back to IB, select the UI object, and select the new class for it.
9- Finally you use classes like NSPoint, NSColor, and NSImage to do 2D graphics as discussed before and generally in your drawRect method. See previous posts for details.
Hopefully this quick review gave you the chance to learn a little bit about Cocoa programming. It was a good learning experience for me. Although I didn't find any of the two systems significantly superior to the other in terms of functionality, I found the Windows programming frameworks and tools more convenient and effective. Of course I'm not done yet. My next step is to try 3D programming and also test and compare some operations in common 3D programs.
I'LL BE BACK!
Subscribe to:
Posts (Atom)