Entries in Stanford (7)

Sunday
Nov132011

I've Build... a Calculator!

Just as I expected there were more time to study and code after the 10th of November.  So, I went ahead and did one assignment from Stanford CS193 course on iOS programming and coded a calculator.  Now, I do remember coding one calculator in the past, but that was more of remembering the code rather than understanding the code.  This time I was able not only replicate what the instructor was doing, but go one extra step thurther and improve the original concept.

The calculator was supposed to be a usual one, supporting floating numbers and basic set of operations:  addition, subtraction, division, multiplication, and square root extraction.  It was very simplistic in both visual design and structural complexity.  Speaking of structure, though simple it quite well illustrates the Model-View-Controller paradigm, having three distinct classes:  CalculatorBrain (model), CalculatorViewController (controller), and the view which is build via Interface Builder in XCode.  While coding I've realized the boundaries between the three classes, and was even able to implement the extra features in the correct way, choosing the right class to modify!

My additions to the original app were just three buttons:  'AC' to reset everything back to 0, '+/-' to be able to enter negative numbers, and '.' to have the ability to enter floating point numbers.  It didn't take long for me to implement any of these features, but it surely provided a great experience and boosted my interest to continue with the studies.

I'm not posting any screenshots of the calculator here, because it's way too generic and frankly speaking looks ugly to me.  However, it served its purpose very well, and it even posed some design questions I really need to consider for my future apps.

I'm going to have a bit more free time during this week, so there will be more coding, studying, and hopefully great screenshots of my first apps posted here!

Sunday
Nov062011

A (very quick) Break

Decided to take a very quick break.  Next week is going to be the most consuming in all possible terms (mainly time), so I'm off the usual coding/learning schedule.  All I had time to do was to review a couple of lectures from Stanford course to keep myself 'in the loop', and did a bit of general programming-related reading via Zite (I think I've already mentioned this really nice free iPad app before, but it is indeed a great way to skim through relevant articles).

Most of the time I've been preparing for my day-time job project due November 10th (which seems to be turning into something original and viable already, but not related to coding in any way), and keeping up with my second day-time job (thankfully it's a remote one with flexible hours, but also not related to coding).  After November 10th I hope to have more time to pick up with mastering iOS app development.

Sunday
Oct302011

Time Is Tight

Past week was the first one in the upcoming 'tight on time' period.  It's something like 'project release' on my main work, so before November 10th it's going to be crazy!  :)

I've started Project Euler problem, but still cannot optimize it to work fast enough to produce the answer in reasonable time.  I believe I'll make it work and figure out the math for it sometime during this week.  Meantime I watched more lectures and read a bit of manuals from Apple.  Not much excitement, but still not a complete nothing.

Due to the hard time restrictions I've mentioned for upcoming 2-week period I might take a quick break from this project.  However I'll do everything possible to avoid any interruptions and stive to do some coding, reading, and lecture watching.

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!

Sunday
Apr102011

Changes, Changes, Changes

There were a couple of major changes during this week which now will affect the current state of things.  But first, I need to thank the first reader to contact me.  His name is Anton and he was asking if I am a student at Stanford.  Well, I am not an official student there, and all I do is basically self-education based on free CS courses anyone can download at iTunes U.  Still, it's the best one could actually manage to get to Stanford courses and studies without enrollment.  And there is secondary value in Anton's question which I am so thankfull:  now I know this project is public not only by name but by cold facts as well.  :)

 

Now to the changes.  Firstly, I've realized I went too quick through the lectures and the book and not all the information has settled just yet.  I need to slow down and review the previous materials, and do some more coding on those.  It's going to take a week or so, but that's what needs to be done in order to lay a better foundation for the future studies.

 

Secondly, there will be a slow down in 'Harakiri' game development.  I'm thinking about changing the approach to the code architecture, and while this is definitely not a complete "throw-away-start-from-scratch", it still will take time.  The main reason for me to do it is a thought that this game if it comes out nice may end up on Android platform (which uses Java as programming language).  Anyways, this is not exactly the goal, but if such opportunity comes up, the code should be ready to get changed easily and with appropriate style.

 

I am planning to finish watching the lectures very soon (in about couple of days), at the same time I'll be reviewing some of them and reading the textbook once again.