Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Monday, February 16, 2015

Corona SDK and Code Signing

It's been forever since I posted anything here. A lot has happened since I last posted. I left my old 9-5 to start an agile training, coaching, and consulting company called Artemis Agile Consulting. A LOT of my effort has been focused on trying to get that moving forward. As a result, I've been working in my "copious free time" on games. I ran into some problems with OttoJotts that I was having a REALLY hard time solving so I decided to take a break, get some fresh perspective, and work on something simple that's based on an idea my daughter had.
Basic app with VERY placeholder graphics
The game I'm working on right now is called Cats and Dogs. You play a secret agent cat or dog trying to prevent a bad guy from taking over the world. It's quite simple, in a Flappy Bird kind of way, but I hope it will be enjoyable. And silly. Silly is the key. I decided to try Corona SDK as my app bed because it allows multi-platform support. I really don't want to learn Java at this point in my career, so this seemed like a good solution.
I've had success with Corona in the past. I wrote a simple app to help developers on my teams at the old 9-5 estimate story points using a Magic 8-Ball. You'd shake your device and it would show you an estimate - anything from 1/2 to infinity using a modified Fibonacci sequence. They had complained about "how hard it is to estimate", so I made it easier for them. And we laughed about it. But the experience was great - everything worked seamlessly for both Android and iOS and I was happy.
I've been working on Cats and Dogs for a few months off-and-on and decided that it might finally be in a place where I could put it on my daughter's phone for her to play with. It's nowhere near "done", but it's enough that she can at least play it. So I began the process to build it for iOS and get it going. And that's when I ran into the dreaded "The application does not have a valid signature" issue in Xcode. This is a common error based on the number of stackoverflow questions about it.
Corona has quite a lot of documentation about how to build your application using their simulator. There are also quite a few gotchas. Corona lists several things that can prevent your app from installing on your device: expired profiles, spaces in your project name, etc.
First, let me say that I was using the Xcode Devices window to install the application. I tried iTunes, which seemed to work, but after it put the app on the device it greyed out the icon saying it was "Installing" - iOS speak for "not gonna work, broh". Second, I was using a version of the SDK from November but downloaded the new version (2511) in the process. DO download the new version - the shell console makes it worth it.
For me, I had made sure that I created new certificates for both development and distribution - it had been a while and was worth refreshing everything. Then I created App IDs for both dev and distro and then provisioning profiles. Everything looked shiny and new. I had some old profiles that had expired, but as I wasn't using them anymore, it didn't seem like a big deal. I thought I was pretty much golden.
When I built the app, I made sure I was using the development profile and provisioning profile. Looked like everything was happy when it built but when I tried to install it I got the "Application does not have a valid signature" problem. If you right-click on the device in Xcode it will show you what profiles are installed - and all four of the new ones were, so I was confused.
After I began exploring the issue, I saw a couple of things that might be causing problems. First, I had expired profiles. So I followed the directions and deleted them from ~/Library/MobileDevice/ProvisioningProfiles (the shell console will show you the expired profile IDs). But if you got into Xcode | Preferences and refresh your profiles from iOS Developer Center, it will simply re-download them, which doesn't do you any good. So what I did - unnecessarily, I believe - was to edit all of my expired profiles and renew them. Rebuild, re-install, failure. So it wasn't that.
Then I found that you can't have spaces in the project name. I was using "Cats and Dogs" as my folder for my project, so I made a new folder called "CatsAndDogs" and tried it. Rebuild, re-install, re-fail. Check that one off the list.
I went through the shell console and noticed that it tells you what it actually puts into the bundle. I've been using an Excel spreadsheet to check some things and saw, in the build, that it was putting my Excel sheet in the app. Say what? So - let's remove that from the source folder and try again. Rebuild, re-install, re-fail. Okay - so, not that.
More searching, more looking at parts of my app and source and folders. Nothing. Then I decided to see if it was my project or if it was iOS Developer stuff and I opened the Hello World sample. Build, install, fail. Aha! So it's not my project, it's my provisioning profiles somewhere...
One of the threads I read say to go through your keychain and remove old profiles. I searched for "iPhone" and found a few items but now something stuck out a little. I had two Developer profiles. So I went to iOS Developer Center and downloaded my brand-spankin'-new developer certificate, removed both certs from keychain, and then reinstalled the new one. Then - rebuild, reinstall, and - success!
So, what worked for me (for development, at least) was to remove my old certificates and install my new ones. If you're still running into problems and don't have a "resources" folder in your project, don't have spaces in your project name, and aren't using expired profiles, maybe delete your certificates and install ones freshly-downloaded from iOS Dev Center. Hopefully it works for you!

Monday, June 2, 2014

Realizations and Level Setting

