Friday, October 22, 2010

22 October 2010

It's Friday again~

Kevin briefed us on what to do in the morning. We'd have to go through the Xcode preferences to see what each settings does, as well as to review the applications that we have programmed previously. After reviewing, we'll be cleaning up these codes so that they can be used for future references. I'm sure at some point when we're working on our upcoming projects, we're bound to forget some things. It's easier to recall what we have done ourselves anyway.

Zac found a whole list of Xcode settings and shortcut keys. Very useful! Check it out in the useful links section "List of Xcode Settings & Shortcut keys". OH, and after exploring Xcode's preferences, finally found the setting to have all windows in one. That makes the viewing much more cleaner! Do this by going to menu bar / Xcode / Preferences / General tab and change Layout to "All-In-One".

Went for lunch with Bernard and Zac today. Ate at the foodcourt on the first floor and went to walk around in the market place (basement). Bernard took us to the Sky Garden at the 23rd floor. There's such a nice view there, but the haze simply ruined it. -.-

Watched the lecture done by a guest lecturer who talks about the basics - getting help and debugging.

So far, life @ IHPC is real good. I've been learning new stuff and making progress everyday. Although it can be tiring at times, but still, we've to persevere. These stuff that we learn will definitely be put into use when we work on our actual project. Looking forward to that day.

Starting on Touch next week, one of the major components that we'll be interacting with in out project. Gotta have a goooooooood understanding on this part.

Thursday, October 21, 2010

21 October 2010

Continued working on assignment 4 part 3 (aka assignment 6) today. Managed to have more progress already. Learnt how to pull data from Flickr and populate the data in our application. I was also able to plot the pin locations on the MapView with the use of Flickr's photo geo-locations.

Zac met with a "crazy" problem while trying to add in a framework. 58 errors, crazy - Yes? No? After spending around 1 hour trying to debug, Kevin came to the rescue. Haha! Kevin the master programmer?

We tried to set up FaceTime on the Mac. But it doesn't seem to be calling the phone and the Mac at the same time. We're gonna go through the keynote tomorrow to find out more.

Oh yeah, gonna have to spend some time going through Xcode settings. Really important!

Wednesday, October 20, 2010

20 October 2010

Tasks for the day:
- Go through lectures 10, 11 and 12
- Complete assignment 4 part 3 (aka assignment 6)

Today seems like a very long day... 3 lectures in a row! I got lost when watching the lectures. However, once I started working on the assignment, I was able to recap on what was being taught. I went through parts of the lecture again just to follow the demos. The demos done in these 3 lectures were very useful. It helped a lot when working on the assignment.

However, Zac and I are now stuck. The assignment we're working on has got to do with Flickr. We tried out the given methods to retrieve the photos from Flickr but nothing worked. Then finally I realized that we are missing the class "FlickrAPIKey.h". I encountered this problem earlier when starting on this assignment, but somehow the problem just went away. Then when I tried shifting the classes around to organize them, the problem came back.

We put in that missing class, but still needed that API key in order to process the retrieval of information. We tried to register for an API key but the server's not processing our request for the API key. Guess we'll just have to wait till tomorrow.

Time now: 5.40 pm

Used this link today to learn about creating delegate classes:

Tuesday, October 19, 2010

19 October 2010 - More Core Data

Been working with Core Data for the whole day! Finally completed Assignment 4 Part 2. The way of adding data into Core Data is different from what we did in our previous applications via Visual Studio. The toughest part of this assignment was to know how to write and retrieve proper data in/out of Core Data. Once we got the concept right, the rest of the assignment wasn't much of a problem at all.

We thought that the way we retrieved and stored data with Core Data was the right way yesterday. However, there were some issues that surfaced after some analysis. What we have done is to add the separate entities, namely Person and Photo. However, all that we need to do is to actually add the Person entity, as Person contains a set of Photos. We just had to properly assign the NSSet of Photo instances to the Person, and add Person into Core Data. The relationship would be established automatically by the database system.

Through much researching and looking at sample codes, as well as Kevin's help, we got to understand how Core Data is being implemented. Zac and I also helped each other in the implementation and debugging. We went ahead to derive an algorithm that saves and retrieves data properly using Core Data. This time round, we're very sure that everything is right.

All along we've been working with delegates, just that I didn't know what that was called - until Kevin explained what delegation was all about. It's one of those design patterns out there, where the methods being implemented by the delegate class would be called by the OS itself. All that is needed for us to do is to implement the required methods, and/or the optional methods. Its really kinda amazing how things work.

I've been learning many new stuff since I came here as an intern on the first day. Everyday is about learning new stuff, not just technically, but about things going on in life as well.

Went for lunch with Kevin, Calvin, Bernard and Zac today. Talked about getting cars, houses and even a girlfriend. Interesting to know how they look at things in life. Had a tea break too, at level 14. It's like a common area for all the various different departments. Played pool with Kevin, Calvin, Gim Han and Zac. Man, they played like professionals!

Would be proceeding on to watch more lectures and complete more assignments tomorrow.

Monday, October 18, 2010

18 October 2010

Went through lecture 9 today. This lecture covered things related to data in the iPhone. After watching the lecture, Zac and I proceeded on to work on Assignment 4 Part 2, where we have to apply the concepts of reading and writing data - persisting data.

First we worked with Property Lists (plist). We spent close to 2 hours and finally got to understand how to make use of plists and the concept behind it. At first, we're trying very hard to get plists integrated into the assignment. However, Kevin redirected us such that we worked just on a simple application to get an idea of how plist works. In less than 30minutes after heeding Kevin's advice, we managed to move on to the next part, Core Data.

Once again, we had a lot of trouble trying to read and write data into Core Data. Core Data is a database system, just like what we have been using, Microsoft SQL. When it comes to coding, it is always good to look for sample codes that can be downloaded via the Apple Documentation. Learning programming through looking at sample codes is definitely very effective. Kevin once again reminded us that we are taking the wrong approach. He told us about the general approach to solve problems, and it all really makes sense.

We're finally able to read from and write data to Core Data. However, there's still this problem that I've been pondering for quite a while - How do we mainain the relationships between entities? Kevin said he'll talk to us about that tomorrow. Looking forward to what he has got to tell us (: