iPhone programming – Learnings

iPhone programming – Learnings

From the wayback machine…

I found a half-completed post on when I was first learning to program on the iPhone.  I think these things are all still valid…
So, I’ve embarked on an ambitious programming project.  One that is now 1/3 of the way complete (first third was the ‘heaviest lifting’ part of the project – took about a month of outsourced grunt work).  The next 1/3 involves programming an app on the iPhone/iTouch.  I thought that would be the easy part, but as it turns out – there is a substantial learning curve that one should be aware of before starting this endeavor.  Here are some of the learnings I’ve found so far after having just got the bare bones of my own app up and running.

  1. Apple’s documentation is very robust – but frustratingly ‘useless’ at times.  They provide many very detailed and excellent vertical stacks of information.  Want to learn about pooled allocators?  They have a document that gives you all the information you could ever want.  But not in the context of how you’d actually use them – or why you hit various problems you hit.   You’ll find yourself sifting around from document to document trying to find out why your NSString object is throwing an exception when returning from a function – only to find the real reason is buried in the memory management section of the Cocoa programming guide – not anywhere near the NSString documentation or their samples
  2. You need to learn Objective C and Cocoa. – and learn them in THAT order.  It’s annoying, but try to find a good Objective C book first.  There aren’t many of them.  There are lots of bad ones though.  Learn how to write a class, add functions with multiple calling parameters, how to make calls to classes, and how allocation works.  That last one is key.  Really spend time learning why:
    [[NSString alloc] init]
    is the right way to allocate and initialize an object and then learn why:
    NSString *s = [[NSString alloc] initFromString:@”hello”];
    [s appendString:@”this string now leaks”];
    leaks memory.  And how the autoAllocator pools work/don’t work.  This is all huge and the first biggest gotcha’s your get hit with right off the bat.
  3. You’ll struggle to get even a 5 line program working at first.  Your first Objective C/Cocoa programs will be very painful.  The simplest things will feel like fighting a brick wall.  I tried to do a simple enum, and kept getting burned by an invalid class definition.  Wha?  The objective C compiler on the iPhone requires you typedef your enums and structs:
    enum newEnum { a, b, c, d }; (NOPE – will cause a compiler error in whatever line follows this definition)
    typedef enum { a, b, c, d } newEnum; (yes – works)
    Just millions of little things like that.  Again, logical if you put your old C/gcc hat on, but it’s been a bit since I last had that hat on and it had some dust on it…
  4. The GUI IDE is great – if you do things they way THEY want them and only for straight-forward designs.  The interfaces for GUI controls holds very much like Win32/X programming philosophies, albeit the syntax is very different.  X Code comes with it’s own WYSIWYG GUI editor, but I found it very limited if you’re going to come up with any kind of innovative interface.  If you just want some standard buttons/etc – you’re probably fine.  But if you want to have some interesting scrolling effects/etc – you best be ready to spend another few days learning how the UI control systems work underneath and experimenting.  The built-in GUI editor reminds me of the old VS2005 GUI editor that you could drag-n-drop controls, compile, and you’d see the results.  If you want any dynamic elements – I haven’t found a way to do that using their gui editor.  And if you want to embed controls on scrolling panels and some other more modern effects – you’ll be tossing the GUI editor altogether.  Trouble is, you spend a good bit of time learning how the built-in GUI system works, find out it won’t do the thing you need without tons of digging through forums and ‘tricking’ the thing to do what you want, then give up and have to learn a bunch of NEW stuff when you give up and decide to just dynamically/hand-generate the controls yourself.  Frustrating.



							
Advice from a manager

Advice from a manager

Interesting article in Fortune from someone who appears to be a good manager and author of the book “You Can’t Fire Everyone” by Hank Gilman.   I particularly liked him because he seemed like a ‘good’ manager.  i.e. he had the notion of treating his people with respect, and handling his job with class, professionalism, and style.  One of his un-stated guidelines he seems to have is that if you build a great work environment, then it will sell itself.  Keep that point in mind while reading the rest of this. Some of his points:

  1. The day your star employee decides to leave is the day you start woo-ing your player back again – it’s not a time to act like child, hold a grudge, or try to sabotage them.  New opportunities and a chance to grow/try something different come along for everyone.  It’s your job as a manager to get them to want to come back. Doing any of the aforementioned childish behaviors only sabotages your own reputation, future hiring, and long-term career.
  2. Try to keep them – if what they want is something you can give.  Know when it’s right to bend over to keep someone.  If it’s about money, get them some more. If it’s about title, do something about that (titles are only words anyway). But if they really want a new job – or need a change – let them take it.  People who think a good career move is a new title will likely be back in six months anyway.  Conversely, all the money in the world won’t keep someone who really wants or needs a change.
  3. Don’t bad-mouth their direction/new employer.  Even if you know the other company is bad or people there are cut-throat back-stabbers, don’t get involved in a petty squabble or words that might get back to the people you gab about.  Show your integrity at those moments.  If you’ve build a great work environment, then you can honestly say “Go off and have a great time. I think you have a great opportunity.  However, I’ve had enough of them and I believe you’re not going to get much better than what we offer.  You’re always welcome here.”  The grass isn’t always greener, but sometimes you just have to let them find that out on their own and welcome them back when they’re ready.
  4. Keep in touch – Make it a point to have lunch or dinner and remain friendly.  You have a scout in a new place if you want to recruit one of their colleagues. You also have a damn good reference in case you need to look for work!