I had a bit of an epiphany lately that I think is worth sharing at this point. I am following someone on Twitter who's handle is @HobbyGameDev (his G+ is +Chris DeLeon (HobbyGameDev)). It was through the work Chris has been doing that I've started realizing that maybe I've been looking at Otto Von through the wrong lens. In particular, am I truly committed to making Otto Von a "going concern" that could provide a career for me - with all the associated risks - or is it more of a "hobby".
I think the answer that I've been leaning toward, at least presently, is that it's more a hobby than a career. Would I like to do Otto Von all day, every day? I think I would probably say "not really". Not that I like having a job and I would love to work for myself rather than someone else, but all of the uncertainty around being an actual indie developer may be more than my risk-averse situation allows for at present.
When I think about doing that, I realize there are some prerequisites, skills, and connections I need that I don't have. First, I would need several months worth of savings available to really take a stab at doing this as a career and right now I have several years of negative savings available. It's been a very rough year financially. In all honesty, we weren't really able to afford to send my daughter to Waldorf for as long as we did, but we've finally figured it out. It's also a great time for her to transition out as she's going to be starting middle school next year.
Secondly, there are definitely some skills that I don't have (some very well documented here), nor do I have connections with people who DO have those skills. Or, rather, have connections with people who have those skills and are willing to do this kind of thing as a partnership with profit sharing. Maybe I just need to find some HS students who have tons of free time and lots of drive. Regardless, it's been challenging and while I can put out some apps, they're not going to have the kind of polish and "oomph" that I'd like them to have. Will they be "good enough"? Probably. Will they provide the kind of income I need to make this a career? Probably not.
So, given that Owen Goss (of Streaming Colour Studios and Milkbag Games fame) did a survey a couple of years ago and learned that the average lifetime income from an indie game is $1200, I would need either a TON of games out there, or I would need to be better than average. And that's the mean, which means that 49.9% of games earn less than that. And that would require a lot more games.
So, what does all of this mean? It means that I'm not an indie trying to make it in the bigger world. What I really am is a hobby developer enjoying what he does.
Happy coding!

Saturday, February 8, 2014

Facepalms

Before the holidays, I was really focusing on OttoJotts by trying to finish up what were a dozen or so tasks that needed to be finished before I could release the game. I had determined, based on the lack of response I was getting from my artist on a separate project, that I should focus on something that I had a lot of control over and had made some good progress on completing. After I broke everything down that remained to be done, I found that I had a month or so of work left on OttoJotts to finish it off. I blazed through several different tasks, had to create some new ones, but overall was making some good progress on it. Then the holidays happened.
Catniss in Nutcracker
The Thanksgiving to Christmas period at my house is one of lightly ordered chaos. Catniss has several performances of The Nutcracker with the Colorado Ballet during that time and the spousal unit sings professionally as a caroler for different functions. Toss in a couple of illnesses and the whole time is just ridiculous. I was certain I wasn't going to get much done over the break so I didn't really even bother. And then for Christmas I received Call of Duty: Ghosts, so I had at least a campaign to complete before I could get back to anything. Then it was January and I joined a CoD clan and then we had a clan war and then... Long story short - nothing really happened on OttoJotts from November through January.
When I tried to get back into it, though, I found it more and more difficult to get back into the groove. I found plenty of opportunities to procrastinate and not work on OttoJotts at all - including finding some data from fiksu.com about iOS 7 adoption (you need to check out that site). Given that adoption rates are around 82% for iOS 7 and I've been having trouble getting OttoJotts to draw properly in iOS 7 (something changed in the basic UIView stack I still don't understand), it put even more of a downer on wanting to work on it. Plus, I had something else potentially brewing at the 9-5, so my motivation was a little more depleted than I thought it could be (without being completely disinterested).
BUT (and it's a big but), that's when things started heading south. The "something else" dried up and I started feeling like the 9-5 isn't going to be terribly viable for much longer (which suxors hardcore). Suddenly, without really feeling like I was up to it, I decided that I need to get back to doing what I should be doing, even if I didn't feel like it. I started checking out what needed to happen with OttoJotts and just couldn't, for the life of me, actually open up the project. I'm just a little burned out on it. It was supposed to be a pretty quick little app that would go into the App Store and then maybe make a buck or two. Instead, it's turned into months and months of continuing development that don't quite seem to be going as well as I'd hoped. All of the backend work is challenging for me (I'm a front-end - but not UI - guy). While there are still only about 80-100 hours of work left on it, I think I'm going to put it on back burner while I reinvigorate with something else for a while.
I thought I had been recharging a bit by playing some other games and taking some time off, but I think it's had the opposite effect. It's put new and interesting distractions in my path to getting anything done for real. Unlike some acquaintances, I haven't hit it big on the App Store and can't just semi-retire at the moment. Until then, it's nose to the grindstone no matter how distracted I want to be.
It's not that I don't love doing this - I do - but it's that I just find myself in the same position over and over again: unable to complete some portion of the game because I lack some skill. I need to either acquire said skill or find someone who is willing to help - and unfortunately I haven't found people who are likeminded about doing this. Or I do and they totally flake. *sigh* As a result, I have a hard time being motivated to work on things.
My favorite captain
All of this said, I have about 4 games that are in various stages of completion. If I can just get ONE of them done and out, I think I can make enough to either hire the people to finish the others or perhaps attract enough interest to get people engaged. And then I'd have a small group of games earning a little money in the store for me and that might be enough to get the ball rolling. Which would be totally cool.
So, I am once again ditching my current project (OttoJotts) for something else - for now. Hence the facepalm (to left). It's been a rough few months and I am not at all motivated to do this, but I am motivated to not be dependent upon a salary. I'm not thinking of quitting any time soon, but going to work when you don't have to makes the trip a whole lot easier and more pleasant. And THAT'S the goal - to have the flexibility to do what I want to do when I want to do it. Don't we all?


Saturday, September 14, 2013

Cautions and issues with iOS 7

I've been working on OttoJotts quite a bit over the past few weeks, making some great progress. One thing I've had to do is perform all of my testing in iOS 6 and earlier because I'd been seeing weird display problems with iOS 7. I thought it might have been just some issues with the betas of iOS but now that I have the gold master of iOS 7, I'm seeing the same problems. And now you can too:
iOS 6 on left, iOS 7 on right
What you're seeing is what the screen looks like in iOS 6 and 7, side-by-side comparison. Each letter is a label and I load a box and place it behind each label. On everything but iOS 7 it displays properly as you can see. I thought it might have been a problem with the background color on the label being something other than clearColor, but that doesn't seem to be the case either. I don't know why the boxes aren't displaying at all right now. Definitely going to require some additional work before I put this out to the App Store.
I am pretty surprised by this pretty major change in iOS. This seems like pretty basic functionality that has been changed. I know that a lot of it is because of the new UI paradigm that Apple is trying to introduce, but this seems like quite a major change in implementation from previous versions. What this seems to me is that every app developer is now going to have to be extremely careful about this upgrade and what it means to their apps.
Good luck with your apps.

