Welcome

This is a blog sharing what i have learn and experience from my internship in A*Star IHPC
- Zac Kwan

Thursday, December 30, 2010

Day 60 - Last day of 2010 work in the office

Today came back to the office and started to continue working on the problem we identify as the translation issues from different object. First, we manage to fix the translation on the different z axis that each object have from the clip. This make the translation more accurate although from the visual we couldn't really tell.

After that we went on to the second problem. The translation for different object seems to be the problem with their different unit of axes. We try importing different object first to see if we get the same result but apparently it doesn't. However, the object work fine individually. So alex continue meddle with it. He then found out that because the object is too small so he scale up, and this cause the axes of x,y,z to unit to be larger.

So now we found of is the scaling problem, we went on to search the libraries for methods to reading the scaling matrix. We went on to fix it after working on the formula for a while. Everything for the translation seems to be working perfectly find now. What a good way to end our work in 2010 =)

Wednesday, December 29, 2010

Day 59 - Where are you?

.... still working on the translation issue. Seem to me as not able to get it. Kevin came over and i explain to him about what i think. This time round i think that it get more clearer now.

After a while, the translation start to yield result. Just as the path that i expected. Mange to move on working on the other translation issue.

Work with alex to get some other working like the translation when not selecting any object moving to a object cause it to fly. Also the problem of not going into gesture began when it is call.
Everything seems to work for the first node that is draw.

The other node that is imported from other file to the pod scene fail to work when drawn. The translation value is the same for both object, but it seems to translate more than the other those. Believe is the problem in generating the pod scence.

Tuesday, December 28, 2010

Day 58 - Exploded

Yesterday before leaving office, found out that the exploded formula have problem with node count of 4 and lesser. as 360/4 or less would result a value of 90+. This would cause tan(degree) to produce a result that is not correct.

So i went on to fix this problem by specifying the exploded view of the translation when the model have less than 5 node count. The time require was actually quite short as i only have 3 scenario to do.

After lunch, i went on to help Alex with his problem the translation of the object. I believe that the formula that he did earlier was the correct 1, rather than finding other solution i decide to dive into the problem that might cause this formula not working to the result we expected. The first thing i did was to draw a plane at the near clipping plane. After doing this i found out that there must be a distance from the camera to the object even if the object is not being translated.

I did manage to prove what i thought and explained that to Alex to let him know about the chance that this could happen.

“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime”—Author unknown

“Give a man a fish; you have fed him for today. Teach a man to fish; and you will not have to listen to his incessant whining about how hungry he is.”—Author unknown

Monday, December 27, 2010

Day 57 - First day of work after Christmas

Its monday and the day after christmas, it hard to get my engine started for work.

Kevin back to work after his holiday, we explain to him about what we done and what we have not done. It slightly embarrassed to say that we got more than half of the task still not yet complete. I told him about the problem in translation and how did i plan to get it working. He describe to be a more simple one that is still logical.

Went on to work on the exploding of the object for the remaining of the day. Spend time calculating the formula of the object to be divided by 360 den * tan(degree) and blablahblah. Trying to get the formula working before i even started to code. So i spent almost more than half a day to do that.

At least my effort did paid off. Manage to set up the exploded view just as expected from my formula result but still translation is a bit of the problem.

Friday, December 24, 2010

Day 56 - Half Day Work at office today

Today is Xmas Eve, Merry Xmas if you are from US and Happy Xmas if u are from UK =)

Well although is Xmas eve, still got to come over to the office to complete a half day work. It seems that everyone looking really happy today, even the strangers in the train, or colleague in the office or maybe it just me.

The mood now is definitely Xmas mood, but still need to get some of the leftover work done like the changing of texture while translating. After yesterday understood about how the binding of the texture work, it wasn't much of a difficulty to change according to the translation. Just calculate the differences in the axis when the value is translated and change the texture according to the full screen bounds. Manage to get it done pretty quickly thou but still have way to optimize it.

So while i still have time i write up a simple if else to only change the texture when the translation to another texture so that it will not alway be binding texture to the plane even when the texture currently displayed. This way only the texture that is going to be shown will be bind, this would improve the processing speed.

Thursday, December 23, 2010

Day 55 - Texture and Translation on Cutting Plane

Day 55 is Xmas Eve's eve.. Already can feel the xmas mood now. Town, shopping center, mrt are all decorate with xmas item!

The fact i love xmas is whenever xmas is coming, a year is ending. Every time at this point, i will start thinking back on what had happen so far this year. Thinking back on the memories, epic moment and etc. Sometime couldn't believe that it happen so long ago. Anyway Merry Xmas everyone =)

Well still have to work today, cont working on the translation on the cutting plane. By apply texture on the cutting plane work fine. However i did notice that the animation start to get laggy because apply apply the plane cutting, where i suspect is due to the texture. I remenber that when reading on Jeff blog the texture should only be loaded one time if possible so that it will not cause memory issue. The way i am doing it is actually loading the texture to the texture2d every frame x30 per sec. This is really alot. i try various way but i cant because i have texture for the model node as well. After reading more and texture and see how the podloader applying the texture that don't cause any problem, i believe there must be a way to do it. So i decided to read up more before i start trying again. And YES! solve the problem with

glBindTexture(GL_TEXTURE_2D, m_gridTexture[0]);


So now will continue working on the translation to change the texture when moving in and out of the z axis. Its hardcoded still but it does look nice when u see the texture of the plane changing as u cutting.

Wednesday, December 22, 2010

Day 54 - Clipping Plane is Cutting

Continue yesterday work that is to calculate the normal of all the plane.

There is alot of project or sample code that i get from already have method to calculate the normal from the vertices of the object. I read through that and it is actually quite complication or overwhelming on what i need to do. All the previous project i dl-ing will calculate the vertices for a non-flat plane object which each set of vertices would have different normal. and some even go on to divide by the number of face being reuse to reduce the normal. I got really confuse at first so i read the iPhone 3D programming. The godly book that have been helping me for very long.

As i read the chapter i understood more about it although there isn't any build in method or provided method to calculate the normal. But at least i understood that i am creating a flat plane that mean all the normal from any set of vertices would produce the same result! So i went to read up jeff blog on calculating normal. Then i make use of some method he have in GLCommon.h to calculate the normal of my plane. After some try, finally to get it working. I also manage to apply rotation to both plane and the clipping. It wasn't difficult but the fact that it work prove that my understanding of drawing a plane at the clipping edge is correct!

Now got to hardcode some image and test the changing of texture when the clipping plane is translated tomorrow.

Tuesday, December 21, 2010

Day 53 - Finally Found Something

Still working on the clipping plane, after a lot of googling and research yesterday that is reaching nowhere, decided to start all this all over again.

As usual i open-ed my tab from last browsing session, i browse through some of the website that i already read before yesterday. Suddenly, i found out that this website is actually teaching how to do a clipping with stencil that is somehow related to what i need.

http://glbook.gamedev.net/moglgp/advclip.asp

Trying to find the pdf book online on this chapter, but look like it not available or i have to purchase it. So i just going to make do with the short tutorial. I try apply the clip function as my plane vertex and draw the plane on the object. This time finally the plane appear, but not at the right position.

I re-read and read the blogpost in the website again and finally notice a method that might be the cause of my problem.

get_plane_equation(verts[0], verts[1], verts[2], eq);