He had other suggestions, but you get the idea of his style.  He shows how an other-directed focus gives your actions class and doing things with a style that makes people want to come back to him.  His advice is to not pout around like a child that didn’t get their way, burn up potential partners and bridges, and generally strangle your own career over the long haul because you’re too ego-centric.  If all managers worked in a similar way, then I think far more people would be happier in their work lives.

Windows 7 blue-screens due to stdriver64.sys

Windows 7 blue-screens due to stdriver64.sys

I recently started getting blue-screens with stdriver64.sys. In doing my blue-screen debug, very little useful information was given:


SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck.  Usually the exception address pinpoints
the driver/function that caused the problem.  Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: ffffffffc0000005, The exception code that was not handled
Arg2: fffff8800970bbe8, The address that the exception occurred at
Arg3: fffff8800676d7f8, Exception Record Address
Arg4: fffff8800676d050, Context Record Address

Debugging Details:
------------------

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

FAULTING_IP:
stdriver64+1be8
fffff880`0970bbe8 49              dec     ecx

EXCEPTION_RECORD:  fffff8800676d7f8 -- (.exr 0xfffff8800676d7f8)
ExceptionAddress: 0000000000000000
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 158383080
Parameter[0]: fffffffffffff880
Parameter[1]: 0000000000000002
Parameter[2]: 0000000000000000
Parameter[3]: 0000000000000000
Parameter[4]: 0000000000000000
Parameter[5]: 000000000022dba8
Parameter[6]: 0000000000000000
Parameter[7]: 0000000000000000
Parameter[8]: 0000000000000000
Parameter[9]: 0000000000000018
Parameter[10]: 0000000000000000
Parameter[11]: ffffffffffffffff
Parameter[12]: 000000000000007f
Parameter[13]: 0000000000000000
Parameter[14]: 0000000000000000
Attempt to execute non-executable address 0000000000000002

CONTEXT:  fffff8800676d050 -- (.cxr 0xfffff8800676d050)
Unable to read context, NTSTATUS 0xC0000147

DEFAULT_BUCKET_ID:  VISTA_DRIVER_FAULT

BUGCHECK_STR:  0x7E

CURRENT_IRQL:  0

LAST_CONTROL_TRANSFER:  from 0000000000000000 to 0000000000000000

STACK_TEXT:
00000000 00000000 00000000 00000000 00000000 0x0

STACK_COMMAND:  .bugcheck ; kb

FOLLOWUP_IP:
stdriver64+1be8
fffff880`0970bbe8 49              dec     ecx

SYMBOL_NAME:  stdriver64+1be8
FOLLOWUP_NAME:  MachineOwner
MODULE_NAME: Unknown_Module
IMAGE_NAME:  Unknown_Image
DEBUG_FLR_IMAGE_TIMESTAMP:  0

BUCKET_ID:  INVALID_KERNEL_CONTEXT

I dug around on my support forums, and exception 7E has been related to loads of different problems: bad logitech mice drivers, cardbus adapters, audio drivers, failed USB drivers when it happens on awake from hibernate, etc.  Basically, any and all services seem to be known to cause it.  Also, having the module and image names completely unknown wasn’t very hopeful either.  I considered the idea of stepping into the memory location specificed until I found this write-up.  It mentions the program SoundTap as a very common source.  I had recently got Soundtap as part of a kit including the excellent Switch sound converter.  I uninstalled Sound Tap and sure enough – bluescreens went away.  Soundtap installs an audio driver to divert playback so you can do raw rips of anything you play on your pc (think sound ripper for youtube/shoutcast streams/shockwave players/etc).

So, it’s always a good idea to keep track of what you’ve changed on your pc and suspect even the unlikely things such as a simple software install.  That and googling for others with the same problems. 🙂

Is there really a shortage of scientists, engineers, and computer scientists?

Is there really a shortage of scientists, engineers, and computer scientists?

