Wednesday, June 24, 2009

App Foundation and Core Data Model

While a release hasn't come out recently, I've been working quite a bit on this project. The biggest change is the Core Data model. Simply put, I was doing it wrong.

Best way to explain it? I always the process of building a house as an analogy to programming. If you build it on sand, it works. After all, you only need one floor, right? You make a few workarounds to get it to work. And great, you got a nice, working single-floor house. Now, lets say you want to add an addition? Or better yet, another floor? In the case of my app, if you wanted to add a skill planner? So you add the second floor and the house start sinking. Now, you need to find a way to add another door to be able to get into the house. So you build that. Your plumbing into the house gets bent out of shape, so you jury-rig them to get it to work. However, things just don't work right and the amount of work it takes to fix it is becoming far too expensive, not to mention neither worthwhile or fun. Now, you want to add a 3rd floor, i.e. a ship builder. I'm sure you get the hang of what I'm saying.

In relationship to how my program was structured, my model was built in such a way that made it difficult to build on top it. Specifically, there are a defined number of skills in the game but I'm guessing 99.9% of EVE players don't have all of them. At the time I figured it would best to have a character have a limited number of skills equal tied to them equal to the number learned, possibly for speed and efficiency. The fewer the objects, the smoother the program will run, right?

It turns out that, first, I've underestimated Core Data's speed. Worse, though, is that not having a one to one mapping relationship of every skill to a character's learned skill is what's really crippling me. What it ended up doing was, for example, if you wanted to add a add a skill to a skill planner that you haven't learned yet at all, the program is forced to add a different internally to the planner. Then, when the program is doing calculations, its being forced to do a lot of type checking. Is it a learned skill? Or is it a skill at a level not learned yet? The sheer fact that the app is doing type-checking in the first place means the app is doing something wrong and is violating basic object-oriented programming principles.

So, back to where I'm at. I've got the skill tree and character data importing done. Speaking of which, I switched from tree-based parsing to stream-based and I've gotten about 4x boost in speed. Currently I'm getting the skill queue to work (work correctly, that is). The current skills outline view is working.

Wish me luck. Signing out.

Thursday, June 18, 2009

Object Oriented Design

Overall, I'm pretty happy with trying to keep with object-oriented principles when designing this app. However, in upgrading my interface, I did run into a problem that make my code look like spaghetti code.

Primarily, I have a problem with encapsulation and abstraction with how I'm handling characters from the main app controller. Right now, the general flow of launching the app and creating a new character is first to create a character data controller. When this data controller finishes loading, a character view controller is made and the data controller is passed into it. This view controller handles all the bindings and event processing.

The first problem with this is that I'm creating multiple view controllers. This solution works when you have multiple tabs with different views. However, when you don't have a set number or limit to the number of characters, the tab solution is a violation of GUI standards. A list based selection, such as a combo box, would be the proper way to go.

Now I have the problem with handling multiple data and one view. Ultimately, setting up bindings isn't hard, just tedious. However, currently the main app controller is dealing with the character data controller and the character view controller. I need to remake it so that the app controller is only dealing with a character controller now that encapsulates the data as well as the event handling.

So, in short, wish me luck.

Monday, June 15, 2009

Crossroads

I'm at a point where I'm unmotivated to continue for several reasons:
  • Time: I have college classes. I have a part time gig (system administrator). I have another part time gig (iPhone development). I have a wife. I'm hardly on EVE anymore, much less have the time to continue on this project.
  • Money: I don't mean real money. Several people have come out and offered ISK. To date, I've only had one donor who gave me 5 million. I'm not calling you a freeloader if you choose not to donate anything. It would definitely make me a jerk if I did think that way. However, any ISK donation would certainly encourage me to continue working.
  • Help: I've only had one somewhat qualified designer approach me. After a few email exchanges I never heard from him again. No developer has come forward. Implementing stuff takes time. Overhauling stuff takes even more. I'm also not that great of a UI designer. When I was at WWDC, I met up with a design expert from Apple and we chatted one on one with the current state of my app. However, this is only a solutions for the current problems on hand, not future ones.
  • Feedback: I've had some responses as to how I can improve my app. For example, people preferred not having a training queue be in a separate window but rather in the same main one. Currently I'm making changes to do just that. Otherwise, silence. Just downloads and silence.
I really do enjoy working on this app. I know there are a lot of Mac EVE players happy that someone out there is helping out their game playing experience. Its natural for people to be compensated for their efforts in some way, if not always financially. However, for the most part it feels like its been a one-way experience.

Monday, June 8, 2009

WWDC

That's right, I'm there. Somewhere around 500th in line to get into the keynote as of this writing. I'm here mostly for iPhone stuff. I actually wasn't even expecting to go. I only managed to secure a ticket thursday and had to book everything at the last minute. Anyways, here's to hoping for a great time here in San Fran.