This equation is not being explain by the blog, at first i thgt i just pass in the vertex of my plane. But after remembering what was the parameter about the equation, i know that i have to pass in normal x, y,z to set up the clipping. I hard corded the normal and rotate the plane there and IT WORK! Long day but finally get it working. Going to calculate the normal using method tomorrow so it work for all plane!

Monday, December 20, 2010

Day 52 - Plane Cutting

After finishing with the rotation and fixing the bug in frame animation of the model, now i am moving on to working on plane cutting.

First up, i research the way of doing it. From what i have found, a the cutting of the model is usually use with the glClippingf function. This can be a user define equation to define where to cut the model. Just by hardcoded equation, i am able to see the 3d model being cut.

There still more to learn about how to write the equation, but now i am trying to draw a plane at the clipping part so that i can see the cutting visually. I spend the other half of the day researching on how to draw a plane at the clipping part of the model but found no answer. It was really bad when all the link in the google search result already turn purple. Not going to give up yet, will start all over the research again tomorrow!

Thursday, December 16, 2010

Day 51 - Fixed rotation and modelframe

Its day 51! Time seems to fly, i have been working here in IHPC for half of a hundred days. Really enjoy working here.

Well back to the topic, today was to fix the rotation by changing from the original swipe gesture to UIPangesture. It was not that difficult to rotate the whole model view matrix for the whole 3d object as i already manage to create the iVar and other, just have to get and set according to the translation of view.

However, for the individual node, as method and the UISwipeGesture was being done previously, there was quite alot to change to make use of this UIPanGesture matrixes. At first i manage to get the object rotate at the correct direction but the speed of the rotation is too much. I do not really understand what the reason at first because i did += the new value minus the old value which should not give any problem. But after more debugging and thinking i finally found the error with this that will only work for the first two step. So i fixed it.

The remaining of the day i spent trying to fix the modelframe animation as the sudden end of the animation and start doesn't look good at all. It seems to make the object jump from one frame to another frame without smooth transition. Manage to implement a pause and play function for the frame to have it connected to the last stop frame.

Wednesday, December 15, 2010

Day 50 - Rotation on ModelView

As stated yesterday, i have put the explode view on hold for the time being and move on to doing the rotation view.

I started to look for way of rotation the camera and then came across a post to say that in opengl es there issn't such thing of a camera in the first place. User is viewing at the 0,0,0 by default but because we applyed some transformation to the modelview like lookat and translate therefore the view changes. And this is also our so call camera. With this, i knew that i should also perform my rotation here to apply the rotation matrix to all the 3D object in the modelview scene.

I try using glrotate here before the push and pop matrix its call, but nothing seems to change. I still think that it is the correct 1, so i explore the rotation perform by the POD tutorial on all the object. I found that that they have their own build in rotation to be perform on the model matrix. Apply this rotation matrix at the same place, i finally manage to get the whole object to rotate together at the same axis. However the by using UISwipegesture, the rotation is quite stiff that doesn't feel nice in the user point of view. So i decided to change to UIPangesture to do the rotation.

Tuesday, December 14, 2010

Day 49 - Kevin is going on leave tmrw

Kevin our supervisor will be on leave starting from tmrw for the next 10day. We already have discussed on what need to be done in the next 10 day, hopefully we can complete it.

So started working on what was discussed, first i look at the technique for separation in the exploded view. I did some research and studies on this thinking that there should be some algorithm did by some people that i can simply make use of for my project. However after almost a whole day of searching, its simply wasn't the case.

I did some thinking and decide to put this to the last on my list and work on the other part first. I would get back to the exploded view when i completed the rest of the component even if i have to write my own algorithm to get it working.

Monday, December 13, 2010

Day 48 - Changes to Transformation

Previous as we create a objective class with c++ object inside, a lot of unnecessary warning occur, though it doesn't affect much, but is not very pleasant to have so many warning when running the application. Also because of this, we have to change the compiler use by objective c to a cpp objccpp compiler for every class that uses it. Which result in more warning.

Kevin told us about a possible solution to just have the c++ object remain in a the eaglView, by create a transformation class to pass the value to the c++ class in the eaglView method. This would just have to change the eaglView compiler to the objcpp which is unavoidable, but other class could remain using objc compile which will give us lesser warning.

We agreed and started changing it. At first we though that it would have a lot to change, but end up it was actually quite smooth during the changing processing. The error encounter was being solve pretty fast as we somehow already know what causes this to happen when the error occur.

Thursday, December 9, 2010

Day 47 - Adding gesture and colorpicker

As the layout of the iPad and iPhone is complete, we started working on the functionally today.

We spend the 1st of the day getting the color picker to work. Colorpicker is a technique to detect the object that is being touch by using unique color assigned. Was able to get it working without some depth buffer at first. But without depth buffer this would cause the object behind another object to never get selected which will not look nice. After that manage to solve it by enabling depth buffer but need to clear it before drawing again.

After that we went on to continue adding the gesture of rotation, translation and scale to the individual node. Rotation wasn't much of the problem, but translation doesn't seems to work well. Alex is still trying to fix the translation issues.

Wednesday, December 8, 2010

Day 46 - ScanViewController

After fixing the UISplitViewController yesterday, now the layout of the iPad is close to finish.

So now i when on to do the scanView that will show the dicomm image of the MRI scan of our project. It will just be a plain swipe on the view and the image will be changing according to the translation.

As Alex have already did UIGestureRecongizer before for the openGL object, all i have to do was create a controller and add in the UIGestureRecongizer of pan to get it working. It wasn't too touch of a job to do. Manage to finish all this before lunch thanks to alex code =)

Alex came after lunch cause he have a driving test in the morning. Congrats for passing! I give him a overview of what i have done so far when he is not around and also told him how i manage to overcome the bump that we encounter during the development.

Tuesday, December 7, 2010

Day 45 - More on the Interface Design

After solving the rotating in UISplitViewController, i now needed to set the eaglview as a delegate to send my podnode back to table. I created another table to set up the podNode. Working on iPad but when i try to implement on iPhone, i face some cycle dependencies issues.

I google it and i manage to understand what the dependencies is about. But at first thought my app does not have such thing occur. However when i go more deeply i notice this happen because that my iPad and iPhone share the same class which result in the problem. When i work individual everything would be fine. So i told kevin about this problem and now we decide to create a separate table class to solve this issue.

After solving this, i helped kevin with some html code that is not related to the current project. Have been long since i last touched the html code. Although not very difficult, but it is time consuming. Kevin also actually pull me in to sit for a presentation that conducted by some companies where we bought their product. It was a really interesting one, as they show us the potential of using their product to do stuff that we needed.

Monday, December 6, 2010

Day 44 - Continue on iPad design

Last friday, before we left the office, alex manage to set up the UISplitViewController on the iPad. It look really cool to have a popover on portrait and landscape to show them side by side.

However there are some bug to to it. Whenever we turn to landscape, the openglview is disappear. Not the object but the whole openglview, because the cleanscreen wasn't there. If we were to stop the animation and rotate it will appear, but once we start the animation again it disappear. Initally i concluded that this is the UISplitViewController problem because when we rotate on landscape on iphone, everything work fine. However the iPad with splitview it start to have some problem.

I spent half of the day googling and found no matching result. After that kevin came over, i told him about what i thought. He try re-adding the view but he accidentally resized the view and it disappear as well. So i start googling about this problem and finally found out that openGL view need a pixel dimension that is multiply of 32. But with the splitviewcontroller added, the openglviewer is automatically resize to another value which is not multiply of 32.