You hear it in the news – the US has a shortage of people going into engineering, science, and high-end technical degrees.  We’re being trounced by the extrodinary graduation rates in developing contries and China/India.  Even Obama introduced his STEM education support program to encourage students into Science, Technology, Engineering, and Math (which he touted on his trip to our Intel site a few months back).

I was recently elected to Purdue’s Alumni Board for the school of Sciences.   During the last bi-annual meeting, we have a dean of one of the science schools come in.  This time it was the dean of the Geology dept.  He gave a great presentation on the interesting things they’re doing, but one of the most interesting points about his presentation was this: he gets calls all day long from companies and government agencies looking for geologists, but he has none to give them.  Currently the enrollment in geology at Purdue is around 150 students.  For ALL undergraduate levels.  Purdue has just under 30,000 total students, and only 150 are enrolled in undergrad geology.  He says he has jobs to give away, but nobody to fill them.  And they’re not all just for oil companies – government needs lots of surveyors, building ground inspections, erosion and terrain evaluation/etc.  Companies have all kinds of jobs too.

Surprised by this information, I went over afterwards to my haunt – the Computer Science department.  In talking to one of my old professor acquaintances over there,  I was surprised to find they were *just* reaching 200 undergraduates.  When I was in computer science in the last 90’s, there were 250 students and rising every year.  it turns out that enrollment plummeted right after the dot-com bust and has only recently started recovering.   Both of Dean of Geology and the CS professor independently cited 2 major reasons:  high-school curriculum focus and perception of job market.

First they both talked about the need for outreach programs.  The dean of Geology and the CS department appear to desperately want to get kids in High School interested in CS or Geology (I’d say most of the schools of sciences would also agree).  We all know that high school programs across most states have been getting chopped for years.  Their evaluation is that the constant budget chopping has seriously cut back on all their curriculum; but in science/math it’s had a particularly chilling effect.  Why?  Because schools under budget constraints tend to focus only on core-courses that are required for state accreditation, and cut everything else.  Computer programs are nice, but are expensive investments from a per-student basis.  My own high school only had a programming course because one math teacher wanted to teach it pretty much pro-bono and the machines were the ones use to teach typing/word processing classes.   Many science programs have cut back to just basic chemistry and biology.  So it’s no wonder that students that have had lack-luster, or simply no, high school experiences with sciences like geology or computer science.  Even fewer are inspired to look into or consider them as possible career choices.  In recounting my own experience of being a rural Indiana student of a high school with only 500 students; my professor friend said I was most certainly a huge exception.  Most rural students never see the insides of a Purdue science lecture hall, let alone even apply.

If anecdotal evidence isn’t enough, the Dean of Geology said that many states and oil/geology companies are becoming so desperate for geologists that they are starting to create their own high-school curricula for geology programs and giving them to high-schools for free; if only they agree to teach it.  Some of these companies have even considered also sending along someone to teach it – for free.

Secondly, there is a perception that the job market isn’t good for sciences.  For CS, there is apparently still a lot of stigma from the dot-com explosion.  During a lot of the later 2000’s there were tons of out of work programmers, and even though the tide is completely turned around, the perception is that there is still a glut of programmers and/or that it’s a difficult job market.  In Geology, there is a perception that one will have to work for an ‘evil’ oil company; not knowing there are tons of fascinating other job opportunities doing surveying, soil research, water erosion, earthquake prediction/prevention, etc, etc, etc.

These two points were big factors in their take on the situation.   So as a member of this board, what should one advise?  I did some of my own research, and will write about THAT next time. 🙂

Successful iPhone 3GS battery replacement

Successful iPhone 3GS battery replacement

Well, just shy of 2 years, the battery in my iPhone 3GS had gotten pretty sad.  While it would charge up to 100%, it would run down really fast.  I wasn’t able to get more than half a day of good use out of it before it needed recharging.  Even sitting on my desk at work doing nothing it would lose 20% in an 8 hour stretch and seem to be getting worse every day.

Call up an Apple store, and ask them.  Battery replacement on a iPhone 3GS?  $199.  Really?  $199 sir.  Hangup.  I look around on the internet.  Lots of folks selling iPhone batteries, and most for $5-$15.  I start looking around for the most reputable guys, and find iFixIt.com.  They have lots of great step-by-step diagrams, descriptions, videos, and pictures.   Even better, they have a comments section that has literally hundreds of folks who put tips/gotchas/etc. This is looking good.

They sell a 3GS battery kit with all the tools you need for $15 – which includes a tiny screwdriver and a small plastic pry tool that they claim is the same one made for Apple.  You can also buy other helpful tools like a suction cup for removing the 3GS screen.  I decide to take the risk and have it all shipped – $25 total.

Kit comes in the mail and looks pretty well packaged and has all the tools I need.  I open it up and go to the website for instructions.