Sunday, September 8, 2013

Crawling toward the goal line

For several months I've been using a Kanban board (via www.kanbanflow.com - a great FREE resource) to track the work I need to get done on OttoJotts. It's been helpful seeing both the work that I've been getting done (very minimal) and what's still left to do (big and growing daily). That said, it's been nice going through and moving things from Ready to Pull to In Progress to Done. I'm keeping my WIP (work in progress) limit to one because, yeah - I'll get distracted if it's more than that.
Part of my Kanban board
Almost all of the work left to do is around the two player game. I will need to go back and sort out all of the bad decisions I made around single player games when I get into Beta, but until I complete these remaining 11 stories, that's not worth my time. The nice thing about the board is that I can see how much time I've estimated it will take to complete each story. And when I sum them together, I get 176 hours remaining. Which is actually pretty cool. I am, in theory, 4.25 weeks from being done with OttoJotts. Assuming that I worked 40 hours a week (which I don't) and that I haven't terribly over- or underestimated any of these stories (which is kinda likely).
STILL! 176 hours is actually reasonable. There is real potential to be done with this thing before I sprout daisies. And bringing together a lot of technologies and pieces that I have only some familiarity with (and certainly wouldn't claim proficiency or expertise). Well, beyond using agile methodologies to track the work (and even that was a latecomer to the project). Overall I'm feeling, well, accomplished.
I had this gigantic negativity about the project when I put it on the back-burner last year. The size of the work that needed to be done seemed ginormous and insurmountable. But when I picked it up again and poked at it I saw some small successes and those kept building into other successes - small, to be sure, but present. And then when I finally took an accounting of all of the things that I wanted to complete before I could explore the possibility of releasing the game - 176 hours were all that remained. And out of those 176 hours there are 80 hours that I put in for what I consider will be some large efforts - things I don't have any idea how to do. The good thing is that they're down well-trodden paths - I just need to find the guide map and make my way down those paths.
So, it's been a LOOOOOONG winding road getting here, but the end really truly is in sight. And thanks to tools like KanbanFlow I've been able to focus on prioritizing the work I need to do next and focus on the current item only. And, hopefully, this is the beginning of something really exciting.

Tuesday, July 30, 2013

Lessons learned

So last night I was working on getting a singleton1 created to store the player data so that I don't have to track it through all the different view controllers in OttoJotts (there are quite a few). I had done it with the dictionary already and that was working beautifully, so I thought this would be a piece of cake. I created the new class (using NSObject as the base), pretty much copied and pasted the code, made the requisite changes, and compiled. And I got this cryptic message:
The unusual error
I was a little surprised. I had declared that PlayerAccountData was a singleton. I mean, hadn't I just copied and pasted the code? Hadn't I made the changes that I needed to make? I went back and checked - yes, everything looked correct and all the changes had been made. What the heck was going on here? Why would this not compile? Obviously I'd done something wrong. Oh wait - this was the Xcode 5 developer preview; could that mean something? I searched online to see what I could learn and was stumped. Nothing seemed to work. And no one else seemed to have seen this. What on earth was going on?
Then I noticed that things seemed "not quite right" in the file. And here's what I mean by "not quite right":
Comparison of the new and old code
The original code had coloring for the SYNTHESIZE_SINGLETON_FOR_CLASS macro which the new code didn't. Now what the hell did that mean? Why didn't it recognize it as regular code? I tried adding the #import for the SynthesizeSingleton.h - no luck. I tried removing it - no luck. So back to the web! And nothing. And I had a sad face.
Something made me open the right-hand side bar for the file - and that's when I noticed something interesting. There was a check box under the section called "Target Membership". It was unchecked for the new file. But right there was my app logo next to the check box. And when I clicked it? The syntax coloring changed for SYNTHESIZE_SINGLETON_FOR_CLASS! Well, how 'bout them apples?
So what was the lesson learned or, in my case, re-learned? Really check to see what's happening with the error messages you get from Xcode. Sometimes they seem cryptic but actually contain the exact information you need to fix the error. But I think in this particular case it means that sometimes the differences between what you expect and what you get may be slightly hidden from you. I didn't even think about the right-hand properties sidebar for my .m file - and it didn't dawn on me that when I added the file to the project that it wouldn't be appropriately associated. But the next time I add a class, I'm going to be double-checking to make sure that the target membership is set correctly. And maybe this saves you a little time in the end too.
Happy coding.

1. The SynthesizeSingleton macro I'm using is from the incredibly awesome Matt Gallagher of CocoaWithLove.com. The singleton code is located here.

Sunday, July 28, 2013

OttoJotts REBORN!

Once, a long time ago in a land far, far away, there lived a wanna-be game developer who decided oh-so-frivolously that he would write a game based on a game from his youth. One that he had played with his very erudite mother and worked wonders to both improve his vocabulary and his spelling. He thought that he could write the basic game in a few weeks and then the multiplayer version in a few months and be done by the end of summer. But alas - our wanna-be game developer had a case of the hubris.
He was able to complete the core game mechanics in a week or so and then spent far, far too many days working on getting the user interface to work. For, you see, our developer wasn't "graphically inclined" (read: his artwork suxors). So he spent many a day trying to get some basic things looking good enough to play. And then - amazingly - the single player version was complete! And there was much rejoicing!
As he began to work on the two player version, however, he stumbled and stuttered and fell flat on his face, for his game required a "back-end" (read: database and middleware to talk between the device and the database). And he despaired because again, alack, his database skills were "lackluster" at best and his middleware skills were, perhaps, rated "mediocre". He worked diligently, though, trying to connect all of the pieces. And finally, he got some of the information he wanted to get from the device to the database and back again! And there was more rejoicing!
But then came the actual "two player" work. And there was much gnashing of teeth and grunting of exertion and swearing of curses. And the developer grew weary and tired and despaired of ever completing his opus. He feared that perhaps he would always just be a "wanna-be" game developer.
And then the Great Fruit From Which A Bite Has Been Taken decided that the manner in which he getting information from and to the database was WrongTM. And it was deprecated (read: removed). And the developer was despondent. Not only would he have to actually finish the work to allow two player games to work but he would also have to change all of the code that worked to do that work. And he despaired. And exerted. And cursed. And gave up.
One day, he found that his current hosting provider was deprecating the product he had grown to love these past 10 years and would require that he move to one that was far more limited or one that was WAY more complicated. He decided to move his website and his databases and his code to a new provider who offered a product more in line with his old product. And it was good.
Then, while distracted with another as-yet-fruitless pursuit, he decided to open up the old code and see whether it was possible to make the needed changes for the new database host and make sure he followed the rules of the Great Fruit From Which A Bite Has Been Taken. After looking at the code and the middleware he decided that it wouldn't be that bad after all. And he poked and prodded the middleware, making a tweak here and a revision there until - it worked! And there was astonishment!
And our poor, despondent wanna-be game developer is no longer so despondent (although he is much poorer). He had Purpose. He had Intent. He had - a real opportunity to actually get back to finishing the damn thing.
So now, to you, my gentle reader who has so patiently put up with this long and purposeless fable, I make claim to the Twitterverse, the Facebookverse, and general Internetverse that OttoJotts is REBORN! And it WILL. BE. DONE! (By Halloween.) (No seriously, I mean this.) (Stop laughing.) (Dicks.)

Sunday, April 21, 2013

Simple diversions

I've been working on my game for a bit over the past few weeks, but have run into something of a roadblock. I don't know whether I want to continue on this path - I'm having a hard time "finding the fun" in it. Plus, the "real job" has been a real Debbie Downer, so I've been in a bad mental state. Not sure if the problem I'm experiencing is general malaise or if it's indicative that the game really isn't that fun. I've been playing some Modern Warfare 3, Civilization V, and Skyrim (trying to level my blacksmithing to 100) trying to recharge my enthusiasm. Not really helping so far. Although I did get my blacksmithing to 100 and then made it "Legendary" which reset it. Not really sure what the benefit there is, yet...
I attended the Mile High Agile conference on Friday and one of the sessions was about "gamification" in the agile space. A lot of the context was "how do you insert game elements into your teams so that they stay engaged". He provided some examples like LinkedIn's profile completeness (you want to be at 100%, right?) and the Nike+ product (which I'd heard about in a different context) tracking/sharing/comparing against your friends. There are some game elements in there to be certain. I'm not sure what elements of gamification would work at the 9-5, but the jarring reminders about basic game design left me contemplating the game I'm writing. Some of the basic elements (progression of difficulty, activity loops, etc.) just really aren't there. Is this because I'm failing to write something of quality or is it because there are different elements? What is the "fun"? How hard/easy is it to "find the fun"? Will it end up being the same game over and over again (and therefore boring) or will people stay engaged? How might I make the game continually challenging?
All of this was swimming through my head all weekend and I wasn't really any closer to resolving it until actually writing it out in this blog. I have some ideas about progression now. I had already decided on some kind of "ranking" system, but that was just a rudimentary tracking system based on the number of games you'd played successfully. But the difficulty of the game never changed - until now. I think I know how the single-player game can be more dynamic and grow with the player. Nothing fancy, mind you - but enough to make it something someone might be able to start with and then get better at over time. Not counting the multi-player version, of course (which will be hot-seat only for now, I've decided - back-ends and me are just not working right now).
So for now I'm working on the fully-expanded version and will then winnow it down for the first time players. But the point is that I'm now feeling a little more energized about working on this. Sometimes all it takes is a conversation with yourself to get back on track. Owen Goss, the main guy at Streaming Colour Studios, tweeted me this morning (whilst I was in the depths of whining about my un-developed/un-released software) that I needed to just "ship it!". And he's absolutely right. Funk over - development restarting. Thanks Owen.
I thought I'd leave this here, though. It's my Xbox Gamer Card and shows how much (or how little) I'm playing. And if you have an Xbox live account and want to kick my ass (not a hard thing anymore), maybe I'll see you online.

Monday, January 21, 2013

UITableViewCells and Forgotten Wisdom

I've been playing around with a new game for my daughter based on an old game called Electronic Detective. I'm actually making a version of it for her to play (since my old solid state system, for some reason, only plays about half a game before crashing out). I had originally planned on making everything fit onto a single screen (which would have been better on iPad, but I'm a sucker for pain which is why I'm making it for iPhone), but decided to be considerate and moved from a single UIViewController view to a new UITableView layout. But the new version of Xcode makes creating UITableViewCells a little, um, wonkier than I remembered.
NB: I'm sure this is all 1,000,00% easier with storyboards, but I'm not using them as I'd like to target devices more than 6 months old. And yes, that was some slight sarcasm.
The first thing I ran into is that when you add a UITableViewCell .h/.m to your project, it doesn't allow you to create a .XIB with it. You need to create the .XIB separately. Then, the thing I've learned, is that you need to set the class for the VIEW to be the new .h/.m class name you selected. Do not set the File Owner to be the new class - leave it as UITableViewCell.
If you don't do that and leave the view as the UITableViewCell or if you set the File Owner to be the new class, you're likely to run into a dreaded "this class is not key value coding-compliant for the key XXXX" error. This is not terribly useful but some searching on slashdot and other places guided me in the right direction. If you've come here because you searched for that and you're using UITableViewCells, then here is likely what you're seeing as a problem.
This is one of those problems that I continue to stumble upon as I work through things only periodically. I forget some of the tricks and tips I've learned previously. But as my spousal unit and I have decided that she will not be returning to her job at Lockheed-Martin (as they have recently changed their leave-of-absence policies denying her the ability to take a second year off to watch our illness-prone son), I need to start getting some more titles in the App Store - and quickly. Given that, I will be working more feverishly to get things completed and released and will be sharing far more on this blog than I have been of late. And I will hopefully be retaining more of this forgotten wisdom.
Wish me luck!

Sunday, December 30, 2012

Care when posting from the web

I've been working on a new application (Electronic Detective for my daughter) which will be the basis for a longer-term game effort and ran into a strange thing. I decided that how I was going to be doing the UI for a particular portion of the game was just incredibly clunky. I had remembered a piece of information that needed to be included and rather than shoehorn it in, I decided to take a step back and see what made the most sense. In this case it was changing things from a static UIView to a UITableView. This opened up a lot of potential real estate and made it possible to do some things I was struggling to fit on the screen before.
I was searching to find the best way to get UITableViewCells working with the new Xcode (4.5) since they've sort of changed how they operate since last I'd done one (a long time ago - in a galaxy far, far away). I found a good sample from a blog post and decided to just copy/paste and modify the sample code. And things were fine - until I got a very strange build error - "unexpected '@' in program". Um, whiskey tango foxtrot was that? I searched a bit more and the answers proposed didn't seem to really address my particular error. Here was the offending code (from a code blog I found):

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
 static NSString *CustomTableCellIdentifier = @”CustomTableCellIdentifier”;

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CustomTableCellIdentifier];

 if(!cell)
 {
   NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@”CustomCell” owner:self options:nil];

 if(nib.count > 0)
 {
   cell = self.customCell;
 }
 else
 {
   NSLog(@”failed to load CustomCell nib file!”);
 }
 }
 