Friday, December 3, 2010

Day 43 - Just when everything went so smoothly

Friday, was really happy with the way the project progress. Although we move from obj loader to pod loader, but manage to set up everything in less than a week to do what it can do which is more than the obj loader that we did.

Alex also make progression on his animation with 3ds max. He manage to animation the object created the way he wanted to and also set up the camera and lighting. I am also able to load the podfile he create into my podloader. Everything was going so well.

Alex then went to find gimhan to take the obj file of the heart model. We find online for help on how to morph the heart model from 1 obj file to the 2nd obj file to the 3rd obj file. Of course we didnt know the technique was call morphing at first so we actually searched quite long for it.

However after watching the tutorial we manage to get the animation. BUT after exporting it to pod, the animation doesnt seem to work anymore. At this point, we found out podfile doesnt support vertex animation. Which causes us to have to move on when not having this animation.

Thursday, December 2, 2010

Day 42 - Depth Buffer

Although yesterday manage to set up the animation to run correctly, but there is still some problem in the drawing in the view. On my app, the last object that is being draw is on top of the object that draw 1st regardless of the z axis.

This is a problem because not every pod will be drawn from back to front. I believe that there is someway to set up the so that i could make use of the z-axis. Asked kevin for the book about the framebuffer that he actually read about as i suspect there is something to do with the setting up of framebuffer.

INDEED! the framebuffer needed to allow another depthbuffer to be enable to that they could allow the drawing of object according to the z axis. This way the object with z axis closer to the screen will be draw on top ignoring the order of drawing.

Wednesday, December 1, 2010

Day 41 - Animation

Will clear understand of what i need to do and what need to be done, i manage to head off to a good start.

I make changes to the modelapp to now take it camera and lighting from pod file. With this, i am also able to set animation. I manage to set up the app to load pod file with camera lighting texture before lunch.

After lunch i start to go and find out on how the animation of the pod file work. Found out from Alex that pod file is using key frame animation. With this type key frame, i believe that the animation is set by passing in and updating the frame number. So immediately i search for keyword frame in the training course, and i manage to found it. The code is written in c++ but comment did explain that it is passing in the frame number per ms that is pass to the next draw. I spend the day coming out with the algo to do time and set frame and manage to get the animation to work.

Tuesday, November 30, 2010

Day 40 - Alex is Sick

Sorry for spreading the virus to you.

Today alex is on MC, so i am working in the lab alone. I continue the work that i left off yesterday, and i manage to found out the possibility of drawing individual node on screen. So i started to reconstruct my understand of the pod file.

I spend about 2 hr brainstorming on the possible way of using the node and this also bring back the camera and lighting that was not included at first. With the possibility of individual node, we does not have to include multiple loading of POD.

So i asked kevin over to discuss about my finding. Told him about the problem when we load POD as we have to translate them to our camera which is something that required some complication algorithm if needed and also the problem when importing multiple pod. This time with the solid finding and backing, manage to convince him about using the pod camera and also lighting on the scene.

Monday, November 29, 2010

Day 39 - Loading POD with Library

Still coming to office with flu, but feeling better. However i found out that Alex is now having flu too. It seems like my flu virus is being pass over to him. Oppz sorry.

After understanding the lecture and how it work, i finally want to try to do a import of pod file by starting a new app from template i created before. The first troublesome thing is to import the library. Spend quite long on research to get the library into the xcode, but still unable to compile it when using the library. Doesn't seem to have a solution behind it. I decided to search way to import library and finally found some lead that might cause error when importing a C++ library. Change my .m file to a .mm file to trick Xcode to use a c++ compile and this indeed work =)

Finally get it working, i started to import the pod file into xcode. With a lot of comment in the training course, i manage to set up pretty fast however as i set up my own camera, i need to translate the object back to my camera space. So kevin came i told him about using the possibility of using the pod Camera, but he think that using the camera in the pod will not allow other pod to be imported at the same time. This is a point too. So i continue working on the app to fix the bug and understand more about how the individual drawing of meshes work.

Friday, November 26, 2010

Day 38 - Changing to the POD format

After discussion and careful consideration, we decided to move on to POD format.

POD is another 3D format by PowerVR i believe. PowerVR is actually the graphic chipset company that supply apple with its embedded chipset on iPhone.

The reason to move on to POD is because that its seems increase the loading time on importing the vertices from pod file, it also have a lot of tutorial to help us understand better. They provided training course, demo and library for iPhone developer to use.

After looking at the tutorial, my first thought was that its is really cool, as we can even set up camera and lighting on the pod file before importing it which can immediately point the user to look at the specific part of the object. Spend the rest of the day messing with the provided training course and understanding how it work.

Thursday, November 25, 2010

Day 37 - Material & changes

Today i manage to set up the material by calculating the normal from the vertex and faces so now every part of the object reflect the same thing when they are at the same angle toward the light source!

However this make me realise that obj file is actually quite error prone. In a way that not all obj file from internet is able to use, because some might actually set different setting like compression which cause the obj file to have lesser vertex. But because we had been working so long with obj, i didn't actually have a thought on moving toward other 3d model format.

Kevin came and had a discussion with us. We told him what we found and also about the obj file. He actually came to ask us on our opinion on using other format as well. Like the opengl 2.0 to 1.1 case, we needed to change the stuff we work on, but i think i really learn a lot of stuff from there!

Wednesday, November 24, 2010

Day 36 - Lighting Material Lighting Material

More lighting to be done on opengl. Read up from more sources, including the book that Kevin bought. .

After that i manage to set up the lighting according to Jeff blog. However i still face difficulties in visualling how the lighting will shine on the object from the xyz axis. Example, the distance like nearer it get darker or brighter and such.

Have to work on material now. Material is the reflecting of light from the object. Manage to apply it but do not understand how it work and it does not seems correct either. Need to fix it tomorrow.

Tuesday, November 23, 2010

Day 35 - Lighting & Material

35 day of internship, time just since to files.

This morning came to office working on the bug fix on the translationInView alone. Alex went for his regular doctor appointment. So first start on finding why that bug appear, after awhile manage to understand what causes the problem. Trying a few way to apply the solution, manage to fix it just before lunch.

This time we had lunch at Jack's Place with some other colleagues to enjoy the 1 for 1 offer. Thanks Kevin! The lunch was really good, good food, good service.

After lunch, Alex is back, we spilt the task, while he work on the texture, i will be working on the lighting. Spend the remaining of the day reading and understanding how does lighting work in OPENGL.

Monday, November 22, 2010

Day 34 - Formula Brainstorming

Back to office today continue trying to fix the translation problem with the object. Alex and I was brainstorming how to calculate the formula so that the object would translate according to the touch of the object.

Kevin drop us a hint when we was stuck, although I saw the code that he hinted us on, but i didn't bother finding out more at first. Now after he say, i started looking more in deep but still after hours of thinking still cant figure out the formula. So i was thinking that there must be some concept that i misunderstood resulting in all the formula i come out with do not give me the result i wanted.

Kevin came to save us later teaching us how it done it, he used the translationInView rather than locationInView which can have a lesser step of calculation to be done to get the correct translation value needed. Well less calculation equal less user error, so we manage to get it to work but with some bug left to be fix tomorrow.

Friday, November 19, 2010

Day 33 - Back to Maths

