Getting Back on Track

Due to injury, illness, and ennui, I have gotten a tad bit behind in my classes.

In my iOS class, we have class on Tuesday and Thursday. All of our homework is due Tuesday, no exceptions (except for attending programming conferences, but that won’t fly every week). Eric has office hours on Monday and Tuesday. The office hours on Tuesday are after class, so if you don’t get it done before then, no dice.

It’s just a little hard to figure out where you are going to be stuck and what questions to ask. I plan to have everything mostly done by Monday afternoons from now on so that I can ask questions before stuff is due.

Part of the problem is that I have Advanced Java with Eric right before office hours. I find it hard to mentally switch gears between those two quickly. It usually takes me 20 minutes or so to adjust my brain waves, so going from Java to office hours to talk about iOS is hard for me to do. I will just have to adjust my though processes.

I am not so far behind that I can’t catch up. I am not irreparably lost, I just need to do some maintenance to shore up my knowledge base so that I don’t get to that point. It’s like deciding to go on the diet when you have gained 10 pounds rather than ignoring the problem until it gets out of hand!

The Red Queen slowed down a little. Time to start running as fast as I can again. Break is over!

First Day of the Weekend, First Java Project

“Well believe me, Mike, I calculated the odds of this succeeding versus the odds I was doing something incredibly stupid… and I went ahead anyway.”
– Crow T. Robot

I do not have classes on Fridays, so this is the first day of my weekend.

On the docket:

– Complete my first Java project. The project requires me to read a large text file, output it one character at a time to a text file, then write another text file saying how many unique tokens are in the file. This project is due Monday

– Do my assignment for iOS class. This requires me to read a chapter in the book, complete the tutorials in the book, and complete the challenges in the book. This is due Tuesday.

– Try to work ahead in the iOS book. This will likely be delayed until next weekend whenI do not have the Java project obligation to complete.

At my Java class on Wednesday Eric asked me how far I was on the Java project. I told him I was spending most of my time on iOS. I told him I still had a few days to complete the Java project. At this point he started laughing at me, so I do not take that as a particularly good sign.

I asked him what was more important to dedicate my time to. He said both of them are important. This was not a helpful answer.

I then proceeded to write a long rambling email explaining why Java was easier and therefore slightly less important than iOS in my list of priorities. I foresee this biting me in the ass sometime around five o’clock on Sunday afternoon. We shall see.

Today is most likely to be my most productive day because my husband is out of the house at work. Got sidetracked by having to go out and shovel the snow. It wasn’t as bad as I feared it would be, so thank god for small favors. My dog was peering out at me while I was shoveling giving me a sad, mournful look. I felt sorry for it until I remembered that I was outside busting my butt in the cold shoveling snow and it got to stay inside where it was warm and I got over it.

So, time to make tea and forage for lunch while I settle down and focus on the task at hand. We’ll see how much progress I make and how long it takes me to get stuck on my project.

Still Almost there!

Okay, I bit the bullet and asked for an explanation on this project. Apparently most of us did not get it to work and we wanted to get an understanding of how this works.

I had all the components of the project present, but they were in the wrong places. I forgot that we had the View Controller class.

It’s funny. Everything in iOS has names that tell you exactly what it does, but sometimes your brain just kind of blanks on what to do with it.

So you have a View Controller. What does it do? It controls views. You don’t try to control the view from the class you are creating the view in, you outsource it to the class that does that job.

Sometimes you get hyper focused on the small part of the picture that you lose sight of the whole picture.

Speaking of that, now is time for me to determine how to proceed. I would like to make this project work, but I have a Java project due on Monday that I have not been focusing on. I blithely believe that I can breeze through this project without getting stuck, which is probably a stupid belief to have.

I also have another chapter to get through in the Big Nerd Ranch book. We are being advised by Eric to do the same amount of work, but to do it a week early. So he is saying we should work a chapter ahead. This requires me to read three chapters: Last week, this week, and next week.

I think I will implement this suggestion, but I will do so next week. I have other obligations this week, so this isn’t a priority.

So, due next week: Weekly iOS assignment and my first Java project. Plus we have another Snowpocalypse coming tomorrow, so I will be stuck shoveling for an hour or more.


Almost there!

I think I have most of the random rectangle assignment figured out, but I haven’t tested my code yet because I have class shortly.

