Entries in XCode (6)

Monday
Nov212011

Back On Track, and Running!

So many great things happened during this week, that I don't even know where to start!  Well, let's start from the beginning of the week.


Just as the Assignment #1 was done and over with the updated Stanford iOS course CS193p has been posted on iTunes!  This one is also done by Paul Hegarty, great instructor and very engaging man, but this time it's specific to iOS5 and uses the latest version of XCode (4.2).  After I've watched a couple of first lectures I firmly decided to switch from XCode 4.02 to the most recent one (I'd been holding to the old version because of the old lectures, so to be compatible).  It was quite easy to do, because I've advanced only to lecture 4 and did only one assignment.


I then updated XCode and found it to be a very much big improvement over what I had before!  Two most striking features are the Storyboard (and its automatic code generation) and the Automatic Reference Count (it vastly improves the memory management, especially when someone like me has a poor understanding of how memory should be managed).


Following the update, I've completed three lectures of the new course and did the very first assignment (it's also a calculator, but this time RPN).  I've enjoyed coding in the XCode so much that I re-made the calculator a couple more times, which also helped me to get used to the new subtleties of the app and the way it works.


Another bit of a good news is that I've decided to update my system to Lion (eventually), and join Apple Developer Program for iOS and OS X.  I've started the sign up process some days ago, and right now I'm in the middle of making it all work (for some reason I need to fax my confirmation to Apple, and the most interesting part in here is where do I find... a fax-machine!).


There was only one semi-bad event, I had Internet outage during Sunday, so this post came out late, sorry.  However, the good side is that I've had lots of time on my hand to code, code, code!

Sunday
Jul312011

Good week

This week results are great and important.  I've completed 3 problems from Project Euler in the last two days.  One of them even took me just 20-25 minutes to come up with an algorithm and to code, and it worked fine from the beginning, no bugs.  

However there was one problem (#10), which took me 2 hours to optimize for a quicker solution.  Finding the sum of all primes between 1 and 2,000,000 was not a quick task to complete by brute force alone.  I did my very best to think of and implement all sorts of possible shortcuts in calculations, and still it took about 5 minutes for my program to come up with the answer (it was correct, but still it's very slow).  At that point, when I'd run out of ideas for improvement, I've decided to settle with the way it worked, entered the result into the problem's page, and got access to 'post-mortem' explanation and the best algorithms for solving it.  As I imagined it was beyond my current math abilities, but still I could trace the logics and finally understood the idea behind it.  I don't think I'm going to implement it, but who knows maybe during the week ahead I would want to take a 'coding hour'.  :)

Another important thing happened around Thursday.  I've re-installed XCode 4 on my MacBook, and now it handles all my C++ templates and files perfectly well!  First, I've uninstalled both XCode 3.2 and XCode 4 (thanks Internet, there are many helpful pages about this process and how to do it right), then I've downloaded XCode 4 over again, and finally installed it.  After that everything worked smoothly, without any errors or glitches.  Once again I felt how much more polished and though-out the XCode 4 interface and workflow are.  Really pleasant experience.

I was reading a lot during the week, and there are very good chances will finish the chapter I'm currently on this evening.  I also watched Lecture 1 from CS193 course, which is specific about iOS development.  It's an introductory lecture, so no really hard materials there.  I might continue watching along, in parallel with the current C++ course lectures, until I get stuck.  Besides, my day-time job vacation time has just started and it doesn't hurt to force my studies just a bit.  :)

Sunday
Jun052011

Back to XCode

Breaktime is over, and I'm already reading, watching, and coding!

First, good news.  I'm having some more spare time, and hope this is going to speed up my learining process.  I still have not got any specific outcome regarding my part-time job, but this will be known very soon, practically on Tuesday, June 7th.

Another good news.  WWDC is opening tomorrow, and though not attending I'm very excited to see all the updates, announcements, and keynotes to be available online.  Of course, Steve Jobs keynote, which is set for tomorrow, is my primary interest, also the details about the upcoming products and services.

And finally some not so good news.  I've decided to free up some space on my laptop's hard drive this morning and deleted the old XCode 3.2 thinking what could possibly go wrong?  Well, something has broke, and my blank template file produces errors and won't compile!  More so, all the examples I've coded before produce the same type of error:  XCode 4 can't find links to <iostream> and to <iomanip>.  I've tried many different things, but my best guess is that those libraries were from XCode 3.2 installation, which is now gone.

So, why that last news is not really a bad one?  Because on my main MacMini everything works just fine (I had enough luck not to delete XCode 3.2 from it), and I also have backup of my laptop, so I hope to recover what I've deleted.

Glad to be back!))

Saturday
May072011

Coding More and More...

It's definitely a quality shift happening during this week regarding my C++ studies.  I was reading and watching lectures for a pretty long while, and did much less coding.  This week it's definitely all about exercises and practice!

I actually prefer it to be this way, coding in XCode is relaxing and pleasant experience, I'd even say I enjoy it a lot!  Also that Textastic app on my iPad for 'on-the-go' programming helps me to stay focused on a problem during my commute or when I have a small window of free time.  I do rough prototyping on iPad as well (I use Notes+ for that purpose, and it works really well;  however there are many great solutions out there!).

There is an important difference in coding in XCode and in Textastic, which I'd like to bring about this time.  In the XCode it's very easy to track a bug or a typo, highlighted variables are easier to identify too, and of course you can just compile and see if the result is the one you want right away.  This makes me less cautious about misspelling and typing in general.  It also tends to soften my logics, or do less thinking about the algorithm.

Textastic does C++ highlighting, but it is limited to standard functions of the language and doesn't include variables.  This makes it quite tricky to write a working program from the scratch.  And you cannot actually debug it, since there is no way to do it on the iPad by any means.  This all makes me to pay more attention to implementation of my logics, to do more preparations (sketching out the algorithm, or as I call it prototyping), be carefull about spelling, etc.  For many people this would mean that it is completely useless waste of time to do this 'on-the-go' programming.  But I also know that it will be very easy for me to debug my program later in XCode, so I tend to use up as much time as possible to code using Textastic, and I am sure it not only saved me time, but also increased my learning speed and quality of the study.

And speaking of Textastic (yes, I do like this app a lot, really great and thoughtout piece of software) it's going to be updated very soon, hopefully in a couple of days with many more useful features (Cyrillic code page support, just to name one which is quite nice for me to have now), and I am very excited to see it!

Sunday
Apr172011

Even More Changes!

The week was very intensive in terms of making decisions.  I considered various possiblities, and came to the following conclusions:

a)  I am not ready to spend time developing Java programs just yet.  Android is really nice platform, but too diverse;

b)  since my Java understanding is very good (I can write quite complicated programs, using various available techniques and patterns), I better press on to reaching my ultimate goal of learning Objective-C, rather than reviewing Java;

c)  even though it is possible for me to take both C++ and Objective-C courses and study in parallel, it would be better to study C++ first, learn and practice more programming patterns, and then continue on with Objective-C.

So, in light of all those considerations, I've decided to take CS106B course as planned.  My C++ studies began in the middle of the week, and developed nice pace already.  I like Julie Zelenski videos very much, and her teaching style being different from Mehran's seem to suit me better:  everything is so vivid and clear, I hardly need to review the textbook.

One more decision I've made this week was purchasing the Xcode 4 from MacApps Store, and figuring out how to make it work with my C++ course requirements.  I should say, that the difference between Xcode 3.2 which I already had downloaded and installed some long time ago and Xcode 4 is quite big, especially when it comes down to configuring projects and workspace.  However, right now I've got both versions of SDK working all right, and even have done some pretty basic C++ coding!