Goal for end of august

July 28, 2008

because lets face it, without deadlines and pressure, procrastination will surely set in and its the end of the world. I’m going to set the goal of finishing my Cocoa Programming book by the end of next month. More to come about my random frustrations.

Status? I’m currently on page 117, learning about Delegates, wahoo!


iPhone post

July 22, 2008

Ya, wordpress finally came to the app store and I am testing it out. Yeah!

Long absense, what the heck am I doing these days, and First impression of OS X development as a hobby

July 17, 2008

Long absense

Ok, so there are a few reasons why I haven’t updated this blog in such a long time, let me first start by enumerating a list of excuses followed by what the heck I’m actually doing with my spare time these days.

1. I actually forgotten the password to this account. Through lots of digging through my old email accounts, I was fortunately able to find the password and tada! I am hack the system. No really, I changed the password to something I can actually remember now.

2. Final year of school has been quite hectic. Nothing beats the pressure to graduate like studying like mad and not blogging about random tech experiences. 

Really, that’s all the reasons I can think off my head.

The heck am I doing these days

As for what am I actually doing these days. I’ve been applying to a few places looking for a position as a web developer (It’s something I’ve done during the summer and to my amazement, I actually enjoyed it). Though what’s been bugging me lately is the fact that I forwarded my utoronto mail to my gmail since I read that in order to keep my email domain, I’d have to set up forwarding. Turns out the University of Toronto email forwarding isn’t exactly.. the best thing in the world. Both a friend and I are having the same problems, where emails being sent are stuck in forward mail limbo. Time to fire a email to the email help desk at U of T and see what the heck is going on.

Also, I’ve finally picked up an iPhone (well, I got it the day it was released so it’s not really finally). But having an actual data plan actually makes the fun much more enjoyable to use (and much more expensive in my wallet). I’ve been using the 1st generation iPhone without a dataplan and making sure I don’t use edge data was a very brutal experience.

iPhone, App store and First impression of development on OS X

In any sense, I’ve been poking around at the app store to see what developers has been making. While some apps are truely amazing (Shazam being one of them, where it listens to a song for about 15 – 20 seconds and then does some magic music searching through its databases and gives you the name of the song with a very scary level of accuracy). Others… are not so great; who the hell builds a flash light app where the screen turns white and tries to sell it for 99 cents? Seriously, why would you spend 99 dollars on Apple’s developers program just to write an app that probably took 5 minutes to write (granted, I’m being naive, it probably took about 10 minutes to find the command to make the screen white) and expect that people are going to pay a dollar for it? 

Now that that’s off my chest, There still seems to be a problem. Up until this date, there doesn’t seem to be a ToDo list application that actually sync’s with the iCal todo list (that, or I’m just plain bad at reading and googling it up). So what I’ve decided to do was attempt to write such a program myself.

I expect to run into a lot of road blocks, but before I can even tackle a project like this, I first need to learn a bunch of things in order to even develop on the Mac.

So my goals for the next few weeks (something to keep me occupied and productive while I’m job searching):

1. Learn how to develop applications on the mac.

2. Move on and learn how to develop applications on the iPhone.

3. Commence work on the ToDo list application.

I bought a book before graduation called ‘Cocoa Programming for Mac OS X‘. Unlucky for me, the 3rd edition wasn’t out when I bought it so I have the 2nd edition.  What are the differences? Apple decided to move a bunch of stuff and change a few things in Xcode (their developer tool) which made the first program they made in the book (a random number generator) a complete pain. In the end, I followed a guide on the online guide (which made a currency converter, nothing fancy with web services, but its a great starter app). 

So after writing the Currency Converter, I was able to successfully cross reference any changes that was made between Xcode of the past vs the newest version which I have right now (3.1). I also spent a bit of time learning Objective-C, it wasn’t long, but getting used to some weird square bracketing syntax definitely made my head spun a bit at first.

From scratch, it wasn’t much work at all writing some Objective-C and hooking things up between the Interface builder and the controller. The wow factor wasn’t as big as I’ve been poking at .NET for the past 2 weeks, so lots of interface’ing and hooking things together there. 

One cool thing that I did find with Xcode was with the debugger. In the middle of debugging, you can edit the source code and click ‘fix’, in which the code will continue to run with the fixed code. I was printing a bunch of dates one day apart and then ‘fixed’ it halfway though to be 2 days ago. And the final print screen printed it all out with 1 days apart, then the fix’a’roo, to 2 days apart. I’m sure this will come in handy when I enter one of those deep debugging trance of mine. 


Life being organized

September 25, 2007

Well, I wouldn’t consider (in my first 3 years of my undergraduate studies) to be pretty organized. I usually remember due dates when my friends remind me I have an assignment due and anythign else I really just hammer into my head and hope its still there when the day comes.