There didn't really seem to be anything wrong. The highlighted lines were the ones causing the problem and I couldn't really see a problem. Each of the literals was perfectly correct. What the hell was going on with this code? Then I stumbled upon a stackoverflow question and answer that provided a little insight. What was weird about the editor was that it wasn't showing the text formatted as "text" - it was just showing as black text, not the typical red you'd see. Then I read the part about the "smart quotes". I replaced the first "quote" with a regular "quote" and the text higlighted. That's when I realized I must have pasted in smart quotes and that's what was causing the problem.
I replaced all six quotes and things started working the way I expected. So, as a word of caution, Xcode apparently will maintain some special characters when you paste code from other sources. Make sure that if you're pasting that you double-check the characters. If things don't look correct to you, they probably aren't. It may be a bit weird, but it may be worth your effort to retype some of it manually in the editor to see if it's a problem with the paste or with the code. You could save yourself a little mental anguish by trying a couple of simple things. Good luck and happy coding.


Friday, September 21, 2012

New glyphs are done!

So I spent a little time finishing off the glyphs for the app. I think they look "okay". At least "okay" enough to be in version 1.0. And, for me, they're "freakin' amazing". *sigh* As I said, my graphic artist skills leave MUCH to be desired. Anyway, without further ado, here are the glyphs I made for the app.
The glyphs for my app