Today was a day to clean up our code and also comment it before we archiving it into our es2.0 version. I spent the morning improving some of the UIDesign and also commenting on the function that i have done so that whenever we come back, this project should be a clear enough one to find what we are looking for.

During afternoon, we actually went to clementi for lunch, as Kevin want to buy a book about opengl from the clementi book store. The amazing thing is we queue for the koi bubble tea that is the longest that i waited (close to 1 hour).

On the afternoon, Alex need to do some translation according to the pan of the user finger. The translation have the same problem with the Z axis that required some kind of formula calculation to do it. Calvin came and actually explain to us what was going on in the 3d space so that we can actually know what exactly was the problem, rather than just knowing is the Z axis. With that we finally understood and now needed to come out with a calculation to do it.

Although i love maths during my secondary life, but in poly i have never touch much maths before, not to mention our geometry. Needed to read up more on that during the weekend.

Thursday, November 18, 2010

Day 32 - Officially changing back to OPENGL ES 1.1

As decided on tuesday, we decided to move back to OPENGL ES 1.1 as the development of 2.0 as reach quite alot of bump whenever we are trying new stuff. Although so far we manage to solve all the issues, but it take way too much time that can cause this project to delay and we never know what bump would occur again.

So the first time we need to do is to move everything that we have done into opengl es1.1. Surprisingly, it wasn't as difficult as i thought. Manage to completly port over the whole project in less than half a day. After that we went on to find out on how to allow each object to have its own transformation. To do this, we first need to identify the object that is being selected on the screen.

Research and found out a few method, like using a distance radius, color picking and also vertices pixel conversation. Every have its own advantages and also disadvantages. We decided to go on with color picking first as the advantages is what we want it our application and maybe look at how to fix the disadvantages issues. Manage to actually successfully identify the object before leaving the office today. Everything seems to be going on the right track today. =)

Tuesday, November 16, 2010

Day 31 - Back to OpenGLES1.1

Today was trying to solve the same problem about the matrix that cause object all to be translate to the same location, believe that there is a more simple way to do than to hardcode a few matrix and applying it one by one.

Kevin then came and we started to discuss about it again. During lunch, i think he was trying to tell us that maybe we should go back to using OpenGLES 1.1 as 2.0 is really too new and there is hardly any tutorial out there. I can see that he trying to tell us that our effort was not in vain, we did not do stuff that is not going to be used but just putting it aside for now. As a supervisor, i think he really play his role well. I believe any other supervisor would just come over and say "hey i think 2.0 is too new lets go back to 1.1".

Well, i think that although the code will not be used anymore, but i learn alot from it and have a better understanding of opengles overall.

The task to do was to create a template so that can be use for our future opengl project.

On the side note: is day 31 time files and enjoy my time here! However the project is still not progressing much.

Monday, November 15, 2010

Day 30 - Loading Multiple OBJ with GLES2.0

After some research i manage to put the EAGLView into a uiviewcontroller before lunch.

Everything was going quite smoothly, importing the obj object and doing the translation + rotation.

However when importing the multiple object, the problem start to occur. As every object are making use of the same matrix, the all the object being import is being translated into the same position. This cause the object to stack over one another. So, back to research and see what are the recommend way of solving it, like creating multiple model or using a array of model as 1.1 have a stack function but 2.0 has remove this function.

Friday, November 12, 2010

Day 29 - WireFrame

At the beginning of the day, walk-though my code with Kevin and Alex explaining to them what i have done with the opengl es2.0 and how i manage to import the obj file. Although i understand, i hope i did not misunderstood stuff and end up teaching them the wrong thing.

After discussion with Kevin, i does not need to go into applying texture and lighting into the object yet, just changing the object to a wire-frame kind of object. Alex then suggest changing the GL_TRIANGLES to GL_Lines and it work! Just a line of code and the object turn to a wireframe kind.

Spend the rest of the day cleaning up code and also start a new project to move it into a table.

BTW: the image look cool in wire-frame, will upload screenshot soon.


Thursday, November 11, 2010

Day 28 - Import OBJ, Rotate, Translate

Continue the work from yesterday, trying to understand why the object is not being draw correctly, looking into the method of glDrawArray() and glDrawElement. This is where the mistake was make. glDrawElement is actually use usually for importing obj file as the array of vertices is not in sequence, which mean a indices is needed to tell which line to be draw 1st. To make use of a universal drawelement and prevent maths error, using a for loop to loop the count of the indices and drawing it line by line is the perfect solution.

With that, manage to draw out a imported obj object. Next i try to do the rotate and translate. Translate is already been done by the apple template, using the same way i did the rotate but it did not work at first. "Same way" is always what i thought, after analyzing i still do not understand how the translate work even though the code was provided. This part, i stopped coding and start looking for answer online again. I decided that i have to understand what opengl es shader actually means! so Wikipedia is the best solution.

After reading what is shader, the attribute and uniform that state in the blog of jeff start to make more sense. I went back to the code, set the attribute and uniform in the sharder class, also bind-ing to the attribute and uniform of our ivar and this work!

Will post up screenshot soon of imported object soon!


Wednesday, November 10, 2010

Day 27 - OpenGL ES2.0

After decided that this project would make use of the ES2.0, started to research on how to create a simple hellogl project. Before i start, i read through the blog by Jeff(i posted the link on the previous post) which discuss about opengl es2.0 from chapter 1 to 4. Is really interesting read, it also contain some history and maths. But i believe that there is still alot more needed to be understand.

From there onwards, i started to make use of the apple provided template, understanding the code line by line, trying to understand as much as i can. Due to know pass experience on any opengl before, i have to debug on every method, understand how is the flow of the code, then started to refer to the blog explanation as i go through. Although the project template already draw a sample 2d square, but as the debugging mode is hard to apply on the rendering on every vertices is almost impossible to debug. However when i started to understand how the openGL work and what is the flow of it, i start to be able to set my own vertices and create it.

On the second half of the day, i try importing obj model object and draw it out. It wasn't as complicated as what i expected as first, but there is still some learning curve in understanding how it work. Manage to draw the obj model, not a perfect one before i leave the office. My aim for tomorrow would be to do a perfect one and do simple manipulation with it.

Tuesday, November 9, 2010

Day 26 - OpenGL ES 1.1 VS 2.0

Yesterday started to find the differences between this two different version and which is more suitable to use for our project. By the name it seems like 2.0 is a updated version of 1.1 but actually is rather a significant update.

The main differences i believe between OpenGL ES 1.1 and 2.0 is the Pipeline rendering, where 1.1 is the fix pipeline rendering and 2.0 have a programmable pipeline rendering. As a programmer programmable pipeline rendering come to u that it is allow more customization and modification which is the true. But the bad thing is there is not build in delegate/method that you can make use of to do stuff that u want like glrotatef(), glscalef(), glmatrixpush() and such. All this you have to write urself. For a beginner like me is just too deep of a river to jump straight into.

But as the advantages of 2.0 is clearly what this project will benefit from, knowingly that is deep, i still need to dive down and get it done. Thats where the other problem came. Unlike other iPhone topic where you can browse and find easily online for help or tutorial to guide you through, OPENGL ES 2.0 is a pretty new topic that is hard to find anything for beginner. Most guide assume that you have knowledge in openGL 1.x or openGL ES1.x where i have none ==.