I follow the instructions pretty closely.  This isn’t like swapping the battery in your remote.  Mine has 16 different steps with no less than the removal of 10 different tiny screws and 7 different tiny ribbon cables.  You need to remove the screen, logic board, camera, and …well… basically everything because the battery is on the very bottom *glued* to the back plastic panel.  I remove it all, install the new battery, and reverse the 16 steps.

I flip it on, *blip!* it makes the normal startup sound – the screen backlights – but NO image/icons/etc.  🙁 I plug it into my computer and it syncs and sees the phone just fine.  I can even see my pictures and music on it – but no image.  I take it apart 2 more times and try re-seating the 3 display cables.  Same result.  Ugh.  I go to check iFixIt.com’s forums, but the site is now down for maintenance – right in the middle!  I remember from a previous look on the forum where one guy had to restore the factory defaults to fix a problem with his phone not charging properly.  I figured what the heck and tell iTunes to restore to factory defaults.   Turns out there was an update due, so it took 30 minutes to download the patch and another 15-20 to restore the defaults.  Shesh.  But right after the restore of factory defaults – I get my display back!  WOOT!  I restore everything, then make a phone call – works like a champ!

I make a phone call, test the buttons, test the camera/screen/music/etc, and everything seems to work great.  Why a software reset is needed to have your display come back after a simple battery replacement is beyond me – but there it is.

So, I don’t recommend the procedure to everyone.  It took about 30 minutes of steady concentration and a equally steady hands – but it seems to be working like a total champ.  It just finished charging to 100%, so we’ll see how well this battery lasts, but it already seems much better.

Thoughts for when you get that call at 5am…

Thoughts for when you get that call at 5am…

I haven’t written on this much, but felt that I’m in a good place to share my thoughts now that it’s been 2 years.

My dad had a stroke about 5am the day after Christmas in 2008.  When it happened, I fell back on a lot of the things I learned in CPE (Clinical Pastoral Education).  CPE is something almost all ministers of most every denomination are required to take during their training.  It wasn’t a bunch of classes; instead, it is primarily experience driven.   I think this quote about CPE from Wikipedia sums it up nicely:
Learning in CPE is largely focused on the students’ development of the self. The students are introduced into encounter with persons in crisis. Out of an intense involvement with persons in need, and the feedback from peers and supervisors, students develop new awareness of themselves as persons and of the needs of those to whom they minister.”

So why is it they take this approach?  Because everyone experiences crisis differently.  The reality is that there really is no way to teach what you or others will actually feel or experience when another person dies, is informed of a terminal illness, is involved in an accident that will permanently affect you or a loved one, etc.  Yes, there is some minimal educational ground work that can be done to set expectations and understanding basic processes of how people deal with acute stress. (i.e. the 12 stages of grief)  But after that, it is a process of experiencing and participating – then taking time to reflect, connect what you learned, and process what happened based on your own beliefs and faith.  If one does this over time and with enough people, (hopefully) you learn enough about yourself, your faith, and how to be present to others so that one can actually be of service to others in those moments.  That’s what CPE (hopefully) does.

Unfortunately, this also means it’s limited by the individual student’s ability to cope with and process the experiences they have.  People must be in a healthy place themselves before they start.  Much of the screening (6+ months of screening to get into a 4 month program) is to judge some of that.  But the reality is that even when ‘ready’ you walk into CPE, it will expose all of your own unresolved emotional, family, political, relationship, faith and other issues.  This is ok so long as you are willing to properly deal with those emotional hits and not take them out or project them on others.  Your job is to listen to the person in crisis’ beliefs/needs/feelings/confusion and guide them to understanding of what it is they are experiencing and what their own lives are telling them.  It’s not about telling them what they should do/feel.  Some programs go so far as to even require their students simply reflect what the person is saying/feeling and do not allow them to even ask questions. (try THAT as a listening exercise with someone at some point).

So to that end, here are some things I learned (or re-learned) and probably are good to keep in mind if you or a loved one gets seriously or fatally injured.  This is mostly true for the first few hours of the event:

1. You will (all) be in a surreal state – You and everyone involved (save the hospital staff) will experience everything in a surreal state of adrenaline, grogginess (if at a weird time of day), and emotions that can be anything from fear/terror, anger, shock, disbelief, or even ambivalence. Your internal state will be in such a state that you’ve likely never felt it before both physically and mentally. But what will you feel exactly?  There are no rules and no two people will be the same – in fact, in different crises, the same person will likely experience it differently each time.  THIS IS ALL NORMAL.  Outside of obvious self-/other-/ or property destructive behavior – simply let everyone react as they are doing and tell yourself that’s ok.