This year is different, after a summer of hard work and staying organized; I knew this year is going to be a lot more work due to my applications, my solution? I have my laptop on me pretty much 24/7 and I don’t like GoogleCalendar because I need internet access for that (though there is an application on the mac that will allow me to sync my iCal with google calendar.. but its not free). So I decided to use iCal, addressbook and anythign else that pops up. I also picked up an iPhone to make my calendar that much more convenient to use (though it has no todo lists, something apple really botched on, and no.. I didn’t get the iPhone just for the calendar, its quite fun to use.. but thats another entry).

So, 2 weeks into school and what can I say is wow. The difference vast, but still the same in some ways. I love the fact that I know exactly whats up every week, planning things and keeping them is easier than ever now. Though there are things that are the same:

Using a calendar will not magically make the work go away; no, if anything, theres slightly more work to do, keeping yourself organized and whatnot. You still have the same workload… infact, if you organize everything, you may realize that you actually do a lot more than you think after putting it all down in a to-do list and on the calendar. So using a calendar won’t make the stress of work magically go away, but it does drastically reduce it. I am no longer panicking last minute for an assignment, but now I’m worrying about an assignment 1 or 2 weeks in advance; I think its healthy. Things get done way earlier now and you realized.. yes, I do have things I should be working on.

So what have I learned really? I shoulda been doing this all along, walking out of my undergrads with this kind of skill is essential… oh, I still have to find myself a Ninja costume for halloween (on the todo list), I better get on that.


Some bizzare dropdown firefox rendering

August 9, 2007

So I am playing around with the Comment creation system in Online Marking Tool, the weeks are winding down, but if theres one thing I want to push personally, is to make the comment creation system a bit simplier; since beside the nifty UI changes, speeding up the system. I feel that pushing back the File Body had to be done, but that also meant not touching the comment creation system which most of the TA’s werent as happy about. So what am I going to do? I’m going to add a dropdown box and adding a file creation box.

I’m still (even after 3 months ish) consider myself an expert with HTML; but I do say I’m comfortable enough to augument things. So when I was adding a dropdown box, I forgot to enclose it within a form. Needless to say, it gave me some bizzare rendering with firefox.


All seems fine, it displays properly.. but If I were to select any item with a length of greater than the first element…


It gets cut off.. some of the options would show up as a blank string. Now, I’m scratching my head wondering.. what in the world?! I popped the same thing into Opera and surprise, it works. I didn’t try Safari since the current version of TurboGears I’m using has some unicode issues that causes it not to render properly (the newer TurboGears fixes this, but messes up with some of the Alchemy behavior and fails our tests because of it). I guess I’m lucky it didn’t take me more than 20 minutes to figure this one out, or else I’d be scratching my head for so long, hair would start falling off.

copying unicode files?!

August 5, 2007

So i thought I had it all planned out with the copying of my iTunes Migration Tool, I was going to use the built-in library shutil and they have a pretty nifty copy command. then I tried using it… couldn’t find my unicode files… I’m stumped, how the heck am I suppose to copy these files over? copyfile only takes a string, not unicode >.<

iTunes parsing and Unicode characters

August 5, 2007

Ok, so this maybe not work related; but something I’ve had in mind for a while.

My situation is, I’m going to pick up an iMac as soon as Steve Jobs annonce the new update to the already 331+ days old current iMac (only apple can get away with selling almost 1 year old hardware for the same price as when it first came out). I’m migrating from Windows to OS X and really want to keep my copy of iTunes (50 gb of music and junk, and all the work I’ve placed into organizing it); Luckily for me, iTunes is managed by an XML file. Sure.. I could do a search and replace on the xml file and call it a day, but what fun would that be?

So I’m writing as a iTunes xml parser, I figure it wouldn’t be very hard at all, seeing as I’ve done a ton of xml parsing and testing for Online Marking Tool already.

for OLM, we used a package called PyXML to handle our XML parsing, so thats what I did, used PyXML and  try parsing it through that route… unfortunately for me, I didn’t realized that PyXML is not being updated anymore, and worse of all,  its SLOOOOW….. I guess for OLM, it doesn’t matter as much as we don’t really handle really large XML files (My iTunes Library file is 4 mb btw). Parsing my iTunes library took an amazing 6 minutes, and the python thread took up over 1 gb of ram to do it… thats pretty dam inefficient.

I got about 3 hours of playing around and I realized, I better figure out a way to setup SVN on my macbook or else I’m going to be hating myself later on (seeing as version control saved my butt many times when working with OLM).

I stumbled upon this: http://www.systhread.net/texts/200607subver.php

Which was a very useful guide to helping me work my way around setting up my SVN repository, 10 minutes later, version 1 of ‘iTunes Migration Tool’ has been created!