However, i came across a blogspot by a noble guy(at least to me) JEFF LAMARCHE that teaches how to do openGL ES2.0 for newbie like me. He posted the material of the book on his blogspot as his book is still not completed and got no ETA on publishing. I manage to read all the 4 chapter and started to understand but i know there is still much more to go. I only can hope he would post the other chapter up when he is free.

The link of JEFF LAMARCHE's Blog: Good Open GL ES 2.0 Guide

Monday, November 8, 2010

Day 25 - OPEN GL

Started the week with new topic OPEN GL!

A topic that i long wanted to look into it but just don't know when to start(excuses). Looking through the demo and such just as expected is about vector and coordinate like the x y z axis. Never really like doing this even during secondary maths.

We watch the lecture 1st follow by doing a short demo mirror-ing what he does in his demo app.
However the problem is that ES have a updated version of 2.0 that has significant different from ES1.1. Going to read up more on this.

Oh. brw alex and I now will be working on different part of the project, he the UI gesture (tough 1) and me the openGL part. Lets hope we all able to finish it so that we can learn more stuff as we progress faster.

Thursday, November 4, 2010

Day 24 - Officially done with Bonjour

Good day =)

Manage to complete the client send to the server and forward to the other user pretty fast. Did in less than a few hours but spend the rest of the time fixing the leak because we did not dealloc a class.

Went to holland V for lunch again then came back and fix the leak issues. After a while manage to do it at also did some tweaking to reduce the code making it easier to read. Everything completed very smoothly today and tomorrow is a public holiday so LONG WEEKEND =D

Is 4 now and i am allowed to leave =)

Wednesday, November 3, 2010

Day 23 - Close to finsihing on the bonjour

Bonjour = Good Day.

It really make my day good when the bonjour app is able to progress smoothly. Manage to set up the multiple connection in the morning. Alex came up with a solution by adding all the stream to the array and that work magically. Although there is still some bug before we went for lunch, but we know exactly what was the problem, the appended data to wrong stream.

After lunch we decide to modify the user class to each own a own value of instream, outstream, write and read leftover. However the troublesome part is that when a connection is established, we cant get the username we set unless the 1st data is being pass over. So we needed to find that and we research for about 2 hours on method to get the connection user hostname or client name. But fail to found any leads.

After that we came across the IP address and decided to make use of IPAddress to replace the username in this case which work. And on second thought it is a brilliant choice as IP address is unique so no duplicate ip address will be able to connect to the same server unlike hardcoded username. After all is done we get some bad excess error that we think that memory is being released when we try to use it again. Did some search and found out a short tutorial on using allocation with zombie instrument to check the part that cause the error and manage to find it. Although there is a alloc and init on top of it but somehow we should not release it i have no idea why. We did a check on leak instrument and indeed there is no leak when we remove the release. So that solve the problem and now we just left with OSX to send to other iOS devices to be done.

Tuesday, November 2, 2010

Day 22 - Finished with Bonjour, Started a new Bonjour

Came in the morning and try to fix the buffer part that is causing error. Spend hours trying to correct it, but still not exactly show what was the cause of the error, as it don't occur at every touch which make it difficult to debug.

Had a discussion together with Kevin and rethink of the idea for the research project. As the previous bonjour app has stuff that is not needed much and also to clean up the code, we decide to start a new Bonjour app now. We separate the server application (receiver) application with the client(sender) application this time round. Luckily on the app that we do previously is still fresh in our head, manage to move those required method in to the class. The server application we manage to complete it before lunch.

After lunch we continue working on the client application and modifying part of the send data. This time round we create a user class and for easier getting and setting rather than using a dictionary that contact a nsstring and nsarray where by this nsarray contain a nsdictionary again. Around 4pm manage to get the client and server application to work also fixed the leak issues. Take a short break now and needed to work on multiple connection to the server later on.

Monday, November 1, 2010

Day 21 - Week 5 Finished the Bonjour App

Is Week 5 day 1. Still working on the bonjour app. Did what as planned, splitting and merging the data bytes in our program. Manage to do that pretty fast, but still with some error. The amazing thing happen is I did not release some of the memory causing memory to leak when i pass information over to alex. Thus his Mac Crashed White screen! First time seeing that happening.

After that we fix the leak and also try playing around with 2 player interaction, but there still some bug here and there whenever some 1 click or release at different time the view is not synchronies.

Manage to complete the bonjour app a hour after lunch. Did a small demo to
Kevin about how it work. Everything was good, and now needed to add in the
multi touch interaction from the user. Make changes to it and also try to cater
to Multiple connection so that when we need it does not has to amend much
code.

Friday, October 29, 2010

Day 20 - More Bonjour to go...

Came to office today trying to fix the problem of yesterday. The server not able to pass anything thing to the client but client able to do to server.

When i was at home yesterday, i read up on the "godly" pdf found by alex yesterday that teach Cocoa. Just read the NSNetService part where they talk about the socket. The book explain very well on every step of code that it teaches and also explain the different which include stuff that i did not understand before. Manage to saw a session where the book describe exactly what we want to do to allow passing of data back and forth. We manage to pass forth but not back coz we only manage to successfully configure the instream but not the outstream. Knowing what need to be done we change the method today.

We changes our server class to the delegate and try some run and before lunch we are able to get it to work. However we notice that the data byte send is sometime being combine when received resulting in the unachrieve of data fail with exception. Try various of way to solve it but fail to work. Did some search and came to this book again. The book again! explaining how it can be done using splitting, append leftover packet so we will do all this in monday.


Thursday, October 28, 2010

Day 19 - Bonjour - Part 2

Continue working on the rest of the part, cracking our head thinking of how to connect to the network publish by the other device. We keep on trying on different thing, research and trying and research and trying. Finally we found the code on the listening socket required that we miss out when we publish the server. Thus this lead to us thinking that our connection to the network publish is the problem but rather is the listening socket not open to public yet.

We manage to fix this in the afternoon and also try to implement the touch on the app. Implement the touch wasnt much of a problem because the code that we did before was just few days ago. However although we manage to connect both devices the client to the server, but only the client touch is being detected by the server, but the server are not able to output stream to the client. Knowlying that outputstream is what we needed, but we are still not able to get it function to what we wanted, being stuff at this problem for the rest of the day. We decided to read up more on the bonjour networking after work.

Day 18 - Bonjour

Yesterday finished watching the bonjour lecture just before leaving office, so today is to do some short demo on bonjour.

The demo shown since to be easy, making use of delegation again to do network call on all who connect to the same network. But when starting to write on our own apps, finally understand the complicated stuff. There is a lot of networking thing to be understand and also some older syntax from CF needed to be implement. By making use of the classes in demo, we are able to write out the apps.

Then Kevin challenges us to write on our own trying not to refer back to the demo sample. Alex and I then start to plan the flow of our apps and also writing our own class for this bonjour app. We manage to advertise our self in the local network.

Tuesday, October 26, 2010

Day 17 - Working on Irregular shape and Multi-touch

Continue doing multi-touch event on the irregular shape first. Did some research on how to do it and came across two very useful link. Both use the same approach detecting the alpha level of the object being click if >0 do watever else ...

http://iphonedevelopment.blogspot.com/2010/03/improved-irregular-shape-uibutton.html

Making use of the same concept, applying to what we need to do, able to understand but still not exactly show how it work. And somehow some shape object just does not performance what was expected. In order not to waste too long on this, as the main aim is still the multi-touch event, I move on to the multi-touch event for the shape. Alex and I manage to complete it just before lunch and now has to move on to the first multi-touch event task.