In these moments, folks will react in the way their psyche and bodies need or dictate.  It will likely be strange and you’ll see sides of folks you likely never have – but again that’s ok and to be expected.  The only key is that you don’t try to force yourself or others into a particular response.  Don’t tell yourself or others that their crying needs to stop, or others must do a particular thing or act a certain way, etc.  As long as the behavior isn’t causing harm or getting in the way of decisions that need to be made in those moments – it is probably better to let it run its course.  It is the time to respect and let those things happen for everyone there.  If one person starts monopolizing interaction, or breaking into behavior that is utterly disruptive or combative, then you *might* calmly ask them what they need next (ex: asking if they’d like to go somewhere quiet, or just sit down, or hold the loved ones hand, etc).

Severe grief, destructive behavior, or completely disruptive/domineering behavior that is trying to force others into courses of action/disparaging/etc should not be allowed if it’s severely impacting others. The best answer for that behavior is to gently remove them from the immediate vicinity and have them speak their mind to good listener.  Most of the time this behavior comes from trying to take control of a situation that hurts that they cannot be in control of.

Here’s some common things people might experience/fall into.  But expect people to vacillate between several of them:

  • Shock – babbling nonsensical things, fixation on details that aren’t important.  Some will just sit and cry, or waver between crying, disbelief, and back to crying.
  • Emotional shutdown – the person just shuts down and may sit with a blank stare or walk out of the room, sometimes right in the middle when something huge is happening.
  • Attempting to take control of the situation or become screaming angry – some people will react by trying to take control of what’s going on.  They’ll ask all sorts of questions of the staff/doctors or even get combative.  However, as long as they aren’t getting in the way of the doctor’s work – then this is ok.  The doctors are usually good about telling someone they need to shut up or leave if its interfering with their work.

2. Time no longer exists – You’re likely in the states mentioned above – and the normal way we experience time will be gone. Minutes might pass like hours, or if there is a lot of activity, you might experience 2 hours in the blink of an eye.  When you’re all said and done, you’ll be completely outside your normal perception of time.  Many people walk outside and realize half a day has passed.  Or that it’s now morning, or night.  This is why it’s ok to let people do much of what they do – because they don’t realize they’re in these strange states for as long/short as they are.  Again, all perfectly normal.
In that situation, if it’s clear that the situation will go on over hours, it’s time to be attentive to yourselves/each other.  Give each other permission as the situation allows to go rest in shifts, to eat, to get a shower, etc.  Nobody will want to leave at first, but it is absolutely essential. You can’t be there for the other person and process things in a healthy way yourself if you’re constantly in alert mode.  Severely exhausted people make worse decisions and are less emotionally capable of dealing with crises.  Offer to take turns sitting watch for each other. Sometimes the best thing to do is give others permission by example, “Bob, I really need to eat.  Please could you stay here and watch until X o’clock and I’ll do so for you after.”

3.You’ll shut out what most other people are saying – especially your family/siblings/close ones –  Even if you are really trying to listen to others, in the heights of crisis – you simply are in an altered state and will unlikely be able to process meaning/intent from words properly.  This is a good way to see where people are – because in these moments, all shields are down and people are responding with the raw guts of what they are feeling – not with their rationality intact.  Don’t get upset if someone screams at you, or breaks down in response to a simple question.

4.  You won’t know what to do – both during, and right after, you might feel like you want to run away.  You’ll feel like no matter what, you have to stay even though you can’t do anything.  You’ll feel helpless.  You’ll want everything back to normal.  You’ll just want the person back the way things were. You’ll be scared of what’s supposed to happen next.  You’ll be angry at doctors, the person in crisis, a sibling.  These are all normal things to happen; so don’t take them personally (or try to take them out on each other if you’re the one experiencing them).  Do, however, take note of them for later processing.  These feelings will all have to get sorted out in good time.  That is exactly what 1/2 of grieving loss is.  Don’t expect to be able to deal with it all right then; but don’t bury it all either.  Healing is the process of going through all those issues that came up – and it takes far longer to talk them out than it does to have them come up.

5. You are in trauma yourself! – When a loved one has an accident, or is rushed to the hospital, or is going through emergency surgery/etc, recognize that you will be kind of in a state of ongoing trauma yourself too.  Just like hard exercise creates tiny tears in your muscles, you are experiencing the ripping of your emotions and mental reality as the event is happening.  Sometimes it feels like waves of strange new reality or change just flowing over you, or perhaps the crumbling of things you held as true and dear.  This will go on until the situation stabilizes enough (person is stabilized physically, surgery is over, etc) that the outcome is known (they’ll live/die/etc).
While it’s going on, you’ll likely be left with tons of questions: what does this mean?  what will happen now?  what if they don’t get better?  what can I do? etc.  Sometimes it might be regrets.  These thoughts/questions very likely will unseat you – because they’re likely challenging the things you’ve known/loved a long time (my father’s always been there since the day I was born, what will life be like without him?).  Recognize this is normal and don’t try too much to bottle them up, or go crazy trying to answer them or acting out.  Just know these things WILL all get sorted out in time, and that there is no problem that cannot be overcome or dealt with given enough time and the help of others.  However, in the moment, you are experiencing trauma yourself – so be gentle with yourself and don’t try to force things.

