Friday, October 8, 2010

08 October 2010 - First iPhone App [Calculator]

OMG!!! I've just completed my first application today! - Which is the first assignment that we're tasked to work on. Met with some difficulties along the way, but we managed to overcome it together :) Zac and I communicated and discussed the problems as we went through the assignment and managed to find solutions together.

The whole app was relatively easy to work on. Its more of the syntax issues that got us stuck. Obj-C still is a new language to us, hence, definitely we would have to spend some time getting to know more of the new syntax. I'm sure as we go through more practices, we'll get better.

Here's a screenshot of the app!

Ta da! :D

Since we're done with the assignment, Kevin played a movie for us to watch: Pirates of Silicon Valley

Didn't quite understand some parts of the movie. Let me just go read up on it, probabaly might be able to understand more :)

Thursday, October 7, 2010

07 October 2010 - Learning Obj-C

Reached office at 9 am. Kevin briefed us on what to do for the day:
- Go through Chapters 2, 3 and 4 in the book "Cocoa Programming for Mac OS X (3rd Edition), do the excercises
- Watch Podcast lecture 2 on iPhone Application Development (CS193P) - Winter 2010
- Do assignment 1 of iPhone Application Development (CS193P)

Managed to finish chapters 2 and 3 before lunch. In chapter 2, we learnt to create an application where the system would generate a random number when the user clicks on a button. The random number would then be displayed in a label. We also learnt more about classes in this chapter. Got to familiarize how to create instance variables and how methods are being called. Managed to create instances of the classes as well as making connection.

Went for lunch with Kevin, Bernard, Calvin and Zac at Holland V. The food there's nice. Continued with chapter 4 of the book after lunch and watched the second lecture. As usual, Kevin went through what we've done and clarified our doubts. Got to know more about local and global variables. Local variables (int, double, float) are stored in the stack portion of the computer's memory. As for global variables (object references - pointers) are stored in the heap portion.

Moved on to work on assignment 1 after that. Looks like we've gotta work on more applications in order to familiarize ourselves with obj-c. Even Kevin is working on the assignment. We're to compare our work tomorrow before lunch. We're already halfway through, and should be able to get it done when we return to office tomorrow.

I'm really starting to like the Mac. Maybe getting one when my laptop gives up on me. Hehe. Looking forward to more learning tomorrow! :D

Wednesday, October 6, 2010

06 October 2010

I'm already starting to get used to office life. Hehe. Looks like we're gonna start on development real soon.

We went through the questions given to us with Kevin today. Learnt much more things than I did yesterday. At least now I know that I have the right concepts.

Kevin then went through with us some of the necessary things that we need to know about the tools that we'd be using for development. Things like the Xcode and the Interface Builder. Not forgetting that I finally know that SDK and API are actually quite similar. I've always thought that they were different -.- We also touched on design patterns, particularly the MVC (Model View Controller). Looks like we would have to put this into use when development starts. Looking forward to that!

Managed to properly setup iChat to actually be able to chat. A*Star blocked some of the ports, hence, once the changing of ports for that application is done, problem solved!

Just went through the first Podcast lecture on iPhone Application Development by Stanford University with Zac. Makes me feel like I'm back in the days where we had lectures for our course modules. Podcasts are really useful, and the lecture we went through actually proved that point :) looks like iTunes would be my good buddy too.

"Podcasts are very useful, especially for programmers." Keep that in mind!

Should be going for lunch soon with Kevin and Zac, and heading for IKEA as well. Setting up the lab after lunch!

Time check: 11.45 am.

Time check: 1.20 p.m.

Back from lunch with Kevin, Bernard and Zac. Went to IKEA and bought some plants to liven up the room. Had Subway for lunch :)

Cleaned up the lab and got the plants ready to be placed on our desks! Will upload the pictures soon~

Wow... Finally done the installations for iLife, iWork, Mac OS X Snow Leopard 10.6, and iPhone SDK with Xcode. Only managed to start trying out the demonstration in lecture 1 at around 5 pm.