Not bad, eh? Yeah, I think they'll suffice. I did spend quite a bit of time making them and hope that they'll be met with approval by the community. It was definitely not something I felt at all comfortable doing, but sometimes it helps to get out of your comfort zone.
I'll point out that these are the original drawings - I haven't cleaned them up at all. I will be extracting the individual glyphs and improving them before incorporating them into the application. From personal experience with other graphics exercises, this will take several hours. I just hope I'll be able to get enough time strung together to make it happen. I also need to get the description written for the application, so that's something else I need to get a block of time to accomplish.
So, there we are. Hope you like the preview here. Once I'm done and submit everything to the App Store, I'll post a link.

SLIGHT delay on Maya Calendar App

So as I was going through the submission process to get my Maya Calendar application onto the App Store (yes, that was actually happening!), I needed to create a description of my application. I decided to go see some of the other applications in the space to see what they had crafted for their descriptions - check for inspiration, really, not plagiarism. No, seriously - no plagiarism. I think I might just like typing that word...
Mine on left, theirs on the right
Anyway, as I was going through looking at "maya calendar" (as opposed to "mayan calendar") I stumbled upon an application - using the exact same graphics. In fact, their icon was the same idea (with a different glyph - see right for comparison). Well, *(^*&!@. And AS I WAS SUBMITTING MY APP! I found that the website I'd "borrowed" the glyphs from was the same site that had the application I found. *facepalm* O.M.G. Bad me for thinking they wouldn't be used somewhere else.
So what did this mean to my calendar app? It meant that I needed to have some new glyphs. I asked my daughter if she'd be inclined to draw them (there were 44 required) and she agreed. Then she drew the first one and decided "um, no thanks - that was HARD". So it fell to me to draw some new ones. I used some different sources to get ideas for what they looked like (including the ones that I can't use now), but I've redrawn all but five of them. Next will be scanning them in, then cleaning them up, then integrating them into the app. The nice thing is that integrating them is a piece of cake - I just need to replace the existing files with the new ones. Also, I'll have higher-quality ones to use for an iPad app (if I do that). While they will be similarities to other glyphs on the web, they're hand-drawn (by yours truly) and lacking the funding to fly to Central America to tromp around Maya ruins looking for samples, I have to do it virtually. Which means other peoples' pictures.
So I'm close to having that app in the store. I'm really hoping that I'll be able to get it done by the end of the weekend. We have a very busy time planned, but here's hoping that I'll have a little time during those two days to get this sorted out and submitted. In the meantime, I'm working on getting a description put together so I can just copy/paste it into the submission page and go from there.
Fingers crossed for a successful submission. Then it's the waiting game for approvals. I'll post more on that as we go through that process.

