The title says it all. I today I spent roughly one hour tediously drawing out a triangle in Xcode on my quest to become an iOS developer. I’m following the videos on Stanford’s online CS193p course and doing all of the homework on my own. So far, I have created a working card-matching game that has two playable game modes: Set and Playing Card. Playing card works just as you would expect it: you gain points based on rank or suit matches. The Set mode is a clone of the popular game Set (one which I played far too much with my friends in elementary school during indoor recess).
The goal of this week’s assignment is to move away from text-based cards and write the app so that it will actually do all the drawing itself. This has turned out to be very tedious, as a key part of the design is that any code must be scalable so that if the cards change size on screen, they will still look the same. To do this, I wrote the code so that each card’s “view” was divided up into a sort of grid, then plugged in some drawing methods, and voila: my pièce de résistance!
It doesn’t look like much, but it’s a pretty cool thing to be able to draw graphics directly on screen. When I code stuff like this, I feel kind of like a small child who just figured out something really cool. Like when I figured out how to make a Superman symbol using only my fingers. Or when I learned how to make mac and cheese.
Yeah, the feeling is literally the same.
Anyways, this blog is supposed to be about my journey through college, and there will probably be a lot of stuff specifically about code in the future as well. Hope it doesn’t bore you.