6.  Fatigue will set in.  You’re in a massively heightened state of internal stress/activity that will feel like running a marathon; and you’ll get very tired without knowing why.  Be sure to be attentive to yourself and your own needs as time allows or you are setting yourself up for a physical collapse/emotional breakdown in which you’ll be no good to others or yourself.

7. These all apply to the person experiencing the trauma as well!  Don’t forget to realize/address these same things with the person undergoing the event.  They’re in a brand new situation in their life and perhaps experiencing their own mortality.  Maybe for the first time in their lives.  They might even know this is their last moments of life.  Talk to the person as if they are a real person – not some kind of little kid.  You might have to speak loudly and clearly, but address them as you would anyone else.

Probably the best lesson I’ve learned out of this was:
Dealing with loved ones and family is messy.  It isn’t efficient or the ‘best’ way to deal with things.  It is also essentially the lesson of what love is.

More in another post about steps we can take before the inevitable crises of life happen.

My own market direction speculation from GDC 2011

My own market direction speculation from GDC 2011

Here’s are my guesses/market trends based just on what I’ve been seeing/hearing/guessing:

  • Mobile computing (i.e. smartphones) is a powerful new force that is here to stay and is really pushing computing and gaming in new directions.  Since mobile is now entering into its ‘teenage’ years, there is still a lot of rushing around and ‘land-grabbing’ going on trying to align markets, business models, programming models, distribution, and revenue streams.  There is very good money to be made for the savvy, but it’s also more risky.  Those software companies that enter and establish a good name/brand will likely do very well, but almost certainly will be smaller, more nimble companies.  Nobody is making a killing on phone apps and very few can quit their day jobs and live off what they make solely from that revenue stream until things settle more.
  • Consoles will continue to be developers’ target platform because they have a stable user base, known revenue stream/model – but are in severe danger of being rendered impotent.  They need to solve:
    • Aging graphics.  With no new consoles in the works for a few years, things are already looking dated and it will only get worse.  There was absolutely no talk of any new consoles – which means it’s at least 2+ years away.  Microsoft appears to be trying to figure out it’s own strategy as there was no info for a new version of DirectX and a lot of effort clearly trying to get Winphone 7 adoption/features/devs going.
    • Terrible loading times, frequent updates, etc are all a terrible experience and hindrance to keeping people using their consoles.  I already know several people to whom their XBox 360 is really just a Netflix box.  And with the advent of all those features in smart TV’s coming – that selling point will soon disappear.
    • There were a number of rants about 40+ hour games and how people simply don’t finish them or want to play one game that long anymore (except for AAA titles like Call of Duty/etc).
    • Not as solid of a digital distribution of whole games like on PC/Mac where you can get whole games online (Steam/etc)
    • Higher entry bar for indie developers to develop for vs PC/Mac
    • No instant on/off features like every laptop and phone has.  Waiting 5 minutes to boot your console and scan past splashes/intro crap/etc is intolerable in an age they will be competing against smartphone games.
  • Smaller, faster casual games will grow like wildfire but generating a sustainable (and livable) revenue stream from them will still be getting hammered out for the next few years.  Studios that develop them will stay smaller and live leaner – but likely deliver a lot of the innovative new gameplay for casual markets.  We’re in the exuberant pre-teen days of this movement, so it’s direction is still very malleable.  Yet, there will be a point at time at which the limitations are felt out and they get their stride.  It’s already happening and the signs are very positive.
  • The indie developers will continue to come out with buckets of games.  Following the 80/20 rule, 80% of them will be garbage, but 20% will do well.  The top 1-5% will be phenomenons (i.e. Minecraft) and those 1-5% will really move gaming in a newer direction. That direction being:
    • Game developers will develop with off-the-shelf engines and middleware, not programming stuff themselves.
    • Games will focus on simpler and more creative elements.
    • It will keep the industry from going into stagnation and death, but take it in a new direction very different than the old guard.
  • Big houses will become fewer, but get more powerful and likely be lonelier at the top (ala movie studios).  As the cost of AAA games rises each year, consolidation and shake-out will happen.  Which means they’ll likely be more and more conservative and get more entrenched in their franchises – which probably means less innovation on the IP front, but they will be cutting-edge beautiful.
  • PSP’s and handheld gaming will just about disappear in the next 5 years as smart-phones will become so ubiquitous and be just as powerful with many more options.  Nobody will pay for two wireless plans to connect their PSP’s/DS’s.  This is bad news for Nintendo, and somewhat Sony, who have a large portion of their revenue stream from their handheld gaming devices.  It’s unclear whether they see this threat – but Sony appears to be seeing this threat with a ‘certification’ program for mobile devices.