Wednesday, August 29, 2012

Nearing completion

Current launch screen for the app
So I've been working a few hours every night trying to get closure on the Maya Calendar application - and I'm almost there. Except for a marathon Bejeweled Diamond Mine session this evening (I didn't want to quit until I'd topped 200k) I've pretty much been working on finishing up the application. I've got the backgrounds all changed - they look very nice now - and am working on the final touches. I was going to do a universal application - both iPhone and iPad - but the size on the app was making it ridiculously large. Like 60 MB large. Wow. Um - no.
What's left you ask? Well, I've got some "about" kinds of things to finalize. Need to get the application version information in there as well as information about HOW to use the app. Plus I wanted to put in some text about the long count calendar - where did it come from, how was it used, etc. Once I get those things in and working as expected I think I'll be ready to build it for distribution. I don't have an iPad version yet at all. I think while I'm waiting for the App Store approval process to complete I'll work on the iPad version. I've got all of the graphics and logic - just need to change up the display. I think.
Things have been coming together over the past few days. I feel that I've been productive - moreso than in weeks past. In order to get things finished I need to do something I haven't ever done before, so I do still have a little more work to do, but I feel now that I'm closer than ever to having something completed that can be submitted to Apple. And that will be a huge boon to my self-esteem these days. I also made some adjustments to the graphics that, for a non-graphic artist, I feel pretty good about.
Anyway - just a quick update. Looks like things are getting close. Now to sprint to the finish line and be done with this.

Sunday, August 26, 2012

Oddness with the Maya Calendar

So I've been reading up a LOT on the Maya* calendar over the past few months. There are two different calendrical systems - the Long Count (which is what we hear about when people talk about the end of the world in 2012). The current date in Long Count (as of this post) is 12.19.19.12.0. There's another calendar is called the Sacred Round and uses what are called Tzolk'in and Haab dates. This calendar was more religious in nature and had a full cycle of about 52 years. When doing calculations for Long Count or Maya calendars it's common to include both the Long Count and the Sacred Round dates.
One thing that seems clear is the basic calculations to get the Sacred Round dates. The Wikipedia article describes pretty clearly the arithmetic required to derive these. The regular Sacred Round cycle is 360 days and there are 5 Wayeb days (that were considered unlucky) to make the calendar 365 days long. Close to the 365.2422 days our tropical calendar is, but it means that the Sacred Round shifts one day forward compared to the tropical year every 4 years.
One problem is that I would like for my application to work for dates all the way back to 9999 BCE (and forward to 9999 AD/CE). Most calculations are done using Julian days as a baseline, but the Julian dates start in 4730 BCE, a little later than my 9999 BCE desire. What's a developer to do? Well, one option is to try to address the negative values that come from going before the start of the Julian dating scheme, which is what I initially thought of doing. Then I realized that since there is a higher-order cycle above the currently accepted five values, I could add what's called a piktun worth of days to the count, in essence moving back the Julian calendar about seven thousand years. I did this and it worked great for the Long Count calculations - I just subtracted out a piktun if it was past the beginning of this cycle or not - it all worked out. The Sacred Round, however, was a different story.
The reason is that the Sacred Round starts at specific values for tzolk'in and haab. Moving back a whole piktun, though, means I needed to recalculate the tzolk'in and haab values. I figured out what the new offsets were and after resolving some oddness with displaying the correct glyph for the tzolk'in and haab I seem to have gotten everything working.
The only things I have left to do to get this thing out the door is finish the polish for iPhone and get the iPad version looking reasonable. All of the testing I've done to date is solid. I still have a few things left to validate, but I actually have a high confidence that it will work pretty well. Then two versions - one free and ad-supported and one for $0.99. Then I'll have broken my 3.5 year drought of getting apps into the App Store. Yay?

* You'll note that I'm not using "Mayan" anymore. I learned that Mayanists (scholars who study the Maya history) use "Mayan" for linguistic elements (the language) but use "Maya" as an adjective for "things that are from the Maya culture"). I will bow to their superior expertise and understanding in this particular matter. 

Sunday, August 19, 2012

More Mayan Madness and Inspiration