So it was lost, PyXML route lead me to a dead end, but I’m not one to give u easily, so I searched up another library. Python has a built in python xml library which is much… MUCH better I found out. parsing my macbook’s file took 4 seconds, much happier.

I also ran into another issue, changing the paths of the xml file, most of my tracks are in chinese. Lucky for me, the python library already does things in Unicode, all i had to do, was find out what encoding OS X uses to read chinese characters. The answer is UTF-16.

So now, I think i’m already done, just need to write the part of the code that will copy the files over to my external hard drive :), I’ll probably touch up and finish up on it and post it somewhere sometime 🙂


Debugging for IE and 2 Virtual Machines

July 25, 2007

So, all the hard work this summer was on Firefox; all the tools I’ve been using such as firebug, javascript debugger and web development tools that I’ve taken for granted is no longer there. Instead, I’m forced to start debugging under Internet Explorer since I was told, the rest of the world still uses Internet Explorer.

I installed Windows XP into VMWare yesterday, I tried the quick install and it was much easier than I thought; I hated installing Windows for the reason of drivers and clicking through a bunch of useless things that takes up time (set up clock, languages etc). I knew it was going to be hectic when running everything, I’m developing in Ubuntu with Vmware and now, i’m going to run another VM for windows. 2 VMs and OS X running all at the same time, that 2 gb of ram investment really does come in handy. Starting up the 2 Virtual Machines is utter hell, I never seen my laptop under such stress (except when I try running games on it). After the initial startup, it runs pretty well actually, I’m surprised and a little impressed.

 I was greeted a nice surprise, when I fired up OLM on Ubuntu and tried to connect to it with Internet Explorer.. the page was white.. interesting, the source code was visible but Internet Explorer threw me a blank page when it was done. A little playing around and I came to realized that it was because OLM didn’t close the javascript tags properly, with the:
<script … /> instead of <script … ></script>

After changing that, the page loaded fine. I’m a little relieved, I’m playing with the grader interface and some javascript functions aren’t very friendly under IE. Its a little hidden, but Microsoft did include a built in javascript debugger; going into the Advance setting of Internet Explorer under internet options and unchecking “disable javascript debugger”, it gave me a bit more power to debug instead of the standard box they include that tells me the line number and the URL… pretty useless dump. Now, I’m playing a little bit more with it before I dump the selenium tests on it. Looks like I can’t avoid Internet Explorer forever 8(

In conclusion, I still hate Windows; its a love hate relationship, I love it only because most games run under it and it is quite speedy after a fresh install; I hate it because it still crashes, OS X looks 10x prettier than it, theres no working search function, no quicksilver, and some programs will only run on this OS.


July 24, 2007

So I finished adding Group assignments into the system of OLM; yes… more tests is needed, but it works, backed by my personal approval.

So now, its massive UI time; I got the task of implementing Tabs (well, I’ve stole it from under Martin’s nose, I was kinda attached to the idea of tabs)

So while thinking of a way to implement this, I first google’d up for tab implementations, because I’m sure, there are half a billion tab implementations already out there, and maybe (being the lazy person I am), I can use their implementation instead of having to write mine from scratch.

I’ve came across two implementations:

One was the Javascript Tabifier:

The other was Tabtastic (awesome name):

both of them had pretty pictures and simple tutorials on how to implement your personal websites into it. I personally didn’t manage to get tabifier to work, but Tabtastic seems to be playing fine, though I didn’t like the way it was handling tabs. It would re-render your tabs into markers on your page and when you click the tab headers, your page would “jump” to the marker and show your tabs. This of course, mean that my page flies to the file container of the page, making it very annoying for the user.

Ultimately, I did like the css sheet that Tabtastic has, so I took that and modified it (I’m not too familiar with css myself yet). Using that, and the system of drawing everything into a single box, and some visibility fiddling, I got tabs to work the way I like em to. makeVisible and makeInvisible was my favorite tools in making such a simple implementation.


Some bizzare javascript render’er

July 18, 2007

I’m not sure what exact was the cause of this, but olm had a few pages which closes the tags using:

<script src=”blah blah” type=”text/javascript />

Which, is valid xhtml, but for some reason, firefox on my computer wasn’t playing very nice; It wasn’t rendering the script at all. On the other hand, Martin’s computer had firefox and it was running just fine. After comparing the output of his view source with my view source, it turned out that the problem was my line ending wasn’t the same as his, his is rendered with the explicit closing tag.

<script src=”blah blah” type=”text/javascript></script>

Kind of bizzare, Opera renedered the pages fine with the shorthand closing tags. It could possibly be some plug in I have installed, but I dont know, all the plugins I got are debuggers: firebug, javascript debugger, and the Selenium IDE.