GDC 2011 Trip report

GDC 2011 Trip report

It’s been about 4 years since I last attended GDC, but some interesting trendlines seem to have solidified/gone away since last time I was there.  Winning mobile developers was THE topic for the show. Sessions continued to be very good – but I noticed that almost (if not more than) half of them are now related to art, gameplay, or business concerns (not technical).  The Indie game scene appears to be moving beyond just closet developers and becoming a big and energetic movement in the industry.    Hiring appears to be back judging by the energy and sheer number of interviewing/companies interviewing on the show floor.  Attendance seemed to be at record levels at 19,000 attendees.

 Details:

  • Attended Wednesday thru mid-Friday sessions on my own accord – so no booth duty/official duties on that front.
  • Notable sessions I attended:

1.       Data Management For Modern Game Pipelines – Two fellows from Autodesk/Maya went over the state of current content pipelines from Maya to game engine.  They are apparently hard at work at Autodesk trying to make these converters and content back-and-forth between engine and Maya easier with a project called DNA.  It is a system of metadata and a database that, once integrated into your engine, allows you to quickly get assets out of Maya into your game engine, and back into Maya quickly.  It was likely too cumbersome for most game developers, but it was a good recognition on their part of the needs of the industry. 

2.       Noon poster sessions.  Real-time music generation was well done (for what it was) and the ’10 things to know about usability testing’ was a good list of resources for those trying to understand what doing usability testing was.

3.       One hour 10 speakers talk had a lot of great ideas.  One of best was why consoles are failing: 1. In age of instant-on mobile/PSP-type devices, waiting 15 minutes to get into a game is intolerable.  2. Too many cutscenes, license agreements, booting, etc.  Want instant-on wake-from-sleep into my game just like a laptop.  3. Wants no more 40+ hour games – they’re just too long. 4. Update sizes and frequency are just ridiculous – you only should have 1 update per quarter.  Period.  Many other good thoughts if we ever want to go into that realm.

4.       Multicore Memory management in Mortal Kombat.  EXCELLLENT talk on a multi-threaded memory manager.  Takeaway is that it took them 11 months to get it done (3 months of that was just to get the multi-threaded/lockfree library built they needed), but it’s a really fantastic system they are using in all their games going forward and shows some amazing speed, efficiency, and debugging features.

5.       Dice talk about Data Oriented Design.  Very good talk with good analysis and results.  Takeaway: throw away all your fancy data structures and line up your data for SSE manipulation.  It’s much more performant than non-cache friendly data structures, orders faster, and can easily be threaded.

6.       Kinect skeletal tracking deep Dive.  Very interesting talk on the problems (and solutions) unique to skeletal tracking/Kinect given by Microsoft AE.  Some good general solutions for multi-threaded timing issues.

7.       Halo Reach Effects. Excellent talk on the special effects in Halo Reach.  Excellent new way to do dynamic particle systems that interact with geometry in the real world, shield effects, and a few other really visually stunning, and very realtime, techniques. 

8.       Mega-Meshes – modeling/rendering worlds of 100 billion polygons.  Very interesting talk that seems to be along the lines of last year’s ID siggraph talk on streaming massive geometry.  The second half had to do with getting pretty decent spherical harmonic lighting techniques on Xbox and other consoles.  Lots to digest in the talk – so I’ll likely look at the slides when published.

9.       Experimental gameplay – 10 or so people positing or showing interesting gameplay techniques and ideas.  This session really showed what the Indie scene is about – trying to create unique experiences.

10.    Marble Madness, Pitfall, and Doom postmortems
       

  • Trend speculations based on what I saw:

1.       Mobile – the real energy this year was clearly behind winning developers into each camp’s mobile and tablets.  Unity showed extensively.  Free hardware galore, tons of sessions, and big parties were being thrown.   With years left to go before another console refresh – it was mostly just quiet, incremental changes from the big players like Xbox, Sony, and Nintendo.  With smartphones getting such sophisticated graphics hardware, it does make me seriously wonder if the days of PSP or DS-like gaming devices are limited, which could spell big problems for console companies that see such large revenue streams from them.

2.       Monitizing – Lots of financial companies on the show floor and session talks focused on micropayments and new revenue streams.  The fact there were old-school financial and credit card companies on the show floor was a real shock.