So it's been a while since I've posted. Unfortunately in the weeks since then I've had a hard drive "almost" fail, a Time Machine restore TOTALLY fail, the hard drive FINALLY fail, and lots of restore pain. In short, it's been a hell of a few weeks. But now I'm mostly back to normal (well, the laptop is) and running again.
19 Aug 2012 in Long Count
I've been working on the Long Calendar app for the past few days. So far I've added a lot of better graphics to it so it looks better than it did before (see picture to the right). I think it's starting to look a little better. I wasn't planning on working on the glyphs until I had completed everything else, but I'm actually really close now. I have two remaining bugs. For some reason the Haab and Tzolkin calculations are incorrect. I'm guessing I messed something up when I fixed some +1/-1 problems earlier. And BCE dates aren't working correctly right now. Again - I think I managed to break them at some point during development.
One thing I'm not doing much and need to be doing a lot more is the unit test. Xcode 4.2 integrated a unit testing framework into the system, which is awesome. I need to spend some time really beating it up and understanding it a lot. With this applet I feel that it could be beneficial (it would have caught the changes that broke the calculations), but I'm also pretty far down the path. I've got a set of tests that I do whenever I make changes, so I'm not totally out of sync with current development methodologies, but still feel that with all of the agile experience I have that I'm not being "true" to the methodology by not doing it for my own projects. Especially since Apple has done the "right" thing by encouraging developers to do it. Next project I must do it.
Regardless, things are starting to come together with this. I expect that I'll be able to get this completed this week, I hope, and get it into the AppStore next weekend. Earlier would be better, but there's a lot going on right now - lots of swirl and lots of stress.
On a good note, though, I spoke with a friend from my HP days - Cooper. He works at Microsoft right now and I was in Seattle last week and rang him up. He's one of the most talented engineers I know (perhaps the most talented). He's also one of those people who is completely committed to whatever it is that he's working on at the moment. He inspired me to work on things that made me happy when we worked together. We actually started talking about starting our own company before MS offered him riches that would make Solomon blush. But it's Coop who really encouraged me to dream bigger and work harder to achieve those dreams.
I've sort of lost sight of that in the doldrums that are everyday development. It's easy to forget the why of what you're doing in the day-to-day of doing. What do I want to have? The ability to be with my family when and where we want to be. To be able to provide for them while not being beholden to a time clock at a wage-slave job. To not be a sarariman. As you probably know, I have a 9-5 at Comcast. The "job" is good - challenging to be certain, but I'm well-compensated and enjoy working with my coworkers. But it's not what I want to do in the long-term. Before I got this job I told my wife that I wanted my next job to be my last one - that I would make this Otto Von thing work come hell or high water. And what's happened in the 2.5 years since I started at Comcast? Not a whole lot. I've managed to learn a lot but at same time waste a lot of effort not focusing on the end goal.
Talking with Cooper has really re-focused my energies on that end goal. I was reminded of the possibilities we had back at HP. Of the things we talked about doing and the places we'd go. Of the games we'd write and the lives we would change. Of the paradigms we'd create with our innovation. We'd be the Nintendos of the game world. And that's gotten lost.
So, here we are in August. What will the next few months bring? I don't know, but I do know that I'm reconnecting with those "halcyon days of my youth". I'm remembering WHY I'm doing this and why I need to make this more than just a hobby. It just takes a look at my family and a chat with an old friend to bring everything back into focus with a clarity I could scarcely recall. Almost like a haze that slowly dims your vision. Over the years it just seems fuzzier than it used to be. And then you clean the haze away. Now I just need to keep the haze away.

Wednesday, June 6, 2012

More Long Count Calendar Updates

I've been making some awesome progress on the long count calendar application. I've got all of the math working (although I still need to test all of the nasty edge cases to make sure it calculates things correctly), but for anything after 1582 (when the Gregorian calendar came about) it seems to be working just fine. To test the date calculations I'm working on the ability to convert ANY date into a long count. This is a nice feature to have (what was Jan 1, 1900, for instance?) and will be useful for people looking to compare against other date calculations. The other thing I'm going to provide is the ability to put in a long count date (13.17.5.2.1) and see what date that converts to in a Gregorian calendar.
Normally, the main issue about converting from these earlier dates to later ones is that not everyone transitioned to the Gregorian calendar at the same time.Most of Catholic Europe adopted it in/around 1582. The British empire didn't adopt it until 1752 and the Soviet Union was in 1918 (right after the Bolsheviks took power and Russia became the Soviet Union). The Wikipedia article on the calendar has a nice chart showing the adoption times for different countries. So depending on where you were you had a different calendar. I'm pretty sure that the date is the 1582 and using the default NSCalendar objects will fix it for that date, I believe.
I will say that Apple seems to have done a good job with the calendar objects. NSCalendar and NSCalendarComponents are very nice little objects that really do simplify the mathematics. I have to convert to Julian dating anyway, which makes the math about as easy as it can be, but having the system provide some of the common functionality is very handy, especially being able to extract out year, month, and day without any extra divs and mods on my part. It will even provide the day of the week if you need it (which I don't in this particular application). I still need to dig into the objects a little more, especially with the pre-1582 dating - just to make sure they work as expected.
I did get the T'zolkin and Haab calculations into the application, so not only does it show the long count form (12.19.19.8.2 for today) but also the "month" and "day" (5 Sotz' 1 Ok - also for today). So everything is present in the application now from an implementation perspective - all the math works, it grabs the right images, etc. I need to get some better quality glyphs for the application, though, because the ones I have are low-res and won't look good on the iPhone let alone an iPad. That could actually be a major pain in the butt - one I'm not concerned about right now (those two stories are last on my kanban board), but I recognize that I'm going to have to spend some time either finding some good quality ones or drawing them myself (shudder!).
Overall things are looking really good. I think I might be able to make some good progress this weekend during downtime for Yeomen of the Guard. I'm off-stage quite a bit and with 3 shows in 4 days, I've got a lot of potential time to move this forward. I'm setting a goal of having the Gregorian to Long Count conversion done around Saturday night, the Long Count to Gregorian conversion around Sunday afternoon, and the reckonings done by Monday night. Which means that all I'll have left to do is get some good graphics next week and then I could, in theory, put it out on the App Store by the end of June - the first such Otto Von product to be available. All in the course of 3 weeks. Wow.
So keep your fingers crossed - I need all the luck I can get on this rapid development path!

