Friday, January 13, 2012

Friday the 13th

It's Friday the 13th and it's the day we receive our postings.

I got posted to
1. You are posted to ARTY INSTITUTE

2. Your vocation is ARTY OPR - GUNNERY

3. You are to report to: Khatib Camp, Blk 26, Artillery Institute (Main Lobby)
Reporting Date/Time: 16/01/2012 at 0800 hrs
Person to report to: Chief Clerk
Contact Number: 6210-0075/0076
You are required to report in smart no.4 uniform (PES E recruits to be in No 3 uniform), except for those assigned to Police Force.

4. Special Instruction:
No Camera Handphone is allowed. Bring complete SAF issued items. stationery, and 2 colour passport sized photos. You are expected to stay in.
Yep that's right. ARTILLERY vocation. I don't know how's the life as such because I couldn't find a single information about it even on sgForums.

I guess I gotta suck it up no matter what it throws at me. Oh and I also hope that the commanders are the good-to-be kind.

Tuesday, January 10, 2012

Objective-C

What have I been doing since day 1 of block leave?
Trying to experiment with coding for iOS5 notification center.

Few days ago, an author with the name of Shades published SimpleDate for Notification Center. I installed it and yes, it's exactly what I wanted before (as opposed to ClockCenter) BUT with a digital clock like the lockscreen.


Realising that it is open source from github, I decided to work on it by experimenting with Obj-C.

I am glad I had Hackintosh installed on my PC. The following is what I did. Basically, to record a note of what I have done to accomplish it.
Updating Mac OSX Lion
1. Boot to Hackintosh
2. Update Mac OSX Lion 10.7 to 10.7.2 and installed MultiBeast
3. Sound wasn't working
4. Removed HDAEnabler*.kext, ALC8xxx.kext remained
5. Reboot, sound returned (no more sound lag too!)
After updating to 10.7.2, I was then able to install Xcode 4.3 with iOS5.1 SDK (I didn't realised it until I tried to experiment with it on VMware Leopard 10.6). This installs the make bin file too, required to build the .deb from source code.

Then I Googled around, looking for tutorials on how to create a notification center template file to code. First I found is this. The original website is dead so I had to open up the cached version. I followed the tutorial, I was able to get Theos installed fine and then I ran the nic.pl, hell it didn't work.

When I tried to create the notification center template which is based from this. All I get is a package folder with Theos alias. No .m file or any files that has the template. I kept trying but to no avail. Then I redownloaded Theos without getting the notification center nic file and it works. I don't know how it affect but it stayed that way until now.

I gave up as I am unable to find a solution and so I went another way. I downloaded the source code of SimpleDate and immediately build it by using make package. It didn't work. It tells me I need dpkg-deb but I already have it by following the tutorial. So I looked for solution which is MacPort. I downloaded MacPort but didn't know what it does and how it works. Then I came across this website, who gave a really clear-cut tutorial on how to get started on Theos. Also, that's where MacPort came in I guess.

Everything works pretty after - make package as it actually builds the .deb file and I was elated.
Setting Up Compiler and Environment
1. Install Xcode 4.3 w/ iOS5.1 SDK
2. Followed brandontreb.com guide to setup Theos and other tools
3. Ran make package on Shades' SimpleDate source code
4. .deb file compiled
5. Compiler ready
I had ClockCenter source code and SimpleDate source code side by side. Those 2 are the same because Shades stated that he ripped it from ClockCenter. With C++ and C knowledge, I slightly understood Obj-C. With all the initialization and variables, it gave me a nostalgia feeling.

I basically played around to add a digital clock to the SimpleDate Shades created. I managed to do so and the end result is a date with a clock as a compact notification center widget. Oh, the clock auto-updates too by using the NSTimer class.


New Year, POP

Yes I know that I am late in blogging about new year and stuff. That's because I was busy and away. So anyways here's some updates.

3rd November 2011 - I got enlisted into NS, BMTC School 1 (Basic Military Training).
Life inside at the start was rather hectic. However, what's unexpected is that the whole journey was actually a replicate from my dreams and yes it's just DeJaVu. Honestly, everything felt like it happened before. It was really strong. Those pieces of short dreams I had in the past seems to have stitched up by this real experience.

Ok, let me just blog about the reality side. Hectic at the start but I was really enthusiastic. I learn, I participate in all the trainings and the problem comes.

Before I enlisted, I had some injuries on my legs. Shin splint due to flat feet and also an injury on my right knee from standing broad jump in the past.

All these injuries started acting up and I had to go and see a medical officer. Getting those statuses was shitty because I could do nothing and it really sucks. But well, I had to suck it up.

I still managed to finish all the high keys and I POPed without the last P - parade because I have a 6 weeks status which ends at 300112.

Now that I am waiting for my new unit, what I could do now during my 1 week of block leave is to learn some new skills and also head out with friends as much as possible (provided I have the $ of course).
-------------------------------------------------------------------------------------------
Oh yes about new year, I didn't do anything except watching movie and heading out to eat with parents.