Tinkered around with Xcode and the Interface Builder to work on the demo project. Met with some problems. The interface we see is somewhat different from what is being shown in the demo. Still, we managed to figure it out. 3 minds (Kevin, Zac and I) work better than 1 :) Once we managed to get the project working, Kevin explained to us in further details with regards to what we have done. He's really good at explanations! I'm sure I'll be able to learn lots of things throughout this journey.

Gonna finish up on the final bits of installations and getting off from work. Don't think we'll be leaving at 5.30 pm though. Maybe around 6 pm? The crowd is so scary at 5.30 pm!!!

Tuesday, October 5, 2010

05 October 2010 - Mac OS X Familiarization & Trying out Objective-C

Kevin's on MC today. Just hope he gets better. He's a very responsible supervisor! We were given a list of questions to work on in order to familiarize with the Mac. Let me just put up the questions and answers here (:

P.S. Bernard is a really nice person too! Hehe.

Do check out Zac's blog too, he's got his answers there as well. Lets get started.

Q1.
What is the DOCK and how is it used?

A1.
It is used for the running of applications and switching between running applications. In NeXTSTEP and OpenStep, it is a launcher that holds frequently used programs. However, in the Mac OS X, it is used as a repository for any program or file in the OS. The number of items it can hold is unlimited. Applications that are not kept in the dock would still appear when being run. The size of the dock in NeXT OS is limited by the display resolution, but for the Mac, its not.

The dock on the Mac OS X also has extended menus to control applications without having to make the applications visible. Take iTunes for example. The extended menus allow users to control certain playback options. Been tinkering with the extended menu for iTunes to get some screenshots but to no avail.

Reason: I've got no songs on this Mac -.-
Thanks Zac for reminding me on that point.


Q2.
What is the Menu Bar and how is it used?

A2.
The Mac OS X menu bar is a thin horizontal bar that is permanently anchored to the top of the desktop. It can be hidden though. It always contains the Apple Menu as well as the basic menu items such as File, Edit, View, Window and Help. Aside from these basic menus, the menu bar would contain the menus of the currently focused application.


The far right area of the menu bar contains optional menus (called menu extras) for controlling applications and configuring the system. These include the date and time, the volume control as well as the spotlight (search tool for Mac OS X). There's also the fast user switching menu here, if enabled. All these menu extras can be moved horizontally when command-clicking and dragging left or right. If dragged and dropped vertically, the icon disappears with a puff of smoke. Cool eh.


Q3.
What are the three Red, Yellow, Green buttons at the top of an application window for?

A3.
Happened to chance upon this PDF document when researching. Find it quite useful for starters! (: take a look here.

These buttons has somewhat similar functions to Windows' buttons. Nevertheless, there are still differences. The red button closes the window, AND, in many applications, such as MS Word, a black dot appears in the red button if the document is unsaved. Unlike Windows, an asterisk appears beside the document name when the document is unsaved.

The yellow button puts the window in the Dock, somewhat similar to the minimize button in Windows. As for the green button, it does not only maximize the window size, minimizing of the window size can be done as well.

There is also this clear elongated button on the top right corner. When clicked, it either show or hide the toolbar.

Q4.
What is the equivalent of the Control Panel in OS X? How do you enable left+right click on the mouse?

A4.
The Control Panel in OS X is called the System Preferences. It allows users to modify various system settings, divided into separate preference panes.

P.S. I just learnt how to take a screenshot on the Mac. Hehe. Check it out here.

To enable left+right click on a Mac, all that has to be done is to fire up System Preferences and click on Keyboard and Mouse. Then set the mouse as follows:

Once the right mouse button is being set to Secondary Button, right click is enabled (: Here is the full tutorial.

Q5.
What is the equivalent of Windows Explorer on the Mac? What are the different views in which one can view their files and folders?

A5.
Its called the Finder. It allows users to visually access practically everything on the mac - applications, hard disks, files, folders and even CDs.

There are 4 different views in the Finder.

Icons View
List View
Columns View
Cover View

Q6.
How does one launch an application that's not in the DOCK?

A6.
There are actually 2 ways to run an application that does not reside in the dock.

The first way is to command+click on any applications that are currently in the dock. This would fire up the Finder and a list of applications installed on the Mac can be found.

The second way is to make use of the Spotlight on the menu bar. All the user have to do is just to type in the application name, and the OS will run a search on the system and display a list of applications that can be run.


Q7.
What is iTunes? What is it good for?

A7.
iTunes is a proprietary digital media player application. It is used for playing and organizing digital music and video files. Apart from being just a media player, is also acts as an interface for managing the contents on Apple's iPod and iPhone, not forgetting the iPad.

The iTunes Store can be accessed via iTunes as well when there's internet connectivity. Purchasing and downloading of music, music videos, television shows, iPod games, audiobooks, podcasts, feature length films and movie rentals (only available in certain countries), and ringtones (iPhone only). Applications for the iPhone, iPod touch and iPad can also be downloaded from the iTunes Store.

iTunes is available for download at no cost.

With that, let me answer the question on what is iTunes good for in my own opinion. I like the way how iTunes centralize all the media that I use on my computer. Everything can be found in the iTunes folder, plus, they are all organized nicely. Backup of all my favorite media can be done easily by copying the whole iTunes folder. This way, I would not miss out any that are scattered all over my computer.

That brings me to the next question, what's bad? Well, up till now, I've had no issues with iTunes except for some lag when used on Windows. Other than that, it's all up to my expectations (:

Q8.
What is iPhoto? What is it good for?

A8.
iPhoto is an application developed by Apple, exclusively for the Mac OS X. Importing, organizing, editing, printing and sharing of digital photos can be done using this software.

It is designed to allow importing of photos from digital cameras, scanners, picture CDs, as well as the Internet. No additional software is required for iPhoto to recognize most digital cameras and scanners. The most common image file formats are supported by iPhoto.

Imported photos can be titled, labeled, sorted and organized into groups (known as "events"). This is optional though. Using the basic image manipulation tools, photo editing can be done. These tools include but are not limited to red-eye filter, contrast and brightness adjustments, crop, and resize. Still, it does not provide comprehensive functionality that other programs provide, such as Adobe Photoshop.

There is also the facial recognition feature, and it allows for tagging and organizing photos by person. embedded GPS tags will be read by iPhoto and these photos can be organized by location, represented by a pin on a map that is powered by Google Maps. If in any case where photos take using cameras that does not support geotagging, it can be done manually within iPhoto.

Photo albums in iPhoto can be made into dynamic slideshows, and optionally set to music imported from itunes. Exporting to QuickTime movie files can be done and further edited in iMovie or burned into DVDs using iDVD. Both the slideshows and static photos can be shared to other Mac devices on a local network by using the Bonjour "zero-configuration" technology. They can also be uploaded using simplified web publishing to Apple's MobileMe online service. Photo albums can also be synced to any iPod with color display.

Q9.
What application is used for mail? What is the difference amongst POP, IMAP and Exchange accounts?

A9.
The application used for mail on Mac OS X is Mail.


IMAP: Internet Message Access Protocol
POP: Post Office Protocol

For IMAP, when checking mail, the messages are being pulled form the server and shown in inbox. However, for POP, the messages are downloaded from the server and saved locally, and then accessed from there. As for exchange, the mails are stored on the central server, and there's also the option of saving it locally.


Time check: 11.50 am
Going off for lunch with Zac now! Will continue later.

Time check: 12.30 pm
Let us continue!

Q10.
What is the quicktime application good for? Open a clip and trim it to a shorter period.

A10.
Quicktime uses the latest video compression technology and is able to compress videos tightly. This results in much smaller files, without any loss in quality. Videos can then be watched in awesome quality.

It also is able to determine the system's connection speed and choose the highest quality stream based on the amount of bandwidth available, automatically. In cases where connections are lost during video steams, reconnection is done automatically as well.

Downloaded a sample clip but unable to try out the video trimming feature :S got to have the pro version installed on this Mac.

Q11.
Connect Mail, iCal and iChat to Gmail account.

A11.
Tried connecting to Mail but was only able to receive mails through IMAP. However, couldn't get to send any emails. Seems like the connection to the Gmail's SMTP cannot be established.

Managed to sync my Google Calendar with iCal! Tried creating an event in iCal and look what happens to my Google Calendar (: follow the instructions here if you wanna try!


Was able to set up the account for iChat, however, iChat couldn't connect me even though I've set my status to online.

I suspect there's some privilege issues here. Same thing is happening to Zac as well :S

Q12.
What is an RSS?

A12.
RSS: Really Simple Syndication

It is a family of web feed formats used to publish frequently updated works, such as blog entries, news headlines, audio and video - all in a standardized format. An RSS document, called a "feed", "web feed", or "channel", can include full or summarized text, as well as metadata such as publishing dates and authorship. Publishers benefit by automatically syndicating content, while readers get timely updates from favored websites, or to aggregate feeds from many sites into one place.

RSS feeds can be read using RSS readers, feed readers, or aggregators. These can be web-based, desktop-based, or mobile-device-based. The standardized XML file format allows the information to be published only once, but can still be read by many different programs. There is no need for publishing multiple times.

Subscription to an RSS feed is done by entering the feed's URI into the reader or just by clicking the RSS icon in a web browser that initiates the subscription process. The reader would then check the user's subscribed feeds regularly for updates, and provides an interface for monitoring of the feeds.

Subscribed to nba.com's RSS feeds using Google Reader. Hehe.

Q13.
What is a Podcast?

A13.
Podcasts (also known as non-streamed webcasts) are a series of digital media files that are released in episodes and often downloaded through web syndication (RSS anyone?).

The mode of delivery differentiates podcasting from other means of accessing media files over the Internet, such as direct downloading or streamed webcasting. There would be a list of all the audio and video files associated with a given series that are being maintained centrally on the distributor's server. This list is maintained as a web feed. The listener/viewer is required to make use of special client application software known as a pod-catcher. This application can access the web feeds, check it for updates, and then download any new files in the series. Automation of this process can be done for automatic downloading of files. The files would be stored locally, and ready for offline use.

In other words, a podcast is a digital audio or video file that is episodic, downloadable, program-driven, mainly with a host and/or theme, and convenient, usually via an automated feed with computer software.

Downloading some podcasts via iTunes (: 2 episodes in this series.

Managed to complete my tasks for the day! A very fruitful day indeed. Starting to get used to the Mac already. Alright, now for some more tinkering with the Mac...



...Trying out Objective-C...

Had some time left, so did a little exploring and here are the results:

Got this code on the internet and tried it out.

Compiling the code in the Terminal.

There you go! Hello World! :D

Here's another one. Took me longer than I expected -.-

Had problems trying to print out the integer.

This seems to be a useful link to read up on: NSLog and Format Specifiers

Found another link while trying out some codes. Has some really good tutorials. Click here.

Monday, October 4, 2010

04 October 2010 - First day @ IHPC as an intern

My first post on this blog. Arrived at IHPC with Zac at 8 am sharp today. Had to fill up some HR documents before we got anything started. We are working at IHPC's Advanced Computing (AC) department, in the Geometrical Modeling group. Sounds cool! The lab that we would be working in is called the Visualization Chamber (VC). It's really big!

Our supervisor, Kevin, talked to us about some things to expect during this whole period. We're told that we would not be working on HoloTouch. Instead, we would be working on a project with regards to Human Computer Interaction (HCI). This project would be related to medical applications, in particular, education. End product - iPad application? We shall see... Development would be done using Objective-C, something to look forward to. We have got interesting tasks on hand, and I hope to accomplish these tasks as much as possible.

We also took some time to get to know each other better. Seems to me that Kevin works out everyday. Gym on Mondays, Wednesdays and Fridays. Running on Tuesdays and Thursdays. Wow! Looks like I gotta do some jogging to keep in shape too. Hehe.

We would be setting up our lab for use tomorrow, and touching on some things related to Operating Systems (OS), the various different tools. Kevin calls it CS101 - Computer Science 101 (sounds good eh?).

It's time for me to continue reading up on Lup Peng and Situ's blogs. I would probably be able to learn some new things from there. While doing that, I guess it would be good if I try to familiarize with the MAC.

P.S. I had no idea how to copy and paste (command + c & command + v) using a MAC -.- so much for a Computer Science person! Haha!

Oh and by the way, Zac and I have to speak english wherever we go. Seems like a good chance to improve my spoken English eh? Still lots of getting used to be done.

Here are some pictures of our lab before the setting up tomorrow:


Some mugs that should contain plants
My desk!