Monday, June 4, 2012

Silly Little Mayan Long Count Calendar Utility

So for post 101 (that's 5 in binary), I'm giving a sneak peek into a silly utility I decided to develop. I don't know why, but it's just been one of those things that I thought "you know - why not?". So I am. And what IS said utility? Oh, it's tres bien, mon amie. And tres sillie. (And yes, I know that sillie is not really French). Regardless, here's a screenshot:
And what, pray tell, is that? Why, my friends, that's a Long Count (commonly referred to as "Mayan") calendar converter. It tells you what day it is in the Long Count (which, ya know, 'ends' on Dec 21 of this year - but not really). The Long Count calendar is actually pretty straightforward. It's mostly based on the number of days since the "dawn of man" which is 13.0.0.0.0 - a date that correlates commonly to August 11, 3114 B.C.E. It uses a Julian dating scheme (every day is just 1 more day) and then divs and mods them into buckets (b'ak'tun, k'atun, tun, winal, and k'in). The main Wiki page gives a pretty good explanation of the whole thing.
I pretty much started it this evening when I got home, but I've been reading about the Long Count for a while now. I'm intrigued by different counting methods. I used to have a devil of a time with them (converting from decimal to binary to hexadecimal sucked). And then I heard Tom Lehrer's "New Math" (YouTube link here - and yes, you want to click it) and it completely resonated. I grokked it. My mom had Lehrer's LPs (if you remember those, you're older than you look) and I listened to them endlessly. Since then I've kind of geeked out at new methodologies.
Anyway, I looked in the App Store and saw a couple of things about the Long Count calendar but saw that some people were disappointed in the lack of functionality of some of those other apps. There are multiple "reckonings" for the start point of the Long Count, but those are all just relative to the main reckoning. It seems simplistic to use the different reckonings for reference use and also to allow people to convert any date. Probably be able to put in a Long Count and have it convert to a Gregorian date as well. So I'll see what I can do to make that happen and quickly.
Given that I have the basic calendar already working in just a few hours I'm actually feeling a lot more accomplished than I have in ages. And that's a good thing. And tres bien, mon amie.

Saturday, May 19, 2012

Using Kanban for Work


I've been using agile development methodologies (Extreme Programming (XP), RUP, Scrum, etc) for over a decade now. In every job I've had in that time I've touted the benefits of using agile rather than whatever process was prevalent (usually just basic waterfall). In some cases the teams totally bought into it and saw fantastic productivity improvements (like a 300% increase at one company). I've had grassroots support in the trenches only to have senior management balk at it ("too hard to track", etc. - the typical NIH issues). In some cases, the team decided to implement it anyway. Other times the team thought they knew the technology but just ended up with iterative waterfall (smaller waterfall cycles).
Example KanbanFlow board
For all of my work with Otto Von I've done agile in some way. I've been doing primarily XP with some modifications given I'm a one-man shop. But lately Kanban has been getting a lot of traction in my mind and I've just started using an online Kanban board (see this post for a little more about it). What I like about Kanban is that it's really better adapted to how I need to work and what I focus on from an agile perspective - take on a small chunk of work, complete it, move on to the next.
A slice of cake is like a story
So what does Kanban offer? First, as in all agile methodologies, you start with decomposing the work that needs to be done into small pieces. The key concept is to look at the entire project as a cake that you cut into vertical slices. In most applications there are layers that need to be built (back-end, UI, storage, database, etc). With the slice, you focus on doing all of the work on the layers at one time in the slice while providing some small element of value to the project. In the picture above you can see that I've got stories like "Add Friend". These require UI changes. back-end code, and DB changes. That's my slice for that piece of work. These can sometimes relate to "functionality" or "features", but traditionally features are larger than a story would allow.
Your first column is usually the "backlog" or "To Do" list. These are the stories that you've started to define but aren't really complete enough to really consider for developing. Ideally you prioritize the backlog so you can quickly identify those stories that you need to finish defining first. Your "Ready to Pull" list are the stories, in priority order, that can be worked immediately if you have the bandwidth. The "In Progress" is just that - things that you are actively working. Sometimes called your "WIP" (work in progress), this should contain only those stories that you can work on and complete in two weeks (the standard iteration/sprint length). This insures that you don't try to take on multiple tasks that de-focus you from working something through to completion. Finally, when you've completed a story you move it to the "Done" list. It's pretty straight-forward, but the challenge is making stories/slices that are usable and small enough. It takes a lot of practice and even after a decade I struggle sometimes.
Kanban allows you to have multiple work items in process (your WIP limit). For me that's generally one. I need to focus on that one thing, get it completed, and move on to the next. With a larger team than I have (i.e., more than one),  your WIP limit will be larger. Using the Kanban board lets me prioritize the work that needs to be done. I can add new stories, shift priorities - all things that are important in running a small project.
KanbanFlow, the free(!) online board I'm using doesn't have some typical user story fields (and no, I don't get a kickback for rating them so highly, but maybe I should; are you listening, KanbanFlow?!). For instance, it tracks time in hours not points. I guess you could use the "hours" field as a "points" field, but overall it's a small thing. So far I am very pleased with the software and able to work around (or ignore) the things I don't require.
If you're looking to get some focus on your work, Kanban is certainly one methodology that you should explore. And KanbanFlow is a very good free service should you choose that direction. Good luck and happy coding.