After lunch, started on doing the multi-touch event for the moving object. Overwriting the delegate to have the object appear on the touch. When the multi-touch occur the object will go to the center of the multi touch. Not sure how to start at first, but after looking at the lecture slide again, manage to complete the touch then the multitouch after few hour.

Monday, October 25, 2010

Day 16 - Week 4 Monday

Time flies! Unknowingly, this is my week 4 intern in IHPC. Enjoying everyday here learning new languages. Started the day with watching the lecture video on Multitouch. Seems to understand the demo, but when try to do a example out it start to get complicated.

Soon after, Kevin came and take a look at our previous assignment the Flickr Api. He saw something that is not a good programming style and told us to change it. In the Flickr Api, we retrieve photo from a specific user and it will usually take about more than 7sec. For the 7sec the application will stuck there unresonpive but it is still loading. However if this was to release out in the market user will not know if it hang or it still loading. He want it to be threaded which is the right way of doing stuff.

The thing that i anticipate that it is going to bite back me one day came. When in school, threading was alway briefing teach, and i the lazy 1 didn't make the effort to go and find out more on my own. Although i did some threading before in previous project, but i do not really understand the concept about threading. Kevin then give us a short lesson on threading using more computer science term like blocking method, main program, threading. Within a short while he clear the doubt that i has even since threading was being taught.

After that, modification to the previous assignment Flickr API app was done and threading was implement. In coding wise it is not difficult at all is just where to apply it. But after i understand the concept of this blocking and non blocking style it get a whole lot easier on where to apply it to.

The remaining of the day was left to do the multi touch application. The more difficult 1, still trying to figure how to implement it, although Kevin say that if we can't figure out after a few hour will just move on to do the more simple app.


Friday, October 22, 2010

Day 15 - Review & Relax

Today is friday of my 3rd week in IHPC. Time seems to has pass by so fast since the first day of work. Be friend with many people in the office like Kevin, Calvin, Gim Han and Bernard. Everyday come to work at 9 and leave around 6, seems to has get use to such life now.

In work wise, manage to learn a lot of stuff beside just XCode with objective c. I learned how to actually source for solution, the reason behind coding, new way of building application and etc. So today was actually told not to do anything much but just review through all the code i did and also play around with XCode setting to set to our prefer one. Spend the day reorganizing code and folder also reading up on IT news and so on.

After that we had lunch together with Bernard, going to the sky garden at the highest level and look at the view. If not for the haze, i believe the view would be much more nicer. Bernard also bought some cracker to share, it taste really nice and different from those usual one.

After lunch, came back to the office and continue doing some small stuff and also watch some guest lecture video.

Thursday, October 21, 2010

Day 14 - Being make fun by XCode

Came to office today continuing with the paparazzi 3 assignment.

Everything seems to be progressing well and on time. I found out that for now i am able to look at the documentation and find method or delegation method required and modify it at a faster pace. Previously after looking at the doc i still need quite awhile to try, change and google if it still doesn't work. But now it faster, and that explain why everything progress faster now.

During lunch, went to NUS Science faculty with Kevin, Calvin, Bernand, Gim Han and Alex. First time go to NUS, the place was really crowd and every store is long queue. Decided to went for the Japanese food, is not too bad. During lunch talk, is the same old stuff where Kevin and Calvin will shoot each other on different thing this time is about movie. It is always funny listen to them. =)

After lunch, the bad thing came. Was doing the MapKit and has to add in the framework to get it work. After i add in the mapkit framework, the whole project go haywire. Alot of warning came out and the project fail to compile. Spend about 1 hour fixing it. Kevin came and help me with it. He can't fix it either so he created a new project and import all the file in. It work well after that. Kevin then say he is the Master of Programmer because he help me fix sometime that i stuck for 1 hour.

Soon after we take a break and try out facetime Beta on the Mac and also iPhone to try how it work.

Wednesday, October 20, 2010

Day 13 - Start to understand about those "Uncall" method

Started the day watching two straight lecture video on Performance on iPhone and Delegation. Although i did say that the Stanford university videos was good, but still has the feeling of tired when watch 2 video one after another.

The first video talk about performance and memory leak and way to check it. Something that i want to know about since i learn objective c as i am alway afraid that i forget to release and result in memory leak(this also caused me to alway release too fast that cause the program to crash). The second video was on keyboard and delegation. Delegation is something new that i learn, not sure if it exist in C# but i dun think i use it before. All along i was wondering how did some method get call like the setDisplay or viewDidLoad method when i did not call it but i can still do my code there to have it run. This is all delegation. Didn't really understand fully at first but during the assignment everything is solved.

After lunch, we continue watching the third video about web views and location all the gps blablaa. Soon after that kevin came and check on our understanding. After that we start on our assignment. I followed the video on doing the delegation and although it seems to be and copy and paste just that i typed out, but i feel that i manage to understand how delegation work. Complete the first half of the assignment, left with the other half to be done about flickr api.

Tuesday, October 19, 2010

Day 12 - Continue of Day 11

Came to office this morning with the aim of completing the assignment today. Has another half of the assignment to be complete, mostly the retrieving and push it to the UItable part.

The database that is used in objective-c, is actually quite different from others i use before in other languages. I create the table just by coding, and i don't get to see the table data. It is difficult to start as firstly i do not know if i added correctly, secondly when i add to the table it does not show out. So i got actually no way to debug if my database is wrong while adding or while retrieving or i bind the data wrongly to the table. So alex and i spend the whole morning trying to figure out and when we manage to figure out, it was really like 2-3 line of code that is required for the whole morning.

As today is Tuesday, we went for lunch together with Kevin, and other staffs too. Started talking about house, car, girlfriend over the lunch. Everyone have different opinion, but definitely good to share. Came back to work and manage to figure out and complete the remaining part in the next 2 hour.

After that kevin, calvin and gim han brought us to the level 14 a place for all institute too chill and relax. We had a few game of pools and they are really good at it. So end the day with typing the blog for today and yesterday.

Going to restore back my iPhone to the original so i can put my 1st app into my iPhone! =)

Day 11 - Paparazzi Part 2

Start of the Week 3 Intern. Kevin came and explain to us on which lecture to cover which to skip so that we can start on the 3d model project on friday if possible. Was happy to hear that we can finally start our project.

After that, we watch the new lecture on coredata, plist and sqlite. All this are database use in objective C. The video show how to use all the database in 1 hour. So after finsihing the video, went on to modify the paparazzi assignment.

The assignment specification this time round was very brief. Don't really know what was required at first and what exactly need to be done. Kevin came and help us out by explaining to us what the assignment actually mean. So finally get started with the assignment, but still face a lot of difficulties in completing it. Usually the assignment we are able to complete in one day. But this time round, we spend the whole day trying to do this assignment and still unable to finish.

We got stuck at some point and ask kevin for help again. This time he teach us the way to actually solve problem when we are stuck. Sometime that i usually do - doing alot of stuff at one time is not the right way when u are stuck! He show us where to get sample code, understand the code than try to modify it to what you one, solving one problem at a time.

When i was on the way home, i look back at what i have done today, i feel that i actually spend too much think trying to solve problem in the wrong way. Hopefully now i can continue progress-ing faster so that the project can be started earlier.

Friday, October 15, 2010

Day 10 - Paparazzi Assignment

Started the day by doing the assignment 4 on Paparazzi. This time the assignment walkthrough is less detail so as to lets us learn more and also customize our own style i believe. So spend the whole morning working on it before lunch.