3.       Indie culture – The indie area of the show floor was packed every time I went by it.  Lots of young energy and it’s more than just hype judging by the awards Minecraft won.  Attended 2 classic game post-mortems which really clarified in my own mind the shift in game dev culture.  Used to be programmers ruled the roost in developing games, but now I think we’re seeing that most of the current game developers in the indie scene are content with using off-the-shelf engines/tools and focus 90% their attention on the gameplay and creating unique experiences as opposed to focusing on the newest/greatest tech. 

4.       Hard-core technical talks seemed to be diminishing in number, but not quality.  Still excellent work being done, but I wonder if this large trend towards younger developers just using more off-the-shelf engines and simpler mechanics will create a two-tiered system in which the majority of smaller Indie games will use low-end/runs on just about anything techniques, while AAA titles will always continue but just get more technically impressive, but (with fewer studios able to afford it) smaller in quantity and more insular.  Do we turn into a world where there are a few engine makers and game houses are primarily programmers that write games in scripts on top of them?

Free on your birthday!

Free on your birthday!

As someone who’s recently experienced the event, here’s a couple great sites with free stuff you can get on your birthday:

Portland specific stuff: http://portlandonthecheap.com/birthday_perks.html
More universal: http://www.heyitsfree.net/2006/10/03/birthday-freebies/

Even though DisneyLand isn’t doing their ‘free ticket on your birthday’ thing anymore, there are plenty of other great deals.  Some of the better ones:

  • Black Angus Steakhouse Free steak dinner.  Join the BA Prime Club and they’ll send you a free dessert just for joining and then you’ll receive a coupon good for a free steak dinner.  The free steak dinner birthday offer is good from two weeks before recipient’s birthday to two weeks after recipient’s birthday.  Birthday offer requires the purchase of 2nd entrée of equal or greater value.
  • Medieval Times – Sign up in advance and they’ll send you a free ticket (worth $53!) to one of their feast and tournaments.
  • Benihana Sign up for the “Chef’s Table” and you’ll also get a complimentary Benihana Birthday Dinner certificate, maximum value of $30 (excludes alcoholic beverages, gratuity and tax) that will be emailed to you for use during the month of your birthday.
  • Claim Jumper Join the Claim Jumper E-club and they’ll send you a coupon via email for a complimentary entree for your birthday.  Offer valid up to a $18 value.  Dine-in only, not valid on liquor, gift card purchases, tax or gratuity.  Expires 14 days from date sent
  • Red Robin Sign up for the E-club and get a free burger during your birthday month.
  • Ruby Tuesday Join the ‘So Connected’ club and they’ll send you coupon good for a free handcrafted birthday burger!  Must  present valid ID and printed copy of the coupon.  Expires 14 days from date sent.
  • Noodles & Company Free entree.  Join the Noodlegram E-Club and they’ll send you a free dish voucher good for your birthday.  This is not a buy-one, get-one free, this is truly a birthday freebie that is good for one week before and one week after your birthday.
  • Moe’s Southwest Grill Free entree.  Sign up for the e-club and they’ll send you a coupon on your birthday for a free menu item.  The only Oregon location is in Wilsonville.
  • IHOP -Free Rooty Tooty Fresh and Fruity or menu item of equal or lesser value.  Must join the “Pancake Revolution” online and you’ll receive a free menu offer on just for signing up, as well as on your birthday AND on the anniversary of your sign up.
  • Home Town / Old Country Buffet – Sign up for their eClub and you’ll get a buy one adult buffet meal, get one free coupon.  Good for one week before and one week after your birthday.  Coupon is not valid on holidays or on Sundays.
  • Fuddruckers Free 1/3 pound burger or other Fudds entree of equal or lesser value.  You must sign up for the Fudds Club online and a few days before your birthday you’ll receive the email coupon.  Offer expires 14 days from date sent.
  • Chang’s Mongolian Grill – Free meal on your birthday (as long as you bring another dining patron).  Bring your ID

Sweet!  Let the birthday fun begin.

SQLite on iPhone is byte compatible with Windows

SQLite on iPhone is byte compatible with Windows

I was working on a good write-up on how to use SQLite in C# (since the most popular package install for SQLite on C# is kinda broken in Visual Studio 2010), but thought this might be a good data point for folks.

So, the short answer?  Yes, you can build SQLite databases on Windows, copy them across to your Mac, and then use them in iPhone applications without any issues.
You should open the database with the proper character formatting  ( sqlite3_open([dbPath UTF8String], &database)),
but other than that the SQL files can be just copied straight across the devices from Win 7->Mac->iPhone and the same select/delete/etc commands work like a champ.

How do I know?  I did it last night. 🙂