So, there is a set of methods associated with detecting that the iPhone shakes. It was spoken about in the book we are using, but it did not explicitly state that you can call methods when the device shakes. The method I used was “(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event”.

My last few problems I am having is wondering if this will create a rectangle every time the device shakes or if it will only create one that will move and change when the device shakes. The other one that I have is there is a drawRect method that draws a rectangle but it requires you to pass a rectangle to it before you execute it.

There are a lot of void methods that require you to pass an object to the method and it does something. Maybe I am just not thinking about this correctly, but that seems weird to me. I feel like I should be returning the object rather than passing the object.

I will talk to Eric after class about whether I did this correctly or not. If I haven’t I will come back and say what I did incorrectly and what I needed to fix.

Now on to focusing on what is happening now rather than what already happened…

Madison College’s Two Year Degree Curriculum

I have just realized that this blog may be read by people who are not current or former students of Madison College/MATC, so I am at this point going to give a brief overview of the curriculum to put some of my posts in perspective.

There are two Computer Programming degrees at MATC. They both fundamentally have the same curriculum, it is just more difficult to eliminate a program than it is to create one, so for all intents and purposes, there is one Computer Programming degree.

This is a four semester degree. There are some general educational classes required, like an English and a math. There is some study of databases and query languages plus an overview of web development with HTML and XML.

The part that is most pertinent to my posts are the programming language classes. Each student in their first semester takes and Introduction to Programming class. When I took this class in 2010, we were learning programming using JavaScript. This is so that students can learn about arrays and functions and conditionals before progressing to a more specialized course of study.

After this there are several languages offered and they are each three semesters long. When I began in 2010, there were three languages: Java, PHP, and VB.Net. Each of these had an introductory to that language, an advanced class in the language, and a class on some subset of the language. Java had Enterprise Java for it’s final class, VB.Net had ASP.Net.

In Fall 2012, MATC began offering a Mobile Development degree in place of one of the two programs I mentioned at the beginning of the post. MATC had offered iPhone development as a post-graduate elective and certificate, but these proved so overwhelmingly popular that they were brought in as an option for the degree program.

The first semester for the iOS class begins with “Introduction to C and Objective-C”. It then progresses to the “Intro to” and “Advanced” iOS classes. Android is also offered as an intro and an advanced after first taking the introductory Java class.

For the iOS classes we are using the Big Nerd Ranch books. For the Objective-C class we used the Big Nerd Ranch book about C and Objective-C. Right now, for this class and the advanced class, we will work through their iOS development book.

For the Introduction to Java class last semester we used Head First Java. This semester we are using the teacher’s slides and directly utilizing the Java API.

I have taken every single introductory programming class currently offered during the time I was here. I kept having issues that caused me to either drop the advanced version of a language or not progress past the intro.

This is the first semester I anticipate completing the second semester of three of at least one language. I am focusing on Advanced Java and Intro to iOS.

This is some background if I talk about what came before and what will come after. I am approximately a third of the way through my various language tracks and I am going to attempt to find employment for iOS.

Madison has a very large Java community due to organizations like American Family. It also has a large VB.Net community. I am learning Java as a back-up in case iOS does not work out.

So this is just a quick overview of the curriculum and my place on its path.

Where’s the Click?

Okay, I have pinpointed my source of confusion in completing the Rectangle project for iOS class.

If this assignment were slightly different, if instead of having the triggering event be a shake but a button click, I would be able to conceptualize this. When you create a button object, you can create a method called IBAction to do something when the button is clicked. So I would create a method that instantiates a rectangle with random parameters to be triggered when the IBAction gets called when the button is clicked.

So where is the click? I know that the phone registering that is being shaken is also an action, but as of this moment I am not aware of there being a specific method that is called when this event is triggered. I think there are a series of methods that get called, but when I look at them I feel like I don’t understand what it is that they are doing precisely.

So I have isolated the source of my confusion. Now I need to switch mental gears and work on my Java project.

Onward and upward.

The Emperor has no Code

So, as I mentioned in my first post, I attended my first professional conference this past weekend, Snow*Mobile. It was glorious! I was awake and out of the house from 5:30 in the morning to 11:00 at night on Friday seeing lots of cool things and talking to a bunch of amazing people.

But, as my mother says, when you dance you have to pay the fiddler. I spent all my time and energy doing that last week and I am behind on my homework. I did not look at the assignment that was due yesterday until about six hours before it was due.

I worked on it but I was horribly confused. The assignment is to create an iOS app that makes a random rectangle on the screen. The rectangle’s size, color, and position need to be random.

I approached this like it was a Java project. I understood the principle behind what is going on. I need to create a rectangle class that defines a rectangle which has random properties attached to its size, color, and position and then I have to instantiate an instance of this every time the device shakes.

But then I got lost. Where does this get called? I can make a class that does these things, but where does it go? Am I fundamentally not realizing some large chunk of information?

So I go to class not done, but determined to figure out what I did wrong. I am sitting in the hall waiting for Eric the teacher to come. I look around me and everyone is on their Apple laptops.

I don’t say anything because I don’t want anyone to know I didn’t figure it out. I feel miserable and stupid and contemplate my existence on this planet.

Then, suddenly, I hear a whisper down the hallway, “…Hey, did anyone get this to work?”



“Trying to get it working right now…”

This instantly makes me feel better. I am not abnormally dumb! Other people are having trouble too!

It turns out we all did the exact same thing wrong. We all started with an empty project and we were supposed to open a single view application. I know we could have added the view later, but we are all still starting out and it was enough of a stumbling block that we all got tripped up.

I pleaded for more time on the project because I spent all my free time at the conference. This is the only reason that will fly with Eric, so I have a reprieve.

I have until tomorrow to get this working. I supposed I should work on it instead of updating my blog…

I am rolling the problem over in my head and letting my thoughts percolate. I am not procrastinating. Not really.

…Maybe a little.