Kevin also came to ask me and alex to sit into a team meeting to listen to a presentation on his algorithm of 3D modeling. So after lunch we went to the meeting which we meet other staff who are from the same team. The 3D modeling was very impressive in my opinion. He make use of a 2D model that actually draw out the contour line, compare and draft out the 3D model. I believe there is alot of calculation in it to do that. Lucky i do not has to do one of those. My project would actually make use of the 3D model he generated and manipulate with it. Definitely feel good to be in the meeting as i get to experience what do they discuss about.

After the meeting, i continue on the paparazzi assignment + the extra credit that need to be implement. Finish all in the next hour.

Thursday, October 14, 2010

Day 9 - Video and More Videos

Started the day with watching lecture 6 video. The video talk more about programming iphone in a whole concept. No much coding involve but more on MVC (Model View Controller). During the video one audience raised a question asking if Model = database view = interface and controller = class. From the answer i also learn that class could involve a data class view class or controller class, not necessary always a class is a controller.

After that continue with watching lecture 7 video that show us on UINavigationBarController and UITabBarController. Feel that in Cocoa iphone everything seems to be so well plan. There is alot of build in stuff where you can just use it. It simplify the coding pretty much.

Thursday- so went for lunch with Kevin and Calvin again. They bought us to the basement where it actually has a hugh department store there. All along i assume that it was a walk way to the carkpark, didn't brother to check it out.

After lunch, more video to watch and although it was good video tutorial, but feel slightly tired to stare at the screen for few hours already.

Some screenshot of demo that we try :

Wednesday, October 13, 2010

Day 8 -CGRect Drawing

Started the day by starting a new assignment. Assignment 3, a assignment continue from assignment before the helloPoly.

Before i leave the office yesterday i thought that this assignment would be easier as i already mess around with the drawrect function yesterday to draw what was in the demo. All i have to do is apply what i did yesterday and use it into today assignment. However, i was only 1/10 rights? haha.. Although at the start i complete the first few requirement fast, but the other requirement is much more tougher. Required to make use of more advance cg function that i thought that i know but i don't. Only manage to complete the assignment just before lunch.

Alex and I then went to a the hawker opposite for lunch. We don't really know where the place so just follow the crowd ^^. Just like what Bernard said is much cheaper compare to the foodcourt at the basement.

After lunch continue doing on the extra credits and Kevin came to check on our progress. Manage to complete after a few hour of coding and researching. Kevin also show us what he did to improve the UI with the animation option and also change the icon for our project. With all this the assignment 3 is not completed . Now need to read through the Apple and IOS development guide to understand the basic, as we seems to has jumpstarted too much that still lack of basic skills.

Tuesday, October 12, 2010

Day 7 - Continue on Assignment

2nd day of the week, continue on the helloPoly assignment. The assignment is consider more simple in the logic or algorithm sense whichever u want to call it. However, still not familiar with the syntax wise. A lot of function required to use object class method which i am still unable to code out without looking at the documentation or google search.

During lunch went to Holland V again with Kevin, Calvin and Alex. Had a great chat with everyone. It seems that the average level of education went up again, from a minimum o level to diploma to degree(in my opinion) and now bachelor(in Kevin opinion) and even higher(in Calvin opinion).

After lunch, finish up with the leftover of assignment 2B. Begin to watch lecture 5 video shortly after that. Was pretty lost in the video as i has never make use of any UIView before, not even something related in C#. Kevin already anticipated that we will be lost pop up while we watching the video to explain to us certain part and tell us to try and follow the demo shown before working on the assignment 3.

Alex and I had a hard time trying to copy what he show in the demo as everything was bit and pieces of it. Copy and pasting of code to the write file at the start and get never get it to work even though sometime it compile with no error. Kevin guide us to which class we should work on and we continue trying. Spending the next few hour trying, googling, research and finally Alex got it to work. So i learn from what he has done and also understand the logic behind it. Most properly will start on assignment 3 tomorrow. Hope after trying this demo the assignment will be more clear.

Degree? Master? PHD?

Monday, October 11, 2010

Day 6 - Week 2 of Intern in ASTAR

Started my 2nd week of internship in IHPC. Starting to get use to the packed with people MRT and shuttle bus.

Today, initial task was to see video lecture of 3 and 4 and continue working on the assignment which is related to the Calculator assignment before. Spend about 1 hour downloading video and watch video lecture 3 before lunch. After lunch continue watching lecture 4. Did doze off slightly, not use issit too tired from soccer yesterday or some of the lecture already covered by Kevin before.

After watching lecture 4, found a terrible fact, the assignment that we work on is actually the Fall 2010 by stanford but we actually watch the winter 2010 version. The syllabus of topic taught was different as well. Maybe that explain the difficulties of the calculator app and also the boring of lecture 3 and 4 because we already completed it!!!

Told Kevin about what we found and after discussion we decide to follow the winter version of the assignment. At the same time doing the Fall version of assignment about the 2nd part of calculator app. Although there will be more assignment, but feel that more can be learn from the calculator app, thus i am happy to do that. =) So spending the other half of the day doing the winter version of 1a 1b and 2a of assignment. Left with some part to continue tomorrow. Although the assignment was easier, but still quite unfamiliar with the syntax wise which required a lot of checking on Apple documentation and Google.

Monday blue the end of weekend fun and start of weekday work.

Friday, October 8, 2010

Day 5 - More Xcoding

Started the day by continue what i have done yesterday. The assignment on the Calculator assignment.

Manage to complete the basic function before lunch, however are stuck on a few extra credit function. Had a quick quick lunch then came back and work on it. Told Kevin that we are done with the basic function and what we don't really understand. After his explaination, manage to complete the rest of the extra credit.

AND WOW I JUST CODE MY OWN IPHONE APP Calculator!
Doesn't look really appealing but is the functionality that count! =)

Thursday, October 7, 2010

Day 4 - Xcoding

Started the day with what i has expected, update of software failed when i click update and leave the office yesterday. However somehow today the update speed was super fast and finsih updating everything in less than a hours.

During that period, also started to read through the book "COCOA PROGRAMMING FOR MAC OS X THIRD EDITION" that Kevin lend us.

Was confusing at first as most of the syntax and are different and the IDE. I was so much use to Visual studio(the only software i love from MS) that make me so use to the way of finding method with a method name follow by a dot behind to see the list of method. But sadly xcode dun work like that. So actually spend quite a lot of time coding to figure out the different syntax and way of method call.

Had a good lunch today in Holland V, with Berand, Kevin and Calvin (newly met colleague).

After that we continue coding on chapter 4 and Kevin also came and explain to us about we have done and what we need to know for the better habit of coding. Before we left office, we went through the video podcast 2 and also worked halfway on the assignment given.

The people who are crazy enough to think they can change the world are the ones who do.
-Jack Kerouac
Am I?

Wednesday, October 6, 2010

Day 3 - Lab Cleaning and Watch Video Tutorial

The start of day 3, Kevin came and discuss with us about the question and answer we did yesterday. We set up our iChat and also need to update and install some application later on.
He also gave us a short lecture on Programming. Some term that he use is not that familiar at first but when he start explaining it, is just like what we have learn before but forgotten what its call. He also show us a short run through of Xcode application and explain what are similar to C# we did in Visual Studio and what are the differences. We also got some video tutorial from him to learn about Obj-C.

