?

Log in

No account? Create an account

t3knomanser's Fustian Deposits

iPhone Programming : CS193P

How Random Babbling Becomes Corporate Policy

run the fuck away

Mad science gone horribly, horribly wrong(or right).

iPhone Programming : CS193P

Previous Entry Share Next Entry
tesla
Stanford University is publishing video and assignments for their iPhone programming course online. I've been following it and doing the assignments, and man... I miss compsci classes. I've been having so much fun doing this. For those that recall me in college, I was a lazy underachiever in most of my classes- but not the programming ones. In those, I always took the assignment and exceeded the parameters. I would show other students how to do the assignments. I'd add little flourishes.

This has been such a breath of fresh air. By day, I slog through tedious code written in tedious languages to do tedious tasks. By comparison, programming on the iPhone is downright sexy. It's fun, it's fast.

But more than that, I'm enjoying my remote college experience. My brain is getting a gentle stretching, and I really like that. Of course, it's very gentle- the course material goes at a painfully slow pace and is treading over the basics of OOP with a leaden step. But then I pick up the homework assignments, and run past the requirements and show off, and I don't care how dull the lectures get.

Not to say I get nothing from the lectures. I finally "get" Objective-C memory management. ObjC has an approach that's someplace between Java-style Garbage Collection and C style malloc/free.

In any case, I've got my first non-trivial iPhone application done. The business logic is pretty trivial- do some stuff with polygon shapes- but the UI has drawing and animations, which is well beyond the goals for the current homework assignment. If you have an Intel Mac, you can download the SDK from Apple (free signup required) and run it if you like. The linked code is distributed under a CC-share-alike license: HelloPoly code.

If anyone is dumbshit enough to try and hand this in to the class, they're going to get owned, because it's pretty obviously not what the assignment called for.
  • heh, exceeding assignments.

    For my programming logic course, we had to write a simple payroll app in QuickBasic. All in memory, the class didn't even touch disk I/O at all. This wasn't even an optional feature of the program- he mentioned it was possible, but that was it.

    There were a few optional features, I can't recall them right now. But I got all the required ones, all the optional, and even the file I/O the instructor only mentioned was possible. And it was documented well enough that if I could find where I put it, I could reeimplement it in basically any language and use the same data files produced by the program. Oh, I believe mine was the only one that used subroutines too. I did have to use a couple gotos in the file I/O routines, they could probably have been removed but I was at the due date by that point so I didn't have time to do it without them.

    The C++ class, we had to find perfect numbers. Everyone else used brute force. I knew there had to be a better way, researched and found Mersenne Primes and used those. Mine ran several times faster. The funny thing is the instructor was planning on giving that as extra credit, he didn't think that someone would come up with the idea on their own. I vaguely remember being moderately clever on the program to calculate Pi, but it wasn't using a better algorithm, it was really just a better implementation of what we were given than other people had turned in.

    Anyways, does the iPhone SDK have a simulated iPhone to use for testing? I don't have one, and the more I look at it when I do get a smartphone an Android would probably work better for me. It might be fun to play around with iPhone programming though.
    • Yes, it does use an iPhone simulator.

      My favorite "exceeding" story is from my "Intro to OOP" class. The first assignment was to use the provided windowing/drawing library and OOP techniques to draw a few shapes on the screen. I decided to go over the top and made a full featured drawing application. We presented them in class, and I got dirty looks for being an overachieving nerd, but even the teacher seemed a little pissed at me.

      I didn't know why, but as it turned out, that was the day she announced our final project. To make a drawing application.

      Oops. It was a group project, and that was probably the one moment in college where I was incredibly popular.
Powered by LiveJournal.com