NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: |
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, |
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; |
Tuesday, November 24, 2009
CoreData Lightweight Migration
I have been dreading my CoreData migration for a while now. I just jumped into the documenation and found this little chestnut.
I added the new models and attributes to my model. No data needed to be migrated across entities and no entities or attributes needed to be renamed. Viola, easy migration. Phew.
OpenGL and UIKit
Just recently I finished a cover flow like control. I used the OpenGL implemention from Chaos in Motion (http://www.chaosinmotion.com/flowcover.m). I layered UIKit ontop of the OpenGL. Surprisingly or maybe unsurprisingly it runs really fast on my iPhone 3GS. At the iPhone tech talk in London, Schaffer dropped on the group that it is okay to do this. Just not the other way around. Because of the composite nature of UIKit the drawing doesn't take a huge hit when rendered on top of one OpenGL layer. Do this with many OpenGL layers and that's another story. I did my best to implement just about every UIKit feature I could think of on top of Chaos In Motions OpenGL layer. Very slick and cool. Will post the project later.
Thursday, November 12, 2009
NSURLConnection with compression
Great link here http://www.bigevilempire.com/codelog/entry/nsurlconnection-with-gzip/ about compressing NSURLConnection data with gzip. NSURLConnection also handles decompression behind the scenes. The only problem is it isn't turned on by default. This could have a massive impact when receiving large data sets or images.
Tuesday, October 20, 2009
Wireless
Palm Pre is selling a wireless charger with their phone. That's brilliant, but why do you still need to tether it to sync with a computer? Confounded! This got me thinking. Why do I need to tether my iPhone at all? It could easily do it over bluetooth or a wireless network. It will probably definitely be slower than USB 2.0, but for small syncs that would do the trick. I hate that stupid little cord.
Wednesday, October 7, 2009
StylizedLabel (Viola!)
I got tired of browsing the web for a solution to stylized UILabels and decided to take matters into my own hands. For the record, Three20 is pretty robust but I didn't want to import his entire project just for one control, on top of the fact that it wasn't compiling under 2.2.1. So I created my own solution. Which is great because it's lightweight for what I want done. This isn't a perfect solution to the problem, but it's pretty damn near good enough.
Markup on the text looks like this, "<color ="0000FF">Blue</color> <bold >Bold </bold > and <italic >Italic </italic >! "
The markup is simple and descriptive. Feel free to modify my code.
It's also fast. 100 cells in a iTouch was very smooth.
XCode Project
Markup on the text looks like this, "
The markup is simple and descriptive. Feel free to modify my code.
It's also fast. 100 cells in a iTouch was very smooth.
XCode Project
Saturday, October 3, 2009
Where am I now?
Foursquare, Britekite, Loopt. They all want to know where you are, but only you can tell them. Every single time. How annoying. For location based social networking to take off, the mobile device is going to have to update your location for you or you'll never do it. Yes there are privacy concerns, but an opt-in/out policy would be great. Or use a feature like fireeagle where they will pin point your location based on your settings. Exact, street, city, state, country...
Regardless, "always on" is the only way location based social networking is ever going to be really effective.
Regardless, "always on" is the only way location based social networking is ever going to be really effective.
Signup
I love the facebook homepage. Sign in or sign up. The sign up process is 6 fields and done. What's even better is the sign up process that some iPhone applications take. Usually involving 2 fields. Username and password. Done. It's brilliant and stream lined. Somewhere along the way sign up became a hassle. I was so stunned the first time I created an account through the Run Keeper iPhone application that I opened the web browser to verify that it actually created an account for me remotely. It's so simple it's brilliant.
Now I want the feature to sign into any site with my email address and password without ever having to sign up for anything and we'll all call it a day.
Now I want the feature to sign into any site with my email address and password without ever having to sign up for anything and we'll all call it a day.
Friday, September 18, 2009
Core Data
Working with Core Data has been an interesting experience. It's safe to say that none of it worked like I thought it should out of the box. Once I completely digested the documentation it was easier to get my head around some of the concepts. Hopefully I'll get an example application up shortly. Finding any examples that used Core Data with NSFetchedResultsController and background fetching proved to be very difficult.
Lessons learned:
1.) Not thread safe -> merging MOC's, and passing object id's is critical
2.) Locking the persistent store when background fetching is a life saver
3.) NSFetchedResultsController isn't perfect and took a lot of massaging
4.) Don't ever pass MOC's and you'll be better off for it with cleaner code and design
5.) Keep a designated read MOC on view controllers for listening, write to new MOC's, then merge changes into the read MOC on the view controller is my preferred methodology
Lessons learned:
1.) Not thread safe -> merging MOC's, and passing object id's is critical
2.) Locking the persistent store when background fetching is a life saver
3.) NSFetchedResultsController isn't perfect and took a lot of massaging
4.) Don't ever pass MOC's and you'll be better off for it with cleaner code and design
5.) Keep a designated read MOC on view controllers for listening, write to new MOC's, then merge changes into the read MOC on the view controller is my preferred methodology
Wednesday, September 9, 2009
iPhone Gaming
I really didn't mean for this to become an iPhone blog, but GameLoft have just released two games that have really blown me away. Modern Warfare: Sandstorm and Blades of Fury. Unfortunately both are knock offs of other IPs, but they did a superb job with both titles.
As the quality of software and even games improve it will help establish a greater trust in mobile computing. Hopefully more trust will equate to a greater need. Point in case, I can't wait for Madden, FIFA, and Doom.
Update: Even despite a hard crash bug in Dungeon Hunter, I would still purchase it again. I believe one of the side affects of quality games for the iPhone is that independent developers are going to have to work extra hard for a piece of the pie. Gameloft, EA, Flick, and Ngmanco are setting the bar high. Justifying anything of lesser quality on my iPhone is going to take some serious convincing, ingenuity, or cleverness on the part of the publisher.
As the quality of software and even games improve it will help establish a greater trust in mobile computing. Hopefully more trust will equate to a greater need. Point in case, I can't wait for Madden, FIFA, and Doom.
Update: Even despite a hard crash bug in Dungeon Hunter, I would still purchase it again. I believe one of the side affects of quality games for the iPhone is that independent developers are going to have to work extra hard for a piece of the pie. Gameloft, EA, Flick, and Ngmanco are setting the bar high. Justifying anything of lesser quality on my iPhone is going to take some serious convincing, ingenuity, or cleverness on the part of the publisher.
Monday, September 7, 2009
OpenID I'll actually remember to use
I just setup an OpenID account using my domain name and myopenid.com. For the first time I actually have an OpenID that I will remember to use. Even more importantly the 37signals guys did some interesting single sign on features that made it useful to use.
Would it pass the mom test? Heck no. It took me an hour to setup with DNS registration and I didn't have a webserver for verification. Even if my mother finds an IT guy to set it up for her I still doubt she would take the time to learn the insanely long url for login. SSO is still a geek toy and won't be going mainstream anytime soon.
What about bit.ly for OpenID? Still annoyingly long but the more you could shorten the url the better for ease of use. Email addresses would still be the best SSO in my opinion. You have the username@domain. Everyone knows their email address. Why can't I find more documentation to do this instead of http://openid.myopenid.com/username?
Would it pass the mom test? Heck no. It took me an hour to setup with DNS registration and I didn't have a webserver for verification. Even if my mother finds an IT guy to set it up for her I still doubt she would take the time to learn the insanely long url for login. SSO is still a geek toy and won't be going mainstream anytime soon.
What about bit.ly for OpenID? Still annoyingly long but the more you could shorten the url the better for ease of use. Email addresses would still be the best SSO in my opinion. You have the username@domain. Everyone knows their email address. Why can't I find more documentation to do this instead of http://openid.myopenid.com/username?
Saturday, September 5, 2009
Mobile Revolution
1994 was the year my father bought the families first PC and plunked it into the den. I had never wanted a computer before, but their it was in our living room. At first I only used it to write papers. Then came Doom, telnet, winamp, Napster, AIM/ICQ. The families PC had just turned from a powerful word processor to a gaming/communication/entertainment center. The PC was changing my life. Fast forward to 2008.
Mobile phones were useful, but felt like a necessary evil. Smart phones were expensive and struggling to take off. Data plans and hardware were expensive. No one outside the work place could justify the cost. Then Apple introduced the iPhone. I didn't adopt myself until shortly after the App Store arrived. For the first time in my life I actually was interested in what other software was available for my phone. In my opinion, one of the smartest things Apple did was open up an API and the App Store for 3rd party developers.
Today I feel privileged to be writing software for mobile applications. Much like the early adopters for writing Windows software probably felt. Developers are increasingly pushing the boundaries of the hardware at their disposal. Hardware you don't typically have access to on a PC such as GPS, gyroscopes, compass, camera, and video that offer unique ways to create interesting and engaging software. I never would have imagined seeing augmented reality on a mobile phone the way they were floundering in mediocrity just 3 years ago. It's almost laughable to think how cool the Motorola Razr was. The work being done in the mobile space is starting to change science fiction into reality. For the first time in my life I feel like I have a mobile computer in my pocket and not a phone.
The best thing that could happen for my field is for other smart phones with similar platforms to take off. Writing one application that can run on millions of phones has been the dream of many developers. Until Android or some other platform takes off, I'm content with writing for one hardware device as long as I know I can reach millions. I'm still crossing my fingers that Android can be to the mobile world, what Windows was to the PC.
Mobile phones were useful, but felt like a necessary evil. Smart phones were expensive and struggling to take off. Data plans and hardware were expensive. No one outside the work place could justify the cost. Then Apple introduced the iPhone. I didn't adopt myself until shortly after the App Store arrived. For the first time in my life I actually was interested in what other software was available for my phone. In my opinion, one of the smartest things Apple did was open up an API and the App Store for 3rd party developers.
Today I feel privileged to be writing software for mobile applications. Much like the early adopters for writing Windows software probably felt. Developers are increasingly pushing the boundaries of the hardware at their disposal. Hardware you don't typically have access to on a PC such as GPS, gyroscopes, compass, camera, and video that offer unique ways to create interesting and engaging software. I never would have imagined seeing augmented reality on a mobile phone the way they were floundering in mediocrity just 3 years ago. It's almost laughable to think how cool the Motorola Razr was. The work being done in the mobile space is starting to change science fiction into reality. For the first time in my life I feel like I have a mobile computer in my pocket and not a phone.
The best thing that could happen for my field is for other smart phones with similar platforms to take off. Writing one application that can run on millions of phones has been the dream of many developers. Until Android or some other platform takes off, I'm content with writing for one hardware device as long as I know I can reach millions. I'm still crossing my fingers that Android can be to the mobile world, what Windows was to the PC.
Saturday, August 1, 2009
iPhone Fun
Two days ago I downloaded Tiger Woods for my iPhone. This was the first game I had actually purchased through iTunes. Now I get it. What all those "Lite" versions couldn't deliver. The quality is a lot better than I thought it would be. I find myself playing all the time. Mostly because I always have my phone on me. My iPhone has found new life. I'm literally using my iPhone as a gaming machine and I love it.
Wednesday, July 29, 2009
Apple Development
I drank the Kool-Aide. I'm still drinking it. Even while I continue to develop for Apple products I still ask myself why? Why does it have to be like this? Objective-C feels old. XCode is a poor IDE that lacks many features other IDE's have (I miss Eclipse). Interface Builder works only so well and isn't intuitive to use. There is a gestapo feel to the App Store. Apple throw up NDA's for anything and everything. This a lot of negative energy. So why am I still acting like a mindless lemming as I head straight for the cliff?
To Apple's credit they have some of the best software I've ever used. The difference between a Windows application and a Mac application can be small, but the impact is huge. The place I notice it the most is in the UI design and animations. The UI design improvement seems to be a trend that has been consistent to most Mac developers for quite a while. The more aesthetic the application looks the more confidence I have in the product. CoreAnimation can really make an application shine too. Animation plays a bigger part in Mac software than any other platform I've developed for in the past. Microsoft, Sun, and IBM might have better tools, languages, and support, but in terms of advancing the end product they should probably take notes.
To Apple's credit they have some of the best software I've ever used. The difference between a Windows application and a Mac application can be small, but the impact is huge. The place I notice it the most is in the UI design and animations. The UI design improvement seems to be a trend that has been consistent to most Mac developers for quite a while. The more aesthetic the application looks the more confidence I have in the product. CoreAnimation can really make an application shine too. Animation plays a bigger part in Mac software than any other platform I've developed for in the past. Microsoft, Sun, and IBM might have better tools, languages, and support, but in terms of advancing the end product they should probably take notes.
Bing?
Bing is picking up users according to the web analytics gurus of the internet. I like the simple interface, with good query results. It's even received good reviews from sites like TechCrunch. So why do I have such a hard time switching to it from Google?
At first I thought it was just muscle memory. Or laziness. Or maybe it was my confidence in old reliable. Or maybe I still had a bad taste in my mouth from using any of Microsofts previous web products. Then it finally dawned on me. Internet Explorer. Being a web developer I've really come to loath IE's wonky standardless rendering. How can I trust Microsoft to do anything correctly on the web if they can't even get their own browser to behave with the rest of the internet? I need development harmony and Microsoft to their credit is doing everything they can to gain that trust back. It's just going to take time.
At first I thought it was just muscle memory. Or laziness. Or maybe it was my confidence in old reliable. Or maybe I still had a bad taste in my mouth from using any of Microsofts previous web products. Then it finally dawned on me. Internet Explorer. Being a web developer I've really come to loath IE's wonky standardless rendering. How can I trust Microsoft to do anything correctly on the web if they can't even get their own browser to behave with the rest of the internet? I need development harmony and Microsoft to their credit is doing everything they can to gain that trust back. It's just going to take time.
Desktop Apps vs. Web Apps
I love rich web applications. I love creating them with frameworks like GWT. Once loaded in the browser they are usually very responsive, reduce load times between server requests, can be loaded from any location using a web browser, and generally reduce the time the user needs to complete a task. There are still serious short falls to this model. Thank goodness for web API's. I have been using Tweetie for the last month and have to admit there is still a place in my heart for desktop applications. Why?
Tweetie really got me thinking why I still like using desktop applications in preference to web applications. From a usability standpoint Tweetie is better than the browser because of it's simple design, quick start up, background updating, auto-login (cookies suck), and presentation of data. This allows me, the user, to get at the data I want more efficiently. I spend less than 20 seconds in Tweetie, which is absolutely brilliant. This involves starting Tweetie and then skimming tweets. Alternatively I can start a browser, hit my bookmark or enter my URL, wait for the login page to load, login, wait for my page to load, skim, close. See the shortfalls of the web model?
Time, time, time. Computers should be moving the human race forward, even when it comes to procrastination with something like Twitter. I don't want to log into a site every time I lose my cookies. I don't even want to type in a URL, which means opening a web browser. I don't want to wait for page refreshes. I don't want 1 MB of javascript or flash to slow down my user experience.
Chrome OS or Gazelle might be the future, but I want to see how it handles the above issues first. I have a lot of data in the cloud, but getting to it shouldn't be so painful. The web is still a primitive place, but it's evolving rather quickly.
Tweetie really got me thinking why I still like using desktop applications in preference to web applications. From a usability standpoint Tweetie is better than the browser because of it's simple design, quick start up, background updating, auto-login (cookies suck), and presentation of data. This allows me, the user, to get at the data I want more efficiently. I spend less than 20 seconds in Tweetie, which is absolutely brilliant. This involves starting Tweetie and then skimming tweets. Alternatively I can start a browser, hit my bookmark or enter my URL, wait for the login page to load, login, wait for my page to load, skim, close. See the shortfalls of the web model?
Time, time, time. Computers should be moving the human race forward, even when it comes to procrastination with something like Twitter. I don't want to log into a site every time I lose my cookies. I don't even want to type in a URL, which means opening a web browser. I don't want to wait for page refreshes. I don't want 1 MB of javascript or flash to slow down my user experience.
Chrome OS or Gazelle might be the future, but I want to see how it handles the above issues first. I have a lot of data in the cloud, but getting to it shouldn't be so painful. The web is still a primitive place, but it's evolving rather quickly.
Tuesday, March 31, 2009
OAuth vs. The End User
I just submitted a patch to fix Jaiku's OAuth implementation for accessing web applications. 99% of the code was there so submitting the patch appears to have been a simple task. Hopefully it gets merged into the trunk soon so I can keep working on my integration with ScreamIt!
OAuth has certain advantages over other public authentication schemes.
What I really struggle with is the end users reaction. I had a conversation today about doors that have handles on them but still require you to push for entry. Even though there is a sign on the door that says push, I still see the handle and pull every time. Is this process too confusing and drawn out? Users are used to filling out forms and clicking next -> next -> done to complete tasks. If I have to put up descriptive text to help the user through the authentication process I've failed.
Facebook has done a good job of implementing a similar closed authentication scheme. I've been very surprised by the amount of social sites that use it. Twitter is reportedly going to introduce OAuth support soon too. I'm hoping wide spread adoption will lower the learning curve and better OAuth workflow design will follow.
OAuth has certain advantages over other public authentication schemes.
- Never gives requesting sites your password.
- Revoking a token for an application means not having to change your passwords all over the Internet.
- Token is passed as a url parameter > no firewall concerns
- Click a link that navigates away from site A to authenticating site B.
- Log into site B.
- Authorize site A to use data from site B.
- Site B redirects back to site A...hopefully (kicks Jaiku).
What I really struggle with is the end users reaction. I had a conversation today about doors that have handles on them but still require you to push for entry. Even though there is a sign on the door that says push, I still see the handle and pull every time. Is this process too confusing and drawn out? Users are used to filling out forms and clicking next -> next -> done to complete tasks. If I have to put up descriptive text to help the user through the authentication process I've failed.
Facebook has done a good job of implementing a similar closed authentication scheme. I've been very surprised by the amount of social sites that use it. Twitter is reportedly going to introduce OAuth support soon too. I'm hoping wide spread adoption will lower the learning curve and better OAuth workflow design will follow.
Sunday, March 22, 2009
Twitter Bitter
Twitter rubs me the wrong way for different reasons. Let me explain.
I can't deny the social web is an outlet now for commercialization, much like TV has been. The parallels are simple. You pay for TV and you pay for the internet. Both are channels of distribution for content. Networks produce television content and then recoup their revenue in the form of advertisements. Most websites aim to do the same thing. Obviously these similarities have been over simplified, but the modal has worked for sites like Digg, Facebook, and Google.
Twitter retains and displays 140 characters of text and allows users to follow one another. The hype machine has exploded around them in 2008 and the momentum is continuing to build in 2009. Politicians, athletes, celebrities, and students thrown in jail in Egypt all use Twitter now. Twitter has gone above and beyond what I thought it was capable of.
Now we are in a recession. We look at bankers and brokers and shake our collective heads. Irresponsible lending got us into our current situation. So it astounds me when a site like Twitter can raise millions in capital not once, but twice. As of today Twitter has made $0 in three years of service. I have no idea how many millions they have spent in that time for very legitimate expenses like bandwidth, hardware, R&D and so on. The investors must know something the public doesn't...or not.
Websites like Salesforce and Basecamp can actually sell a service, usually geared to corporations who will spend money. Facebook, MySpace, and Digg have managed something miraculous. They sell us (to advertisers) because frankly they can't charge us (everyone would just move onto the next free service even if it were rubbish). We are more valuable as a whole than to try and nickle and dime us. This makes the social web a viable and honest business. In a recession there are only so many advertising dollars to go around.
Twitter has admitted publicly it has no idea how they are going to generate revenue and doesn't seem to care as they are continuing forward with R&D (Maybe on a 280 character feature). If that was my capital or 401k/pension that was being invested I would be pretty furious. Twitter has become the Worldcomm of the web 2.0 era because even they don't understand what it is they are trying to sell. Then again maybe they do. How else do you convince someone to hand over millions of dollars to you? Digg and Facebook managed to make it work. Now Twitter does.
I can't deny the social web is an outlet now for commercialization, much like TV has been. The parallels are simple. You pay for TV and you pay for the internet. Both are channels of distribution for content. Networks produce television content and then recoup their revenue in the form of advertisements. Most websites aim to do the same thing. Obviously these similarities have been over simplified, but the modal has worked for sites like Digg, Facebook, and Google.
Twitter retains and displays 140 characters of text and allows users to follow one another. The hype machine has exploded around them in 2008 and the momentum is continuing to build in 2009. Politicians, athletes, celebrities, and students thrown in jail in Egypt all use Twitter now. Twitter has gone above and beyond what I thought it was capable of.
Now we are in a recession. We look at bankers and brokers and shake our collective heads. Irresponsible lending got us into our current situation. So it astounds me when a site like Twitter can raise millions in capital not once, but twice. As of today Twitter has made $0 in three years of service. I have no idea how many millions they have spent in that time for very legitimate expenses like bandwidth, hardware, R&D and so on. The investors must know something the public doesn't...or not.
Websites like Salesforce and Basecamp can actually sell a service, usually geared to corporations who will spend money. Facebook, MySpace, and Digg have managed something miraculous. They sell us (to advertisers) because frankly they can't charge us (everyone would just move onto the next free service even if it were rubbish). We are more valuable as a whole than to try and nickle and dime us. This makes the social web a viable and honest business. In a recession there are only so many advertising dollars to go around.
Twitter has admitted publicly it has no idea how they are going to generate revenue and doesn't seem to care as they are continuing forward with R&D (Maybe on a 280 character feature). If that was my capital or 401k/pension that was being invested I would be pretty furious. Twitter has become the Worldcomm of the web 2.0 era because even they don't understand what it is they are trying to sell. Then again maybe they do. How else do you convince someone to hand over millions of dollars to you? Digg and Facebook managed to make it work. Now Twitter does.
Subscribe to:
Posts (Atom)