By now, i has finish watching the first video and did somewhat understand the differences but still unable to try out as the Xcode in this computer is the older version.

BTW the video was really good. It is on iTunes, iTunes U CS193P Winter Version

2nd half of the days, clean up the lab and install update install update and install update all application and OS. Wasted a few hours on this.

This is my new clean-ed up desk with new plant bought from IKEA

Finally got the latest Xcode and started working on. Did try to code the what the first lecture has demo before leaving the office.

Screenshot of the iPhone emulator =)

Believe tmrw will have more fun in Xcoding.

Oh.. i finally went for a jog after a break for so longggggggggggggggg

Tuesday, October 5, 2010

Day 2 - Supervisor is on MC

Second day of work, came early for breakfast before reporting to office.

In the lab, Bernard(a really nice guy that assist us to find the HR department yesterday) came and told us that Kevin is on MC. Kevin get Bernard to pass to us a list of question that we have to answer. So after some discussion with Alex we decided to do all this question on our blog!

What is the DOCK and how is it used?

The dock is the 3D bar usually at the bottom of the screen in Mac OS but can be move to the right or left if the user wish to. Application will appear in the dock when running till they are quit. Control click on the application can run the extended menus to do function like quit, keep or remove from dock and etc. The dock is usually use to launch frequent use application.


What is the Menu Bar and how is it used?

Menu bar is a bar anchored to the top of the screen. The left side would contains the Apple menu and the currently focused application menus. The right side would contain time, volume user and spotlight(similar to search in windows). It is usually used to perform application menus function which can also be done using short cut like 'command and T' for new tab in Safari. Thus the different i notice is that Mac would only have a Menu bar running on the screen but Windows can has multiple menu bar depending on the number of application window it is running.


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

Before i start researching on this i thought that this is a self answer question where red is close application, yellow is minimize application and green is maximize.

However after i start googling, i found out that although red closes the current window, but it leaves the application running(depending on what type though). Like safari, when u click the red button although the application is close, but the application is still running and there is acually a little blue light under the icon to show that the application is still active. This also lead me to finding out short cut key like command-w to close and command -q to exit application.

The green button is also not to maximise but rather expand the window to necessary size to show all content but forum-er claim due to resolution issues the function perform randomly sometime.

list of short cut key i found: http://support.apple.com/kb/ht1343


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

The control panel in OSX is actually system preference on the dock.
I cant really find how do you enable left+right click so i assume that this question is actually how to right click which is control + click.

After reading the question again i think that maybe he is asking on how to change the mouse setting to default left and right click on the mouse which is in system preference under the keyboard and mouse session.


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

Finder is the equivalent of Windows Explorer on the Mac. The different view are the icons views, list view which is pretty similar to windows and also columns view and cover flow.

The shortcut key to change view is actually cmd+1 to cmd + 4 respectively.


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

To launch an application not in the dock, can either use spotlight and search for the program or cmd click application on the dock to get to a list of application not shown in the dock.


What is iTunes? What is it good for?

iTunes is a digital media player application use to play audio and video files. It also manage the content on other Apple's product like iPod, iPhone, iPad and etc.

In my opinion, i feel that iTunes is good for hardcore Apple fans. People who use a lot of Apple's device can just make use of iTunes to manage all its content rather than to install individual application to manage their devices. The other features in iTunes like the edit info of music is another convenient function where user can update the music info easily at least compare to Window media player =X

The bad thing i feel is that iTunes take too much resources compare to Winamp in Windows.


What is iPhoto? What is it good for? Create an album in Iphoto and name it Images for Project.

iPhoto is a a software exclusively for Mac OS X. It is a application can can import, orgainze, edit, print and share digital photos. Something like Picasa i believe. It provide basic function like crop, resize and etc but not low level editing like adobe photoshop and firework does.

I personally has not use it before because i don't own a mac. But reading from article and wiki i believe the good point that interest me is the features of facial recognition and allow tagging + the GPS tag to Google Map with its geo-tagging function.


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

The application that use for mail in mac is call Mail. The different is that IMAP read and send mail from the mail server where all email is kept but POP will download any new messages to your local computer accessing it and delete the server copy but it has setting to to keep a copy on server. For the exchange email it is stored on central OIT Exchange server where it can be check using Outlook entourage or webmail. It has the option to store locally. It will only be accessible from your computer.

More could be found on this 2 link : http://helpdesk.princeton.edu/kb/display.plx?ID=9815

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

Quicktime support a lot more video format compare to Window media player and also has build in function like trimming, saving and exporting to other codecs supported (PRO VERSION). This way user does not has to download individual video editors.


Connect Mail, iCal and iChat to the gmail account.

Only able to configure Mail to google though IMAP when receiving but not POP and also fail to send up SMTP server to send out email.

For iChat unable to connect as well.

Suspecting that all this is due to limited right on computer.



Create events in the Calendar with iCal and check if it appear in the Gmail calendar view -in the browser.



What is an RSS ? Use google reader and subscribe to some RSS tech feeds and sports news.

Rss stand for Really Simple Syndication. RSS is used to publish frequent updated work like blog, news, audio and video in a standard format.



What is a Podcast, find and subscribe to a few podcasts of your choice.

Podcast is a series of digital media file either audio or video that are released episode by episode and usually download through web feeds.



Finished task for today. Did learn a lot more on how to use mac and started to use some shortcut key which i believe in the future can help reduce a lot of time navigating around.

Hope that can faster start learning obj-C or other IT stuff!!!

Lastly get well soon Kevin. =)


After answering all the question, got a bit bored so try to search online for coding obj-c on textedit(notepad).

I googled and found some useful link to make use of terminal to compile and run the program.
The link is: http://genedavis.com/library/objc_tutorial/objc_tutorial_ch1.jsp

some screenshot :
Just messing and playing simple stuff. Overall still not use to it as I have been using C# for almost 3 year. Much more to learn and try ^^

Monday, October 4, 2010

Day 1 - First day of Work

Today will be my first day of work in IHPC.

First thing to be done is to fill up tons of forms given by the HR! So use to typing on a keyboard that make me feel awkward in writing. Well but still has to fill up in order to get our pay! =)

After filling up, we move to the our working lab (Visualization Chamber).
We met our supervisor, Kevin and he was so nice, reminding us to take note on the "homework" that need to be submitted to our school during our SIP.

Was being told that the project we will be working on will not be what was being discussed during our interviewed earlier. Seems to has some re-structuring going on. But the new project Kevin brief us on seems to be interesting as well. Medical Application for education in iPad device using obj-c! Maybe after my intern i can start develop my own iphone apps. cool!

Beside speaking on our project, we also talk our interest and hobby. My opinion about Kevin, seems to be a super sporty person! A routine of gym on 1,3,5 and jog on 2,4. Make me feel like jogging too. Had stopped jogging for awhile since competition and MP period. I also learn new term to identify myself. Liberal and Skeptic (hopefully these is the right spelling)

Oh, you must be wondering why am i blogging because i usually do not do so! Well, because this is one of my work and beside blogging i has to read on luppeng and situ blog. At the end, i do feel that having a log of my SIP journey seems to be fun and meaningful.

I has been using 'we', just for people that do not know 'we' refer to me and Alex, my classmate, friend, group mate and now colleague. =)

Before i sign off, this is my work desk! so Spacious =)
*please all the kind soul try not to correct my grammar and vocab, i know that there is still much room for improvement =)