<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2188951568343415255</id><updated>2012-02-13T15:55:01.228-06:00</updated><category term='ib xcode objective c apple ios'/><category term='images'/><category term='out of memory'/><category term='jtable'/><category term='android eclipse java game'/><category term='mobile android iphone hardware'/><category term='replacement'/><category term='iphone android emulator snapshot close view fragmentation'/><category term='getSharedPreferences'/><category term='android java'/><category term='xcode sucks apple crash'/><category term='fan only'/><category term='provision'/><category term='development'/><category term='xcode appcode objective c ios development SVN'/><category term='minimize'/><category term='Lint'/><category term='ide programming camera games bowling'/><category term='migcalendar'/><category term='iPhone Android programming'/><category term='Apple'/><category term='gigabyte'/><category term='upgrade'/><category term='chrome'/><category term='rewrite'/><category term='submit'/><category term='iphone'/><category term='scheduler'/><category term='iphone objective c libxml2 SAX speed'/><category term='monitors'/><category term='i5'/><category term='toString'/><category term='android market'/><category term='drag'/><category term='maximize'/><category term='app store submission iphone'/><category term='resource'/><category term='keyboard'/><category term='app'/><category term='Xoom update iPhone portrait landscape'/><category term='frustration'/><category term='eclipse'/><category term='bitmapfactory'/><category term='viewdidunload'/><category term='solo development iOS code alone Objective c'/><category term='UUID mismatch'/><category term='alternative'/><category term='utility'/><category term='broken'/><category term='keyboardhidden'/><category term='graphic artist programmer lessons'/><category term='table'/><category term='recycle'/><category term='C# java programming'/><category term='android froyo 2.2 T-Mobile updated'/><category term='reports'/><category term='android conversion iPhone'/><category term='java'/><category term='refactor'/><category term='store'/><category term='Welcome to Kev said what?'/><category term='android iphone sqlite table view'/><category term='memory'/><category term='android game publish results admob'/><category term='Win7 taskbar icon'/><category term='xcode sucks apple ios iphone'/><category term='rejection'/><category term='NSUserDefaults'/><category term='didreceivememorywarning'/><category term='android iphone conversion'/><category term='xcode mac touchxml'/><category term='toDebugString'/><category term='iPhone Android date wireless headphones'/><category term='ui'/><category term='android'/><category term='xcode'/><category term='Java 29'/><category term='build'/><category term='orphan'/><category term='java visualvm tool'/><category term='market'/><category term='marginarea'/><category term='android xoom review'/><category term='ios android xcode exclipse dual development'/><category term='slide'/><category term='unreferenced'/><category term='release'/><category term='vista'/><category term='java eclipse c# 3rd party'/><category term='iphone provisioning xcode'/><category term='ios xcode stringWithFormat initWithFormat memory leak'/><category term='app store'/><category term='previous'/><category term='support'/><category term='ADT 16'/><category term='c# atalasoft image processing .NET'/><category term='dual'/><category term='hardware upgrade tablet SSD'/><category term='Oracle Sun Java Eclipse issue'/><category term='tablet'/><category term='Eclipse warnings code Java consistency'/><category term='ipad'/><category term='single beep'/><category term='eclipse fatjar JRE'/><category term='imageView'/><category term='low memory'/><category term='CMOS reset'/><category term='osx'/><category term='forum'/><category term='sync'/><category term='configchanges'/><category term='ipad universal'/><category term='grill research'/><category term='C# fake data log dictionary'/><category term='win7'/><category term='ios'/><category term='R.java'/><category term='Android iPhone iOS provisioning profile xCode'/><category term='disappears'/><category term='xcode apple trouble iTouch'/><category term='objective c enum iOS Mac'/><category term='adt 14'/><category term='iOS UIALertView broken reset iPhone SQLite'/><category term='sql job skills interview manager'/><category term='java android iphone mac'/><category term='productivity'/><category term='image'/><category term='iPhone iOS XCode Android XML optimization'/><category term='hardware ios android excitement'/><category term='days'/><category term='iOS mac sucks XIB simulator cached'/><category term='memory leak'/><category term='android tablet decision future'/><category term='contest win android'/><category term='crash'/><category term='long'/><category term='JIDE'/><category term='favorites'/><category term='grill pancake heat'/><category term='3rd party c# pain'/><category term='sqlite'/><category term='manifest'/><category term='files'/><category term='decodefile'/><category term='sliding'/><category term='viewdidload'/><category term='boot family friend cleanup memory'/><category term='interface builder crap scrolling tableview'/><category term='viewer'/><category term='gain'/><category term='dead'/><category term='locked'/><category term='android 3.0 honeycomb display bugs issues ExpandableListView'/><category term='day'/><category term='jxlayer'/><category term='datepicker'/><category term='lack'/><category term='vs 2010 IDE crash'/><category term='sucks'/><category term='scopebar'/><category term='miglayout java dialog layouts'/><category term='iOS 5'/><category term='iOS iPhone android SQL Java'/><category term='setImageBitmap'/><category term='1970'/><category term='nenu'/><category term='mac install crap stupid bad usability'/><category term='xcode stupid update kernel fault apple'/><category term='eclipse vs memory upgrade'/><category term='xcode eclipse ios android'/><category term='management'/><category term='WiFi'/><category term='MAT'/><category term='profile'/><category term='problem'/><category term='Xcode 4'/><title type='text'>Kev said what?</title><subtitle type='html'>Musings on Android, iOS, OSX, C# and other PC based development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default?start-index=101&amp;max-results=100'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>109</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-4529971055873944246</id><published>2012-02-10T09:56:00.004-06:00</published><updated>2012-02-10T09:56:57.613-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='toDebugString'/><category scheme='http://www.blogger.com/atom/ns#' term='toString'/><title type='text'>Java needs a toDebugString to go with toString</title><content type='html'>&lt;span style="color: cyan;"&gt;toString()&lt;/span&gt; is a very handy Java method. It allows you and the debugger to display the value of an object in a nice format. The problem is &lt;span style="color: cyan;"&gt;toString()&lt;/span&gt; is not just used by the debugger and by your code for logging. This method is used by ListBoxes, Trees, ComboBoxes and other UI elements.&lt;br /&gt;&lt;br /&gt;It would be great to add a second method &lt;span style="color: cyan;"&gt;toDebugString()&lt;/span&gt; that returns the string to be used by the debugger when inspecting objects and potentially for your logging leaving &lt;span style="color: cyan;"&gt;toString()&lt;/span&gt; for UI elements use. In the base Object&lt;span style="color: cyan;"&gt; toDebugString() &lt;/span&gt;would return &lt;span style="color: cyan;"&gt;toString()&lt;/span&gt; so unless you override &lt;span style="color: cyan;"&gt;toDebugString()&lt;/span&gt; they would both act identically. I have various objects that I want to use in a ListBox so I have to use &lt;span style="color: cyan;"&gt;toString()&lt;/span&gt;&amp;nbsp;to return a very basic String for a variable usually called name or description. That is great for a ListBox but not for the debugger where I may want to know the name, colors, child count or any number of other things.&lt;br /&gt;&lt;br /&gt;I just got done converting some handy debug &lt;span style="color: cyan;"&gt;toString()&lt;/span&gt; methods to the much simpler&lt;span style="color: cyan;"&gt; return name;&lt;/span&gt; variety in the scheduler code as I needed to show them in the UI. I just lost useful output in the debugger from this. I can easily do my own &lt;span style="color: cyan;"&gt;toDebugString()&lt;/span&gt; calls for logging and simple inspection but the Eclipse debugger will not call that when viewing then in a watch list.&lt;br /&gt;&lt;br /&gt;Of course Eclipse helps in this area by allowing you to create Detail Formatters. Under Window -&amp;gt; Preferences -&amp;gt; Java -&amp;gt; Debug -&amp;gt; Detail Formatters you can define what you want displayed for various object types. It means you get to go through some extra hoops but you can see the results you want. I really would like to avoid the hoops and have a call right in the code for the object as it is easier to maintain than diving deep into an Eclipse dialog to set things. During initial development I tend to refactor my objects quite a bit.This is not portable to another IDE and if you keep a lot of projects open under a workspace this can get rather cluttered.&lt;br /&gt;&lt;br /&gt;I am going to attempt to use the Eclipse Detail Formatters while testing / debugging this project to see how it goes. It could be my fears are unjustified but I really would love a simple / clean solution to this issue easily supported by all IDE / Debuggers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-4529971055873944246?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/4529971055873944246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/02/java-needs-todebugstring-to-go-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4529971055873944246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4529971055873944246'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/02/java-needs-todebugstring-to-go-with.html' title='Java needs a toDebugString to go with toString'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3680152840162040766</id><published>2012-02-01T15:03:00.000-06:00</published><updated>2012-02-01T15:03:31.213-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JIDE'/><category scheme='http://www.blogger.com/atom/ns#' term='previous'/><category scheme='http://www.blogger.com/atom/ns#' term='rewrite'/><category scheme='http://www.blogger.com/atom/ns#' term='day'/><category scheme='http://www.blogger.com/atom/ns#' term='table'/><category scheme='http://www.blogger.com/atom/ns#' term='refactor'/><title type='text'>Some days you just rewrite what you did the previous day</title><content type='html'>Today was one of those days. I thought I came up with a really cool solution to block times and appointments sharing a cell span for the new appointment scheduler using JIDE. I had it all implemented yesterday and it appeared to be working nicely as I went home for the night and off to enjoy my son's band concert.&lt;br /&gt;&lt;br /&gt;This morning I sat down and ran the program again just to see if I could get it to fail. Of course it did fail after a short time of testing. My fake data starts with one time block and two appointments with none of them overlapping. A time block is used to paint the background of the group of cells - say from 8 AM to noon - in a special hatched color pattern. This allows the provider to block a set of time for specific tasks such as OB or cancer only patients. You are allowed, encouraged actually, to schedule appointments in that time block. You can't move or resize the time block using the mouse, that is all done via a configuration dialog so you don't accidentally move it about during normal business activity. It needs to paint first and all appointments on top of it.&lt;br /&gt;&lt;br /&gt;I had a bunch of code looking at each appointment as it was added to the schedule to see if the an existing cell span needed to be extended - either earlier start row or growing the row count. It worked most of the time unless I added appointments in a certain order and they overlapped but did not cause the cell span to grow. So the block was from 8 to noon and an appointment was from 9 to 10. It fits but I did not account for it thus I ended up adding two cell spans to JIDE table which annoys it when you try to delete them. I had added a cell span dump call to my table allowing me to see why the painting was all wacky. I tied the dump into an unused button on my test interface as I did not want the output filling up as I was dragging appointments around trying to get the problem to replicate. Once I really looked at the code I was not happy about adding a bunch more logic for special overlaps and cleaning up JIDE table Cell Spans and internal Cell Spans. Time to step back and take a new perspective.&lt;br /&gt;&lt;br /&gt;What I decided to do is add the appointments as a collection. I can put each appointment in its column, then I can sort a column of appointments by row and row span. After sorting I can easily come up with unique cell spans. I add those spans to the JIDE grid then I also calculate which row / column to do the setValueAt call for adding appointments to a collection for that cell. You don't get paint calls for every cell in the table, only the one in the upper left corner of a cell span. I needed to consolidate all appointments for a span to that one callback spot. An earlier attempt at that had less than stellar results.&lt;br /&gt;&lt;br /&gt;I ended up deleting a lot of code and making the logic a ton easier to debug and understand. Looking at the data to decide what to paint is also cleaner. Still runs slower on the Mac that I want so tuning will be in order but I want to get overlapped appointment painting to work first then I will tune things. I have a feeling it is JXLayer related on the Mac and I might not have much control over that. I have broken down and reconstructed the logic more than once already so no need to optimize yet.&lt;br /&gt;&lt;br /&gt;Today's implementation appears to be pretty solid. I have been unable to get it to screw up after beating on it via lots of drag and drop and tossing numerous appointments at the grid. I even fixed a clipping issue that only occurred on the Mac. I am doing all my development on the PC but I copy the code over to the Mac as a backup being as I don't have a sandbox area in SVN to check anything in just yet. It is also good to run on more than one platform to catch any weird errors, graphical glitches or performance problems early in the process.&lt;br /&gt;&lt;br /&gt;I have notes all over my whiteboard, scratch paper and in PSPad that I will go through so I can cross off the random thoughts that did not work. Next up is painting overlapping appointments by insetting them from the edge and tracking the mouse into them allowing you to change the Z order. Could get kind of hairy but I think the new way I am storing things is going to help. My plan today was to implement that once I felt the code was solid. Since the code was not solid I did not get around to it today. Guess that is why we have tomorrows.&lt;br /&gt;&lt;br /&gt;Next scary piece will be implementing a pivot. Allowing time to run in the columns and column categories to run as the rows. I don't want an IF statement every other line so I might have an object ready for each layout type for processing rows vs. columns. I hate to duplicate code but if it becomes too messy it will be worth it. Double the testing for sure. Get that all in place and I get to do week and month views. Somewhere in there I will have to move this into our main application to replace the current MigLayout. It needs to be a fully working custom control before I do that so I can concentrate on the real appointment data at hand and not on fixing scrolling and painting bugs. Plus it will allow other developers here to help out with dialog boxes and all the other decorations needed by a scheduler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3680152840162040766?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3680152840162040766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/02/some-days-your-just-rewrite-what-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3680152840162040766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3680152840162040766'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/02/some-days-your-just-rewrite-what-you.html' title='Some days you just rewrite what you did the previous day'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5692731817216437029</id><published>2012-01-30T07:55:00.000-06:00</published><updated>2012-01-30T07:55:16.100-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='win7'/><category scheme='http://www.blogger.com/atom/ns#' term='long'/><category scheme='http://www.blogger.com/atom/ns#' term='vista'/><category scheme='http://www.blogger.com/atom/ns#' term='upgrade'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='maximize'/><category scheme='http://www.blogger.com/atom/ns#' term='minimize'/><title type='text'>Upgrade Vista to Win7 takes 5 hours - why?</title><content type='html'>With various upgrades and new hardware in the house only one machine was left running Vista, my wife's Gateway laptop. It has a 1920x1200 screen that she runs at a different DPI to read it easier. Once you do that Chrome screws up and you can't use the upper right button to minimize, maximize or close it. Vista was also having some other issues and since it was the only copy running in the house I decided it was time for it to go.&lt;br /&gt;&lt;br /&gt;I had a buddy with exact same hardware do the upgrade and it went smoothly for him. I had a Win7 Ultimate DVD from a MS one day conference so there was no cash outlay. Just to be safe I used my Win7 Ultimate 64bit DVD hoping the key from MS would work. The MS conference DVD just listed 32bit but this was running 64bit Vista and I sure as heck did not want to downgrade that.&lt;br /&gt;&lt;br /&gt;Put in the DVD and started the upgrade process around 2 PM. It got down around 7 PM. Really? Why the heck did an upgrade take that long? I really have no idea. It had 6 steps to the process and various steps would get stuck at 20% or some other percentage for over 30 minutes. I just left it alone checking on it every so often and finally the percentage would move. I thought that would only happen during one of the steps but it happened over and over. Plenty of space on the HD and this is not a slow machine but it really drug out the process.&lt;br /&gt;&lt;br /&gt;Once that was all done I had to grab some patches off the web and reinstall the video driver with a couple of reboots to make sure it was all happy. Running like a champ and she likes the enhancements offered by Win7. Chrome works, you can right click on task bar items such as Word to see and open recent files, task bar is cleaner, easy to move items between monitors, shake to minimize all others, etc. Plus it is much easier for me to do phone support if every computer in house on same OS. Only the file / print server is on XP. I feel no real need to upgrade that box right away although I do feel the printer / fax / scanner support under XP for the Canon printer we have is a big buggy.&lt;br /&gt;&lt;br /&gt;If I would have known it was going to take that long I would have started it earlier in the day. I was worried the upgrade would screw up so I have been putting this off. With a friend pulling it off on same hardware I felt better but I was also using a MS key from a slightly different OS, 32 vs. 64 bit, but all accounts on web said this would work. I did not want to lose any of her existing programs - Quicken, MS Office 2010 and others as she uses it on a daily basis. Anytime you upgrade someone else you want it to go perfect otherwise you hear about it for days. Doing your own hardware is not so bad, you can put up with a lot, but dealing with others is a bear.&lt;br /&gt;&lt;br /&gt;Feels good to have this off the books. Nice way to end the weekend and she is happy. I also took some weekend time to rip more of my CD collection to give me some variety of tunes at work. I listen to a lot of older music (80s, 90s) and I have it all on legal CDs that just sit in a cabinet. Good to be able to hear the old hair metal at work. Listening to "The Dark Saga" from Iced Earth right now. My son wanted to try some other songs out too and along the line we lost some stuff I ripped a number of years ago. He wanted Adam Ant back in his play list. I will have to listen to that today too. Good stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5692731817216437029?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5692731817216437029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/upgrade-vista-to-win7-takes-5-hours-why.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5692731817216437029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5692731817216437029'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/upgrade-vista-to-win7-takes-5-hours-why.html' title='Upgrade Vista to Win7 takes 5 hours - why?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7764020698203866866</id><published>2012-01-26T15:10:00.002-06:00</published><updated>2012-01-26T15:10:50.332-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gain'/><category scheme='http://www.blogger.com/atom/ns#' term='monitors'/><category scheme='http://www.blogger.com/atom/ns#' term='productivity'/><category scheme='http://www.blogger.com/atom/ns#' term='dual'/><title type='text'>Bigger dual monitors = productivity gain</title><content type='html'>Pretty much any programming shop you know will have dual screen monitors for their developers. There are a bunch of posts and studies about the potential productivity gains. I have been running dual 20" monitors at various jobs for a number of years. I have a 21" monitor and a 17" at home.&lt;br /&gt;&lt;br /&gt;Generally when gaming at home I don't use the second monitor but maybe I need to get some work done but I want to monitor a football game. I can leave it running via a web page on the second screen or I will have the browser there with Java Doc for my current coding project. They gave away some older 17" LCD monitors at work so I grabbed a couple of them a few months back. I hooked one up to my wife's laptop and she can't believe how usable it has become. She does a lot of Excel / Word / Browser work.&lt;br /&gt;&lt;br /&gt;I gave one to each of my sons. The one in high school uses his to keep the homework assignment up while working in Word. Much easier to keep track of all the requirements for the paper when you don't have to toggle between windows.&lt;br /&gt;&lt;br /&gt;My other son has his hooked up to his laptop in mirrored mode. This allows his tutor to monitor what he is doing without hovering over his shoulder. All of them getting plenty of use and in a variety of methods.&lt;br /&gt;&lt;br /&gt;Great, you love dual monitors but what is the deal with bigger ones? Generally bigger is better, up to a point at least and that is also the case for monitors. Just going bigger without the up in resolution would not have mattered. We needed some monitors for our medical coding department. We figured we could give them our existing monitors and we could get the upgrade. Just like it works at home where my old machines filter down to family members when I upgrade.&lt;br /&gt;&lt;br /&gt;None of us wanted to lose vertical resolution. We were running 1600x1200. If you go 23" you end up losing vertical as most are 1080 for that dimension. Once you get used to see X number of lines of code you don't want to give it up. Almost all monitors are widescreen now. The new ones are 1920x1200. Bonus extra width, same height in pixels. My boss is thinking of just using one as they are so wide. I am running dual and loving it. The extra width means I was willing to split PSPad and Chrome on one screen and Eclipse and Explorer++ and other apps on the other. I can still see the same amount to code but I don't have to toggle between windows.&lt;br /&gt;&lt;br /&gt;I keep all my random thoughts on program ideas, to do list, etc. in various tabs of PSPad. I copy things from the web into there and into Eclipse all the time. Now I feel I have the screen space to keep everything on screen and open. That is a productivity gain.&lt;br /&gt;&lt;br /&gt;The new monitors also have better color making my graphics artist work easier too. Newer tech, not the newest as these are still the value line Dell monitors but better than the old ones for sure.&lt;br /&gt;&lt;br /&gt;If you develop and you don't have dual monitors you are really missing out. If you do have dual monitors and have been running 20" for a long time then at step up to 24" may well be worth your time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7764020698203866866?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7764020698203866866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/bigger-dual-monitors-productivity-gain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7764020698203866866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7764020698203866866'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/bigger-dual-monitors-productivity-gain.html' title='Bigger dual monitors = productivity gain'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2512403274192435750</id><published>2012-01-26T08:18:00.001-06:00</published><updated>2012-01-30T07:56:07.080-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='days'/><category scheme='http://www.blogger.com/atom/ns#' term='app'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='store'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><title type='text'>App released for App Store</title><content type='html'>It took 13 days to get the app released to that Apple App Store this time. I sent them a note yesterday as I was worried about the "review requires additional time" status. From what I could tell on the web this can be a death knell. It appears to mean Apple does not like something and wants to really review it to see if you are breaking any rules.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I sent them a note explaining we just send the data back to our server for it to be processed by the back office staff. Everything is pretty darn tame. I research everything to make sure I am not using a private API, all the graphics are legal, tool bars are in the correct place, back button works like it should, etc. We do store a lot of data on the phone due to CPT, ASA and Diagnosis codes for quick look up later. I wrote my own pop-up menu system that works on both iPhone and iPad to mimic the one I use on the Android but that is just a custom control. I explained all that in my note and it appears to have worked.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have a couple of guesses. One they might have accidentally put it in the wrong status. I am sure this is easy enough to do especially if you are just choosing from a combobox. Second they could have been worried we were making money with the app by sending claims directly to insurance and they wanted a 30% cut of that. This app is just a simple tool to get data to the back office for processing. It saves the anesthesiologist time and money by not needing to drive back to the office to drop off paperwork.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the end it is released and ready for our clients. We will be calling them today just in case they don't notice an update is available via the OTA process. I hope to hear some good news from them as I believe I have fixed all known issues at this time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Previously it was released in a more timely manner: 5 days, 2 days, 2 days and 13 days for this round. Being in release limbo sucks.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2512403274192435750?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2512403274192435750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/app-released-for-app-store.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2512403274192435750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2512403274192435750'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/app-released-for-app-store.html' title='App released for App Store'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-1641540920959719766</id><published>2012-01-23T09:11:00.002-06:00</published><updated>2012-01-30T07:55:38.646-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='app'/><category scheme='http://www.blogger.com/atom/ns#' term='store'/><category scheme='http://www.blogger.com/atom/ns#' term='crash'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='reports'/><title type='text'>Why you don't get crash reports from Apple</title><content type='html'>I thought our little app was doing great, never a single crash report but then clients said they are crashing it. So what is the deal? Turns out to get a crash report the end user MUST connect their phone to iTunes and OK the submission of crash reports. Our clients are Doctors, they never connect their phone. They use it for scheduling etc. as a smart phone. We will never see a crash report from them.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I looked in the logs and I see they are running iOS 4.1. Yep pretty old but since Apple did not support OTA (over the air just in case you don't know) OS updates they never update their phone. Now 5.0x is not all that great on old phones, they run pretty slow with it, but since many users never attach their phone they never even see good updates and patches. Face it, iOS is fragmented but in a different way than Android.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the Android side we see crash reports. When the app dies you are given the choice to send the report over your 3G / Wifi / whatever data connection. Our app is based on being connected so sending this data is no big deal. Apple decided to bundle up all the crashes on the phone and horde them like a dragon.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When I attach an internal beta testers phone to my Mac I get to see all the crashes from our app and all other apps on the device. Stuff crashes a lot from what I see. Those developers never get to see their crashes either. This is a damn shame and a total false sense of security. I pretty much wanted to scream at how annoyed I am at Apple for not giving me access to crash reports so I can make my app better.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am now going to have to look into some user written crash handlers. You can catch exceptions at a higher level and then you need to try and save the crash somewhere then write it to your server during the next log in. When your app is crashed you can't do much with the data and since there is no central support you are on your own as to how to handle it. We will need a new API on our server to accept the crash data so I can log in and get it at a later time to analyze the situation. They need to fix this. Apple has been less than developer friendly through this whole process and they continue to piss me off.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the Android side my Motorola Xoom updated to Ice Cream Sandwich and I am happy with the upgrade. The fonts look a lot nicer and I like the new back / home / menu button look. I don't care for the "clear all" vs. "clear individual" notifications from the status bar.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I wish my phone could be upgraded but they stopped that at Froyo. This is a big downside on the Android side. Each manufacturer gets to decide how much they want to hose over the phone so it is unique to them but when they do that they can skip all future Android releases. As a developer I want the latest stuff. End users don't seem to care and just want it to run. See the iOS stuff above to find out the a lot of iOS users never upgrade. With OTA maybe that will change on the iOS side but the 4.x to 5.x upgrade was not friendly to me or others causing you to lose everything if you did not back it up first. Doing that OTA is not a good idea.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I understand not getting ICS on my phone but I really want Gingerbread as Google sped up various aspects of the UI with some new memory management etc. Guess I will look into rooting it at some point in the future and if it works for me I will do it on my wife's phone too.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-1641540920959719766?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/1641540920959719766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/why-you-dont-get-crash-reports-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1641540920959719766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1641540920959719766'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/why-you-dont-get-crash-reports-from.html' title='Why you don&apos;t get crash reports from Apple'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7356008764737591127</id><published>2012-01-20T15:22:00.002-06:00</published><updated>2012-01-23T08:55:16.256-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rejection'/><category scheme='http://www.blogger.com/atom/ns#' term='app'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='store'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Ouch - App Store rejection!</title><content type='html'>After a full week of waiting to review our app got rejected by the Apple app store. They found a crash, a legitimate and easy to reproduce crash that should have never made it past me or QA. A crash that occurred in all previous versions of the software. A crash that made it through to the store multiple times.It involved turning off some of the editable sections via the admin tool. I was using a tag as an array offset, if all sections are enabled the tag would equal the offset, but in the one test case this was going to cause an index out of bounds. I screwed up and should have labeled the variable as tag instead of as section. I probably was going to do that at one point but the crappy refactoring support in Xcode means I skip doing work like that from time to time.&lt;br /&gt;&lt;br /&gt;It is my fault for not catching this earlier.For the test log in we sent to Apple you had three practices to choose from. The bug only occurred on the third practice in the list and only when you pressed the (+) to add a new image to list.Very glad Apple found this issue. I did not want a crash out in the hands of our users and I am sure many would have run into this issue as the layout of the editable items is totally configuration via our administration tool. That tool is not a mobile app but how each client configures what they want the doctor to enter is totally up to them.Annoying this was not caught by QA. As a developer you don't have time to configure piles of test cases in the admin tool then test things out on the mobile side of things. Something like this I should have tested though as it is pretty easy to configure and verify.&lt;br /&gt;&lt;br /&gt;It works just fine on the Android. Due to language and GUI component differences the code is not a direct port between the platforms. Could be I was doing a quick conversion to the iPhone or I did the iPhone side first and caught the issue during the Android conversion or the Android code is so different that bug would not occur or I forget to go fix it under iOS post Android conversion. I was back and forth between the two on a daily basis.&lt;br /&gt;&lt;br /&gt;Being the sole developer for two platforms is just not easy. I have no one here that can do Objective C code reviews. Someone could look over the Android Java code but I am the only Android developer so some parts of the API would not be familiar too them. Java tends to be Java so I am sure they could find issues if they looked hard enough. Heck, I could find issues if I gave it all a once over.I fixed the issue, ran some tests and we submitted it again.&lt;br /&gt;&lt;br /&gt;Within an hour it was back in "In Review" status so Apple obviously saw we got right on the fix and did not move us back to the end of the line. I really did not want our clients to wait another full week for Apple to just start looking at the app again. I am hopeful it gets through the review process in a few hours and we can contact clients starting Monday to let them know a new version is ready that fixes the camera issues and this new issue.&lt;br /&gt;&lt;br /&gt;I just got another note from Apple that they need additional review time but they will keep me posted. Must be time for a real test instead of the past two times where it was just shuffled right out into production.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;We don't appear to be getting crash reports from Apple. When we look in the crash report section nothing is listed even though clients reported crashes. I wonder if it is due to them running 4.1 iOS and the tabs for the crash reports start with the 4.2.x series. Does Apple throw away older iOS reports? We could tell clients to upgrade but we list support as 4.0x and above. Plus upgrading to 5.x series is not for the faint of heart. You darn well better back up everything because I know multiple people that had everything blown away. That was not the case when doing 4.0.x -&amp;gt; 4.1.x -&amp;gt; 4.2.x upgrades and people got a false sense of security. A lot of doctors just get the device and never connect it to a computer. I really don't want to walk them through that process.&lt;br /&gt;&lt;br /&gt;Here's hoping the new update is available at the store on Monday!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7356008764737591127?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7356008764737591127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/ouch-app-store-rejection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7356008764737591127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7356008764737591127'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/ouch-app-store-rejection.html' title='Ouch - App Store rejection!'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3606920160214326079</id><published>2012-01-19T15:23:00.002-06:00</published><updated>2012-01-23T08:56:22.622-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='drag'/><category scheme='http://www.blogger.com/atom/ns#' term='JIDE'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jxlayer'/><title type='text'>The land of JXLayer</title><content type='html'>I am deeper into the MigCalendar to JIDE conversion process. I am still working on the prototype for the scheduler control and have a good hunk of the rendering working. That means I get to play with drag to size and drag to move. I am using a JXLayer to handle this as the main JIDE grid needs to do its own row height and column width sizing that I don't want to screw up.JXLayer is really nice in that your can paint anything on a glass pain after all the stuff under the glass has already rendered. I have appointments so I keep their rounded rectangle associated to them. If the cursor is over / near the top or bottom edge of the rounded rectangle I paint a thicker border for the rectangle in the JXLayer. The JXLayer also watches for mouse press / release actions for the thick border rectangle so I can start dragging operations allowing the user to resize the appointment to a new time frame.&lt;br /&gt;&lt;br /&gt;Next up was the auto scrolling of the JideScrollPane as they near the edges of the screen. I have to monitor the viewport rectangle for changes while I am in my dragging code to adjust my rectangles. Lots and lots of point and rectangle processing going on in this code along with clipping and offset calculations. At this point it is all working rather nicely although I can get it to screw up a bit from time to time.I need to figure out snapping to time slots. I don't want to increment by the minute but maybe 15 minutes is too much. They can always popup a true time editor dialog to get exact numbers. The drag to size needs to be reasonable but not so crappy you will never use it.Dragging the appointment to another cell in the grid also needs to happen. For that I am thinking of a simple drag to let you move it anywhere, a CTRL + drag to only move the appointment vertically (i.e. change start time) and a SHIFT + drag to only move horizontally (i.e. under another provider, facility, room or category depending on the current column configuration). There are a lot of time you only want to change one axis and I know a lot of paint programs use CTRL, ALT and SHIFT to lock the mouse movement.&lt;br /&gt;&lt;br /&gt;With that in mind I am considering a "status bar" custom control to show the tool tip text, row (time slot) and column  (provider, etc.) information as multiple level row / column headers can be off screen meaning you don't know exactly where you are in the grid always without this special status information.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Writing a scheduler has been a unique experience for sure. You see various 3rd party .NET controls that emulate Outlook in one fashion or another. There is almost nothing other than MigLayout on the Java side. We need to be cross platform so .NET is out even though I know how to code in C#. The other choice would be a web based product but we a lot of support data that needs to be cached leaving that out too.&lt;br /&gt;&lt;br /&gt;Sometimes writing your own control is the only option.I have used JXLayer in the past to draw spinning busy cursors. I had not used it for mouse interaction. It has been pretty easy so far once you figure out your painting offsets based on the scrollpane and other JComponents you are dealing with. Not sure what I would do if I need to port this to a touch interface for iOS or Android.My boss got Ice Cream Sandwich on this Xoom this morning. My updates always seem to be a day or so later in the staggered refresh cycle but I am excited to give it a shot when it magically appears. He tried our mobile app out under it and it appeared to work fine. Not a big surprise as the same code base works on phones and tablets. I am using 2.1 as minimum required API so I am not using any cool fragments or other tablet features that appeared in the 3.x series. I just want to see the bad boy running and to play with the new OS stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3606920160214326079?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3606920160214326079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/land-of-jxlayer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3606920160214326079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3606920160214326079'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/land-of-jxlayer.html' title='The land of JXLayer'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8913031094486449875</id><published>2012-01-13T15:26:00.001-06:00</published><updated>2012-01-13T15:26:39.783-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='submit'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Submitted to the app stores today</title><content type='html'>I have fixed all the client reported issues, a few things I found, a few things QA found and I updated to the new favorite / default favorite processing that works across URL instances and new table loads. It started out being a small thing that got a lot bigger once I dug into what it was going to take to save favorites / reload tables / reload favorites properly across log in sessions. I am very happy with this release and feel good not calling it beta.&lt;br /&gt;&lt;br /&gt;The big fix on the Android side was working with slide out keyboards. It was an easy manifest only fix, tracking it down and finding a device to test against were the fun part.&lt;br /&gt;&lt;br /&gt;Under iOS the fix was crashing during picture taking due to low memory conditions. I had some bad pairing of create / dealloc between the viewDidLoad and viewDidUnload methods. Once that was straightened out and I was able to get hold of an older iPhone 3GS to test low memory on a device I am pretty darn sure I have this one licked. It did really show me how much Apple has moved forward with the later iOS versions. Before everything was killed instead of being put in the background. If you were mid edit on a case and accidentally hit the Home button to bad. Now the app is in the background and you can get back to it. Something I never had to think about on the Android. I am leaving some of the devices on the old iOS version to remind me of the pain. Plus a lot of users don't upgrade their iDevices because it is not OTA. They never hook it up to their PC. If you upgrade to iOS 5.x you must be careful and backup as it is going to wipe our your data.&lt;br /&gt;&lt;br /&gt;Android update is available on the Market now so I can ask the client with the slide out keyboard to test it right away. Hopefully Apple will follow form and have the new release accepted by Sunday and we can have the clients test it starting Monday. They have hit the last couple of releases on the 2 day mark.&lt;br /&gt;&lt;br /&gt;In between bug fixes I have been back to working on the JIDE grid based scheduler. I am wrote a custom label for showing the date with the day of the week in a smaller font over the month day, year. I have a pop-up calendar showing when you click on that control allowing you to quickly hop to any date. I added a gradient JPanel I used in some older projects to give the header where the date control lives a nicer look and have started to hook up some of the other buttons. Pretty soon I will move all of this over into the main product and actually load real appointments and display them in the new grid. I need to mess around with the renderer a bit before I do that so it can handle overlapping events and events that only occur in part of the time slot.&lt;br /&gt;&lt;br /&gt;It has been fun to work without a device, emulator or simulator. Press &lt;run&gt; and a window just appears and you start testing. Very small proof of concept app so everything loads in an instant allowing you to play around with very little pain. After awhile all apps become huge with features just slowing you down as you are tweaking the GUI. I also don't need to log in as I am not using real data which is also nice. Always good to have a small test harness to piddle around with new programming ideas.&lt;/run&gt;&lt;br /&gt;&lt;br /&gt;I have Skyrim sitting on my desk, plan to install it tonight along with the patches. There goes this weekend, the next, etc. until the wife and kids don't recognize me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8913031094486449875?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8913031094486449875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/submitted-to-app-stores-today.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8913031094486449875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8913031094486449875'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/submitted-to-app-stores-today.html' title='Submitted to the app stores today'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7232207671873100152</id><published>2012-01-12T10:41:00.002-06:00</published><updated>2012-01-12T10:41:51.790-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sliding'/><category scheme='http://www.blogger.com/atom/ns#' term='slide'/><category scheme='http://www.blogger.com/atom/ns#' term='app'/><category scheme='http://www.blogger.com/atom/ns#' term='keyboard'/><category scheme='http://www.blogger.com/atom/ns#' term='configchanges'/><category scheme='http://www.blogger.com/atom/ns#' term='disappears'/><category scheme='http://www.blogger.com/atom/ns#' term='manifest'/><category scheme='http://www.blogger.com/atom/ns#' term='keyboardhidden'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android app disappears with slide out keyboard</title><content type='html'>While checking in with a client on our mobile apps they mentioned that on an Android phone with a slide out keyboard the app disappeared every time they slid out the keyboard. I had not tested on any devices with a slide out keyboard so this was news to me.&lt;br /&gt;&lt;br /&gt;One of the ladies in support happened to have a slide out phone at home so she brought it into work today. I set it up for debug and plugged it in to my machine to monitor it under Eclipse. No errors in the log, the app just disappeared. I put in break points and found &lt;span style="color: cyan;"&gt;onDestroy &lt;/span&gt;was being called but why?&lt;br /&gt;&lt;br /&gt;Searching the web and I found you need to add &lt;span style="color: cyan;"&gt;keyboardHidden &lt;/span&gt;to your manifest file so the activity will not be destroyed when that event occurs. All my activities looked like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: cyan;"&gt;android:configChanges="orientation|keyboard"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now they look like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: cyan;"&gt;android:configChanges="orientation|keyboard|keyboardHidden"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This solves the issue. I thought &lt;span style="color: cyan;"&gt;keyboard&lt;/span&gt; would handle things but you must have both &lt;span style="color: cyan;"&gt;keyboard&lt;/span&gt; and &lt;span style="color: cyan;"&gt;keyboardHidden&lt;/span&gt; for it to work on all devices.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Of course you only want to do this if you gracefully handle orientation and keyboard changes in your code. All of my activities are very friendly to orientation changes and to the on-screen keyboard appearing or disappearing. The term &lt;span style="color: cyan;"&gt;keyboardHidden&lt;/span&gt; does not say to me "the hardware keyboard is sliding out" making it an very unfortunate term on Googles part. A better name might be &lt;span style="color: cyan;"&gt;hardwareKeyboard&lt;/span&gt;. I have a feeling the percentage of users with a slide out keyboard is pretty small too but you want to make sure your app works on as many devices as possible.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have run our app on my Xoom with a bluetooth keyboard. Even though it operates to the OS like a slide out keyboard in that the on-screen keyboard does not appear it did not have any crash issues. The slide out keyboard must trigger special events. Glad to have it fixed in our code.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7232207671873100152?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7232207671873100152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/android-app-disappears-with-slide-out.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7232207671873100152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7232207671873100152'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/android-app-disappears-with-slide-out.html' title='Android app disappears with slide out keyboard'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2423610825217895127</id><published>2012-01-11T15:51:00.000-06:00</published><updated>2012-01-11T15:51:33.106-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='provision'/><category scheme='http://www.blogger.com/atom/ns#' term='profile'/><category scheme='http://www.blogger.com/atom/ns#' term='UUID mismatch'/><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='frustration'/><title type='text'>Big Xcode frustrations</title><content type='html'>My developer provisioning profile expired. After pressing [Update] twice Xcode asked if I wanted to send a message to my account manager (my boss) to renew it. I agreed to that. He got an email and renewed it. I hit [Refresh] and got the new one and tried to build. Failure again. A closer look showed a new error message telling me there are multiple provisioning certificates.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I delete one but no help so I open up Keychain Access and delete the expired on that has the exact same name as the good one. Why does the system not prompt you to save or replace or just do it automatically for you? What good is an expired certificate? It is no good at all and just another annoyance getting in my way of getting real work done.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This allows me to build for a provisioned device or the simulator but I can no longer build a release version. What the hell is going on now? I can see the release / distribution profile in the Developer Profile table in the Xcode Organizer but that table is read only. I search the web trying to find the correct wording and finally figure out you have to drag the &lt;span style="color: cyan;"&gt;.mobileprovision&lt;/span&gt; file to Xcode. You can't drag the .cer file, it has to be the &lt;span style="color: cyan;"&gt;.mobileprovision&lt;/span&gt; file. I find that on my HD and drag it to Xcode which now allows me to build release.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We need to provision another device to do some testing as I am having crashing issues on older iPhones. Everything works find on newer iPhones, both iTouches I have and the iPad. No fragmentation here. I send the device ID to my boss and he adds it to our developer profile. I press [Refresh] and the new device appears but the release profile disappears and another expired profile I deleted reappears. Screw all of that. This process is a totally screwed up mess.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I drag the distribution profile back into Xcode and delete the expired one again and all is good or so I think. I plug in the new provisioned iPhone and press (&amp;gt;) to run the new build of the app on it. No go but why? First off the console log window disappears again from the debug window. I click the layout button to have that appear again and it is full of &lt;span style="color: red;"&gt;UUID mismatch&lt;/span&gt; warnings. I copy one of those to the clipboard and it turns out the is a common problem where you have to delete the files in&amp;nbsp;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;/&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;Developer&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;/&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;Platforms&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;/&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;iPhoneOS&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;platform&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;/&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;DeviceSupport&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;&lt;span style="color: cyan; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;&lt;span style="font-size: 14px;"&gt;/&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family: inherit;"&gt;for the device version you have then restart Xcode, reattach the device and let it resync itself before you try to run it again. After all of that I get the program installed and the console window disappears again but we can start testing. So far my fixes appear to be working. I then install on one of the iTouch test devices and have to let it resync too before I can install the app update.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;&lt;span style="font-family: inherit;"&gt;Pretty much I wasted a good part of the day on really stupid crap on my Mac. I also know that anytime I update my provisioning profiles I am hosed and have to delete one and redrag in the correct one. Thanks Xcode for being such a pain in the ass constantly. This is not a friendly IDE, this is not a nice way to treat developers, this is a massive waste of time just to get a freaking build ready. These are not uncommon issues. I found a lot of folks on the web having the same issues. I have not run into this craptastic fun on the Android side of things using Eclipse. I don't have to sign anything to install on any device. I don't have to provision anything. The one signature I use for a release is good for 30 years. I am not constantly hassled to be doing something I should be able to legally do. I don't have developer and distribution certificates expire at different times. I don't have and IDE that gives less than helpful error messages that I must search the web to have any hope of decoding.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 18px;"&gt;Some of this might not happen if I was the Apple account owner and the sole developer. That part of the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: 18px;"&gt;equation has been a huge headache repeatedly with Apple. I finally have to give up using my work email account and use my personal email account with Apple as they could not get their own system straightened out. It gets to the point you hate to try and build the app on the Mac.&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 18px;"&gt;&amp;nbsp;I just don't trust it do it correctly ever.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2423610825217895127?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2423610825217895127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/big-xcode-frustrations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2423610825217895127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2423610825217895127'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/big-xcode-frustrations.html' title='Big Xcode frustrations'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2058068142194107803</id><published>2012-01-10T09:54:00.001-06:00</published><updated>2012-01-10T09:54:46.998-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='getSharedPreferences'/><category scheme='http://www.blogger.com/atom/ns#' term='NSUserDefaults'/><category scheme='http://www.blogger.com/atom/ns#' term='sqlite'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='favorites'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Saving database favorites on mobile devices</title><content type='html'>After a number of missteps I think I have database favorites savings in place on both our Android and iOS applications. How hard can saving favorites be you ask? Much worse than I originally thought for a number of reasons.&lt;br /&gt;&lt;br /&gt;With a mobile device a number of things come into play. First there is no log out. As programmers we like&amp;nbsp;symmetry. Open file / close file, log in / log out etc. Matching pairs are awesome. Load when they start, save when the exit, what a beautiful world that would be. You really can't&amp;nbsp;guarantee log in / log out pairing on a desktop application but you have a better shot of it happening. On the mobile side your app can be kicked out due to low memory conditions or the user Task Manager killing it.&lt;br /&gt;&lt;br /&gt;My users can log into a specific URL instance then pick the practice which has an associated provider name for their log in name. There are some tables that are static per URL instance, in my case ASA, CPT and Diagnosis, and some tables, which I call session tables, that need to be reloaded per log in. The user wants their favorites and default favorite to carry over between log in sessions and between table reloads from the server.&lt;br /&gt;&lt;br /&gt;Between log in sessions the system administrator can add, remove or modify records. That is why we reload things per session. These are generally small tables such as Facilities, Referring Physicians and the like. The large ASA, CPT and Diagnosis tables are updated on a yearly basis. I download a permanent cache table per log in session to see if the ASA, CPT or Diagnosis code table needs to be refreshed even if all my other rules make it look stable. Even when the powers that be decide there are new Diagnosis codes I don't want to lose your list of favorites.&lt;br /&gt;&lt;br /&gt;Just after a successful log I check to see if there was a previous successful log in. If there was and the URL is not the same I save all database table favorites to a favorites table if the current database table has at least one row. All tables are loaded on demand meaning I only load them if you need data from them, I don't just load them at start up all while you twiddle your thumbs, that would be a huge waste of time and bandwidth. If the URL is the same but the Practice or Provider is different I save favorites for session tables before I clear them. I don't actually clear the table but I mark it as stale. If during this session a user needs data from that table it will be cleared and reloaded.&lt;br /&gt;&lt;br /&gt;Once all that is done I save the URL + Practice + Provider to user settings. That would be &lt;span style="color: cyan;"&gt;NSUserDefaults &lt;/span&gt;on iOS and &lt;span style="color: cyan;"&gt;getSharedPreferences &lt;/span&gt;on Android. This is the last known good log in. Basically I check for previous session log out during the log in processing. I use the special preferences area on each platform as that is maintained even if the program is ejected from memory or killed by the user. If the user uninstalls the application then all settings are gone and a new install will start the process all over.&lt;br /&gt;&lt;br /&gt;In general the ASA, CPT and Diagnosis tables are the same across URL instances but not always. The tables are loaded from the same text file but ProgreSQL does not maintain the same order during record inserts for some reason. We were saving the unique key in the favorites table but now need to save the Code + optional Modifier instead allowing me to match favorites across URL instances. I convert back and forth between ID and Code + Mod as I want to do comparisons on the much faster integer instead of slow string checks once things are up and running.&lt;br /&gt;&lt;br /&gt;If you log in to the same URL as the same user and select the same practice every time then I don't save / load favorites to the backing table for the big three. They are just flags set on each table as you toggle the favorite flag on records. The main ASA, CPT and diagnosis tables will only refresh from the server when they get a new master load. Session tables will get a save / load of favorites per log in. It will all be pretty transparent the user. They get a quick busy screen as I load session tables from first time use and after that the data is quickly available for the rest of the log in session.&lt;br /&gt;&lt;br /&gt;Keeping it all straight was fun. I need a fully qualified previous log in that I don't touch until all favorite saving is done. I don't want to gut any of the old table data until all favorites have been saved and I have to use backing table data for everything as just saving to the program objects is not persistent enough. When I access the table for favorites saving I need to make sure I don't do any of my stale data checks which would force the table to clear and be repopulated with new data. Post successful log in I don't want to know about the old log in. Tables can be reloaded from the server at any time as the user does an ASA search for example. When the table is stale I need to load it from the server then apply the saved favorites, if any, from the last time they were saved for the current log in URL + Practice + Provider log in. Keep in mind those might have been save 20 log ins ago because the user may have used the ASA table just once in the past 20 sessions even though they logged in over and over.&lt;br /&gt;&lt;br /&gt;There can only be one default favorite set per table per unique log in so I have to delete the old before I set the new if we have one.&lt;br /&gt;&lt;br /&gt;The best way to handle all of this in testing was to use the emulator for Android and the simulator for iOS. You can't get to the database on a device unless you have a rooted device. Great for security, not so fun for a developer. The emulator in Android is not exactly fast so it made testing less than fun. Plus I have to copy the database file from the device to my hard drive then open it with a third party tool to view the data. I had to log in repeatedly as different users. At last both platforms support the keyboard so I did not have to mouse click on-screen keyboards for the URL, User Name and Password over and over.&lt;br /&gt;&lt;br /&gt;The simulator for iOS is faster than the device which is very nice. I use SQLite Manger under FireFox to view the database. The only issue there is anytime you update the simulator you have to track down the database under&lt;span style="color: cyan;"&gt; /Users/{your name}/Library/Application Support/iPhone Simulator/{iOS version}/Applications/{GUID}/Documents/{app}.db&lt;/span&gt; and you have to remember to click "All Files" under Format: before you do this as the default is *.sql. &amp;nbsp;If you navigate all the way down the directory path and go "where the heck is my file?" then change to "All Files" you get to navigate all the way down there again which is not user friendly. SQLite Manager remembers the last file opened so you don't have to do this very often. Of course if you test under iOS 3.x, 4.x and 5.x you will have to navigate to each directory for that test. At least the iPhone and iPad share directory for a given iOS version. At first that threw me off, I thought when I switched between iPhone and iPad simulators I would get different data but it loaded up my favorites from the iPhone.&lt;br /&gt;&lt;br /&gt;The updated applications are in the hands of QA now. Hopefully I will get them submitted in the next couple of days and go back to my JIDE scheduler table work. It has been a rough couple of days under the old wireless headphones pounding away on both platforms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2058068142194107803?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2058068142194107803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/saving-database-favorites-on-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2058068142194107803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2058068142194107803'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2012/01/saving-database-favorites-on-mobile.html' title='Saving database favorites on mobile devices'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8224701626880039512</id><published>2011-12-21T15:51:00.001-06:00</published><updated>2011-12-21T15:51:39.645-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scheduler'/><category scheme='http://www.blogger.com/atom/ns#' term='JIDE'/><category scheme='http://www.blogger.com/atom/ns#' term='jtable'/><category scheme='http://www.blogger.com/atom/ns#' term='marginarea'/><title type='text'>JIDE Table as a base for the scheduler</title><content type='html'>For the moment I am going to punt on MigCalendar and give JIDE a shot for our scheduler. We already have a license for JIDE so might as well get some use out of it and we can drop a custom control and JAR files from the project with the switch.&lt;br /&gt;&lt;br /&gt;The JIDE table supports various row sizes, multilevel columns, custom rendering, row labels, etc. Pretty much everything we need I hope as long as I can get a really nice looking custom cell renderer in place. Row / Column spanning is in there but night be tricky to handle what we need. I also need to pivot things but will probably do that with a table reconfiguration instead of using their pivot stuff due to special layout needs.&lt;br /&gt;&lt;br /&gt;I did run into some issues with the new MarginArea as the demo they provide was missing that file. I almost got the code running by guessing at they layout but it was not working. A quick email to them got me the example code I needed to complete the task. Very happy with the turn around time on that request.&lt;br /&gt;&lt;br /&gt;Going to take some effort to get it all in place but for the first days work I feel I got a lot of progress done. The documentation is still a bit iffy, English is a second language for them and web support is light but I have a feeling I can fight through this one.&lt;br /&gt;&lt;br /&gt;I hate to give up on MigCalendar but so many here have tried to make it work the way we need it that it is really time to move on to something else that hopefully solves most of our needs and does not introduce too many new headaches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8224701626880039512?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8224701626880039512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/jide-table-as-base-for-scheduler.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8224701626880039512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8224701626880039512'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/jide-table-as-base-for-scheduler.html' title='JIDE Table as a base for the scheduler'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6664098521950518303</id><published>2011-12-20T15:56:00.000-06:00</published><updated>2011-12-20T15:56:00.318-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lack'/><category scheme='http://www.blogger.com/atom/ns#' term='support'/><category scheme='http://www.blogger.com/atom/ns#' term='migcalendar'/><category scheme='http://www.blogger.com/atom/ns#' term='replacement'/><category scheme='http://www.blogger.com/atom/ns#' term='forum'/><category scheme='http://www.blogger.com/atom/ns#' term='alternative'/><category scheme='http://www.blogger.com/atom/ns#' term='locked'/><title type='text'>MigCalendar = slow progress</title><content type='html'>While MigCalendar might be powerful and flexible it is poorly documented and there is pretty much non-existent support on the Web. The company locked down their forums so you can only submit bug reports. I did just submit one so I hope I get an answer to what seems something simple really soon. I hate it when you don't have access to a forum to share problems and solutions with other users.&lt;br /&gt;&lt;br /&gt;I did break down what I am attempting to do into a single source code file. I want to get as much running as possible in that before I integrate with the main product. I have been doing work in the main product too and running into the same issues. With all the other work I am attempting in the main product I don't want to get my lack of knowledge of MigCalendar to get in the way of my lack of knowledge on the rest of the scheduler.&lt;br /&gt;&lt;br /&gt;I have looked for other products that support our needs and have found nothing. I can find simple calendars that show a day, week or month of events for a single person and with time on left and day above but we need to show times for facilities / room, providers, etc. I need a flexible header and activities driven by categories. I need to show overlapping appointments.&lt;br /&gt;&lt;br /&gt;It is getting close to fish or cut bait time. This happens with a lot of 3rd party controls. You get a nice demo going or get a first cut of your code running then you start to run into walls. I am not sure if some of the walls can be broken down here or if they are solid limitations. Writing a header, footer, time range and full grid with drag and drop would take a lot of time but in the end you get exactly what you need. I have written plenty of custom controls in Java and other languages so I can tackle this. Start with a small piece and build it up until it all works.&lt;br /&gt;&lt;br /&gt;Others in the office have had the same experience. They can fix an issue here and there, tweak the look and then get out quickly. The open issues have been left open because no one has been able to fully understand what MigCalendar does. I have it working better in some places - especially with two level deep categories in the header - but broken in so many others. We know it can run fast, you can see that in the demos, but our code is rebuilding too many things as things are selected. The demos tend to just have one layout where we allow the user to toggle how they are looking at things similar to pivot tables in Excel. It has to recalculate too many things about the activity when this happens. That also leads me toward doing a custom solution that is optimized for the data we have. Generic is wonderful when you can pull it off but there are times you need things to do exactly what you want and do them very fast.&lt;br /&gt;&lt;br /&gt;When I was working in the stock market industry I wrote a custom grid in Java to do high speed painting of real-time market data. It could handle a lot of updates using dirty cell paint management and doing paints on a quarter second timer. For a long time it was used by one of the big "do your own trading" places that you see advertise on TV. Not a scam place, a legit trading company that is still around. Sure I can look over that code and get some ideas. It was all Java 1.1 AWT and I did a conversion to 1.2 Swing at one point. Old stuff but highly optimized.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6664098521950518303?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6664098521950518303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/migcalendar-slow-progress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6664098521950518303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6664098521950518303'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/migcalendar-slow-progress.html' title='MigCalendar = slow progress'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-1571218513193143677</id><published>2011-12-19T14:49:00.001-06:00</published><updated>2011-12-19T14:49:18.703-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='app store'/><category scheme='http://www.blogger.com/atom/ns#' term='migcalendar'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='android market'/><title type='text'>New application version out on both Markets on to MigCalendar</title><content type='html'>I finished up the latest release for both Android and iOS and QA accepted it as ready to release on Friday. I submitted it to the Android Market where it appeared nearly instantly. To my surprise it appeared in the Apple App Store on Sunday - I got an email from Apple on its updated status. I did not think they actually worked over the weekend. This is the second time it appeared two calendar days after submission.&lt;br /&gt;&lt;br /&gt;Based on activity they just gave it the illegal method check once over and let it go to the store as it is an update to an existing application that requires a login to use. It is only useful to our clients. It is not like we are selling it and forcing you to buy a login outside of the App Store so I don't think Apple gives a rip about what it does, if it leaks memory or how clients use it. I don't they even care if it follows their UI guidelines. As far as I know it is not doing anything out of the norm. I triple make sure I am not using any private API calls, run it through the leak detector as I add features and really the app is used to access our servers and get to the data the client owns and to send updates to the data as needed. I am very happy it went through the process quickly.&lt;br /&gt;&lt;br /&gt;Now that everything is out of beta we can turn on access at our server level and let the doctors have some real fun with the application. I am really curious to see how many installs we have for each platform and how much data traffic it generates. Doctors can take pictures of the medical paperwork on site so we should start to see images flying about soon enough. Well I won't see the images, I don't look at live medical records, but I can see file sizes and what not from the log files.&lt;br /&gt;&lt;br /&gt;We will await feedback from the clients before we plan the next release. I have some items I would love to add to the program but if no user requests them it is better to work on the real needs and not my guesses. This means I am on break from the mobile side of things for a bit. Good thing to happen just before the holiday season.&lt;br /&gt;&lt;br /&gt;I will be working on our front office appointment scheduling program. It makes heavy use of MigCalendar. I have messed around with that a bit but am a total novice. The original developer is not here so I will have to figure out most of it on my own. MigCalendar is a bit of an odd bird. Things are stored in statics that I don't feel belong there. The API is very powerful but not easy to understand. I started work on this a few months back and made a lot of notes so I am reviewing those and diving into the code. Various object constructors have numerous parameters which can get hard to follow.&lt;br /&gt;&lt;br /&gt;Our current UI is lacking in usability. There is a tabbed interface but the tabs are really just controlling what is visible in the calendar. There are two buttons inside each tab that control the filtering operations. I am converting these into a combobox with 4 items mirroring the tab / button combinations listed above. This gives more vertical room in the UI and gets rid of a tab that is not really a tab and buttons that toggle but don't. It allows me to add more root + filter modes in the future and cleans up the code nomenclature as the buttons were namee after their functionality in the first tab which has no relationship to what they do in the second tab. It also leaves one instance of MigCalendar running instead of two. Yes, this whole application was in dire need of help.&lt;br /&gt;&lt;br /&gt;Can't say I am looking forward to getting this all up and running again. One of those projects you just want to scrape and start from scratch. I feel like it should appear on "Extreme Code Makeover" and we should blow up a computer with C4 while some dude with OCD runs around screaming. Once I get over the initial learning curve it should not be too bad. Of course once it starts working like it should more requests will come in and I will be tagged as "the guy" that knows the appointment stuff. Since I am taking off the last week of the year I also get a chance to forget most of what I figure out this week. Nothing like starting over twice in a few weeks period.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-1571218513193143677?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/1571218513193143677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-application-version-out-on-both.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1571218513193143677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1571218513193143677'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-application-version-out-on-both.html' title='New application version out on both Markets on to MigCalendar'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-796519735238292495</id><published>2011-12-15T14:48:00.001-06:00</published><updated>2011-12-15T14:48:19.976-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lint'/><category scheme='http://www.blogger.com/atom/ns#' term='ADT 16'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>New ADT 16 includes Lint - very nice</title><content type='html'>Grabbed the new Android ADT version 16 and it includes Lint. I like to keep my code as clean as possible so I found this very useful. My initial warning list was 374 items which can seem a bit scary. I have knocked that down to 252 items doing some very simple things. All of the information provided by Lint is useful but not all of it is something you must fix.&lt;br /&gt;&lt;br /&gt;I have some strings that are hard coded in my XML files. They say things like&lt;span style="color: orange;"&gt; "date placeholder"&lt;/span&gt; and the like. I have them to help me visualize things when I am using the preview window. Actual values will be filled in at run-time. There are also a lot of &lt;span style="color: red;"&gt;"Missing contentDescription attribute on image"&lt;/span&gt;. I might just shut this one off. This program is used by doctors. Being visually disabled pretty much means they can't do their job. I don't need to support that functionality in this project.&lt;br /&gt;&lt;br /&gt;I was able to cleanup some &lt;span style="color: red;"&gt;"useless layout"&lt;/span&gt; issues. I converted single row table layouts to liner layouts. I was setting the background color and cache color hint in a lot of my XML files. It recommended using a theme instead as everything was getting painted twice - once with the them background color and then with my override color. I set up an application level theme in the manifest to solve that problem. It also forced me to define the background color in the &lt;span style="color: cyan;"&gt;style.xml &lt;/span&gt;file so I did a quick search across all XML files and updated them to use the define. I can now change the color in one place and have the entire app use it. I should have done it this way from the start but somehow cut and paste seems more fun than doing it right when you are in a hurry. We are hitting final QA cycle and I want things to be as clean as possible meaning this was a good time to fix past oversights.&lt;br /&gt;&lt;br /&gt;I still have a couple of &lt;span style="color: red;"&gt;"children can be replaced by one &lt;textview&gt; and a compound drawable."&lt;/textview&gt;&lt;/span&gt; items to clean up. That will involve code changes and not just XML changes as the image in font of the text changes at run-time depending on the status of the item. Makes sense to use the &lt;span style="color: cyan;"&gt;setCompoundDrawables&lt;/span&gt; instead of having two controls in a &lt;span style="color: cyan;"&gt;LinearLayout&lt;/span&gt; when the &lt;span style="color: cyan;"&gt;TextView &lt;/span&gt;already has full support for that. I will probably wait to change those for the next release as I could find subtle issues to work around since I have not used this particular functionality in a layout used for table rows.&lt;br /&gt;&lt;br /&gt;It is highly recommended that you grab the latest ADT and see what warnings it has in store for you. Between the new Lint and the utility I wrote to scan my project for orphan resources I am feeling pretty darn good about the next release. QA has not found any issues in a few days so it looks like we will ship in the next few business days and allow our clients to enjoy all the new functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-796519735238292495?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/796519735238292495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-adt-16-includes-lint-very-nice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/796519735238292495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/796519735238292495'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-adt-16-includes-lint-very-nice.html' title='New ADT 16 includes Lint - very nice'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5567226629468296948</id><published>2011-12-14T11:29:00.000-06:00</published><updated>2011-12-14T11:33:32.257-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='low memory'/><category scheme='http://www.blogger.com/atom/ns#' term='viewdidunload'/><category scheme='http://www.blogger.com/atom/ns#' term='didreceivememorywarning'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='viewdidload'/><category scheme='http://www.blogger.com/atom/ns#' term='management'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>A better understanding of iOS memory management</title><content type='html'>I got a free eBook called "Objective-C Fundamentals" from Manning. Chapter 9 covers memory management, something we all love. While I have read various things about &lt;span style="color: cyan;"&gt;viewDidLoad viewDidUnload&lt;/span&gt; and &lt;span style="color: cyan;"&gt;didReceiveMemoryWarning&lt;/span&gt; I had not tied them all together. Since my app can get into low memory conditions when using the camera reading this chapter gave me a better understanding of things. It was time to tackle this beast.&lt;br /&gt;&lt;br /&gt;The home screen in the app consists of 6 images the user can press. Below those images are labels and behind all of that are shelves that the images sit on. The labels are pasted onto the shelf front. Pretty basic stuff but the images can be large on the iPad or retina iPhone so we need to be a good neighbor and throw them away during low memory conditions.&lt;br /&gt;&lt;br /&gt;First mistake I was making - loading all the images in the init method. I should load things in viewDidLoad. I moved all that code which was easy enough.&lt;br /&gt;&lt;br /&gt;Second mistake - thinking &lt;span style="color: cyan;"&gt;viewDidLoad&lt;/span&gt; and &lt;span style="color: cyan;"&gt;viewDidUnload&lt;/span&gt; are called in pairs. Gee, the names sure lead you to believe that will happen but it does not. Apple added viewDidUnload support in iOS 3.0 but did not add pair calling code. Since this view in my app is not using an XIB because I totally change the layout between portrait and landscape I don't get &lt;span style="color: cyan;"&gt;viewDidUnload&lt;/span&gt; support even when I call &lt;span style="color: cyan;"&gt;self.view = nil&lt;/span&gt; in &lt;span style="color: cyan;"&gt;didReceiveMemoryWarning&lt;/span&gt;. If I set it to null then I will get multiple &lt;span style="color: cyan;"&gt;viewDidLoad&lt;/span&gt; calls but never a &lt;span style="color: cyan;"&gt;viewDidUnload&lt;/span&gt; call.&lt;br /&gt;&lt;br /&gt;Here is what happens:&lt;br /&gt;&lt;br /&gt;Initial view appears&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: cyan;"&gt;viewDidLoad&lt;/span&gt; is called&lt;br /&gt;As I go back and forth between the Home view and other views - no other calls made.&lt;br /&gt;Go to a view off the home view (home view not visible at this point)&lt;br /&gt;Force low memory condition in simulator&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: cyan;"&gt;didReceiveMemoryWarning&lt;/span&gt;&amp;nbsp;is called&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I set &lt;span style="color: cyan;"&gt;self.view = nil&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I thought &lt;span style="color: cyan;"&gt;viewDidUnload&lt;/span&gt; would be called - it is not&lt;br /&gt;&amp;nbsp; &amp;nbsp;Hit "back" button on second view&lt;br /&gt;&amp;nbsp; &amp;nbsp;Home view becomes visible&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: cyan;"&gt;viewDidLoad&lt;/span&gt; is called on Home View&lt;br /&gt;&lt;br /&gt;Since I am not using an XIB file I have to do all my memory clean up in the &lt;span style="color: cyan;"&gt;didReceiveMemoryWarning&lt;/span&gt; call. It all works fine now and running the memory leak detector shows all is good.&lt;br /&gt;&lt;br /&gt;I can tell things are working because the images "fly" into place when the view first appears or you rotate the device. First time up they fly from 0,0 to their spot on the shelf. Toggle back and forth between the Home view and another view and they don't fly as they were already in right spot. Toggle to second view, force low memory condition and return to Home view and they fly back in place again. Of course I put in breakpoints to verify all the calls are being done in order too.&lt;br /&gt;&lt;br /&gt;The app is being a good citizen. Things are loading in the correct methods. Memory is being dumped in the correct methods. Now if only the methods were actually called in pairs to avoid all this confusion. Such is life when you don't use Interface Builder and IBOutlets due to your interface being different between portrait and landscape. I run 3 shelves in a 2x3 layout in portrait and 2 shelves in a 3x2 layout in landscape.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5567226629468296948?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5567226629468296948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/better-understanding-of-ios-memory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5567226629468296948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5567226629468296948'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/better-understanding-of-ios-memory.html' title='A better understanding of iOS memory management'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7047639751835144023</id><published>2011-12-12T15:17:00.002-06:00</published><updated>2011-12-13T13:31:15.790-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='files'/><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='dead'/><category scheme='http://www.blogger.com/atom/ns#' term='unreferenced'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>First OSX Utility - find unreferenced image files</title><content type='html'>Today I wrote my first OSX application. I have been writing iPhone apps in Objective C but I had not done an OSX application. I needed a utility to tell me what image files were unreferenced in my iOS project so I can remove them and clean things up.&lt;br /&gt;&lt;br /&gt;Started out with a base OSX Application in Xcode. Added some basic fields to the XIB file - Directory name, [Browse...] button, [Find Issues] button and a text area to show the results.&lt;br /&gt;&lt;br /&gt;Next I figured out how to browse for a single directory and get the URL back. Take that URL and do a recursive search for all other directories. In each directory find image files using an image extension list and file all code files (*.m, *.h).&lt;br /&gt;&lt;br /&gt;Once all the file information is available start looking in the *.xib, *.h and *.m code for images either by NSResourceName, extension or by imageNamed: as that call will automatically look for PNG files. As we find references in code increment the image name reference. I have code to ignore commented out lines and blocks of code although the block indicator needs to start the line not be buried within a line at this time.&lt;br /&gt;&lt;br /&gt;At the end of the run it builds a string of all orphan image files (those without reference in code) and populates the text area with the list. This leaves some false positives for icons that you need to publish the app but those are pretty easy to ignore at this point.&lt;br /&gt;&lt;br /&gt;I added a progress indicator as the program run can take a few seconds to run, clean up of the menu system to show only valid items, update the about dialog text and adding a real program icon.&lt;br /&gt;&lt;br /&gt;Finally I added a check for {name}.png / {name}@2x.png to show what missing retina images or orphan retina images you happen to have. I found eight images that I had not done a retina version of so this was a handy validation. I also found an image that was not being used and was being referenced from an unrelated directory.&lt;br /&gt;&lt;br /&gt;This does find false positives but mainly on the numerous icon files you need for all iOS device flavors. I might need to add another text field for you to type in "files that start with {string}" to ignore but only people who are OCD enough to crave an error free run would care. Everyone else will go "yeah, forget those" and move on.&lt;br /&gt;&lt;br /&gt;I am using some code I found thanks to Stack Overflow to read basic text files a line at a time. Totally surprised, although at this point I should not be, that is missing from the core library. So odd to me how many very basic things are missing from the iOS / OSX SDK. It still appears that Apple likes to add new API areas but not make existing API calls better.&lt;br /&gt;&lt;br /&gt;My overall understanding of Xcode / XIB files / Objective C put the whole project in at under a day. I learned how to&amp;nbsp;query for a directory,&amp;nbsp;roll through a directory structure, read lines from a text file and do widget anchoring in XIB so my window resizes / relayouts out controls as expected.&lt;br /&gt;&lt;br /&gt;At this point the program is not as powerful as the Java version I wrote for Android project validation. On the Android side I can check images, strings, layouts, animations, etc. and I don't have any false positives as all my icons are referenced in one of my XML files. For OSX I am making a bit more of a guess about the code to see if you are using an image. The utility will help me do this round of clean up and will keep it clean as time goes on. I really wish the SVN integration with Xcode was better. I know I can delete the file from the project but it does not delete it from SVN. I will have to manually clean that up or do the work under AppCode from Jetbrains as it does full integration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7047639751835144023?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7047639751835144023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/first-osx-utility-find-unreferenced.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7047639751835144023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7047639751835144023'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/first-osx-utility-find-unreferenced.html' title='First OSX Utility - find unreferenced image files'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6080506502156682127</id><published>2011-12-09T14:25:00.001-06:00</published><updated>2012-01-13T15:39:51.740-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='orphan'/><category scheme='http://www.blogger.com/atom/ns#' term='R.java'/><category scheme='http://www.blogger.com/atom/ns#' term='resource'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>New Android Utility - find orphan references</title><content type='html'>I decided to write a new utility to help clean up my Android project. It is a simple Java command line only program, no JFrame / no GUI, that takes a base directory as its only parameter. From that it builds a list of all sub-directories (ignoring .svn directories) then finds the Android generated R.java file.&lt;br /&gt;&lt;br /&gt;R.java is parsed based on "public static final class" and "public static final int" to build a list of ID strings.&lt;br /&gt;&lt;br /&gt;Each .JAVA and .XML file is then scanned in the directory tree looking for resource IDs in their various formats such as @string/ in XML or R.string. in Java. The reference count is incremented. At the end of the run I print out all the items that have a reference count of zero. I was able to clear up a dozen strings, a couple of layouts and 10 images from the project. Strings and layouts don't amount to much but images sure can when it comes to download size. Some of the images were in multiple directories to handle various Android sizes. Getting rid of layouts is always good as you might open one, edit it a bunch, the find out you edited something that is never used. Killing a layout might kill other image and string references too.&lt;br /&gt;&lt;br /&gt;I wrote something similar to this at a previous job to find orphan strings before we sent the Java and C++ programs out to be localized. That saved us from paying money to localize a string that was never used in the program. I also checked for orphan images against the Java code and some other orphan resources against the C++ code. It would be nice if this was just built into Eclipse.&lt;br /&gt;&lt;br /&gt;Now I need to do something similar for the iOS side. It will not be as straight forward as the images are directly referenced in the code as string names and I need to add a special check for @2x images to make sure they have a non-retina mate. I guess this would be a good time for me to write my first non-iPhone based Objective C program. Might put a GUI around it with a [Browse..] button to pick the directory and a list control to show the results. Seems to be cheating to write just a command line program on the Mac.&lt;br /&gt;&lt;br /&gt;I want to run the program a few more times against various XML / Java code formats before I release it to the wild. It appears to work like a champ against the code I write but I am the only author and follow a consistent code format which does not make for a well rounded test. I kept getting false positives until I tweaked various bits of the parser. Trust but Verify was the rule until the final run when it was 100% accurate for my coding style.&lt;br /&gt;&lt;br /&gt;Anyone have a big interest in this program and want to be a beta tester? Leave a comment and I can send you the source code (it is all of 288 lines in a single file) so you can see what you think and request improvements.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;** Update ** Code appears below for anyone to run and check out &lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:cpp"&gt;&lt;br /&gt;package org.peck;&lt;br /&gt;&lt;br /&gt;import java.io.BufferedReader;&lt;br /&gt;import java.io.File;&lt;br /&gt;import java.io.FileReader;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Simple command line program to find the R.java Android generated code and&lt;br /&gt; * look for orphan references against *.java and *.XML files  &lt;br /&gt; * &lt;br /&gt; * @author kevin.peck&lt;br /&gt; * @date December 9, 2011&lt;br /&gt; */&lt;br /&gt;public class AndroidResourceScan {&lt;br /&gt;    &lt;br /&gt;    private static List&amp;lt;String&amp;gt; directories = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;    private static List&amp;lt;RefInfo&amp;gt; references = new ArrayList&amp;lt;RefInfo&amp;gt;();&lt;br /&gt;    &lt;br /&gt;    private static List&amp;lt;XmlMapping&amp;gt; xmlMapping = new ArrayList&amp;lt;XmlMapping&amp;gt;();&lt;br /&gt;    &lt;br /&gt;    private static final String RESOURCE_FILE = "R.java";&lt;br /&gt;    private static final String CLASS_START = "public static final class";&lt;br /&gt;    private static final String ITEM_START = "public static final int";&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Android resource scanner&lt;br /&gt;     * &lt;br /&gt;     * Find and parse the R.java file and see if there items in that file&lt;br /&gt;     * that are not referenced in any *.java or *.xml files&lt;br /&gt;     * &lt;br /&gt;     * @param args  Arguments, base directory&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        if (args.length == 0) {&lt;br /&gt;            System.out.println("Android Resource Scan by Kevin Peck");&lt;br /&gt;            System.out.println();&lt;br /&gt;            System.out.println("Parse the Android generated R.java file then look");&lt;br /&gt;            System.out.println("for orphan references - any defined IDs that don't");&lt;br /&gt;            System.out.println("appear in a JAVA or XML file in same directory tree.");&lt;br /&gt;            System.out.println("Comment lines are ignore in all files");&lt;br /&gt;            System.out.println("NOTE: .svn directories are ignored.");&lt;br /&gt;            &lt;br /&gt;            System.out.println();&lt;br /&gt;            System.out.println("Usage: AndroidResourceScan {base path}");&lt;br /&gt;            return;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        xmlMapping.add(new XmlMapping("@string/", "R.string."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("@drawable/", "R.drawable."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("@color/", "R.color."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("@style/", "R.style."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("@id/", "R.id."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("@+id/", "R.id."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("@anim/", "R.anim."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("style name=\"", "R.style."));&lt;br /&gt;        xmlMapping.add(new XmlMapping("&amp;lt;attr name=\"", "R.attr."));&lt;br /&gt;        System.out.println("Scanning " + args[0] + " for R.java file");&lt;br /&gt;        buildDirTree(args[0]);&lt;br /&gt;        &lt;br /&gt;        boolean haveResFile = false;&lt;br /&gt;        File resFile = null;&lt;br /&gt;        for (String dirName : directories) {&lt;br /&gt;            resFile = new File(dirName + RESOURCE_FILE);&lt;br /&gt;            if (resFile.exists()) {&lt;br /&gt;                haveResFile = true;&lt;br /&gt;                break;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        if (!haveResFile || (resFile == null)) {&lt;br /&gt;            System.out.println("Unable to find " + RESOURCE_FILE + " in " + args[0] + " directory tree");&lt;br /&gt;            return;&lt;br /&gt;        }&lt;br /&gt;        System.out.println("Found resource file " + resFile.getAbsolutePath());&lt;br /&gt;        buildRefList(resFile.getAbsolutePath());&lt;br /&gt;        &lt;br /&gt;        System.out.println("Scanning JAVA files for references");&lt;br /&gt;        scanFiles();&lt;br /&gt;        &lt;br /&gt;        int orphanCount = 0;&lt;br /&gt;        System.out.println("Orphans found");&lt;br /&gt;        for (RefInfo refInfo : references) {&lt;br /&gt;            if (refInfo.refCount == 0) {&lt;br /&gt;                orphanCount++;&lt;br /&gt;                System.out.println(refInfo.name);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        System.out.println("total " + orphanCount);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Scan the directory tree .java and .XML files &lt;br /&gt;     * Send them to proper parser as found&lt;br /&gt;     */&lt;br /&gt;    private static void scanFiles() {&lt;br /&gt;        for (String dir : directories) {&lt;br /&gt;            File fDir = new File(dir);&lt;br /&gt;            String [] files = fDir.list();&lt;br /&gt;            for (String fileName : files) {&lt;br /&gt;                if (fileName.endsWith(".java")) {&lt;br /&gt;                    scanJavaFile(dir + '/' + fileName);&lt;br /&gt;                } else if (fileName.endsWith(".xml")) {&lt;br /&gt;                    scanXmlFile(dir + '/' + fileName);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Open a java file and scan it for R. references&lt;br /&gt;     *  &lt;br /&gt;     * @param fileName&lt;br /&gt;     */&lt;br /&gt;    private static void scanJavaFile(String fileName) {&lt;br /&gt;        BufferedReader reader;&lt;br /&gt;        try {&lt;br /&gt;            reader = new BufferedReader(new FileReader(fileName));&lt;br /&gt;            String line;&lt;br /&gt;            boolean inComment = false;&lt;br /&gt;            &lt;br /&gt;            while ((line = reader.readLine()) != null) {&lt;br /&gt;                line = line.trim();&lt;br /&gt;                if (inComment &amp;&amp; line.endsWith("*/")) {&lt;br /&gt;                    inComment = false;&lt;br /&gt;                } else if (!inComment &amp;&amp; line.startsWith("/*")) {&lt;br /&gt;                    inComment = true;&lt;br /&gt;                } else if (!line.startsWith("//")) {&lt;br /&gt;                    int iStart = line.indexOf("R.");&lt;br /&gt;                    while (iStart != -1) {&lt;br /&gt;                        if (iStart != 0 &amp;&amp; " (=".indexOf(line.charAt(iStart - 1)) != -1) {&lt;br /&gt;                            int iEnd = iStart;&lt;br /&gt;                            while (iEnd &amp;lt; line.length() &amp;&amp; " ,);".indexOf(line.charAt(iEnd)) == -1) {&lt;br /&gt;                                iEnd++;&lt;br /&gt;                            }&lt;br /&gt;                            String refName = line.substring(iStart, iEnd);&lt;br /&gt;                            for (RefInfo refInfo : references) {&lt;br /&gt;                                if (refInfo.name.equals(refName)) {&lt;br /&gt;                                    refInfo.refCount++;&lt;br /&gt;                                    break;&lt;br /&gt;                                }&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;                        iStart = line.indexOf("R.", iStart + 1);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            reader.close();&lt;br /&gt;        } catch (IOException exp) {&lt;br /&gt;            exp.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Scan XML file looking for XML mapped entries&lt;br /&gt;     * &lt;br /&gt;     * @param fileName  Name of file to scan&lt;br /&gt;     */&lt;br /&gt;    private static void scanXmlFile(String fileName) {&lt;br /&gt;        BufferedReader reader;&lt;br /&gt;        try {&lt;br /&gt;            reader = new BufferedReader(new FileReader(fileName));&lt;br /&gt;            String line;&lt;br /&gt;            &lt;br /&gt;            while ((line = reader.readLine()) != null) {&lt;br /&gt;                line = line.trim();&lt;br /&gt;                if (!line.startsWith("&amp;lt;!--")) {&lt;br /&gt;                    for (XmlMapping xmlMap : xmlMapping) {&lt;br /&gt;                        int iStart = line.indexOf(xmlMap.xmlName);&lt;br /&gt;                        if (iStart != -1) {&lt;br /&gt;                            int iEnd = iStart + xmlMap.xmlName.length();&lt;br /&gt;                            while (iEnd &amp;lt; line.length() &amp;&amp; " \"&amp;gt;&amp;lt;".indexOf(line.charAt(iEnd)) == -1) {&lt;br /&gt;                                iEnd++;&lt;br /&gt;                            }&lt;br /&gt;                            String refName = xmlMap.resName + line.substring(iStart + xmlMap.xmlName.length(), iEnd).trim();&lt;br /&gt;                            for (RefInfo refInfo : references) {&lt;br /&gt;                                if (refInfo.name.equals(refName)) {&lt;br /&gt;                                    refInfo.refCount++;&lt;br /&gt;                                    break;&lt;br /&gt;                                }&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            reader.close();&lt;br /&gt;        } catch (IOException exp) {&lt;br /&gt;            exp.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Build directory tree based on a root node&lt;br /&gt;     *&lt;br /&gt;     * @param baseDir  Root node to scan for sub directories&lt;br /&gt;     */&lt;br /&gt;    private static void buildDirTree(String baseDir) {&lt;br /&gt;        String topDir = baseDir;&lt;br /&gt;        if (!topDir.endsWith("/") &amp;&amp; !topDir.endsWith("\\")) {&lt;br /&gt;            topDir += "/";&lt;br /&gt;        }&lt;br /&gt;        File fDir = new File(topDir);&lt;br /&gt;        if (fDir.isDirectory()) {&lt;br /&gt;            directories.add(topDir.replace("//", "/"));&lt;br /&gt;            String [] files = fDir.list();&lt;br /&gt;            for (String fileName : files) {&lt;br /&gt;                String subDir = topDir + '/' + fileName;&lt;br /&gt;                File testDir = new File(subDir);&lt;br /&gt;                if (testDir.isDirectory() &amp;&amp; !subDir.contains("/.svn")) {&lt;br /&gt;                    buildDirTree(subDir);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Build a list of public static final class references found in given file&lt;br /&gt;     * &lt;br /&gt;     * @param fileName  Name of file to process ({path}/R.java)&lt;br /&gt;     */&lt;br /&gt;    private static void buildRefList(String fileName) {&lt;br /&gt;        BufferedReader reader;&lt;br /&gt;        try {&lt;br /&gt;            reader = new BufferedReader(new FileReader(fileName));&lt;br /&gt;            String line;&lt;br /&gt;            String className = "";&lt;br /&gt;            boolean inComment = false;&lt;br /&gt;            boolean inClass = false;&lt;br /&gt;            &lt;br /&gt;            while ((line = reader.readLine()) != null) {&lt;br /&gt;                line = line.trim();&lt;br /&gt;                if (inComment &amp;&amp; line.endsWith("*/")) {&lt;br /&gt;                    inComment = false;&lt;br /&gt;                } else if (!inComment &amp;&amp; line.startsWith("/*")) {&lt;br /&gt;                    inComment = true;&lt;br /&gt;                } else if (!line.startsWith("//")) {&lt;br /&gt;                    if (!inClass &amp;&amp; line.startsWith(CLASS_START)) {&lt;br /&gt;                        className = line.substring(CLASS_START.length()).trim();&lt;br /&gt;                        if (className.endsWith("{")) {&lt;br /&gt;                            className = className.substring(0, className.length() - 2);&lt;br /&gt;                        }&lt;br /&gt;                        inClass = true;&lt;br /&gt;                    } else if (inClass) {&lt;br /&gt;                        if (line.startsWith(ITEM_START)) {&lt;br /&gt;                            int nameEnd = line.lastIndexOf('=');&lt;br /&gt;                            if (nameEnd != -1) {&lt;br /&gt;                                references.add(new RefInfo("R." + className + '.' + line.substring(ITEM_START.length() + 1, nameEnd)));&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;                        if (line.endsWith("}")) {&lt;br /&gt;                            inClass = false;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            reader.close();&lt;br /&gt;        } catch (IOException exp) {&lt;br /&gt;            exp.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * XML to Resource format mapping &lt;br /&gt;     */&lt;br /&gt;    static class XmlMapping {&lt;br /&gt;        public String xmlName;&lt;br /&gt;        public String resName;&lt;br /&gt;        &lt;br /&gt;        public XmlMapping(String xmlName, String resName) {&lt;br /&gt;            this.xmlName = xmlName;&lt;br /&gt;            this.resName = resName;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Resource name and reference count (all we care about is count != 0) &lt;br /&gt;     */&lt;br /&gt;    static class RefInfo {&lt;br /&gt;        public String name;&lt;br /&gt;        public int refCount;&lt;br /&gt;        &lt;br /&gt;        public RefInfo(String name) {&lt;br /&gt;            this.name = name;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Feel free to report any bugs you find back to me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6080506502156682127?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6080506502156682127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-android-utility-find-orphan.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6080506502156682127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6080506502156682127'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-android-utility-find-orphan.html' title='New Android Utility - find orphan references'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8837242700371857365</id><published>2011-12-07T07:47:00.001-06:00</published><updated>2011-12-08T10:54:56.162-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CMOS reset'/><category scheme='http://www.blogger.com/atom/ns#' term='gigabyte'/><category scheme='http://www.blogger.com/atom/ns#' term='build'/><category scheme='http://www.blogger.com/atom/ns#' term='i5'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='fan only'/><category scheme='http://www.blogger.com/atom/ns#' term='single beep'/><title type='text'>New machine built - data xfer time</title><content type='html'>I built a new machine as an early Christmas present for both my son and I over the past couple of days. My son helped me build it which was a cool experience for him. He is getting my current machine as a nice upgrade. His older AMD machine has been having all sorts of issues from not wanting to boot to booting but then not seeing the NIC or having the sound be bad. It could be a flaky power supply but I was due an upgrade anyway. Since I program for a living a 5 year old machine running a 32bit OS was starting to show its age.&lt;br /&gt;&lt;br /&gt;It was a fun experience for him. I have a feeling we are not very far off from never building again so he may never use these skills. I looked for a pre-built box just to avoid the potential build headaches but could not find anything set up the way I wanted for a good price. If the price was good it was some crappy brand. If the parts were good it was $350-$500 more than the parts. I also drive a manual transmission. Cars and computers are like my coding - closer to the bare metal that many like to go. I write custom controls and never shy away from writing gut level code.&lt;br /&gt;&lt;br /&gt;Here is the configuration&lt;br /&gt;&lt;br /&gt;Intel Core i5 2500K&lt;br /&gt;Thermaltake TR2 RX 750W Modular Power Supply&lt;br /&gt;Samsung 22X DVD‘RW Burner with Dual Layer Support&lt;br /&gt;Gigabyte GA-Z68XP-UD3 LGA 1155 Z68 ATX Intel Motherboard&lt;br /&gt;Sentey Extreme Division Optimus GS-6000R Mid Tower&lt;br /&gt;OCZ Technology Vertex 3 Series VTX3-25SAT3-120G&lt;br /&gt;Zotac ZT-50303-10M GTX 560 Ti Overclocked 1024MB&lt;br /&gt;ASUS Xonar DG 5.1 PCI Sound Card&lt;br /&gt;Corsair 8GB DDR3-1600 (PC3-12800)&lt;br /&gt;&lt;br /&gt;I went i5 instead of i7 after seeing in various websites that the i5 is a better gaming CPU due the hyperthreading getting in the way on the i7. I am not one of those "must have the top of everything" guys. I want a system that is stable and comes at a reasonable price. This is also why I did not get the $600 video card or the $1,200 dual video card set up. I bought all of it at the local MicroCenter. I normally order off NewEgg but they had a very limited processor selection and the price was higher than just picking it up local. NewEgg were cheaper on the sound card and DVD player but only by a few bucks. I just wanted to get it all at the same time ready to build.&lt;br /&gt;&lt;br /&gt;I did go with a sound card even though the MB has built in sound. I have never been super impressed with motherboard sound and research shows the ASUS $30 to be a nice upgrade for a really good price. It is the 5.1 card, not 7.1, but I have a 5.1 setup I am happy with so it was the proper fit.&lt;br /&gt;&lt;br /&gt;The SSD was a bit of a splurge. I have SSD at work and it is so nice to boot quickly and move right along after that. I am also moving over a normal HD to this setup to store music, images, etc. The case has a ton of fans but they are all pretty large and spinning slowly making the setup very quiet. The sound of a HD spinning is so familiar this just seems like it is not working at all. Guess I will even hear more of my game sounds when I get the chance to play.&lt;br /&gt;&lt;br /&gt;Once it burns in for a few days I will fill out all the rebate paperwork and get that sent off. I hate rebates but I do have $100 coming back to me so it will be worth filling it out. I also need to download&amp;nbsp;Assassin's Creed Brotherhood which I got for free with the video card.&lt;br /&gt;&lt;br /&gt;I installed Win7 Ultimate 64bit and the Windows Experience comes to 7.5 with 7.8 being the highest and everything pretty much in that zone. Install was quick from DVD to SSD and boot time is faster than any machine I have ever used.&lt;br /&gt;&lt;br /&gt;The build had two difficult areas. One was getting the stinking CPU cooling fan to seat properly. Seems I could get 3 corners in and have one pop out. The second was getting it to boot. Initially fans would kick on, single beep from post and then no video. I tried all sorts of things and gave up for the night thus making this a two day build. Finally used a screwdriver to short the CMOS jumper and then it booted. Not sure what in CMOS / BIOS was so annoyed it needed a reset especially since this is a brand new board and setup but that worked.&lt;br /&gt;&lt;br /&gt;I turned off on-board sound in BIOS then watched the CPU health for a bit. CPU temp kept climbing so I shut it down and reseated the CPU fan again. Fired it up and CPU stayed at 45C for 20 minutes so I was happy and did the OS install.&lt;br /&gt;&lt;br /&gt;I copied various files over from my server, installed updated video, sound and MB drivers along with Java and Eclipse. I still have a ton of other work to do to get it all in shape. I need to pull the HD out of my son's original machine and put it in my old machine so he can copy over files as he needs them. He will get to reinstall some of his games too. I did a backup of my Steam games and will move that over.&lt;br /&gt;&lt;br /&gt;The new MB does not have IDE on it and I was planning on moving my secondary IDE drive into this machine. Guess I need a IDE / SATA adapter to do that. Right now all HD prices are up due to flooding so I hate to buy a SATA drive when I have usable drives to store music and what not. They might not be super new, fast and shiny but they spin up and hold data. I have access to what I need on our shared server drive so it is not a critical item but I hate to get in and out of the case too many times. I need to go in again to route power supply cables in a cleaner manner at the very least.&lt;br /&gt;&lt;br /&gt;Going to be a number of days / weeks before I figure out everything I am missing. Always some utility you use rarely but need from time to time. Since my old machine is just going to my son and we are not reformatting it I will be able to move across anything I need with ease. That machine has dual HD right now so I will copy over everything I can think of from one drive to the other and put that drive in my new machine then put his old drive in there as his D: drive so he has access to his stuff.&lt;br /&gt;&lt;br /&gt;Now I am ready to play some new games to see how this thing really works. I have Gears of War that I got for $20 a long time back. It always stuttered on the old box so I could never get into playing it. Now it should run just fine. Might be the first thing I install to prove this new beast was worth it.&lt;br /&gt;&lt;br /&gt;Means I wont have much to open under the tree this year but really the holidays are all about watching other people open stuff you bought them. Shame I did not have the new setup over Thanksgiving when I got a second copy of Portal 2 during the Steam sale. My son and I played the co-op all day long finishing all levels. Near the end his machine would not show where the white goo was on the level so he could not place portals. My machine did things just fine. Could be a reboot of his machine would have kicked it in, could be his flaky machine would have never worked or his video card was just too old or memory shy to every handle it. He is so ready to play single player Portal 2 on a "real" machine that getting him to do homework is going to be rough. When daddy gets a new machine everyone wins.&lt;br /&gt;&lt;br /&gt;* UPDATE *&lt;br /&gt;Did a ton of data transfer last night. I now have my backed up Steam games installed (overnight process) and am downloading my free copy of Assassin's Creed Brotherhood today as it refused to accept $0.00 payment last night but did allow it this morning following exact same steps.&lt;br /&gt;&lt;br /&gt;I have my son's old IDE drive in his new / my old machine and I copied over all his documents to the C: drive. As he reinstalls games we will move over the save game data from that drive and eventually we will remove it from the system as it is a waste of power to spin it up. I set up a new account for him and left my account so I can copy up to the network if I would happen to need something I forgot over there.&lt;br /&gt;&lt;br /&gt;There were two IDE DVD drives in the case but only one is set to run right now as I stole the other IDE channel for the old HD. He is running without a burner at this point but with a slot load reader. Lets him install games but I need to get the burner back in place so he can burn videos and other school projects in the future. Of course we can burn them from the server, my wife's laptop, my machine or my other son's laptop meaning it is a hassle but not a big deal.&lt;br /&gt;&lt;br /&gt;I installed Gears of War. It would not run saying I had a modified EXE. I installed the patch and it ran but it will not let me leave the video set up screen. I assume it is a Win7 64bit issue but gave up and went to bed instead of trying over and over. I will try a Steam game tonight but the ones I have use the old source engine so I doubt they show off the graphics card. I need to break down and by Skyrim but I really want it to go on sale. I have never paid $60 for a game and hate to start now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8837242700371857365?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8837242700371857365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-machine-built-data-xfer-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8837242700371857365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8837242700371857365'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/new-machine-built-data-xfer-time.html' title='New machine built - data xfer time'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6000697784271878180</id><published>2011-12-01T12:42:00.001-06:00</published><updated>2011-12-01T13:06:05.090-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='imageView'/><category scheme='http://www.blogger.com/atom/ns#' term='decodefile'/><category scheme='http://www.blogger.com/atom/ns#' term='images'/><category scheme='http://www.blogger.com/atom/ns#' term='bitmapfactory'/><category scheme='http://www.blogger.com/atom/ns#' term='out of memory'/><category scheme='http://www.blogger.com/atom/ns#' term='MAT'/><category scheme='http://www.blogger.com/atom/ns#' term='viewer'/><category scheme='http://www.blogger.com/atom/ns#' term='recycle'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='setImageBitmap'/><title type='text'>Android Out of Memory issues</title><content type='html'>The dreaded "Out of Memory error" with corresponding "Force Close" on your Android device is very frustrating. It was happening to our users from time to time but today I think I may have found the issue. I won't know for sure if this is a true fix until it is out in the field.&lt;br /&gt;&lt;br /&gt;I have a couple of ways to&amp;nbsp;acquire images in our app - you can take a picture with the camera or grab an existing image from the gallery. In either case I have to check out the image size and shrink it down to less than 1 meg of data via scaling, quality compression or both. It has to be less than 1 meg as I am holding the images in a SQLite blob to be sent to the server at a later time. I can't leave things in the gallery due to HIPAA rules and I can't trust the user to not delete the original image between pick it and transmit it time frames.&lt;br /&gt;&lt;br /&gt;You can also view the image at any time within my app using a viewer I wrote that allows pinch zoom, drag scrolling, rotation and fit to window functionality. This is where things started to go awry.&lt;br /&gt;&lt;br /&gt;If I opened and existing image, exited that activity then tried to capture an image from the camera there was a good chance I would get the out of memory issue. If I just took pictures but never viewed them or waited some amount of time before viewing them it might work just fine. This also depended on the device and version of the OS I was using. To find the issue I opened an image in the viewer then closed the viewer and did a heap dump via DDMS in Eclipse, converted that dump via &lt;span class="Apple-style-span" style="color: cyan;"&gt;hprof-conv&lt;/span&gt; in the android sdk\tools directory and loaded it up in MAT (memory analysis tool) under Eclipse. The &lt;span class="Apple-style-span" style="color: lime;"&gt;Dominator Tree&lt;/span&gt; showed the &lt;span class="Apple-style-span" style="color: lime;"&gt;ImageView&lt;/span&gt; of the closed activity to still be holding on to a weak referenced large bitmap. I guess the reference is not weak enough for the GC to kick it out of memory during the camera processing even though I was calling System.gc() before I started the camera bitmap manipulation.&lt;br /&gt;&lt;br /&gt;To solve the issue I added the following to the image viewing activity:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;* On the way out dump our images&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;@Override&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;protected void onDestroy() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; imageView.setOnTouchListener(null);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; imageView.setImageBitmap(null);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; System.gc();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; super.onDestroy();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now after hitting the back button from the image activity I don't have a large weak reference to an image floating about in the heap. I have been able to view, take pictures, view, lather, rinse, repeat without any issues. I was running these test on a ASUS Transformer tablet running OS 3.2.1&lt;br /&gt;&lt;br /&gt;I am also making sure I call &lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;recycle&amp;nbsp;&lt;/span&gt;on the bitmaps I use during my scale / quality reduction routines during the post camera processing.&lt;br /&gt;&lt;br /&gt;Probably a good idea to manually release any large images you use in your application as activities go away to avoid these problems. Right now I am not releasing all the smaller images I am using but it might be a good idea to make a sweep through the heap dump to see what else is sneaking around.&lt;br /&gt;&lt;br /&gt;Not sure if the &lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;System.gc()&lt;/span&gt; call is even necessary and I know they recommend you don't call it but at this point I can't see it hurting anything and I am only doing it on activity destroy so I am leaving it in there for good luck and hoping I don't hear of any more OOM crashes in the field.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6000697784271878180?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6000697784271878180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/android-out-of-memory-issues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6000697784271878180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6000697784271878180'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/12/android-out-of-memory-issues.html' title='Android Out of Memory issues'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8187023841688060419</id><published>2011-11-30T14:19:00.001-06:00</published><updated>2011-11-30T14:39:07.306-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='scopebar'/><title type='text'>iOS Scope Bar for searches</title><content type='html'>I was cheating a bit for searching in our app. There are two columns in many of the tables - Code and Description. Most of the time the Doctors would search on the code but occasionally they want to search on description to find something like "liver abscess". To keep screen space at a premium I had the hint text tell you to type a leading SPACE to search by description. Of course that is not totally obvious and many don't read the text.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When I hit the tablet side of things I did two search fields on the Android like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Code:&lt;/span&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt; [ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;&amp;nbsp;Description:&lt;/span&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt; [ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] &lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&amp;nbsp;[x]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could fill in one or the other and I blank the one you are not using. Works nicely and there is plenty of horizontal space in either portrait or landscape to pull that off. Codes are small so that entry field eats up less horizontal space.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the iOS side I am using the UISearchBar and it supports only one entry field. I was going to give up on doing the dual search on the iPad but then I discovered the scopeBar and associated methods on UISearchBar. You can set various button titles and that allows the user to toggle the type of search they are doing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It works and I have converted the code to use it but there is a bit of oddness to it. First the toggle buttons always appear below the search bar. It would be nice to move the buttons to the right of the search bar on the iPad as I only have two buttons in most cases and plenty of screen space. Might as well show more search results. This makes for some very long toggle buttons on the iPad.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Second you can toggle the search mode then tap to type the text but once you do that the toggle buttons are disabled. You have to cancel the search, change the toggle button, restart typing your search if you entered in the wrong mode. Seems this is all one control so why disable part of it?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To save space on the iPhone it would be nice if the toggle buttons only appeared after you invoked the typing of search text. Right now they waste a lot of screen space on that small screen for the ability to toggle which is probably not used very often.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally there is only one keyboard mode for the entire search bar. I want it to be in numeric mode if they are doing a Code search and in alpha mode if doing a Description search but I can't do that. If my search involves Code / Description instead of Last Name / First Name I start in numeric mode but they have to manually toggle back to alpha mode to type description. I covered the 95% case here but wish I could cover 100% instead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While initially I was happy with Apple for providing a generic search control I ended up frustrated due to its lack of flexibility. On the Android I started out thinking "Where is a generic search widget?" Implementing one was easy enough but I should not have needed to do that. I ended up with an exact layout for my needs and more flexibility in the end under Android. Typical programming issue that occurs when you are developing on multiple platforms.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8187023841688060419?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8187023841688060419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/ios-scope-bar-for-searches.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8187023841688060419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8187023841688060419'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/ios-scope-bar-for-searches.html' title='iOS Scope Bar for searches'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5836060491146239881</id><published>2011-11-29T14:58:00.001-06:00</published><updated>2011-11-29T15:01:21.273-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='sucks'/><category scheme='http://www.blogger.com/atom/ns#' term='crash'/><title type='text'>Xcode is still crappy</title><content type='html'>I keep crashing Xcode. I have an M file open and intellisense pops up. I do the three finger swipe to switch to the H file and it crashes. I lose the work since my last save. This happens at least once a week. So stop doing that the Doctor says. I switch between my PC using Eclipse and Xcode on the MacBook Pro multiple times per day.&lt;br /&gt;&lt;br /&gt;I don't remember crashing Eclipse in a long time. I just use the IDE and it works. Then I get on the Mac to convert over some Android code I just wrote and I forget it crashes and boom I crash it yet again. Would be nice for Apple to fix this one but I have doubts it will happen as Xcode does not get updated very often. Sure they tie in a new iOS release but the IDE itself does not change much.&lt;br /&gt;&lt;br /&gt;Just rebooted the Mac after an update install and crash, did not notice update was ready until Xcode died. Time to go back over and see how much of my work it lost this time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5836060491146239881?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5836060491146239881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/xcode-is-still-crappy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5836060491146239881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5836060491146239881'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/xcode-is-still-crappy.html' title='Xcode is still crappy'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-695129352591011877</id><published>2011-11-23T13:59:00.001-06:00</published><updated>2011-11-23T14:16:46.078-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='problem'/><category scheme='http://www.blogger.com/atom/ns#' term='memory leak'/><category scheme='http://www.blogger.com/atom/ns#' term='Java 29'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='WiFi'/><title type='text'>iOS 5.01 and WiFi - not happy</title><content type='html'>The iPad 2 I use for development and testing has been acting flaky. It is WiFi only and the connection comes at goes at will. I sit about 12' away from the wireless router. I had no issues at all until the 5.0x updates but since then it has been iffy at best. Searching the web and I found a lot of other people having the same issue. The Android tablet, also WiFi only, has had no issues.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On another Apple note the Java 1.6 update 29 caused us all sorts of memory leaks. Our clients could run our Java program on the Mac for about 15 minutes before running out of memory. No issues on the PC or Linux with update 29, just on the Mac. My boss dug into their bug fix and fixed their fix to release the objects properly and we are back in business. We checked in our overridden code to our project so our users are not hosed. Others on the web are complaining about this issue too.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am also able to crash Xcode 4 at will. Edit M file, have intellisense / code complete / whatever they call it pop-up, three finger swipe to got to the H file and crash city. I have used the reporting tool to send this off to Apple. Happens to me at least once a week. They tend not to release fixes to Xcode unless they are doing a new iOS release so I bet this is not fixed in the near future.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Low hopes of the Java bug being fixed soon either. It has been a long time for a Java update - going from 26 to 29 - so I bet this hangs out there for a long time too. We don't find Apple to be all that developer friendly so you just suffer along and know how to work around things.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Winding down the round of mobile app development. I pretty much have the two in sync again. Pushing a gig of code on both sides. I added long press to do some default actions. My graphic artist / Mac buddies find most users have no idea a long press exists so I made sure there is a way to get to same functionality via another part of the UI. I just consider the long press a short cut but once you get used to it being there you really like it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;User beta feedback has been very positive. Almost no bug reports, just feature requests. Some of the features make sense and I have been able to quickly add them. Some are borderline insane so they are on a "do it later if ever" list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I sat down and rethought the way I was doing favorites and got it working the same on both iOS and Android. Pretty happy with the final results and ready to see what the beta crowd thinks of it. I have also made some graphical tweaks to the new menu system to make it look better.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I cleaned up some bugs in the iToast code I got off the web to do Toast notifications on the iPhone. If I set the gravity to top or bottom it was not painting correctly in landscape mode - the mode I generally have the iPad in. I kind of cheated here. The Android Toast code handles multiple Toasts by queuing them up and showing them one at a time. The iOS version just painted them on top of each other. I was going to write the queue code and then found I could just set the screen position instead so I have the refresh message show up on the bottom of the screen and other messages in the middle. Avoids the overlap without a ton of work on my part. This only happens in one situation where you save a case and are coming back to the case list screen. One message is saying "Case Saved" and another "Case List Refreshed". No need to introduce complexity to solve one off needs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More than ready for the Thanksgiving break. Thus all the polish work for this short week. Might as well leave it in a very stable state so I don't think about it over vacation. I ran the memory leak detection of Xcode and cleaned up all the issues I found. Always good to run that from time to time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-695129352591011877?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/695129352591011877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/ios-501-and-wifi-not-happy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/695129352591011877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/695129352591011877'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/ios-501-and-wifi-not-happy.html' title='iOS 5.01 and WiFi - not happy'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3996002212353535408</id><published>2011-11-16T15:15:00.001-06:00</published><updated>2011-11-16T15:39:07.139-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sync'/><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='ui'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='nenu'/><title type='text'>Android / iOS sync continues</title><content type='html'>I sure thought I would be done with the next version of our application by this time but we came up with a number of new features to add before it leaves the Beta stage. I have been adding support for favorites so the Dr. can toggle which CPT / ASA / Diagnosis and other fields quickly just using the ones they use the most.&lt;br /&gt;&lt;br /&gt;One of the benefits of dual development is it forces you to look at problems from different angles. I had the favorites all set up on the Android side of things and the Beta clients for those devices have been using it and it appears liking it. What I did on the Android does not fit naturally on the iPhone as far as UI goes.&lt;br /&gt;&lt;br /&gt;First off I had to take some time to write a new menu system for iOS to emulate the one I am using for Android. After getting past the initial scare of creating a full blown custom menu under iOS it went rather smoothly. My draft version proved I could do a menu that pops up over another view - including tables - but the graphics design did not pan out well on an iPhone, it looked fine on the iPad. I took a step back and redesigned the menu GUI so it worked great on both device form factors in both orientations. This is a universal binary so the same code is running on both devices.&lt;br /&gt;&lt;br /&gt;Many tweaks later I have the menu system running in a lot of places in the UI. Without that I was not going to be able to pull of the favorites as designed. Here is where I ran into the next issue. I was using my menu in two ways on the Android to do&amp;nbsp;favorites, one menu to select a mode and one menu to select which items to be in the favorites list. This would not play well under iOS. I also had allow the user to control the font size under iOS and its current UI left something to be desired. After taking a step back, many head scratches and many pen scratches on paper I came up with a new single menu system that is much cleaner and easier for the user to grasp and solved the font sizing issue too. I just finished phase one of my implementation on iOS and am pretty happy with it. Now I have to convert those ideas back over to the Android which technically should not be difficult but will be time consuming as I have to touch a lot of code.&lt;br /&gt;&lt;br /&gt;Because I needed to make something work on the iPhone my Android users will have a better experience. This has happened in both directions as there are areas I wrote on the iPhone first and during my Android conversion I discovered better ways to accomplish the same thing. Some of it comes from just wanting to get something running but when you have to write the code a second time you think it through again and make it better. That has happened over and over during this process. I have deleted, modified and bug fixed a lot of code as I go back and forth between the two platforms. At times it feels like you are just spinning your wheels and will never get it all done. Heck it is not all done but I am in the home stretch.&lt;br /&gt;&lt;br /&gt;I often wonder what it would be like if there was another developer working on iOS. Would we be able to come up with ideas together that work well on both devices? If you don't code on both do you have blinders on for the one you don't code under? Is it better for one developer to hash out an idea and get a working prototype and then show it to the other so they can shoot holes in it and make it better? You could have each developer tackle a non-overlapping area then swap ideas. Working on the same area at the same time, unless you are following a foregone UI pattern, seems a waste of effort.&lt;br /&gt;&lt;br /&gt;There are a lot of "Oh man, I have to write this AGAIN!" moments when you are the sole mobile developer. At times you dread writing a tough hunk of code in another language using another IDE. Not sure if I am sold on the universal binary idea for iOS. Sure it beats a 2x version of your iPhone app on the iPad but Xcode / Interface Builder don't make is very easy to have NIB files per platform. It is easy to do on Android, just use same named XML files in different directories and everything is handled for you. I have a lot of IF checks for the iPad in the code already and am not looking forward to more of them. We might be getting close to the point of doing dual development there which would make my work load even more insane.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3996002212353535408?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3996002212353535408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/android-ios-sync-continues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3996002212353535408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3996002212353535408'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/11/android-ios-sync-continues.html' title='Android / iOS sync continues'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7709516680346430554</id><published>2011-10-25T08:31:00.000-05:00</published><updated>2011-10-25T08:31:09.650-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='datepicker'/><category scheme='http://www.blogger.com/atom/ns#' term='1970'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Fun with Android DatePicker and 1970</title><content type='html'>I was doing a new round of testing on our Android tablet. The application is used for medical information entry and one of the fields is date of birth. It has been working like a champ on the phones using 2.01, 2.2, 2.3 but on the tablet running 4.1 you could not enter anything before 1970. You could type in 1963 and it would set it back to 1970 and the [-] button would disappear.&lt;br /&gt;&lt;br /&gt;I totally get why it stops at 1970 as that is the epoch year used for all sorts of things in computers. Obviously the Android team changed a default in later versions of the SDK. My phone, running 2.2, allows you to go back to 1900.&lt;br /&gt;&lt;br /&gt;After some research I found a solution that works for all devices I have tested against. In my XML file I added &lt;span class="Apple-style-span" style="color: cyan;"&gt;android:startYear="1900"&lt;/span&gt; to my &lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;datepicker&gt; &lt;/datepicker&gt;&lt;/span&gt;definition. If you look in the latest documentation they discuss &lt;span class="Apple-style-span" style="color: cyan;"&gt;android:minDate&lt;/span&gt; but that is only available in later version of the SDK.&lt;br /&gt;&lt;br /&gt;Before I stumbled upon &lt;span class="Apple-style-span" style="color: cyan;"&gt;startYear&lt;/span&gt; I tried to use reflection to call the &lt;span class="Apple-style-span" style="color: cyan;"&gt;setMinDate(long)&lt;/span&gt; on the datepicker but I did not have any luck doing that. I am really happy that was not the solution. I would much rather use something in the XML that solves it on all platforms.&lt;br /&gt;&lt;br /&gt;Of course after I did this SVN got confused about a directory already being locked and would not allow me to check in the change. I found Team -&amp;gt; Cleanup in Eclipse solved that issue.&lt;br /&gt;&lt;br /&gt;Now that I have my new "set favorites" processing in place on the Android I need to convert all that work over to the iPhone / iPad. Research time as some of it just does not have a direct translation to iOS and while the menu system is possible on the iPad it is officially not supported on the iPhone so I am going to have to come up with a work around. The first menu system I found has caused apps to be rejected by Apple due to private method usage making it a non-option. Dual iOS / Android development has a lot of headaches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7709516680346430554?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7709516680346430554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/fun-with-android-datepicker-and-1970.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7709516680346430554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7709516680346430554'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/fun-with-android-datepicker-and-1970.html' title='Fun with Android DatePicker and 1970'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7636029490452885029</id><published>2011-10-19T14:23:00.001-05:00</published><updated>2011-10-20T13:32:05.249-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adt 14'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='broken'/><title type='text'>ADT 14 breaks Eclipse 3.7 - FIXED</title><content type='html'>Just to make sure my week goes as smoothly as possible I installed ADT 14 / SDK 14 for the new Android 4.0 build and now I can't build anything on my Win7 64bit box.&lt;br /&gt;&lt;br /&gt;First I installed the new SDK. Then I installed the new ADT after I got some errors. Now I just get an error that my project has errors but not a single window will tell me what the error happens to be. I installed the SDK from scratch and still have the same error. I installed a fresh version of &amp;nbsp;Eclipse 3.7, ADT 14 and SVN plug-ins and still have the same issue. I have run every update possible. Our bandwidth sucks right now so this is taking a really long time and I am getting really tired of experimenting. I will have to give this a try at home to see what happens there tonight.&lt;br /&gt;&lt;br /&gt;I did cleans before I did builds and did the Android -&amp;gt; Fix Project menu item but nothing will get me past the error message that I have a project error but nothing will tell me what the error is. Not a single file, other than the main project, is marked as in error. I see others are having the same issue on the web. I looked in the project properties and nothing is showing up as in error there either.&lt;br /&gt;&lt;br /&gt;At this point I am running Eclipse on my Mac as it has not been updated to 14. No idea what to do next. I just got out of the iTunes / Xcode / iOS 5.0 install hell. At least that is all working. Now I get to be really annoyed at Google / Android from screwing this up. Guess I can blow away all the version 14 stuff and go back to 13 to see what happens. Seems this is all a bit rushed.&lt;br /&gt;&lt;br /&gt;Well not the fault of Eclipse or Google on this one. My developer certificate happened to expire at the exact same time I installed the update. Once I deleted the old certificate off my HD an let Eclipse build a new one all was fine. Somewhere in there showing errors in the Problem tab had gotten turned off - it was only showing warnings thus it looked like nothing was wrong. What a huge waste of time and energy it took to figure all of this out. I wish the error message would show your the current error list instead of just saying "there is an error, good luck finding it!"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7636029490452885029?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7636029490452885029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/adt-14-breaks-eclipse-37.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7636029490452885029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7636029490452885029'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/adt-14-breaks-eclipse-37.html' title='ADT 14 breaks Eclipse 3.7 - FIXED'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6907329539678924530</id><published>2011-10-14T11:56:00.002-05:00</published><updated>2011-10-20T09:59:24.511-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS 5'/><category scheme='http://www.blogger.com/atom/ns#' term='Xcode 4'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><title type='text'>Pains of iOS 5.0 from a developer perceptive</title><content type='html'>We needed to test our app under iOS 5.0 so I began that process yesterday.&lt;br /&gt;&lt;br /&gt;Step 1: Download and install new iTunes&lt;br /&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Success&lt;/span&gt; - no issues&lt;br /&gt;&lt;br /&gt;Step 2: Connect iTouch Rev 4, install iOS 5.0&lt;br /&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Success&lt;/span&gt; - but blew away everything on device. I only use it to test, not a big deal.&lt;br /&gt;&lt;br /&gt;Step 3: Install and run app on iTouch&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Failure&lt;/span&gt; - Xcode does not know about iOS 5.0 devices so it refused to install. I find this to be stupid as the target of device of the code is 3.0.&lt;br /&gt;&lt;br /&gt;Step 4: Download and install Xcode 4.2 for Snow Leopard&lt;br /&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Success&lt;/span&gt; /&lt;span class="Apple-style-span" style="color: red;"&gt; Failure &lt;/span&gt;- Takes a long time to get it but it installed. Install works but it blows away all SDK version prior to 4.0. I can't test with a 3.2 simulator at this point. Xcode 4.2 has some new warnings that are valid. I fix those issues in the code while I am fixing the iOS 5.0 issue.&lt;br /&gt;&lt;br /&gt;Step 5: Install app on iTouch&lt;br /&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Success&lt;/span&gt; - it now will install&lt;br /&gt;&lt;br /&gt;Step 6: Test app on iTouch&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Failure&lt;/span&gt; - it crashes because some really old code is using NSIndexPath passed to didSelectRowAtIndex path call later. I need to copy and retain the data to solve the issue. Never a good programming idea in Objective C to think any variable passed to you will hang around. No other version of iOS cared about this particular one. Could be they fixed some things to get ready for dual core processing or other threading issues.&lt;br /&gt;&lt;br /&gt;Step 7: Check in changes&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Failure&lt;/span&gt; - Xcode "sees" SVN for a brief second then gets lost. Use IntelliJ AppCode to check in changes. Find out I need put the URL to our instance of SVN into Safari. Safari bitches about certificate but I can tell it to stop bitching then Xcode starts to work. Xcode SVN interaction has always been spotty at best and again it bites me in the behind.&lt;br /&gt;&lt;br /&gt;Step 8: Archive for app submission&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Failure&lt;/span&gt; - Xcode can't find my deployment provisioning profile. Delete profiles, refresh, rebuild, &amp;nbsp;restart Xcode, pray, etc. Something finally works and I can set the deployment area to the proper profile. Archive menu item is disabled. Search Google and remember that you must select iOS Device as target for this to be enabled. Remember how stupid that is from the last time this happened to me so many months ago.&lt;br /&gt;&lt;br /&gt;Step 9: Validate&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Failure&lt;/span&gt; - Message tells me it can't find the app in iConnect. Google the message and see that I have to have the app in "waiting to upload" state before it will validate it. Next step will be for the boss to do that so I can try again.&lt;br /&gt;&lt;br /&gt;Step 10: Test on iTouch without iOS 5.0&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Failure&lt;/span&gt; - By default Apple has decided that anyone not running on a armv7 device should just throw the worthless piece of crap in the trash and give them more money. Connect device, press RUN and all you get is a message that it finished running on the device even though it did not install or run. No error, no console, no help - thanks Apple.&amp;nbsp;You have to open up the build settings and add armv6 back into the supported architectures then it will run on the device just fine. If you only test with the simulators you would not find this issue as the simulator is i386 architecture and I was able to run all the way back to 4.0 using that. After installing Xcode 4.2 you would be hosed unless you tested on physical devices.&lt;br /&gt;&lt;br /&gt;Step 11: Submit to store&lt;br /&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Success&lt;/span&gt; - Once the boss got the app in "ready to submit" mode I was able to validate and submit it without any issues. The error message was stupid. We also put up new screen shots for both the iPhone and iPad.&lt;br /&gt;&lt;br /&gt;Step 12: Released to market&lt;br /&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;Success&lt;/span&gt; - It only took Apple two days. I was expecting 10. Kudos to Apple for cranking this one out. Last time it took 7 days and I figured they would be swamped. We did put in the notes that it was an iOS 5.0 fix being released. Between that and small download count I am sure they just pushed it through figuring if we screwed the pooch on this one it would come back to haunt our users and us but not really Apple.&lt;br /&gt;&lt;br /&gt;A huge waste of time this has been. What you need to do is not obvious. The new updates from Apple are not friendly and blow away or break things. Apple is rather developer hostile. I need to get the app submitted to the market as it is broken under iOS (our fault, not Apples fault). With a rash of people submitting to Apple right now for iOS 5.0 who knows how long I will be in the queue. All our current users who upgrade will be hosed. This is a huge failing of the Apple Store. I will not be able to get a couple of line fix out to our customers in a timely manner.&lt;br /&gt;&lt;br /&gt;Xcode continues to be a very annoying IDE. If this is what Apple considers a good UI and user friendly then I don't want to know what they are like when they are mad at me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6907329539678924530?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6907329539678924530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/pains-of-ios-50-from-developer.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6907329539678924530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6907329539678924530'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/pains-of-ios-50-from-developer.html' title='Pains of iOS 5.0 from a developer perceptive'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8582744711471411249</id><published>2011-10-06T07:32:00.000-05:00</published><updated>2011-10-06T07:34:21.766-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='market'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='ipad'/><title type='text'>Released Android Version</title><content type='html'>&lt;br /&gt;We put the new Android version on the market yesterday. Should have been a really simple process and it started out to be so but one little piece screwed us over for a bit. I did the export in Eclipse and after we typed in the two passwords we have the APK file ready to roll. Logged into the publish side of the Market and uploaded the APK then went to change to screen shots and what not. Things did not work. I kept getting an error and was told to try again later. Later never seemed to be late enough.&lt;br /&gt;&lt;br /&gt;I read that Chrome was having issues with the new market. Go figure, the browser from the company that owns the Market does not work. We tried I.E. figuring it had to work but it had the same issue. FireFox worked without a hitch. What the hell are they doing that only works in FireFox? Very annoying but it has been submitted and our various devices were notified there was an update so we know it is out there and working.&lt;br /&gt;&lt;br /&gt;Our Beta test Doctor now has access. We have to flip on a bit on our server for them to be able to see the new functionality so everyone else will see some minor color scheme and little tweaks but they will not have access to the new functionality until we are ready to turn it on.&lt;br /&gt;&lt;br /&gt;Of course I found an issue already. Not a crash but one of the tables was not loading all the data it needed as I only asked for Type 1 data and I needed Type 1 and Type 3 data in the table. Pretty simple fix and there is a good chance the Doctor will not need this. I can easily release an update if he does need it for this testing.&lt;br /&gt;&lt;br /&gt;I also did some UI tweaks while I was in there. Some buttons needed to be larger to give them a better look and to make them an easier tap target. I took the iPad home last weekend to give it a solid once over but I have not taken the ASUS Android Tablet home yet to run it as a user out the the interruption driven office setting. I did have a little time to play with it today so I of course found things to adjust.&lt;br /&gt;&lt;br /&gt;Next up is getting the iOS side ready to submit. I had to make the same table request changes on that side along with a few other tweaks. I got a note from Apple telling me I can get the Gold Master of the SDK and the updated Xcode. I really don't want to do that as it is a 4.6g download then I will just have to get the real release in a little over a week. If it was a patch that would be one thing but it is an overnight download so I am not going to do it multiple times. I have fallen in that trap once before.&lt;br /&gt;&lt;br /&gt;The problem is I did the archive and tried to validate but it is annoyed in some manner. So I have to figure that out. Could be I changed the name of something and it does not think I am updating and existing application.&lt;br /&gt;&lt;br /&gt;I decided to check out what changed in iOS 5 that may affect our app. I log in to the Apple Developer Network and it does not think I am a developer so it will not let me see anything. I ask my boss to check out the corporate account, which Apple has screwed up many a time, and it needed him to agree to a new terms of use. After that I was able to see the iOS 5 information on the site but I still can not validate out app.&lt;br /&gt;&lt;br /&gt;From what I can tell we might be affected by some iOS 5 changes. It reads that way at first glance but until I am able to run iOS 5 in the simulator or upgrade one of our devices - probably the iPad 2 - I will not know for sure.&lt;br /&gt;&lt;br /&gt;The sales guy stopped by to have the latest version put on his iPhone for a demo tomorrow. Luckily his phone has already been provisioned so that was easy. I also put the latest version in the iPad 2 and gave that to him as it is much easier to demo on a tablet. Will be interesting to hear what the clients have to say about the application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8582744711471411249?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8582744711471411249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/we-put-new-android-version-on-market.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8582744711471411249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8582744711471411249'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/10/we-put-new-android-version-on-market.html' title='Released Android Version'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8805470088209672880</id><published>2011-09-27T15:32:00.000-05:00</published><updated>2011-10-03T15:24:55.995-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='tablet'/><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='ipad universal'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Converting a phone app to Android tablets and the iPad</title><content type='html'>Just as I thought I was winding down my Android and iPhone development the Doctors tell us they have bought iPads and Android Tablets to use to enter all the data. Can't blame them as it is much easier to enter data on a tablet. The problem is we were going to target those devices on the next release. Time to quickly switch gears.&lt;br /&gt;&lt;br /&gt;The app ran fine on the Xoom but the home screen needed to scale better. I searched the web and found new graphics for that area. With more room using larger fonts also seemed the way to go so I tweaked a few other XML files. I ended up creating a new values-xlarge directory under the res directory to hold a styles.xml file for the tablet. I find the way Android handles this to be super easy. I had to go back into a few of my other XML files to make sure they were using the named styles but that was all. I only have a few files in my layout-xlarge and layout-xlarge-land directories to handle all the changes I wanted to make on the Android Tablet.&lt;br /&gt;&lt;br /&gt;Android does handle your app getting kicked out out memory in a way that screwed with our app. We have some global static data (I know wrist slap in order) but I need it for the SQLite database and some other login credentials. When you get booted from memory the OS tries to run your onCreate method of the visible view again. For most apps this would be great, you just pretend you started fresh and go. But with the global variables this is not so fun. I added enough checks that I don't [Force Close] any more but tell the user that the session has expired and they need to login in again. I kick them back to the login screen to get going with a fresh database and session variables.&lt;br /&gt;&lt;br /&gt;Initially testing this case was a royal pain. You needed to leave your phone on overnight or run so many apps that it got kicked out of memory. Of course that is stupid and a few internet searches pointed me in the right direction. Fire up the emulator, run your app, use "&lt;span class="Apple-style-span" style="color: cyan;"&gt;adb shell&lt;/span&gt;" from the command line then "&lt;span class="Apple-style-span" style="color: cyan;"&gt;ps&lt;/span&gt;" then "&lt;span class="Apple-style-span" style="color: cyan;"&gt;kill #id&lt;/span&gt;" of your process. This will cause same sequence of events to occur. I brought up each possible activity / view and did that over and over until they all exiting clean to the login screen. You can't do this when running on a device but you can use the DDMS view in Eclipse and hit the red [stop] button to achieve the same results.&lt;br /&gt;&lt;br /&gt;Once you start running on a real device, especially a dual core tablet, you hate to go back to the emulator. Of course QA came and took the tablet a few days after I had it in my hot little hands so I am still missing it. So much nicer to type on it and code changes are sent over to it and are up and running in a blink of an eye.&lt;br /&gt;&lt;br /&gt;Now for my iPad experience. You can set up a universal binary in Xcode. Once you do that it will automatically switch you to the latest version of iOS as your target which is not a good thing. I wanted to target 3.0x as the minimum iOS version. Since Xcode is smarter than me things quit working on my iTouch until I figured out what it did. Simple enough to change that back.&lt;br /&gt;&lt;br /&gt;Initial runs on the iPad looked like initial Android tablet runs. Most things looked pretty good as I was using list views and text editors. The home screen looked crappy though. I was able to use my @2x images for the retina display on the iPad. I used the stretchableImageWIhtLeftCapWidth to simulate the nine-patch image I was using for the shelves on the Android.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;topShelf = [[UIImageView alloc] initWithImage:[shelf stretchableImageWithLeftCapWidth:25 topCapHeight:0]];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Worked like a charm and was much easier than I assumed it would be. I had to put in manual positioning code for each of the icons on the shelves for the iPad but there are only 6 images so that was easy enough.&lt;br /&gt;&lt;br /&gt;I am adjusting for the height of the status bar in my code too. On the iPhone the status bar height is different between portrait and landscape but it is one height on the iPad. I put code in place to handle those special situations and everything looks pretty darn nice.&lt;br /&gt;&lt;br /&gt;Since I have more title bar room I wanted to show the practice name on the home screen. Of course that changed the "back" button on any screen that launched from the home screen which is not what I wanted. Turns out you can do this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; self.navigationItem.title = [NSString stringWithFormat:@"Home - %@", [RESTCaller practiceName]];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; UIBarButtonItem *backButton = [[[UIBarButtonItem alloc] initWithTitle:@"Home" style:UIBarButtonItemStylePlain target:nil action:nil] autorelease];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; [self.navigationItem setBackBarButtonItem:backButton];&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;That code allows you to set the title text to one thing but the back button used by all other areas to something else. Not the way my mind thinks but I understand the logic behind it now that it is in place.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;I want to increase the font size on various screen on the iPad. Since there is no real layout manager for iOS, everything is hard coded for widths / heights in the XIB file, this is a royal pain. You can either do secondary XIB files where you have to tie everything exactly back to the code via drag and drop or you can try and tweak things in code playing with bounds and what not. Both are sorry excuses for layout editing. I have made slow progress in this area but find the amount of work involved to be stupid.&lt;br /&gt;&lt;br /&gt;The iPad cannot use the same call to show the picture gallery as the iPhone. I had to update the code to make the new call to show a pop-up image picker instead of a full screen gallery picker. I hope that is the only API I am using that they changed on me. Rough one to find, good thing we have QA to beat on it.&lt;br /&gt;&lt;br /&gt;UIActivitySheets don't exactly work the same on the iPad either. They show up nice and centered but if you rotate the device while you are displaying one it will not stay centered. It stays relative to its original position. Looks ugly but this will be a really rare case so I did not fix it. There are some suggestions on the web as to how to fix it but nothing worked for me. The only thing left to consider is killing the sheet when you get a rotation notice and recreating it so it shows up in new orientation centered again. Of course if you do that really quickly you will have a new set of issues. Not worth it at this point. I see Apple cheated in this respect. Long tap a link on a web page. It pops up a menu. Rotate the screen. The Screen will not rotate until you dismiss the menu. Not what I would call a particularly user friendly way of doing things.&lt;br /&gt;&lt;br /&gt;Camera support on iOS devices is totally hit or miss. If you want to determine if a camera is there you need to use iOS 3.2 and above calls. Seems Apple is not very forward thinking on these things and a lot of stuff gets added in later releases but I can't trust a user to be up to date. Instead I am using a call to get the machine name and basing the availability of a camera off of that. Crappy way to do things but it is working for me so far. I know iPad v1 does not have a camera and you have to be up to iPod (the iTouch) version 4 before you have a camera. The simulator never has a camera which sucks. On the Android side it simulates the camera by showing interface then returning a stock image. I had to test camera usage on an actual iOS device and I have to make sure it has a camera otherwise you get a nice crash. I don't even want to show the [Take picture with Camera] button in the UI if you don't have one.&lt;br /&gt;&lt;br /&gt;Which brings me to the another WTF? for Apple. Why are Action Sheets index based? If I remove a button from my Action Sheet it shifts the index of all the buttons below that. Hard to write generic code and you always have to edit two places for each action sheet change you make - once where you create the buttons on once where you respond to their presses. Each button should call its own method or at least you should be able to assign tags to them so you can have one case statement. Honestly assigning tags to UI items seems pretty stinking crappy too. I do it where I can to keep track of things but it is not the most object oriented way of programming.&lt;br /&gt;&lt;br /&gt;Some of my buttons had the dreaded "..." on them depending on what I ran it on. No device fragmentation here boys, move along. They were working find on the iPad 2 and both iTouch devices but not on the iPad 1 or an iPhone with an older version of iOS. I had to shorten the text on all devices to make sure it fits.&lt;br /&gt;&lt;br /&gt;I have no idea if the Doctors will keep their phones up to date. At this point - pre iOS 5 - there are not OTA updates. If a Doctor never connects his iOS device back to a PC running iTunes he will have no idea there is an update out there. Will be interesting to see what iOS versions we have connecting once we roll this thing out into the wild. I have tried to test on as many iOS flavors as possible and each time I seem to find a new issue.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One other big area I can into was the 1 meg blob limit of SQLite. We are taking pictures with the built in cameras and they can easily be over 1 meg on an Android. The lackluster camera on the iPad and the iTouch don't get you into trouble but an iPhone can. I use JPEG compression to shrink the image down as needed to avoid SQLite issues. It is a shame the iPad camera is so limiting in resolution. It is an unusable solution for our doctors, the images of sheets of medical paperwork are not readable with that camera. We also allow you to choose images from the device gallery which could easily be from another device and over the 1 meg limit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Overall it was not very difficult to get a universal app running on either the Android or iOS platforms. We are not taking full advantage of the tablet form factor but at least we are not just doing a 2X version of our iPhone app, the images scale up nicely without being blurry, you get to utilize the extra space of the device and things look native in general.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;QA is doing final testing then it will be off to the beta clients. It will be really interesting to get their feedback. Now I just need a little time to destress and I get ready to head back into Java + Swing + MigCalendar land to fix some issues in our appointment application.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8805470088209672880?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8805470088209672880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/09/converting-phone-app-to-android-tablets.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8805470088209672880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8805470088209672880'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/09/converting-phone-app-to-android-tablets.html' title='Converting a phone app to Android tablets and the iPad'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3022892039557350138</id><published>2011-09-14T15:50:00.000-05:00</published><updated>2011-09-14T15:50:11.886-05:00</updated><title type='text'>Which way is up?</title><content type='html'>Do you ever have days where you can't even begin to tell which way is up? I have been having that feeling for the past week at least.&lt;br /&gt;&lt;br /&gt;I am winding down the Android and iPhone development so it is at least ready to go to beta. We have a doctor that is ready to test it. We thought he was going to do it on phones and 7" tablets but he bought 10" tablets instead. I needed to add an xlarge portrait and landscape version of the home screen to the layout directory. Not a big deal but the button images need to be 256x256 to not look stupid small on the screen. My original images are 128x128 and the phone version I use 100x100. Any time you scale up things look crappy but I don't have time right now to find new base images or to totally pretty up the ones I have. I ran the sharpen tool in Paint.NET so they look acceptable.&lt;br /&gt;&lt;br /&gt;QA has not had enough time to look it all over either. The main QA person was hit by a car while riding her bike to work. Bike is total but she is doing OK and is now back at work but under the loopy state of pain meds due to a fractured hip. To toss in irony the driver of the car is also a cyclist who has been hit by a car. Pay it forward revenge style it appears.&lt;br /&gt;&lt;br /&gt;I think the app is pretty solid as I have run it through its paces a number of times. There are only so many screens and so many data types meaning a lot of the code is hit over and over as you create a case. I installed it a Xoom today and it ran perfectly. I have run it in the emulator but not on the actual device. The big worry is connectivity. If it drops in the middle of some areas it could be bad. Something you think about from a desktop but generally things work but on a phone walking through a hospital could cause the connection to drop easily.&lt;br /&gt;&lt;br /&gt;I have researched the universal iPhone / iPad build setup for Xcode and I really want to take that route before we ship. Currently the iPad would just show a 2X iPhone version and I think that would be crappy. It appears Apple is using something similar to Android where you can name your XIB files with a ~ and have an iPad layout without code changes. You do have to tie all the controls to the extra XIB file but that should not be too bad. I will need better resolution images here too. Only the home screen with the buttons that launch you off to other areas should be affected but since I have not tried doing anything native iPad I would guess there are some other gotchas.&lt;br /&gt;&lt;br /&gt;I am working on our scheduler written in Java using MigCalendar while I await QA and beta feedback on the mobile side. I have never used MigCalendar before so I have to learn those controls first. It has been a tough row to hoe. The MigCalendar API is not straight forward. Lots of parameters to lots of methods and it is not taking advantage of generics and enumerations as much as it could. The documentation is sparse and on-line help is limited. It seems to be very powerful but not super easy to understand. I have some of the requested enhancements in place I need like a tree control going more than 2 levels deep and multi-line header control for those instances. I now understand why our code was artificially limiting things to this depth as it had categories under categories that are hidden from the user as we filter 3 ways (ugly GUI here) - one from a tab, one from a combobox and one from the tree control. I need to clean all of this up without breaking how existing people use it.&lt;br /&gt;&lt;br /&gt;I started with a test application just to learn the basics of the calendar controls. Once I got the header doing what I wanted I moved into our real code and started stripping things out and redoing what is created for the CategoryDepository which happens to be a singleton but not in a good way. This lead me to figure out why the old code that was executed every time any little thing happened in the UI did what it did. Of course nearly everything is broken now. I may have to abandon my changes due to the next item on the list.&lt;br /&gt;&lt;br /&gt;Our C# developer has left the building but we need updates the the C# appointment scheduler. I know C# too having written a number of utilities in it and doing a conversion of a real-time stock market program from Java to C# a number of years back. Nothing like doing Java + Swing, Java + Android SDK, Objective C + iOS SDK and C# + WinForms at the same time.&lt;br /&gt;&lt;br /&gt;There are 54 open issues on the C# scheduler and customers want them now. I have to get a handle on the code first. Initial glance shows a strong preference to cut and paste versus make a method, lack of any real comments and hard coded SQL strings that repeat every column name in every command instead of a nice collection of column names and the commands being built. You have to search a lot of code if you need to add a new column to a table and make sure everything works around it as the code stands. I can look at the code but not build and run it as it uses a couple of third party control packages and we need to transfer the developer license from the departed developers machine to mine once we sort them all out. He was not much on source control or documenting what he did so it has been a trial by fire.&lt;br /&gt;&lt;br /&gt;I will be in another situation where I am using third party controls I don't have experience with just like I am doing with MigCalendar under Java. Mind set switching between Java and C# has been pretty easy in the past. There are some really nice things in C# and some annoyances. Visual Studio is a bit lacking compared to IntelliJ and Eclipse but is generally better than Xcode.&lt;br /&gt;&lt;br /&gt;Yep another IDE to use. The Android side is Eclipse, Java + Swing is IntelliJ, Objective C is Xcode and now I get to use Visual Studio too! Different hot keys abound. I can easily be in all four of them in the same day with 3 running on a single machine. Keeps food on the table and clothes on the kids but my mind is turning to mush as keeping things straight during the context switches of the day can really wear you out. Nothing ever seems to be totally done and the list of open tabs I have in PSPad keeps growing. I have a tab with project notes for each item I am working on to keep track of what is left to do and my random thoughts on areas that could be improved. I jot stupid stuff on paper too during the day but try to keep a digital version of my thoughts so I don't forget things I need to revisit when I am in the code or to keep track of what is implemented on the Android that I have not ported to the iPhone or what has not gone in the opposite direction.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3022892039557350138?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3022892039557350138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/09/which-way-is-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3022892039557350138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3022892039557350138'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/09/which-way-is-up.html' title='Which way is up?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3415430494322192859</id><published>2011-08-24T08:18:00.000-05:00</published><updated>2011-08-24T08:18:53.040-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ios android xcode exclipse dual development'/><title type='text'>Android and iPhone apps in sync - here are the code results</title><content type='html'>I sent the Android version of my app off to QA yesterday. Both the iPhone and Android versions are now in sync and here are some code stats.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;*.m &amp;nbsp; 100 files &amp;nbsp; 589,431 bytes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;*.h &amp;nbsp; 109 files &amp;nbsp; 123,079 bytes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ========= &amp;nbsp; =============&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 209 files &amp;nbsp; 712,510 bytes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;*.java 97 files &amp;nbsp; 633,177 bytes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A lot more comments in the Java code as I have JavaDoc comments over each method but even with that the code base is a lot smaller and a lot less files. Anytime you have less code and less files it is easier to maintain and will tend to have less bugs.&lt;br /&gt;&lt;br /&gt;I was surprised at how quickly the conversion went. A couple of things play into that, first I started on the more difficult of the two platforms - the iPhone. It is more difficult due to my experience with Objective C and the Mac in general. Some things are easier on the iPhone such as only having one screen size to deal with. Second once you have the database schema in place and the logical layout of the program ready to roll you are doing more straight coding and less designing.&lt;br /&gt;&lt;br /&gt;Doing double development has some benefits. There are things on each platform that are pretty easy to do. They force you to look for a solution on the other platform. I don't want either version to outshine the other. The end user should be able to pick up any device with the app installed and be able to use it. There are differences in button placement - iPhone on bottom, Android on top - and the iPhone always has the "Back" operation as a button on screen where Android users know to press the dedicated back button on the device.&lt;br /&gt;&lt;br /&gt;Programming differences&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I found programming for SQLite much simpler on the Android. I pretty much had to build SQL statements by scratch on the iPhone and pass them off to the database. The Android helper methods make this much easier. Android made it super simple to handle cursor data in a scrolling list. All of that had to be written manually under iOS.&amp;nbsp;&lt;/li&gt;&lt;li&gt;I had to write the multi-part entity code to send images to the server on the iPhone where I was able to use the Apache libraries under Android.&lt;/li&gt;&lt;li&gt;Hiding buttons on a toolbar is as simple as setting visibility state on Android. Under iOS I had to totally recreate the toolbar for each unique button layout. Some views are reused for editing vs. viewing of the same data. I needed to hide buttons such as [Save] in the read-only version.&lt;/li&gt;&lt;li&gt;The home screen with icons laid out in 2x3 for portrait and 3x2 for landscape was easier to do on Android as I just defined two XML layouts and put them in the proper directories. All of this had to be done in code on the iPhone although I was able to use the animation framework to have a cool looking transition under iOS that I did not port to the Android.&lt;/li&gt;&lt;li&gt;Handling JPG images was easier on iOS. Pretty simple access to camera, gallery and image viewer. It was also simple to get to the raw data to store in blobs under SQLite.&lt;/li&gt;&lt;li&gt;Doing background / busy threads is much easier under Android. On the iPhone you have to control everything, shut off the UI, get the spinning gear going, dimming screen, etc. On Android I just put the busy work in an async activity and invoked it.&lt;/li&gt;&lt;li&gt;Date manipulation is much easier in Java. The method names make sense &amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;startDate.after(endDate) &lt;/span&gt;where it is &lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;[startDate timeIntervalSinceDate:endDate] &amp;gt; 0&lt;/span&gt; on iOS.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Settings seconds to zero &lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt;startData.set(Calendar.SECONDS, 0);&lt;/span&gt; &amp;nbsp;for Android and &amp;nbsp;&amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan; font-family: 'Courier New', Courier, monospace;"&gt; NSTimeInterval time = floor([startDate timeIntervalSinceReferenceDate] / 60.0) * 60.0;&amp;nbsp;&amp;nbsp;startDate = [NSDate dateWithTimeIntervalSinceReferenceDate:time];&lt;/span&gt; for iOS&lt;/li&gt;&lt;li&gt;iOS wins for speed of simulator (much faster than actual device) and speed when running in debugger but Android wins for actually being able to see variable values, do ad hoc expression evaluation while in debugger and separating output log messages into tabs in the LogCat output window.&lt;/li&gt;&lt;li&gt;Android wins for being able to run on a multitude of devices via one code base. I have run it on various phones, the older Samsung Galaxy Tablet and a Motorola Xoom. The iOS version is for the iTouch and iPhone. I can run it on the iPad but only as a double pixel app. Some call it fragmentation but with very few program tweaks having the ability to run on a variety of hardware is just fine with me. Heck I do that with PC programs all the time. I rarely know the monitor resolution up front. Use the space you are given.&lt;/li&gt;&lt;li&gt;Easier to view the SQLite database under iOS. I used the SQLite Manger for Firefox on the Mac and was able to point to the DB in the simulator directory and look at all my tables with ease. On the Android side I had to export the DB from the device to a temp directory and use SQLite Database Browser to see the table contents.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Releasing to the clients is a huge win for Android. I can just put it on any device I want. I can submit it to Market and have it available in minutes and the same for updates. For the iPhone I can submit it and wait until Apple approves it. I can not give our clients a solid date as to when that will happen. Same thing for bug fixes. This means our Beta cycle will be pretty simple on the Android and a royal pain on the iPhone. Our clients are not local, I can't just have them stop by for new version. Doing it ad hoc might be possible if we can get a doctor to understand iTunes and how to drag and drop things I send them along with getting their unique phone ID to me so I can provision it and build it into the app. This is a gigantic pain.&lt;/li&gt;&lt;/ul&gt;No matter which device I was programming against I spent a lot of time in Stack Overflow looking for answers. As I have gone back to the iPhone side to do some program tweaks and add missing features I put into the Android side I again realize how much Objective C and I don't think alike. I still have to look up method names as they just don't roll off my brain. Trying to think how many staring '[' I need before I get to type code just seems silly. Having to type multiple lines to do simple things gets old.&lt;br /&gt;&lt;br /&gt;I really don't care for Xcode, I really want tabs that keep open the code I am looking at instead of reusing themselves as they see fit.&lt;br /&gt;&lt;br /&gt;Even though I was used to it with C/C++ I really don't like having two files for every object - the H and M files. I just want to add a method and have it there to use instead of adding it twice. Then you have the fun of static variables you want others to access which is tons of lines of code.&lt;br /&gt;&lt;br /&gt;It will be interesting to see how the users respond to the application. Will any switch between devices and will they spot differences they don't like between them?&lt;br /&gt;&lt;br /&gt;The application is used by&amp;nbsp;anesthesiologist&amp;nbsp;to do charge capture and billing. You have to be a client of ours for it to be of any use to you. All you could see without that access is our login screen so I can't give a link the program for anyone else to give me feedback on why I am insane to prefer Android over iPhone or to tell me where I totally hosed up doing something on either platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3415430494322192859?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3415430494322192859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/08/android-and-iphone-apps-in-sync-here.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3415430494322192859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3415430494322192859'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/08/android-and-iphone-apps-in-sync-here.html' title='Android and iPhone apps in sync - here are the code results'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-4230577010363649882</id><published>2011-08-09T10:54:00.000-05:00</published><updated>2011-08-09T10:54:15.348-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hardware ios android excitement'/><title type='text'>Remember when hardware was fun and exciting?</title><content type='html'>Back in the day - this would be the 90's - InfoWorld, PC Week (now eWeek), PC Magazine and Computer Shopper were huge publications. They had massive hardware reviews, dozens of printers, 10 graphics cards, 8 sound cards, etc. It was a blast to read. The industry was exciting, new hardware was on the way every month. Now they are all electronic only or&amp;nbsp;pamphlets. Printers cost $100 and you can hardly go wrong with any of them, just get what is on sale. Graphics cards are down to two major players with not much&amp;nbsp;excitement&amp;nbsp;around them. Hardly anyone cares about the sound card, use what comes on the motherboard and move along.&lt;br /&gt;&lt;br /&gt;To me this is all pretty sad. I still build my own machines. Every time I think I can just do something off the shelf I can never find what I want. I really want a better sound card, I want something above the mid-line graphics card, a SSD drive at least for the boot drive, a big case where I can add things and a power supply I trust to run the whole thing for years to come. I do buy off the shelf machines for relatives, they don't play games or care about the best. By the time you buy an official copy of Windows you can't build one for them at the price you can get from Dell or random Best Buy vendor.&lt;br /&gt;&lt;br /&gt;Since magazines don't have new hardware innovations to talk about and there seems to not be much in the way of software innovation either they have been spewing out top ten lists and comparing everything else to Android device X and Apple device Y. It has gotten damn boring. They also keep running "Study shows iPad will be the champ until 20xx". Give me a break, how can you predict any of that? Some of this stuff came out of nowhere and took the world by storm. In 9 years it will be ancient stuff and something new will be kicking it in the tail. Did they predict this same crap for the BlackBerry? You bet someone did. Just filling space so they can publish some article every day. Content has fallen off and most of the news is now just noise. I end up deleting most of the articles the minute they hit an inbox. Even Slash Dot articles have been more "maybe this will happen" or complaining about DRM or a movie review.&lt;br /&gt;&lt;br /&gt;I want some excitement in the PC industry. We are not getting it from hardware or software. Both Lion and Windows 8 appear to be nice&amp;nbsp;incremental&amp;nbsp;updates but nothing to wow your socks off. Everyone has a color printer, LCD monitor, plenty of processing power and a big enough HD. Heck I just got a USB 1t HD for backup for all of $70!&amp;nbsp;Terabyte&amp;nbsp;was unheard of in a house a few years back.&lt;br /&gt;&lt;br /&gt;My machines at work and home compile my Java and Objective C code in a matter of seconds. My phone beats the power of machines I had not long ago. My Xoom tablet does pretty much anything I need for the web and plays some decent games. I still enjoy playing Wii sports Tennis.&lt;br /&gt;&lt;br /&gt;Tablets are cool but they are just what we had in a different form factor and we use our finger instead of a mouse. I am not doing anything that ONLY a tablet could do making it a must have. Sure some games let you tilt it to move your character but I had that on the Wii with its remote. I like it but it is not earth shattering. Most of the time I use the tablet it is just to read content from a website on the couch.&lt;br /&gt;&lt;br /&gt;People talk about all the apps available on the Android Market and the Apple App Store. I don't know if you have checked many of them out but most are pretty crappy. You hit a block buster from time to time like Angry Birds or Monsters Ate my Homework but honestly most of the games are fun for just a few minutes. Even those games are just level after level of more of the same. They don't hold your attention for nearly as long as a reasonable Nintendo DS game. Games are not easy to write, they are one of the harder things you can do for any device as you are going to push the limits of the hardware. Stuff is being cranked out but you can tell. Some may be pretty but there is no substance behind it.&lt;br /&gt;&lt;br /&gt;Doing a productivity app on a mobile device is also not easy. Typing much on any of them is just not fun. I don't want to do word processing or spreadsheets on my phone. I can stomach them a little bit on my tablet but really I consume data and don't create data on those devices. I can type 100+ WPM on my computer so I go there when I want to create much of anything including graphics. I am not finding must have productivity apps on mobile devices either.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Guess I am going to have to find my excitement elsewhere but I not sure what it will revolve around. Anyone have an idea where that could be?&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-4230577010363649882?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/4230577010363649882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/08/remember-when-hardware-was-fun-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4230577010363649882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4230577010363649882'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/08/remember-when-hardware-was-fun-and.html' title='Remember when hardware was fun and exciting?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-1190818036167478714</id><published>2011-07-29T15:58:00.000-05:00</published><updated>2011-07-29T15:58:19.189-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android iphone sqlite table view'/><title type='text'>Android vs iPhone - SQLite and Table Views</title><content type='html'>I am still in the process of converting my iPhone project to Android. Main goal is to allow doctors to create cases out in the field and submit them to the back office for case workers to finish up and send off to insurance companies to get paid. All the rest of the software is written in Java and Ruby and has been operational for a number of years.&lt;br /&gt;&lt;br /&gt;There are currently 24 of tables involved in the process with some containing over 17,000 records. I am storing as much of the data on the device as possible but some of it needs to be requested per login session as it can change on the back end - facilities, referring physicians, providers, etc.&lt;br /&gt;&lt;br /&gt;The basics of getting the table data in XML format, converting it via SAX parsing to table rows and executing inserts to populate the tables is very similar between the platforms. Where the fun begins is displaying the data to the user.&lt;br /&gt;&lt;br /&gt;The iPhone has a standard Table View but it is up to you to do all the work. You have to build out the rows, you have to get them displayed, you have to deal with rows that have different amounts of data. You have to convert clicks back into rows of your table. It appears one developer did the SQLite side and another did the Table View side but neither talked to each other. Doing all the work yourself is not fun. I have hundreds of lines of code to handle what I am doing trying to be generic as possible. Even showing a simple string when you have an empty table is a pain. Finally you have the fun of performing the SQL queries in a simulated background thread. You are responsible for disabling the UI, showing the busy spinner, positioning the busy spinner and if you feel really adventurous showing some status text.&lt;br /&gt;&lt;br /&gt;Moving over to the Android has been a pleasure. Sure, I have the whole database schema in place giving me a big head start but that is not what is making it so easy. The Android team decided to do a lot of the hard work for me and provided a SimpleCursorAdapter. I can query the table, get a cursor back and pass it to this adapter and my table automatically populates. In a ton less code I actually have better functionality. The rows automatically size to the strings I provide. If my cursor has no rows a simple addition to the XML file shows the "No matches found" message. Background activities automatically take care of disabling the UI and I get to show status strings with ease.&lt;br /&gt;&lt;br /&gt;Things are falling into place so quickly on the Android side I am able to add extra features as I go. This equals some pain as I will get to back port those to the iPhone before shipping.&lt;br /&gt;&lt;br /&gt;This is not the only area where I have found Android to have a more complete API. I can quickly create two views, one for landscape, one for portrait and have them appear without any special code. Doing that on the iPhone is a major hassle. You can either shuffle the controls around in code, which is what I have done, or you can attempt to have to XIB files and do double control hookups which seems like a massive waste.&lt;br /&gt;&lt;br /&gt;The code base I am generating on the Android side is massively smaller than on the iPhone. Pretty much anything I do takes less lines and much shorter lines of code to accomplish. Objective C is not a terse language. The less I have to type the faster I can get code done even with auto-complete available on both platforms. I also don't mind refactoring code in Eclipse where it is s crap shoot in Xcode. If I have to do anything massive I do it in AppCode which helps a lot. Not having two files for every class is also nice, cuts the size of the code tree in half.&lt;br /&gt;&lt;br /&gt;It is going to be interesting to see what the doctors think. Many have iPhones but are thinking of getting Android tablets to do their case work. Why an Android tablet? Because you can get it in a 7" form factor and that size fits in a lab coat pocket where the 10" iPad does not. My job is to be cross platform and as feature equal as possible. This gives them a wide variety of device choice between iOS and Android.&lt;br /&gt;&lt;br /&gt;Beta testing will be straight forward on the Android. I can send them the file and have them install it or they can stop by my cube, plug in the device to my USB cable and I can copy it right over after I kick the device into debug mode. iPhone, well buddy you better tell Apple about the device, wait for it to get provisioned, build the code with the provision in place then copy it on to the device. If you want them to install it they have to play funky monkey with iTunes. Can't go over a 100 device limit either without buying a second license.&lt;br /&gt;&lt;br /&gt;The other area of fun will be release time. The initial version of the app just handled appointments and not completing the case. I was able to release the Android Market in 10 minutes. It took a full week for Apple to approve my app and have it hit the iPhone App Store. If I want to fix a bug on the Android I fix it and release it on my own. I have to restart the process on the iPhone side. With the current, very simple app, out there I have not had to do a bug release. The new version is much more complicated which increase the odds of nasty bugs.&lt;br /&gt;&lt;br /&gt;If we update our back end we can easily sync that with an Android release. With the iPhone we are in the total dark even if I am really sure I have not used anything in the code that Apple with frown upon. It could take weeks to get something accepted. Can't even do a proper marketing campaign when you can't give a real release date. Apple is not really enterprise friendly and they are not really all that developer friendly either.&lt;br /&gt;&lt;br /&gt;I am pretty happy with what I have been able to pull off on the iPhone. It looks good and according to QA is working nicely. &amp;nbsp;I am very interested to see how the Android side turns out. So far it is matching the iPhone punch for punch and coming out better in a number of areas. Any time I have less code to write I know I will have less bugs and thus happier customers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-1190818036167478714?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/1190818036167478714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/android-vs-iphone-sqlite-and-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1190818036167478714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1190818036167478714'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/android-vs-iphone-sqlite-and-table.html' title='Android vs iPhone - SQLite and Table Views'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5566171339899227646</id><published>2011-07-28T09:08:00.000-05:00</published><updated>2011-07-28T09:08:20.329-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='graphic artist programmer lessons'/><title type='text'>Lessons learned by programmer doing the work of a graphics artist</title><content type='html'>At my previous position we had a graphics team that handled all the icons and other art needs. Wonderful group of people and they were very open to you handing them a less than spectacular image as a base idea and then making it into something professional. They also made sure icons followed a theme. At times they threw away my idea and went another direction. No big deal to me, they are the professionals.&lt;br /&gt;&lt;br /&gt;Jump into my current position at a different company and we had a graphics artist but he has decided to move on and they are not in a hurry to replace him. He will do some freelance work for us and the rest they will farm out. That pretty much leaves me to do all the graphics work for the iPhone and Android devices on my current project.&lt;br /&gt;&lt;br /&gt;I know my way around various graphics programs so this is not a huge deal and it does give a nice break from coding. I don't need a ton of assets and I have just enough of an eye for visual design that everyone has been pretty happy so far with what I am churning out. I do hit the web to find as much free art as I can. I always make sure it is free for commercial use. They rest I draw myself.&lt;br /&gt;&lt;br /&gt;What are the lessons I have learned?&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;1.&lt;/span&gt; Always find the asset in the largest format possible. Sure you will be scaling it down but scaling down beats the crap out of scaling up any day. If the download page has it already scaled in multiple sizes grab all of them as a lot of time an artist will scale from a vector image giving much better results than a simple pixel scaling.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;2&lt;/span&gt;. Once you find the asset in the large format save it in that format and only edit copies. I have screwed this up multiple times. Maybe I worked on a copy first then deleted the original or put it in some obscure directory. At times I find something while on the Mac and copy it to the PC to edit it or do the opposite. Then I can't find the original when I want to scale it again or tweak a color. The best solution is to have an assets area in your version control system to keep the originals.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;3.&lt;/span&gt; Be consistent. Don't have a round add button&lt;span class="Apple-style-span" style="color: lime;"&gt; (+)&lt;/span&gt; and a square&lt;span class="Apple-style-span" style="color: red;"&gt; [-]&lt;/span&gt; delete button. If one is gradient the other should be gradient too. Use consistent background images and colors. Make it look like all the screens belong to an app written by a person and not like it has been written by 10 people who never met each other.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;4&lt;/span&gt;. Don't be afraid to throw away images even if you have done a lot of work on them. They might have looked good when you first put them in but the rest of the system has surpassed them so that one asset you loved now looks like it was drawn with a crayon.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;5&lt;/span&gt;. Get feedback and accept it. If every person you show the app too says "Dude that background is ugly" then fix it. You may love it and may have done too many hours of work on it but the feedback of the masses is generally correct. If they can't read the white text on the background image change the text color until it is readable don't question their eyesight.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;6&lt;/span&gt;. When looking for assets download anything that you think looks cool even if you don't have a current need for it. Never know when it will come in handy and finding it again might be impossible. I have directories full of potential icons I don't need right now.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;7&lt;/span&gt;. Learn how to use various paint programs. I use Paint.NET, PhotoShop Elements, GIMP and some other utility programs. I was transferring everything form my Mac to my PC for editing. That was getting silly especially for simple resize and clip operations. I installed GIMP on the Mac, it is free and very full featured. MS Paint really is not what you should be using especially with so many free options available. You can use GIMP on pretty much any platform for free so it is a great place to start. Each program has strengths and features others don't and they all handle the same basic file formats so learn to use more than one.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;8&lt;/span&gt;. Layers are massive time savers so learn and use them. If you watch a real PhotoShop pro like the graphics artist at my last job they have a lot of layers going even for something as a simple icon. It allows you to tweak various aspects of the image without redoing all the work or messing up the background. For the home page of my current project I wanted icons that appeared to be sitting on shelves. I have multiple layers: background, each shelf, each icon and each piece of text under each icon. I can quickly change the text or text color without screwing up my background. I can move elements around. I can resize the shelf. If this was a flat image that would take forever. You can save as a flattened image once you are done but keep in mind lesson &lt;span class="Apple-style-span" style="color: cyan;"&gt;2&lt;/span&gt; and save the PSD (or layer format of the software you are using) first then save the flattened image as a PNG. Don't lose your layers!&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;9&lt;/span&gt;. Nine-patch is a cool format for use on the Android. Make sure you investigate it. It allows you to quickly create scalable images when working on Android devices.&amp;nbsp;&lt;a href="http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch"&gt;Android docs on nine-patch&lt;/a&gt;&amp;nbsp;is a good place to start. I am using this format for the shelves as there are various device sizes along with landscape and portrait orientations to do layouts against. Nine-patch is perfect for this situations.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;10.&lt;/span&gt; Don't be afraid to experiment, it is the only way to learn. You may not be a graphics god but I am sure you can get place holder art ready to at least express the action of the icon. There is plenty to grab from the web even if it is just temporary. Everyone should know how to load an image and size and scale it. I cringe when I see a web page load super slow only to find out they loaded a 1 meg image and allowed the browser to scale it to 200x200.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;11.&lt;/span&gt; Appreciate your graphics artist if you have one available to you. Playing around in a paint program is fun from time to time but you will soon realize it takes a lot of talent to produce professional looking applications. Back in the day everything was green, white or orange text on a black background. That does not cut it any longer.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;12.&lt;/span&gt; Don't go overboard. Everyone has seen an application that looks like someone chugged a couple of cans of paint and threw up. Every label in a dialog is bold or italic and has a unique color. Use color to indicate something like an empty required fields but don't just use colors because you can. Multiple fonts can really mess with your eyes. For the love of {deity of choice} never blink / flash anything. I will stop using software instantly when that happens. I get migraines from strobes. I can't eat at Joe's Crab Shack or go with my kids to the roller rink with the disco ball. Blink screams&amp;nbsp;amateur.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5566171339899227646?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5566171339899227646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/lessons-learned-by-programmer-doing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5566171339899227646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5566171339899227646'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/lessons-learned-by-programmer-doing.html' title='Lessons learned by programmer doing the work of a graphics artist'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3609066457437394736</id><published>2011-07-25T13:49:00.002-05:00</published><updated>2011-07-25T14:59:20.802-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone objective c libxml2 SAX speed'/><title type='text'>Switched to libxml2 ~ 25% less time and a lot less method calling</title><content type='html'>Since I was still disappointed with the XML parsing speed on the iTouch I decided to give libxml2 a shot to replace NSXMLParser. I got a 25% boost in processing speed, less memory thrashing and less method messaging.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;iTouch Rev 1 hardware&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Original TouchXML code (full DOM) &lt;span class="Apple-style-span" style="color: cyan;"&gt;79&lt;/span&gt;&amp;nbsp; seconds&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SAX parsing NSXMLParser &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;42&lt;/span&gt;&amp;nbsp; seconds&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SAX parsing libxml2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;30&lt;/span&gt;&amp;nbsp; seconds&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;iTouch Rev 3 hardware&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SAX parsing libxml2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;7.5&lt;/span&gt; seconds&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is for 17,000 XML records in NSData format in memory to be written to an SQLite table. I still wish it could run faster but a speed up from 80 seconds a table to 30 seconds is pretty darn massive. In the simulator it takes 0.5 seconds. I have a feeling it could be a bit faster if I wrote out the records in this code instead of doing the callback but this is much more generic and reusable.&lt;br /&gt;&lt;br /&gt;This was much easier to write than I thought it would be although it took a lot of research to get just the lines I needed. The pure documentation for libxml2 is not aimed at Objective C programmers so I had to find bits and pieces here and there. One site would talk about parsing from a URL and another how to do it from memory. One would show a big structure with statics for callbacks and another with a SWITCH / CASE statement. None of them showed how to clean up memory at the end.&lt;br /&gt;&lt;br /&gt;Here is what the final code looks like. Its job is to take XML looking like this crappy made up sample (real stuff is diagnosis codes from doctors but the structure is the same):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;lt;itemnames&amp;gt;&lt;br /&gt;  &amp;lt;itemname&amp;gt;&lt;br /&gt;    &amp;lt;id&amp;gt;10&amp;lt;/id&amp;gt;&lt;br /&gt;    &amp;lt;name&amp;gt;soup&amp;lt;/name&amp;gt;&lt;br /&gt;    &amp;lt;desc&amp;gt;soup you fool&amp;lt;/desc&amp;gt;&lt;br /&gt;  &amp;lt;/itemname&amp;gt;&lt;br /&gt;  &amp;lt;itemname&amp;gt;&lt;br /&gt;    &amp;lt;id&amp;gt;15&amp;lt;/id&amp;gt;&lt;br /&gt;    &amp;lt;name&amp;gt;cat food&amp;lt;/name&amp;gt;&lt;br /&gt;    &amp;lt;desc&amp;gt;food for your cat&amp;lt;/desc&amp;gt;&lt;br /&gt;  &amp;lt;/itemname&amp;gt;&lt;br /&gt;&amp;lt;/itemnames&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Passing in @"itemname" for elementName your SAXParserDeletgate would get two callbacks, each with a dictionary holding the following keys: id, name, desc and their associated values. As I get the callback I convert the dictionary items to an SQLite insert command (that code is not shown).&lt;br /&gt;&lt;br /&gt;This is a very special case where I am simply getting a list of data. The only items in my XML data are records. All the data is in the &lt;span class="Apple-style-span" style="color: cyan;"&gt;TEXT&lt;/span&gt; area. You should be able to look up the &lt;span class="Apple-style-span" style="color: cyan;"&gt;XML_READER_????&lt;/span&gt; info to parse attributes or other aspects of the XML. Already feels like I spent more time trying to put this into a blog posting than it did to get the code working but I don't want my efforts to go to waste.&lt;br /&gt;&lt;br /&gt;This is my first attempt a using a syntax highlight editor in the blog so sorry if any of the code is screwy when you copy / paste it out of here. I picked C++ syntax as the closest as the syntax highlighter helper code I am using did not have anything specific for Objective C.&lt;br /&gt;&lt;br /&gt;I really hope this can help someone out and show you how easy it is to actually use nearly straight C code to help speed up Objective C when parsing large XML data record sets. I ran it against the memory leak checker and it came out clean. The key was the final call to &lt;span class="Apple-style-span" style="color: cyan;"&gt;xmlFreeTextReader(reader);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;If it does help please post a simple thank you comment. Always nice to know when the effort makes the programming life of another easier.&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You MUST go to Project - targets (your app) -&amp;gt; Build Phase -&amp;gt; Link Binary with Libraries -&amp;gt; (+) to add libxml2.2.7.3.dylib to your overall iPhone project to be able to use libxml2. I am using Xcode 4.03, don't know how to do that in older versions but I assume it means adding it to the framework area. Doing the (+) way in Xcode 4 auto added the headers to the correct path. If it is not version 2.2.7.3 I don't think that will be an issue. It appears I am using some pretty basic libxml2 calls.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Call back delegate&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:cpp"&gt;//  SAXParserDelegate.h&lt;br /&gt;&lt;br /&gt;#import &amp;lt;foundation/foundation.h&amp;gt;&lt;br /&gt;&lt;br /&gt;@protocol SAXParserDelegate &lt;nsobject&gt;&lt;br /&gt;- (void) SAXDictionaryElement:(NSDictionary *)dictionary;&lt;br /&gt;@end&lt;br /&gt;&lt;/nsobject&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Header file&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush:cpp"&gt;//  SAXParser.h&lt;br /&gt;&lt;br /&gt;#import &amp;lt;foundation/foundation.h&amp;gt;&lt;br /&gt;#import "SAXParserDelegate.h"&lt;br /&gt;&lt;br /&gt;@interface SAXParser : NSObject {&lt;br /&gt;    id&amp;lt;saxparserdelegate&amp;gt; saxDelegate;&lt;br /&gt;    NSData *data;&lt;br /&gt;    NSString *name;&lt;br /&gt;    NSMutableDictionary *dictionary;&lt;br /&gt;    &lt;br /&gt;    bool inZone;&lt;br /&gt;    NSString *keyName;&lt;br /&gt;    NSString *valueData;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;- (id) initWithData:(NSData *)xmlData elementName:(NSString *)elementName delegate:(id&amp;lt;saxparserdelegate&amp;gt;)delegate;&lt;br /&gt;- (void) parse;&lt;br /&gt;&lt;br /&gt;@end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;And finally the parsing code itself &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:cpp"&gt;//  SAXParser.m&lt;br /&gt;&lt;br /&gt;#import "SAXParser.h"&lt;br /&gt;#import &amp;lt;libxml/parser.h&amp;gt;&lt;br /&gt;#import &amp;lt;libxml/tree.h&amp;gt;&lt;br /&gt;#import &amp;lt;libxml/xmlreader.h&amp;gt;&lt;br /&gt;&lt;br /&gt;@implementation SAXParser&lt;br /&gt;&lt;br /&gt;// Initial with data, element name to find and callback delegate&lt;br /&gt;- (id) initWithData:(NSData *)xmlData elementName:(NSString *)elementName delegate:(id&amp;lt;saxparserdelegate&amp;gt;)delegate{&lt;br /&gt;    self = [super init];&lt;br /&gt;    if (self != nil) {&lt;br /&gt;        data = xmlData;&lt;br /&gt;        name = elementName;&lt;br /&gt;        saxDelegate = delegate;&lt;br /&gt;        inZone = NO;&lt;br /&gt;        &lt;br /&gt;        dictionary = [[NSMutableDictionary alloc] init];&lt;br /&gt;    }&lt;br /&gt;    return self;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Clean up any memory we used&lt;br /&gt;- (void) dealloc {&lt;br /&gt;    [keyName release];&lt;br /&gt;    [dictionary release];&lt;br /&gt;    &lt;br /&gt;    [super dealloc];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Start the data parse&lt;br /&gt;- (void) parse {&lt;br /&gt;    xmlTextReaderPtr reader = xmlReaderForMemory([data bytes], [data length], NULL, NULL, &lt;br /&gt;                                                 (XML_PARSE_NOBLANKS | XML_PARSE_NOCDATA | XML_PARSE_NOERROR | XML_PARSE_NOWARNING));&lt;br /&gt;&lt;br /&gt;    if (!reader) {&lt;br /&gt;        NSLog(@"Failed to create xmlTextReader");&lt;br /&gt;        return;&lt;br /&gt;    } &lt;br /&gt;    &lt;br /&gt;    while (xmlTextReaderRead(reader)) {&lt;br /&gt;        switch (xmlTextReaderNodeType(reader)) {&lt;br /&gt;            case XML_READER_TYPE_ELEMENT: {&lt;br /&gt;                NSString *elementName = [NSString stringWithCString:(char *)xmlTextReaderConstName(reader) &lt;br /&gt;                                                    encoding:NSUTF8StringEncoding];                &lt;br /&gt;                if (!inZone &amp;amp;&amp;amp; [elementName compare:name] == NSOrderedSame) {&lt;br /&gt;                    inZone = YES;&lt;br /&gt;                    [dictionary removeAllObjects];&lt;br /&gt;                    [keyName release];&lt;br /&gt;                    keyName = nil;&lt;br /&gt;                } else if (inZone) {&lt;br /&gt;                    [keyName release];&lt;br /&gt;                    keyName = [elementName copy];&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            break;&lt;br /&gt;                &lt;br /&gt;            case XML_READER_TYPE_TEXT: {&lt;br /&gt;                if (inZone &amp;amp;&amp;amp; keyName != nil) {&lt;br /&gt;                    NSString *string = [NSString stringWithCString:(char *)xmlTextReaderConstValue(reader) encoding:NSUTF8StringEncoding];&lt;br /&gt;                    valueData = [string retain];&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            break;&lt;br /&gt;                &lt;br /&gt;            case XML_READER_TYPE_END_ELEMENT: {&lt;br /&gt;                if (inZone) {&lt;br /&gt;                    NSString *elementName = [NSString stringWithCString:(char *)xmlTextReaderConstName(reader) &lt;br /&gt;                                                               encoding:NSUTF8StringEncoding];                &lt;br /&gt;                    if ([elementName compare:name] == NSOrderedSame) {&lt;br /&gt;                        [saxDelegate SAXDictionaryElement:dictionary];&lt;br /&gt;                        [keyName release];&lt;br /&gt;                        keyName = nil;&lt;br /&gt;                        inZone = NO;&lt;br /&gt;                    } else {&lt;br /&gt;                        if (valueData != nil) {&lt;br /&gt;                            [dictionary setObject:[[valueData copy] autorelease] forKey:keyName];&lt;br /&gt;                            [valueData release];&lt;br /&gt;                            valueData = nil;&lt;br /&gt;                        } else {&lt;br /&gt;                            [dictionary setObject:@"" forKey:keyName];&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            break;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    xmlFreeTextReader(reader);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@end&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3609066457437394736?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3609066457437394736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/switched-to-libxml2-25-less-time-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3609066457437394736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3609066457437394736'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/switched-to-libxml2-25-less-time-and.html' title='Switched to libxml2 ~ 25% less time and a lot less method calling'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-784363133263900635</id><published>2011-07-20T14:52:00.000-05:00</published><updated>2011-07-20T15:55:22.060-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android conversion iPhone'/><title type='text'>Android conversion continues</title><content type='html'>I continue to pound away on my Android conversion of the iPhone app I am close to finishing up. I have been working with SQLite on both sides. The wrappers are different which hosed me over for a bit today.&lt;br /&gt;&lt;br /&gt;iPhone&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;[database beginTransaction]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;... db operations&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;[database commit]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Android - &lt;span class="Apple-style-span" style="color: red;"&gt;WRONG&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;database.beginTransaction();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp; &amp;nbsp;... db operations&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;database.endTransaction();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Android - &lt;span class="Apple-style-span" style="color: lime;"&gt;CORRECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;database.beginTransaction();&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp; &amp;nbsp;... db operations&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;database.setTransactionSuccessful();&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;database.endTransaction();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Yes, you need to begin and end but you MUST call setTransactionSuccessful or kiss all the operations goodbye.&lt;br /&gt;&lt;br /&gt;I added a new call to the current XML Pull Parser we are using on the Android side. It allows you to send in a callback to get each row of data as it is processed. For our big boy Java app we just parse everything into memory then write from memory structure to DB table. Not a good idea on a mobile device as I discovered on the iPhone. I use the basic NSXMLParser there and build one record at a time into a NSDictionary. I added a bit of logic into our Pull Parser for the Android allowing a callback interface with a Map of values for each record. Saves a ton of memory and time under each OS. I was very happy how easy it was to do that conversion. I have begun my testing using the largest table I download so far, it has 17,401 records.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow; font-family: 'Courier New', Courier, monospace;"&gt;Timings&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;iPhone Simulator &amp;nbsp; &lt;span class="Apple-style-span" style="color: cyan;"&gt;3.7 seconds&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;iTouch Rev3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="color: cyan;"&gt;42.7 seconds&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Android Emulator &amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;41.0 seconds&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Samsung Galaxy S &amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;11.8 seconds&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see the iPhone simulator can really fool you into thinking your code is running great. On the Android side the emulator forces you to code tighter and the phone gives you a nice speed break. I am not at all happy with the 42.7 seconds it takes the iTouch to parse and store the data. Not sure what I can do to fix it but I will have to play around with it more soon.&lt;br /&gt;&lt;br /&gt;Luckily we only need to download the big tables when they are stale, which it will be once a year. I get a list of tables and last update date / times from the server on login. I compare my local last update to the server and grab a newer copy if it is out of date. We also have session tables that I have to load post login every time but I only want to do that once a session so I have all kinds of fun logic to decide if a table is stale. Seems to be working on the iPhone so I will start on that conversion next.&lt;br /&gt;&lt;br /&gt;I really wish the Android device emulator ran faster. Total switch from the iPhone. iPhone the simulator is very fast. Of course the simulator is using same OS as the MacBook Pro so it really has a lot less to do. On my PC the emulator has to emulate a Linux type OS and the device. It is much faster to run on Android the actual device but of course that is a pain in other ways in that I have to type my password on the silly thing over and over.&lt;br /&gt;&lt;br /&gt;The debugger is much slower under Android too. It is more usable as I can just click on variables and see their values or highlight a section of code and do an Inspect to see the value. Typing in commands to GDB on the Mac sucks and if you want to see some UTF8 text you have to type in a long command to convert it into something usable. Don't miss that at all.&lt;br /&gt;&lt;br /&gt;Command to convert UTF8 NSData block to NSString in Xcode&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;po [NSString stringWithUTF8String:(char *)[data bytes]]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Pretty simple to tag my debug output strings and filter them via LogCat. DDMS lets me look at the file system of the emulator with ease but I have to copy my DB to my local HD browse it. Much easier to use SQLite Manager under Firefox on the Mac to look into the simple, but buried rather deep, directory structure of the simulator on the Mac to grab the .DB file and check it out.&lt;br /&gt;&lt;br /&gt;I thought some things would be more straight forward to port especially since I was using SQLite on both devices but the wrapper classes are just different enough to cause confusion. Once I get in the base calls in my helper areas I will not even have to think about it.&lt;br /&gt;&lt;br /&gt;Just as I expected most of the code is a lot shorter on the Android side.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Not dealing with both a H and M file cleans up what you have to see in the code directory. Calls are less wordy as you are not naming parameters.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Much easier to set up static variables and enums are really enums and not globals.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Date processing is so much easier I am able to in-line the code as it is a few lines where Objective C was too many lines so I put things in separate methods.&amp;nbsp;&lt;/li&gt;&lt;li&gt;You can fully qualify what you are putting in a Map so I don't have to typecast things.&amp;nbsp;&lt;/li&gt;&lt;li&gt;No matched alloc / release pairs or autorelease calls on end of temp variables&lt;/li&gt;&lt;/ul&gt;Other random things&lt;br /&gt;&lt;ul&gt;&lt;li&gt;SVN interaction works in Eclipse but caused me numerous issues in Xcode.&amp;nbsp;&lt;/li&gt;&lt;li&gt;I can keep test.jpage open in Eclipse to run small code snippets to make sure I am doing substring correctly and the like.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Editor tabs are not randomly reused when I am using the debugger&lt;/li&gt;&lt;li&gt;If I double click on a file to open it or a search result is in an already open that tab opens instead of reusing the tab I happen to be on (tab support in Xcode is just barely acceptable)&lt;/li&gt;&lt;li&gt;Auto comment generation for JavaDoc is very handy&lt;/li&gt;&lt;/ul&gt;A lot more to do but it is moving on a pretty decent clip. So far I am just on the behind the scenes processing but soon I will be dealing more on the UI side and I will have to make some changes as there are areas easier to code on iPhone due to its one resolution for all devices. I need to find a nice tiled background for the Android. Currently using one that is OK but could be more professional. For the iPhone I had two images, one portrait and one landscape but that image shows seams when you tile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-784363133263900635?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/784363133263900635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/android-conversion-continues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/784363133263900635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/784363133263900635'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/android-conversion-continues.html' title='Android conversion continues'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3187287707372080142</id><published>2011-07-14T15:59:00.000-05:00</published><updated>2011-07-14T15:59:42.504-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android iphone conversion'/><title type='text'>Starting my Android conversion of the iPhone app</title><content type='html'>While the iPhone app is not complete I have begun my Android conversion. Currently the iPhone app is in internal QA and there are a few areas the server team needs to get in place before I can finish things but it is a fully usable app at this time. Since we want to release both apps in sync I need to get the Android side going again.&lt;br /&gt;&lt;br /&gt;It is always weird when you switch languages. I have been buried in Objective C for the last few months. Java is a welcome site at this time. First only having one file open per project is so much easier. My code tree looks tiny, I keep thinking I forget to convert a file because the package is so much smaller than the group.&lt;br /&gt;&lt;br /&gt;I am starting with the DB tables as I need that full schema in place for everything else to work. What I did to was a pretty easy port and I was able to cut and paste code with minor tweaks. Some of it I have not ported yet as I need to work with lots of rows in Android tables to see how best to handle it. The core concepts will be the same but a lot of data access will be different.&lt;br /&gt;&lt;br /&gt;Feels good to get as far along as I did today. First day in a long time I have not been using my mind all day long. This has been pretty mind numbing but you need that from time to time. Happy to be back on my MS Natural keyboard too with all the keys including the numeric keypad. The Mac Book keyboard is OK but really has a limited key set.&lt;br /&gt;&lt;br /&gt;Being able to hit Ctrl+Alt+O again to automatically handle all the import statements is great. You don't know how much you miss that feature until you don't have it. Plus Eclipse will auto add imports if you cut / paste from one file to another.&lt;br /&gt;&lt;br /&gt;Working on a dual screen configuration is also nice. My monitors are more at eye level so I am not as hunched over as I am on the laptop. I have the iPhone code up via PSPad (my free Windows editor of choice) on one screen and Eclipse full screen on the other.&lt;br /&gt;&lt;br /&gt;I know I am in for a bit of a long haul on this. Somethings will not convert smoothly to the Android, some areas will have to be rethought, areas I make fancier on the Android will have to be ported back to the iPhone. I will need to stop and go back onto the Mac when the server calls are ready to I can finish that up and get ready for beta customer release.&lt;br /&gt;&lt;br /&gt;Don't miss typing [[[ to get an allocation, init and autorelease going that is for sure. Not hitting the @ key for strings is great too. Stuff in Java feels native to Java, some things in Objective C when doing iOS development feel like "you are not doing the normal thing, you must type more to suffer". Hitting Ctl + Mouse Click to jump to a method jumps to the right method in Eclipse. In Xcode it finds methods with same name and gives you a list to pick from. I am in the M file with the method, just go there. Highlight a string and press Comand + F - screw you, type in what you want to find! So I have to Select, Cmd + C, Cmd + F instead of Select and Cmd + F.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3187287707372080142?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3187287707372080142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/starting-my-android-conversion-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3187287707372080142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3187287707372080142'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/starting-my-android-conversion-of.html' title='Starting my Android conversion of the iPhone app'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2716768770343710763</id><published>2011-07-06T08:44:00.000-05:00</published><updated>2011-07-06T08:44:44.700-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide programming camera games bowling'/><title type='text'>Back from DC - new camera is like a new IDE</title><content type='html'>Took a family vacation to Washington DC. Before we left I got a new camera - Canon T2i DLSR - for my birthday / father's day. I am not a professional photographer but I want to step up my game. I really don't know how to use all the features but I plan on taking the time to learn what I can.&lt;br /&gt;&lt;br /&gt;I have found with almost anything in life that better tools make for a better experience. If you bowl a lot you need to get a ball made for you with the holes drilled for you hand size and your bowling style. I don't doubt someone has bowled 300 games using a ball they found when they arrived at the lanes but most likely they are using a professional tool to do a professional job.&lt;br /&gt;&lt;br /&gt;I have friends that tend to go all out no matter what they do in life, beefy gaming rigs, top notch equipment to play tennis, bowl, swim, whatever it happens to be. This does will not make you a professional overnight but it does greatly improve your game and will allow you to more quickly improve because you are not fighting the equipment.&lt;br /&gt;&lt;br /&gt;Using the new camera I was able to take much better pictures even though I don't know how to use it fully. I put it in auto mode or maybe switched over to macro mode, adjusted the zoom level and let it do the rest of the work. I had a Canon PowerShot G1 over ten years back. Cost around $800 at the time and it was a wonderful camera, all 3.2 megapixels of it. I got my wife a Canon 510 and it got a lot of use until my son accidentally sat on it and bent the extended lens so it not longer would retract or do much of anything. We have a Canon SD1200 point and shoot camera that is so much faster to fire up and take shots than the vaunted G1 it is crazy. It does face recognition and all sorts of other cool things. Many fine pictures off of it.&lt;br /&gt;&lt;br /&gt;There just is no comparison to the new T2i and this is due to more megapixels in small part but mainly due to the superior lens. I just have a starter lens at this point, the one that came with the kit. Even with just that the quality is a huge step ahead of anything I have done before. The camera made me a better photographer, it sparked a new interest in learning how to get even better.&lt;br /&gt;&lt;br /&gt;To me this applies to programming as well. Bored? Try a new IDE for the language you are currently programming in. It might take away some of the drudgery. It make have new refactoring tools so you clean up some code you have always hated. Its static analysis tools may point out issues that have haunted your code forever. Maybe it is time to try a whole new language. Or you could just look at some of the menu items in your current IDE to explore areas you have never used.&lt;br /&gt;&lt;br /&gt;If you want to be a professional use professional tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2716768770343710763?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2716768770343710763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/back-from-dc-new-camera-is-like-new-ide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2716768770343710763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2716768770343710763'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/07/back-from-dc-new-camera-is-like-new-ide.html' title='Back from DC - new camera is like a new IDE'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7213384803278489836</id><published>2011-06-22T14:26:00.000-05:00</published><updated>2011-06-22T14:26:31.318-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='interface builder crap scrolling tableview'/><title type='text'>More Interface Builder fun</title><content type='html'>I installed my app on an iPhone for QA. In the appointment list view I had moved the toolbar to the bottom of the screen to put it in the proper iOS location and to avoid the mis-taps that happen all the time on the phone causing the "back" button in the navigation area to be accidentally pressed. The Tap zones on my rev 4 iTouch seem to suck and there are know issues with clicking anywhere near a button on a navigation bar triggering a hit.&lt;br /&gt;&lt;br /&gt;The QA person had a large list of appointments. When you drag scroll you can get the bottom one to appear as you can overscroll, handy feature on most mobile devices. Of course when it settles back down the last appointment was under the toolbar. Here IB bit me in the ass yet again. Clearly the toolbar is there in IB and clearly the scrolling table is above it but once the code runs all bets are off. Apple seems to feel if you have a scrolling view on the screen then it should own the whole screen all other widgets be damned. I had to fix this issue with the table painting under the navigation bar by adjusting the table view content inset at load time and during interface rotation changes. So I adjust it now for the toolbar too.&lt;br /&gt;&lt;br /&gt;After talking to QA this is not a rare issue. He has a number of iPhone apps that don't take this into account so sometimes he has to overscroll then tap really quickly on the last item in the list. That is crappy UI. It is a crappy UI that occurs much to often because the crappy tool you use to build you crappy app makes it look like it will be fine when it is actually screwed at run time.&lt;br /&gt;&lt;br /&gt;Every time I see a comment or article on how wonderful all iOS apps are and how awesome the tools are that let you create them I just want to scream! This stuff needs a ton of improvement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7213384803278489836?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7213384803278489836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/more-interface-builder-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7213384803278489836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7213384803278489836'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/more-interface-builder-fun.html' title='More Interface Builder fun'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-4124120715783546132</id><published>2011-06-21T10:37:00.000-05:00</published><updated>2011-06-21T10:37:40.674-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ib xcode objective c apple ios'/><title type='text'>Interface Builder how I hate you</title><content type='html'>I hate Interface Builder. I hate the way iOS deals with layouts. I must be doing something wrong, if you have any suggestions I am totally open to them.&lt;br /&gt;&lt;br /&gt;Here is the stupid layout for a simple enter the patient name view controller.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Last &amp;nbsp; [ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;First &amp;nbsp;[ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Middle [ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That is it, three stupid labels and three stupid text fields. I want them to show up in both portrait and landscape mode with room for the keyboard to appear without overlaying them.&lt;br /&gt;&lt;br /&gt;First off I drop the fields on the View align them to the top of the view. Run the code and guess what? Last is under the damn navigation bar. Why does this happen? Why are the controls not automatically moved down? What the hell am I missing in IB? I don't even know what to search on in Google to find out and I have tried. If you turn on a navigation bar in IB is just shows how much screen spaces it uses but it does not affect the way it operates when you run the program. That is not what I expect from the self appointed Gods of UI at Apple. I tried all kinds of autosizing anchoring and most made it way worse, moving the controls as I rotated so they overlapped each other.&lt;br /&gt;&lt;br /&gt;So I move all the stupid controls down in IB and get them to show up in the running program. Then I rotate to landscape and guess what? It looks like crap again. You can't design for both portrait and landscape in IB, pick one ONLY. Everything else you have to do in code unless you want to double the fun in IB and then double all your connections in the code and double the reason you want to fly out to California and start smacking people for having such a crappy way of doing this.&lt;br /&gt;&lt;br /&gt;Your other choice, and the one I took as I have had to do this is other areas of the code already, is to manually move controls on orientation changed notification. What a massive waste of code and time. I hardcoded, as that seems to be the Apple way again, the move value. Since the navigation bar is 44 pixels high in portrait and 32 high in landscape I move everything 12 pixels. What if Apple were to change this size? A lot of broken code that is what would happen.&lt;br /&gt;&lt;br /&gt;I added the waste of variables, 6 floats in all, to the controller to remember the Y position of each widget during initial view load. I adjust all the controls when the view appears &amp;nbsp;as could appear in the seemingly evil landscape mode of course and when it rotates. It all works now, things appear just below the navigation bar and just above the keyboard in both modes. The text entry fields expand to fit the width.&lt;br /&gt;&lt;br /&gt;Really people, this is so easy to do on the Android. I don't go through this hell when I do portrait and landscape. I don't have to make stupid adjustments to account for a navigation bar or to write a bunch of worthless code. What if I had 12 controls?&lt;br /&gt;&lt;br /&gt;The Android layout manager GUI editor is not as slick as IB, really pretty barren, and I have to tweak the XML but it works in both portrait and landscape and it does not screw me over when I have a navigation bar. &amp;nbsp;Controls can be relative to other controls so moving one can move a whole group. If I want to make portrait look different from the landscape I just do a second XML file with the landscape suffix using same IDs and the OS deals with it. I don't have to manually code the crap out of all of it. I can rotate in the ever improving GUI editor to see how it looks. If I need to use another language things can flow to match the new text.&lt;br /&gt;&lt;br /&gt;IB needs to take the navigation control into account. IB needs to allow you to create both portrait and landscape layouts without doing double connection work. IB needs an overhaul, it is not friendly to use, it is not obvious what to do, it has a crappy user interface. It does not open the correct associated file when you want to drag and drop connections. It fights me constantly. I hate to create a new view controller as I know the next part of my day is going to suck.&lt;br /&gt;&lt;br /&gt;I am ready to drop kick IB to the curb. I know many iOS developers have already done that. Creating and positioning everything in code, which I am half doing already, is as old school as you can get. Really, that is the solution from the "Graphics and UI masters" of Apple? I have not started on the iPad side of things yet but I am guessing is a new nightmare ready to scare me right back into Linux / PC and the Android. The Doctors want this running on the iPhone but I have to say I can not recommend the iPhone to anyone for use or coding after all the hell I have dealt with on it. The Android side is so much cleaner and easier to do in my coding opinion.&lt;br /&gt;&lt;br /&gt;If you have not coded on both then please don't tell me I just don't get it. If you know how to make IB in the list bit usable I beg you to post a comment or a link to a site that covers how to make it work. If you have given up on IB tell me how wonderful life can be without it shackles.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-4124120715783546132?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/4124120715783546132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/interface-builder-how-i-hate-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4124120715783546132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4124120715783546132'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/interface-builder-how-i-hate-you.html' title='Interface Builder how I hate you'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-3920831942660250407</id><published>2011-06-07T14:39:00.000-05:00</published><updated>2011-06-07T14:42:46.107-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solo development iOS code alone Objective c'/><title type='text'>Programming solo on a development team is not easy</title><content type='html'>How do you code solo on a development team? If you are the only one who knows a technology and believe me it is not easy for necessarily fun. We have 5 developers on staff, one being the boss so he is also in meetings and what not. He takes care of various pieces of the&amp;nbsp;infrastructure, a lot of the Jasper reports, database stuff and some Java coding. Two others do a lot of the Ruby on Rails work, DB work and some Java programming. The other guy does Java and a bit on the server side. For the first few months I was doing Java work on the Front end and a bit of Android work.&lt;br /&gt;&lt;br /&gt;Now I am the one and only person that knows anything about iOS (which I learned on the job) to clean up the existing iOS app and to write the new one. I also wrote the Android port of the original iOS code. Others can help on the Android side and I can bounce ideas off them them as it is Java based. They can also do code reviews. My boss has written and published an app on the Android market outside of work as have I.&lt;br /&gt;&lt;br /&gt;On the iOS side of things it is just me. No one can answer any iOS development questions, review my code or give ideas on how to make things look good on a small device. I can check stuff in that does not build and no one will notice. There are no checks and balances. I have a feeling this is a bit what it is like to work from home each day although even then you might have others in the company to look over your code and give suggestions.&lt;br /&gt;&lt;br /&gt;It is getting to be a large chunk of code too. Over 500k of source code for a&amp;nbsp;measly&amp;nbsp;dozen screens most of them being some sort of table leading you to detail screen or to a data picker. There are also 17 SQLite tables with all the support code that goes along with that.&lt;br /&gt;&lt;br /&gt;Before I began work here I had done a lot of work in C, C++, Java and C# with the most recent stuff in Java. I had not done any real SQL work and in fact got turned down for jobs because of that. For the small DB work I am doing it was really easy to pick up SQL. I am not dealing with stored procedures or a myriad of joins so I would in no way consider myself any sort of expert.&lt;br /&gt;&lt;br /&gt;On the iOS side I have never owned a Mac or programmed in Objective C. It is a mix of C/C++ and Java so I was able to apply that knowledge to the task at and. I am not a big fan of Objective C or Xcode but it is&amp;nbsp;serviceable. Someone needed to learn it and I volunteered for the task so here I sit. I have used a Mac before as I was the one at the previous jot to make sure all the Java code worked properly on the Mac.&lt;br /&gt;&lt;br /&gt;I have never worked someplace where I was the only one that knew an isolate specific thing. Sure I have been the go to guy for an area of the code but it has always been in a language that others know. I was the TIFF and other image format guy at my last job but it was still just Java.&lt;br /&gt;&lt;br /&gt;My wife and kids don't program so I can't go home and talk to them about it and now I sit at work and don't really have anyone to discuss my issues with either. Sure, I talk about the problems I am having but I just get blank stares. There is team interaction as I consume the data generated from the DB by the Ruby guys. We can talk XML format and all of that but I share no code with them. Objective C is a totally different world. I can't share any of the existing Java code. When I worked on the Android side I could share a lot of code making things go so much faster. Now it is all written from scratch and even though Objective C base language is just as terse as C the iOS API is not. I have manually converted a lot of Java code to Objective C.&lt;br /&gt;&lt;br /&gt;Auto complete helps in Objective C but if you scroll though a file you will find it very dense. Parameters are named but without the big benefit of being able to put them in any order, default them or skip any you don't need. Easy to tell what you are passing but there is a lot of text. All strings start with @ which stinks. If that is the normal and not the exception then you should not have to type it over and over. This is a preprocessor for C thus it acts like a tacked on language syntax at times.&lt;br /&gt;&lt;br /&gt;Programming for mobile devices is another difference. On a PC/Mac you tend to have a lot of pixels. Even if you code for 1024x768 you have a lot of room. Plus mice are pretty accurate where fingers are not. You need to leave big touch zones. Adding to the fun is lack of the standard 4 buttons found on the bottom of any Android device. Instead you have to add Menu, Back, Search support elsewhere in the interface. Home is there as the one big button you get on the iPhone. You have to break your UI into small chunks. Entering a date involves a full screen whereas on a PC you might have 10 dates on one screen in comboboxes.&lt;br /&gt;&lt;br /&gt;You also deal with screen orientation changes. The Android side is easier here, design one screen in portrait and another in landscape, the system auto picks up the right one. Under Interface Builder you are really given no help. You can design two screens but you have to manually tie everything back into the code and swap views or skip IB move it all around in the code. Neither way is very friendly. UI items change size between the orientations too, the navigation bar is small as is any menu you may have added to the bottom of the screen. I forget to test landscape when running in the simulator, simple key combination to check, but then I realize I hosed something up when I hook up the device as it is easy and natural to rotate that.&lt;br /&gt;&lt;br /&gt;This brings up the QA side of things. I have to get the code to them on a device and they need to check everything out in each orientation along with changing from one to the other and switching back and forth between screens. This is the type of thing you don't think about on the PC. We also have to worry about loss of connectivity. People on a PC tend to not lose the network connection unless something really bad happened. Laptops are a little more prone to a wireless loss but they still sit in place most of the time. I am working with Doctors who roam various facilities. I don't need an always on connection but I do need to communicate with the server from time to time.&lt;br /&gt;&lt;br /&gt;I am writing so much code just to get the basics in place I am not doing a lot of testing. We are going to hit up QA and there are going to get a pile of new functionality all at once. This has not been an&amp;nbsp;iterative process. With the Java code it is built as it is checked in. They can take a stable version at any time and test things. Can't do that with iOS due to many annoying limitations. First, you have to have a Mac. Our Java stuff builds under Linux and we run it on PCs, Macs and Linux machines. iOS apps&amp;nbsp;have to be built on a Mac, the Mac has to have a developer license from Apple, and it can only be run on a device that has been provisioned for the developers license.&lt;br /&gt;&lt;br /&gt;We can build the Android app with a developer license we create and it can be installed on any device via a command line tool to install the APK if you are USB connected to your PC, Mac or Linux box. I can also have any user run the emulator and play with the product without an actual device.&lt;br /&gt;&lt;br /&gt;We only have one other Mac in house over in QA. I have to do all building, provisioning and installing. That is a waste of my time. The Apple way is just not developer or QA friendly. It really hurts us on the Sales demo side too. Much easier to send out a quick patch for the Android to a sales guy in the field. Nearly impossible to do on the iOS side. Plus we can never publish an actually release date for the iOS as we are at the mercy of Apple even though our program requires a login to our servers so it is stupid to have it in the App Store but the ad hoc distribution plan is not feasible. We are going Android on the demo and sales side to avoid the Apple hassles.&lt;br /&gt;&lt;br /&gt;This covers a lot of ground but hardly touched the solo developer side. At times it is depressing. Working in a cave and doing a lot of Stack Overflow searching to get answers to questions. Writing reams and reams of code that only gets tested after months of work instead of weekly or at times daily. Needed to stop what I am doing to install the new build on a device and hoping when they drop by that I have a build that is currently stable enough to install. Not having people to bounce coding ideas off of means a lot of time under the headphones with my head in my hands. I am so ready to be back on the Android side where I can have people look at my code and tell me where I did something stupid.&lt;br /&gt;&lt;br /&gt;I hope we are able to add another staff member at some point that can help on both sides of mobile development. I would really like someone to look over my code and find areas where I cheated or really screwed up. I can take the&amp;nbsp;criticism&amp;nbsp;and would feel much better with a second set of eyes on it and for someone to make sure what I am checking in builds on another system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-3920831942660250407?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/3920831942660250407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/programming-solo-in-development-team-is.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3920831942660250407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/3920831942660250407'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/programming-solo-in-development-team-is.html' title='Programming solo on a development team is not easy'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6383961338148201149</id><published>2011-06-02T13:07:00.000-05:00</published><updated>2011-06-02T13:07:03.660-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='objective c enum iOS Mac'/><title type='text'>When is an enum not an enum? When you use Objective C!</title><content type='html'>I have been using enums in my Objective C code and they are starting to bite me in the behind. The issue? They are not unique, they really just go up in a big global named item pool. I had two classes (or interfaces as they are misnamed in this stupid language) both had enums and each had a enum value named "Text". Not a big deal in Java as you prefix the enum you want with its name when you use it. No way to do that in Objective C. They don't support namespaces for anything so I guess it should not be a surprise it is not supported for enums either.&lt;br /&gt;&lt;br /&gt;I really did not notice this until I needed to include both interface header files in another interface. Then it got annoyed that I redefined "Text". I see others that use enums prefix every freaking enum with the enum name. What is the point of the enum name at this point? What a waste and gives long and stupid looking enums but I guess you want to use the "convenience" of an enum in Objective C that is really the only way to do it otherwise you will be bite over and over. Hate to think what happens if some 3rd party software does not do this.&lt;br /&gt;&lt;br /&gt;Please don't give me the "just follow the language standards and shut up" argument. This is crappy compiler design. I will follow the standards to get around something the compile should handle for me but arguing that I am the one at fault is crap.&lt;br /&gt;&lt;br /&gt;The more I work with Objective C the more I understand why it has not been ported to other environments. It is not a modern language. You have to use it on the Mac. It was written as a C preprocessor, not as a full language, and it has been tacked on to since then. Learning to get around its lousy limitations is not making my job fun. PC folks steal everything, good or bad, but they have not bothered to steal this language and I totally understand why. It does allow the Mac crowd to feel more unique.&lt;br /&gt;&lt;br /&gt;I am also sick of the "iOS is harder to write so we have better developers, anyone can write on the Android and it shows" line of poop. You should not have to fight the compiler to write code ever. Fighting Objective C does not make me a better programmer, it makes me a bitter programmer and a hell of a lot less productive. I am learning to get around the issues and I try to not make the same mistake twice but I still cuss at the stupid thing for making me write too many lines of ugly code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6383961338148201149?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6383961338148201149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/when-is-enum-not-enum-when-you-use.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6383961338148201149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6383961338148201149'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/when-is-enum-not-enum-when-you-use.html' title='When is an enum not an enum? When you use Objective C!'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8958956977823819613</id><published>2011-06-01T09:22:00.000-05:00</published><updated>2011-06-01T13:13:18.521-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS mac sucks XIB simulator cached'/><title type='text'>How does cached XIB files in the simulator make any sense?</title><content type='html'>I just got done with another major iOS development frustration. The iOS Simulator caches XIB files. When I am writing code I expect a Clean and Build to actually mean something. But it does not for iOS and it really pissed me off this morning.&lt;br /&gt;&lt;br /&gt;I got sick of trying to get a layout to look correct using IB. IB sucks. IB does not help you with a portrait and landscape layout. IB gets in the way a lot. People on the web recommend throwing it out the window and just doing what you need in code. So I did that. I deleted the XIB file from the project and I did it all in code and it appeared to work like a champ. Today I added a background image to the view in question and I found I needed to change the label text color to show up. I change it and nothing happens. WTF? I do a search on Google and find out that the stupid simulator caches stuff and you have to gut it to make it stop.&lt;br /&gt;&lt;br /&gt;This is MY code and I have to gut the simulator, which guts out all my test images and my whole database so I can see the code I wrote that I did a clean and build actually run - you have got to be kidding me! But you are not and this is acceptable behavior of an IDE and simulator? Not in my book. Damn Apple how many more times do you have to royally piss me off? I will be so happy to get this product done so I can work on the Android port.&lt;br /&gt;&lt;br /&gt;I gut the simulator then the program does not run at all because of another deleted XIB file. I found no references to it, deleted it, ran fine,&amp;nbsp;committed&amp;nbsp;the delete action and thought the world was good. But this is an Apple world full of stupid crap. I had to recover the file from SVN today so I could get things to work again. At least the second area where I am doing code only and no XIB is working now too.&lt;br /&gt;&lt;br /&gt;Give me one good reason why the code I just cleaned and built is not the code that actually runs in the simulator. Am I going to have to totally reset my iTouch back to factory settings every time I delete an XIB file?&lt;br /&gt;&lt;br /&gt;I also found out I had to uninstall the app on both the iTouches to get it to stop using the XIB file. That is some extra stupid there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8958956977823819613?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8958956977823819613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/how-does-cached-xib-files-in-simulator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8958956977823819613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8958956977823819613'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/06/how-does-cached-xib-files-in-simulator.html' title='How does cached XIB files in the simulator make any sense?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7939164634940298243</id><published>2011-05-25T15:15:00.000-05:00</published><updated>2011-05-27T10:51:45.848-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode appcode objective c ios development SVN'/><title type='text'>Using both Xcode and AppCode on the Mac</title><content type='html'>I am not a huge fan of Xcode as I find it lacking in a number of areas. You can read my frustrations in various other posts of my blog like&amp;nbsp;&lt;a href="http://kevsaidwhat.blogspot.com/2011/04/things-i-dont-like-about-xcode-4.html"&gt;http://kevsaidwhat.blogspot.com/2011/04/things-i-dont-like-about-xcode-4.html&lt;/a&gt;. I have enjoyed using the JetBrains products in the past for my Java development. JetBrains has an Alpha release of AppCode which is free to download and use for those wishing for something other than Xcode for Objective C on the Mac. I end up using both on nearly a daily basis.&lt;br /&gt;&lt;br /&gt;To save me typing XC = Xcode, AC = AppCode and IB = Interface Builder&lt;br /&gt;&lt;br /&gt;If XC sucks, and it does, why can't I just switch to AC? Because AC does not have an IB replacement. It is going to fire IB up to do work in that less than optimal tool. It does this automatically for you. If I am doing a lot of IB tweaking or adding new views to my app I use XC so I am in just one tool. If I am doing heavy code development or much of anything with SVN, another area where XC truly blows, I use AC.&lt;br /&gt;&lt;br /&gt;Where does AC shine? SVN integration is one place. Where XC can easily get lost if you want to rename a file you have flagged to add to SVN AC handles it just fine. I have had XC screw up SVN so bad I could not even get the SVN command line tools to fix things but AC looked at things and let me fix it with a mouse click.&lt;br /&gt;&lt;br /&gt;AC flags a lot more things as warnings in your code than XC. Even if you just used it as a static code&amp;nbsp;analyzer&amp;nbsp;it would be worth the download. It can flag a bit too much at time especially around suspicious memory leaks, but generally it flags real issues. Using the wrong enum in a method call, odd use of objects for static access, unused imports, unused class methods, etc. It will really help you write cleaner code.&lt;br /&gt;&lt;br /&gt;You also get real refactoring, not the half-bake attempt in XC. XC can not rename a simple enumeration value, that is plain sad. I have found one instance in AC where it did not complete the refactoring. I was using a static on a class via &lt;span class="Apple-style-span" style="color: cyan;"&gt;TheClass.STATIC_VAR&lt;/span&gt; but I think it would have done it if I used the longer syntax of &lt;span class="Apple-style-span" style="color: cyan;"&gt;[TheClass STATIC_VAR]&lt;/span&gt;. As I am learning Objective C I find myself refactoring more and more. I don't want my code to look like Objective C done by a Java coder but to look like Objective C code. I have made a number of mistakes and want to correct them. I also have found inconsistencies in my class naming that I want to clear up. Very easy to do with AC but a manual process in XC.&lt;br /&gt;&lt;br /&gt;I did go into the system settings and turn my function keys into actual functions keys instead of dimming my screen and other things I rarely do. AC makes a lot of use of the function keys for shortcuts. Since I am used to what XC uses for shortcuts I wish there was more overlap but I switch back and forth enough it is not a huge issue.&lt;br /&gt;&lt;br /&gt;Both AC and XC fire up and shut down quickly enough it is not a big deal to switch between them. I am thinking of dumping IB usage and just creating the layouts in code. Since IB can not help you much when switching between portrait and landscape, an area I want to be friendly in, it is getting to be more of a pain than anything else. I also mistakenly thought I could lay things out in landscape and copy the coordinates into my code to move the controls around but that turned out to be a waste of time making the tool even less usable. Even Apple must have found this all too hard as their calendar app still does not support landscape mode. By default the code generated by XC always tells the OS it is portrait only. Scum. UITables with other controls above and below them must be dealt with in code so IB is not very useful for iOS apps and I will not miss the day I never fire it up again.&lt;br /&gt;&lt;br /&gt;I will use XC for memory leak detection, Organizer for screen shots and the like and a few other reasons but the more time I spend in AC the less I even thing of firing up XC to do anything. I would be nice if JetBrains could completely replace XC and IB but that would take a lot of development effort and for now I am very happy to have something to use instead of XC that is much more developer friendly. Nice going JetBrains!&lt;br /&gt;&lt;br /&gt;AC is alpha, I have had it crash a couple of times. XC crashed on me more than once too. I have not had it ruin any code or lose anything in SVN. XC does get lost in SVN which is not acceptable for a 4.x product. AC is using the very solid code base from their other language products and it shows. I am not associated to JetBrains in any manner. I have written a free plug-in for IntelliJ for verification of MigLayouts but I don't make any money from that product. Give AC a shot if you get a chance and let me know if I am totally off my rocker on this one.&lt;br /&gt;&lt;br /&gt;* Update * You can run the memory leak test and other profile activities just fine from within AC. I have had it crash when I make project level changes AC, use XC then come back to AC (fully shutting each down) but it seems to recover just fine. I do wish AC had the 3 finger swipe to switch between M and H files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7939164634940298243?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7939164634940298243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/using-both-xcode-and-appcode-on-mac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7939164634940298243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7939164634940298243'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/using-both-xcode-and-appcode-on-mac.html' title='Using both Xcode and AppCode on the Mac'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8185333511528900194</id><published>2011-05-18T07:31:00.000-05:00</published><updated>2011-05-18T07:31:11.686-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac install crap stupid bad usability'/><title type='text'>Mac annoyance</title><content type='html'>I download a new program on the Mac, in this case IntellijIDEA 10.5 for my Java work, via Firefox. I am using Firefox for the very handy SQLite Manger extension. Download completes so I double click on the downloaded file and I see an "extracting window" flash on the screen for a moment then I seem to be in a state of nothing happened.&lt;br /&gt;&lt;br /&gt;Having done this before I know the window I am looking for has appeared BEHIND the browser. Why? I was interacting with the download, shouldn't that window come to the front? Guess not and to add to this barrel of fun you can't CMD+TAB to it either. Nice usability. You get to move the browser window out of the way or iconize it to to find the exact thing you just tried to interact with so you can drag the stupid icon to the Applications folder for it to install.&lt;br /&gt;&lt;br /&gt;This is NOT user friendly, this is total crap.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8185333511528900194?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8185333511528900194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/mac-annoyance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8185333511528900194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8185333511528900194'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/mac-annoyance.html' title='Mac annoyance'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6857605383048382844</id><published>2011-05-16T07:53:00.000-05:00</published><updated>2011-05-16T07:53:34.753-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Xoom update iPhone portrait landscape'/><title type='text'>Xoom updated - so far so good</title><content type='html'>My Xoom was finally on this list of rolling updates on Saturday so I allowed it to apply the update and reboot. Even though it had plenty of battery and did not asked to be plugged in I did that anyway. Install process was painless.&lt;br /&gt;&lt;br /&gt;You can now size some of the the home page widgets. Nice to be able to see more of the calendar at a glance. We always have a ton of things in progress with two kids.&lt;br /&gt;&lt;br /&gt;Otherwise I did not see any big changes. I used the browser quite a bit this weekend and it never crashed but it is hard to tell if that is due to updates or just the sites I was visiting.&lt;br /&gt;&lt;br /&gt;The USA Today app still crashes but that must be a bug on their side. Pulse ran fine. I did a lot of news reading this weekend on the device. Nice to be able to quickly catch up with the world.&lt;br /&gt;&lt;br /&gt;Lots going on in the land of Android tablets. Many more being released soon which I hope is going to be good news. I still need to finish updating my game to the higher resolution but I have been playing the original Half-Life, Opposing Forces, Blue Shift, Portal 2 and now Half-Life 2 again. Silly way to waste time. All started with Portal 2 meaning I was on Steam again. Decided to play the old Half-Life as it has been a really long time. I forgot how stupidly&amp;nbsp;ridiculous they get with jumping towards the end of the game. It really took the fun out of things when it was just a jump attempt, die, reload process. When I got near Xen I stopped and played Opposing Forces and then Blue Shift. I had not played them before so it was fun. More puzzles in each with Blue Shift being really short.&lt;br /&gt;&lt;br /&gt;I have played Half-Life 2, Episode 1 and Episode 2 but I don't think I ever played Lost Coast. Guess I will find out as I play them in order. Of course it was a massive upgrade in graphics from the original. Plus you don't slide around when you hit the A and D keys. That really stinks in the original. You can go up and down a ladder without fear of instant death which is good and you can jump up on pretty much any box which seemed to be a downfall of the first one.&lt;br /&gt;&lt;br /&gt;On the coding side of things I am doing a home page with 6 buttons on the iPhone. Portrait will be 2x3 and landscape will be 3x2. Turns out Interface Builder is of no help in this area at all. You can make two different layouts but they are unknown to each other in the code. That is flat out stupid. On the Android you put your layouts in named directories and the OS chooses the right one for you. Under iOS you have to do it all manually and you have to double all your IBOutlet connections and switch layouts in code. I may just go the way of one layout and manually adjust the CGRect frame objects if they rotate the display. I can do the second layout in IB to get the proper rectangle numbers.&lt;br /&gt;&lt;br /&gt;Everything is so manual under iOS. I really comes across and and old SDK reused for a device. I know folks out there hate automatic garbage collection too but really people it the computer / compiler helping you out instead of you battling everything. ASM coders hated C, C coders hate Basic and C++, C++ coders hate Java and C#. I have used all of them, I don't miss the "fun" of ASM, 27 pages of 6502 code for a 2.5k program. C was great but code was hard to share even with your own projects. C++ was wonderful but the syntax was wanky and memory management was never a walk on the beach. Java was initially slower but VM updates made it very usable and overall development speed greatly improved. C# improved on various aspects of Java and missed out on other areas in strange ways. Objective C is just something to code in, no real love or total hate, but does seem stuck a few decades back and really does not help you take full advantage of the device I run it on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6857605383048382844?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6857605383048382844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/xoom-updated-so-far-so-good.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6857605383048382844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6857605383048382844'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/xoom-updated-so-far-so-good.html' title='Xoom updated - so far so good'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2084242354796842004</id><published>2011-05-11T15:42:00.000-05:00</published><updated>2011-05-11T15:42:28.144-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ios xcode stringWithFormat initWithFormat memory leak'/><title type='text'>Things I learned while debugging memory leaks in Xcode</title><content type='html'>It has been one heck of a day. I started doing memory leak testing yesterday on our iOS application. I am not done with the full application but I have just knocked off a large chunk of coding around database access and field editing so I wanted to make sure all of that was clean before I moved on to the next step and forgot how all of this code worked together. Of course I had some memory leaks and they needed to be fixed.&lt;br /&gt;&lt;br /&gt;Like everyone I got the point where I was thinking the tool that checks for leaks had a bug. It always seems that way when you look at your perfect code and can't figure out for the life of you why it has a problem. In the end I was able to fix all leaks, the tool was correct.&lt;br /&gt;&lt;br /&gt;While searching the web for leak reasons I ran across a better way of doing some things especially temporary string formatting. I was using:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;NSString *cmd = [[[NSString alloc] initWithFormat&amp;nbsp;:@"drop table if exists %@", [table tableName]] autorelease];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;But the better way to do it with much less typing and bracket clutter is:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;NSString *cmd = [NSString stringWithFormat&amp;nbsp;:@"drop table if exists %@", [table tableName]];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The first version is allocating memory, which you must free, using a method on the object while the second version is using a static method to create a string that it owned by something else so you don't have to release it. Probably just marked as autorelease but you don't care about the internals.&lt;br /&gt;&lt;br /&gt;I cleaned up all the areas in the code using the first format but one. For some reason in that one place I got a memory leak if I did not use the alloc and release myself. I commented the code so I will not try and "fix" it at some later point.&lt;br /&gt;&lt;br /&gt;Next I made a sad rookie mistake that is understandable coming from a Java background. In some of my classes in the dealloc method I called &lt;span class="Apple-style-span" style="color: cyan;"&gt;[super dealloc&lt;/span&gt;] first. Big no no. Of course in Java you don't have destructors so you almost always call super first because you are constructing. Calling &lt;span class="Apple-style-span" style="color: cyan;"&gt;[super dealloc]&lt;/span&gt; must be the last thing you do as it cleans up your object and all of its pointers. You are unwinding your construction. I was sitting there watching the program hit my dealloc call and looking at the retainCount (I know, this is not to be trusted) having a value of 1 and not understanding why it was flagged as leaking as I left the dealloc call and wondering why my release calls would crash things. A mistake I am not likely to make again.&lt;br /&gt;&lt;br /&gt;With a much better understanding of memory allocation and having read a number of web sites talking about who allocs and who cleans up I revisited the code and found a few places where method names were misleading or the object creating the values was not cleaning them up. I reorganized it all so allocation and clean up happen in same class if at all possible and method names don't look like Java but look like Objective C. There were not many of them but now they are starting to stand out to me.&lt;br /&gt;&lt;br /&gt;I missed cleaning up two of my four editing view controllers too. There I was putting nice clean up code in one of them but not all of them which happens when you are writing massive chunks of code in short order in a new language.&lt;br /&gt;&lt;br /&gt;Things are looking really good right now. I have run the program and beat on it pretty hard in both the Profile mode and with extra Run Malloc settings enabled. Running totally clean under both. All the databases are in place and my memory mapped databases are working as expected.&lt;br /&gt;&lt;br /&gt;I installed Xcode 4.0.2 and so far have not had another kernel panic. Still steamed you have to download such a huge pile bytes overnight for each Apple Xcode update.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2084242354796842004?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2084242354796842004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/things-i-learned-while-debugging-memory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2084242354796842004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2084242354796842004'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/things-i-learned-while-debugging-memory.html' title='Things I learned while debugging memory leaks in Xcode'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-4712783464191617875</id><published>2011-05-09T15:44:00.000-05:00</published><updated>2011-05-09T15:44:26.638-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode stupid update kernel fault apple'/><title type='text'>Another Xcode release - what fun</title><content type='html'>In a short time frame Apple has gone Xcode 4.0 -&amp;gt; 4.0.1 -&amp;gt; 4.0.2 with each being over 4g of download so that puts me over 12g of download since they don't have incremental builds. I am guessing since we are only incrementing the second dot of the release that there are VERY minor changes but I have to leave a machine on overnight to get the latest each time.What a massive waste of bandwidth.&lt;br /&gt;&lt;br /&gt;I have my first kernel fault today. When the screen first scrolled into view I thought it was a virus. Did not look like an official screen to me. So I looked up the wording on Google and found that it was in fact the real Apple BOOD or Black Overlay Of Death. I rebooted and sent the report off to Apple. Some semaphore corruption. The only thing running was Xcode and I was just holding down the Up arrow key to scroll through some code. I normally only have Xcode, Firefox and the SQLite extension for Firefox running but I had not even fired up Firefox yet today.&lt;br /&gt;&lt;br /&gt;Massive update of code today as previously I did not have all the tables configured so I was saving the text the user picked to the DB instead of the code. Everything has been converted and I cleaned up a lot of calls to be more generic. I still have a little work to do before I can move on to the MRU interface. I still have tables as getting them and other controls to show on one View seems to be a huge PITA. I know you have to through out using the UITableViewController as it wants the whole screen. I think I just need to put IB and do it all by hand.&lt;br /&gt;&lt;br /&gt;I attempted to refactor an element of an enum but Xcode could not handle it so I had to do it by hand. Another area where it is sorely lacking on features.&lt;br /&gt;&lt;br /&gt;Getting to be a lot of code, 72 objects, 400k of source code, for just a couple of screens. There are 16 database files so far and I know of at least 4 others I need to deal with. Once I got some helper objects in place those have been pretty easy to define and add.&lt;br /&gt;&lt;br /&gt;Probably need to run it all through the memory leak tester again. I did that last week and found a few areas. A lot more going on now with DB searching in place so probably best not to let that get out of hand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-4712783464191617875?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/4712783464191617875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/another-xcode-release-what-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4712783464191617875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/4712783464191617875'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/another-xcode-release-what-fun.html' title='Another Xcode release - what fun'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-1728120899300388750</id><published>2011-05-04T10:21:00.000-05:00</published><updated>2011-05-04T10:21:38.484-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS UIALertView broken reset iPhone SQLite'/><title type='text'>iTouch goes nuts, will not show a UIAlertView</title><content type='html'>I have been coding away on phase two of our application for the iPhone. Lots of SQLite work and ton of new code. I just began testing on the actual device this week. Much easier and faster to test in the simulator as you must type in a password to login in every time you run the program and that gets old on the device keyboard.&lt;br /&gt;&lt;br /&gt;I ran the program on our month old iTouch rev 3 device and not a single UIAlertView would appear. WTF? I did a simple test app, no go. I put the same program on our original iTouch rev 2 and it worked without a hitch. It has an older iOS version as Apple discontinued iOS releases for that hardware. Could it be iOS 4.3.2? After searching the web I found nothing to indicate that is an iOS version issue.&lt;br /&gt;&lt;br /&gt;Next thought was to test it on another device with same iOS version. I went in search of an iPhone that is provisioned but after checking iOS version not being 4.3.2 the owner suggested I do a factor reset on the iTouch and see what happens. Nothing on the iTouch but the one program I test so that was not a big deal. Post reset and everything appears to be working fine. My UIAlertViews show up.&lt;br /&gt;&lt;br /&gt;To me this rather worrisome. Here is a device that is a couple of months old at max. Has had exactly one iOS update installed and has no extra apps, no music, no videos, etc. on it. Basically a blank slate with just the one program I run and the SQLite databases I have created. After a month of use a very standard API call is totally screwed and I get to do a full factory reset to get it back to life. Now every time something works in the simulator but not on the device I am going to factory reset the stupid thing. Not something I want to tell clients to do. Seems like iPod users just accept this as a fact of life. Apple - it just works - unless it doesn't then factory reset it!&lt;br /&gt;&lt;br /&gt;Not that Microsoft and Windows is immune to any of this. I have a Microsoft mouse on my Win7 machine. It gets lost every time the machine goes to sleep then I wake it up. I have to unplug the mouse and plug it back in again to get it to not just jump all over the screen. Web searches show this to be a known issue with a freaking MS mouse! They had a solution of not letting the USB connection being used go to sleep but that did not solve it for me.&lt;br /&gt;&lt;br /&gt;Today I gave up and plugged the Dell mouse I was using on the Macbook into my desktop and plugged the MS mouse into the Mac - partially for the irony of it all. Hopefully I can stop the unplug fun on the desktop and the Mac seems to accept the stupid MS mouse. I like the MS mouse better as far as hand fit goes so I will miss it on my main machine when I go back to coding on the Android side.&lt;br /&gt;&lt;br /&gt;As far as SQLite goes it seems to work rather nicely. I have a dozen tables with some of them having 17k records. Initially loading the big tables took 26 seconds in the simulator and over 5 minutes on the device. Man you really have to run on the device to check your work! I was not wrapping my loading loop with a begin transaction / commit. After I did that the simulator went to 0.30 seconds and the device to 4.30 seconds. Still a massive time difference but 4.30 seconds is not bad for a table that only updates yearly. It is used for code to text description lookups.&lt;br /&gt;&lt;br /&gt;I am using FMDatabase to help out with the SQLite interaction. I implemented some ideas from the Android SQLite wrapper on the iOS side. Things like keeping an over all DB schema version in the PRAGMA user_version of the database. I have helper methods in my main DBTable object to help me create the INSERT and UPDATE strings and all tables are defined by an array of column mappings. Almost all SQL instructions are generated via code. Next I need to put captured pictures into the table as blobs.&lt;br /&gt;&lt;br /&gt;Xcode is being used as my main IDE again. JetBrain's AppCode was just not cutting it as I was in Interface Builder a lot and it doesn't provide enough info on program crashes as of yet.&lt;br /&gt;&lt;br /&gt;Speaking of crashes, I had a memory crash and went crazy trying to find it. I finally held down ALT and got the "Run..." in the menu and set the special memory options to show decent results. Ran slow but pointed me exactly to the memory area which was nowhere near an object I was blaming. I am using a multi-colored label as my table cell view. I was releasing some memory that I should not have in its dealloc. I still don't fully understand the iOS memory model. I only saw the crash after bringing up the view where you search and pick from one of the big DB tables then you rotate the device. Guess it was doing some garbage collection at that point and the double release annoyed it.&lt;br /&gt;&lt;br /&gt;I am slowly learning various memory debugging techniques, how to use NSZombieEnabled and how to use the memory leak detector. All of it is a bit obscure but does the job in the end.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-1728120899300388750?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/1728120899300388750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/itouch-goes-nuts-will-not-show.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1728120899300388750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1728120899300388750'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/05/itouch-goes-nuts-will-not-show.html' title='iTouch goes nuts, will not show a UIAlertView'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2063522331913134039</id><published>2011-04-20T15:47:00.000-05:00</published><updated>2011-04-20T15:47:56.158-05:00</updated><title type='text'>Using AppCode from JetBrains for iOS development</title><content type='html'>Since Xcode annoys me so much I though I would give AppCode from JetBrains a shot even though it is alpha code. I must say so far I am impressed. Not a single crash after have used it for a day and it does solve a number of complaints I have about Xcode.&lt;br /&gt;&lt;br /&gt;What is it that I like?&lt;br /&gt;&lt;br /&gt;Can reformat your code. Easy to set up the rules, works as expected. I finally took the time to clean up the look of some older code to match our current standards.&lt;br /&gt;&lt;br /&gt;Auto imports and uses current Xcode settings. It all just worked when I pulled up my existing project.&lt;br /&gt;&lt;br /&gt;SVN works like I expect it to work. So much nicer than Xcode.&lt;br /&gt;&lt;br /&gt;Groups sorted alphabetically. Gee, who would every think that could be handy?&lt;br /&gt;&lt;br /&gt;Nice color coding in the IDE. More things are colored making them stand out as they should.&lt;br /&gt;&lt;br /&gt;Much better static code analysis. Sure some of it is a bit overkill but I found a lot of useful issues that I have cleaned up in the code. It even spots unused includes, tells you when you synthesis a variable but never really declare it, signed / unsigned mis-matches, unneeded typecasting, things you might not be cleaning up in your dealloc, etc.&lt;br /&gt;&lt;br /&gt;If you start using a class that you have not imported yet a simple Ctrl + ENTER adds the import to the file.&lt;br /&gt;&lt;br /&gt;Editor tabs the way I expect them to work, open a file and it stays open, editor does not replace it during debug or any other time it sees fit.&lt;br /&gt;&lt;br /&gt;When you are in the debugger it shows you the actual content of your variables. Take that Apple, I can see what is my NSArray! I can look at strings, integers, booleans etc. How novel!&lt;br /&gt;&lt;br /&gt;Column block editing mode. Nice when you need to delete a hunk of code out the middle of a bunch of lines of code. Most editors support this, as far as I know Xcode does not.&lt;br /&gt;&lt;br /&gt;I am guessing there is ton of other stuff it does too. Right now it appears to be a keeper. We use IntelliJ for our main Java application so I pretty much know my way around a JetBrains IDE which is a help.&lt;br /&gt;&lt;br /&gt;Downside - still uses Xcode Interface Builder (can't blame them here, who would want to rewrite that) so it will fire up Xcode if you attempt to edit an XIB file. Not like I do that very often, generally you create one then spend most of your time coding for it.&lt;br /&gt;&lt;br /&gt;I will post more as I get more use out of this IDE. Nice to see some competition in this arena for Apple finally.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2063522331913134039?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2063522331913134039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/using-appcode-from-jetbrains-for-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2063522331913134039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2063522331913134039'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/using-appcode-from-jetbrains-for-ios.html' title='Using AppCode from JetBrains for iOS development'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2614585308351992676</id><published>2011-04-18T14:56:00.000-05:00</published><updated>2011-04-18T14:56:50.741-05:00</updated><title type='text'>Hit my first bit of iOS fragmentation</title><content type='html'>Yes there is fragmentation on the Android side of things. I have code in place to check for DPI of the device to tweak things in my custom controls. There are also issues on the iOS side of things so let's just cut the crap here Apple.&lt;br /&gt;&lt;br /&gt;I have a UIAlertView with a text entry field in it. Under iOS 4+ it works fine. The UIAlertView is moved up and out of the way of the on-screen keyboard. Under iOS 3.x it is hosed. Since Apple leaves things centered on screen keyboard or not adding a control to an UIAlertView hoses you. Used to be people could not even get the UIAlertView to rotate. Nice UI there Apple, even today you can't rotate the simple calendar.&lt;br /&gt;&lt;br /&gt;I can get it to work if I lock into a mode - portrait or landscape - but if the user rotates during the view I can't figure out a way to move the current UIAlertView. I have a pointer to it, I can run transforms on it, I can reset its center but nothing has any affect once it is on screen. Sure, the OS will move it about but I can't get it to move.&lt;br /&gt;&lt;br /&gt;Time to punt and move on. I will just have our app require iOS 4+ as most phones run this and we are targeting Doctors who tend to upgrade at will.&lt;br /&gt;&lt;br /&gt;I do see various posts on how to add code to check for older iOS versions. There is fragmentation on the iOS side of things. The original iTouch and iPhone are stuck in 3.x land never to move forward. As a developer you have to decide when to punt. We support Android 1.6 and newer only. That is a pretty old version. 3.x is not that old but also not worth too much hassle in the big picture.&lt;br /&gt;&lt;br /&gt;Even Xcode does not what you playing back in 3.x land. They have one emulator - a combination 3.2 for the iPad and iPhone. You get to 2x your iPhone app to test it. Screw those bastards! Hell their battery should have died by now anyway right?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2614585308351992676?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2614585308351992676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/hit-my-first-bit-of-ios-fragmentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2614585308351992676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2614585308351992676'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/hit-my-first-bit-of-ios-fragmentation.html' title='Hit my first bit of iOS fragmentation'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6201008801118501752</id><published>2011-04-15T09:00:00.000-05:00</published><updated>2011-04-15T09:00:15.624-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='app store submission iphone'/><title type='text'>First iOS app accepted and available on App Store</title><content type='html'>After a full week Apple has approved version 1.1 of our application and published it on the App Store. Very happy to have it make it through the process without a rejection. I did not work on 1.0 version and was not employed by the company at the time of its release. The person who wrote it is not around so I was going into the whole process blind. I made&amp;nbsp;significant code changes to the 1.0 code base, this was not a minor bug fix release.&lt;br /&gt;&lt;br /&gt;Before submission I read a lot of sites covering rejections. I found out RegexKitLite usage could kick you out for private API usage so I pulled its needs from the product. Turns out the one area I was using it I really did not need for users in production meaning I could pull it without replacing it. I also found an on-line tool that scans your code looking for private API calls and it found none so I felt pretty good about this area.&lt;br /&gt;&lt;br /&gt;I located the list of icon sizes for both iPhone and iPad and I included every one of those. Since I was in the graphics area I also updated everything for the Retina display which I was able to test in the simulator and then on the new iTouch we purchased.&lt;br /&gt;&lt;br /&gt;Even though the 1.0 version was already out in the store we did not feel the network handling code was the best. This is an area Apple can get picky about so I gave it a solid once over and cleaned up areas that did not handle network connection loss. I also dealt with multi-tasking as your data could be stale if you pushed the application to the background for any length of time. I auto refreshed the appointment list when the app came back to the foreground.&lt;br /&gt;&lt;br /&gt;I ran the memory analyzer and cleaned up all the potential memory leaks found by the static checker and then ran the application multiple times to make sure no leaks showed up during run time analysis.&lt;br /&gt;&lt;br /&gt;Our QA team gave it a beating too finding a few issues but it was pretty clean overall.&lt;br /&gt;&lt;br /&gt;The confidence level was high at submission but so many have been rejected for oddball reasons I was still worried. The big one could be the new "limited audience appeal" rejection. Would they need to know how many doctors were going to use it? How many is too few? Could they force us into the ad hoc model? Glad that did not come into play.&lt;br /&gt;&lt;br /&gt;Still don't care for it taking a week to get a 1.1 version posted. I guess you can try to have them push updates quicker when you run into critical bugs. That was not the case here, this was really a functionality improvement along with UI clean up getting it ready for the 2.0 release I am working on now that will add a lot of new functionality.&lt;br /&gt;&lt;br /&gt;Back to work on the 2.0 version for me including new SQLite usage. I have already refactored that area twice and just now have it back up and running. I had to use NSZombieEnabled = YES to figure out that I was releasing an object too early. I also can't run my test code in the profiler and I need to figure out why that piece is annoyed. Xcode is a real PITA most of the time.&lt;br /&gt;&lt;br /&gt;The Android version of the product, that I also wrote basically from scratch as there was no 1.0 version of that, released to the store in all of 20 minutes including account sign up. Of course we can update that pretty much instantly too. It just happens to be of less importance as most Doctors use the iPhone. We will release the 2.0 version to both platforms once I get it completed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6201008801118501752?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6201008801118501752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/first-ios-app-accepted-and-available-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6201008801118501752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6201008801118501752'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/first-ios-app-accepted-and-available-on.html' title='First iOS app accepted and available on App Store'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7011088610511063646</id><published>2011-04-14T09:25:00.000-05:00</published><updated>2011-04-20T10:18:25.684-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode sucks apple ios iphone'/><title type='text'>Things I don't like about Xcode 4</title><content type='html'>I have spent the last couple of weeks coding heavily in Xcode 4.0.1 and be sure to upgrade as there are show stopping bugs in previous versions. My experience with Xcode has been less than wonderful over the past half year. There are a number of things that have been annoying me as of late. Might was well vent, why else would you have a blog?&lt;br /&gt;&lt;br /&gt;Refactoring does not fully work. When I program in a new environment I want my code to look native. I don't want it to look like a Java guy is writing Java code in Objective C. On my first attempts to do things I have screwed up and named methods and classes poorly. I use Refactor to fix those transgressions. Of course it does not rename everything. In Eclipse I have not had a refactor fail to catch everything that I can remember. Basic steps in Xcode are refactor, build, fix all the errors it left. This is not how an IDE should work. Since you get a preview dialog during refactoring they could add a "do this one" check list it they think something is iffy, instead they do the simple and blow everything else off.&lt;br /&gt;&lt;br /&gt;Attempting to change method signatures sucks. Let's say I have initWithTitle and I need to update a line of code to become initWithTitleAndFlags. When I start typing "AndFlags" it wants to put in ALL the parameters, even the ones shared with the original. I have to delete all the crap it added incorrectly each time. It gets really annoying when the IDE attempts to outsmart your typing.&lt;br /&gt;&lt;br /&gt;Scrolling through the document with keyboard navigation does not move the text cursor. If I use fn + up arrow to go up a page I expect the text cursor to be on the page I am viewing ready to type. Instead my view just scrolled up a page but my text cursor did not move. I have to click to move the text cursor. To me that is a waste of time and not how pretty much every other editor works.&lt;br /&gt;&lt;br /&gt;I use multiple tabs and I am very happy they added tab support to Xcode 4. I have them all open in the order I want then I start debugging. Lets say I have "CaseItem.h" "GroupSet.m" and "GroupHeader.m" in tabs. The active tab is "GroupSet.m" and I run the program. It crashes in "GroupHeader.m", what do my tabs look like? Did the IDE switch over to the already open tab for "GroupHeader.m"? No, that would make sense, instead I get&amp;nbsp;"CaseItem.h" "GroupHeader.m" and "GroupHeader.m" which totally screws up the tabs I had open. Would it have been so hard to find the tab with the file already open in it? Other IDEs do that for me.&lt;br /&gt;&lt;br /&gt;The left side view - showing the class list, search, debug etc. stuff, changes based on which tab you select. Of course the debugger changes it too as do other processes. It hardly seems like you own this window. Every tab has its own last setting. Just when I think I expand the class view to show the things I am working on I switch to another tab and it changes. The debugger takes over but when the debugging session ends the window is blank so I have to switch back to the class view. Doing a search leaves the results for some limited amount of time that I can't figure out. I end up redoing searches over and over as the context seems to go out of scope just when I am narrowing down to what I want.&lt;br /&gt;&lt;br /&gt;For consistent UI look there is another fail. The Editor and View button sets in the upper left corner appear to be group toggle buttons. The Editor buttons are, only one button can be depressed but the View buttons are not, you can do one or more of the buttons depressed. I don't see a visual difference in the control to let me know that.&lt;br /&gt;&lt;br /&gt;On the View side of things I want to see the Utilities pane only when I am on an XIB file but once I turn it on for a tab it stays there for XIB, H and M files. That view sucks for H and M files because as I type it is updating with some sort of help system which I find very distracting. When I am typing code I don't want the editor to be constantly flashing new text in other areas of the screen.&lt;br /&gt;&lt;br /&gt;It can't always uncomment code.&lt;br /&gt;&lt;br /&gt;// [self goBoom];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; // [self goBoom];&lt;br /&gt;&lt;br /&gt;The first line will uncomment with CMD + / but the second line with not because it starts with SPACES. Gee boys, how hard is this to figure out? Nice to make me strip leading spaces to make a keyboard shortcut work.&lt;br /&gt;&lt;br /&gt;Classes in sorted order? Sorry bub, do it manually. I have my classes organized in various groups but the files in each group are not sorted and as far as I can tell there is no way to sort them without manually dragging and dropping them. There was a way to do it manually in Xcode 3.x but that has been removed from 4. Why remove it? Why not leave it and enhance it allowing you to turn on an auto sort mode? Look I totally get it if you don't want them in a sorted order, that should be an option, but no way to sort is stupid.&lt;br /&gt;&lt;br /&gt;One click zone for both break points and error / warning indications. How many times have I tried to click on the red error icon in the line number gutter but instead I get a breakpoint set? Too many to count especially when using the touch pad. I have an external mouse attached meaning I use it more and more to do things as the touch pad is not as accurate and I end up doing things I don't mean to do like setting a stinking break point. To unset the damn thing I have to click, hold and drag it away. What a cool animation and sound I get for my effort but what a waste of time and mouse movement to do it.&lt;br /&gt;&lt;br /&gt;Doing a New File..., telling it which class you are deriving from and having it create the files with errors. Gee thanks for asking what I am deriving from and then NOT including the header file so the first thing I do with a new file with a few lines of code is fix it. Love that auto code generation. Nice taking it that extra mile.&lt;br /&gt;&lt;br /&gt;Code reformatting, can a brother have some? Really this should be part of any IDE. I have to reformat all the auto-generated code as we don't put the opening { on the a line by itself. Yes, there are some third party tools but I really should not have to go through that when using a Professional IDE. Oh wait, it is free, so maybe it is not Professional? There are a ton of free IDEs that support this right out of the box.&lt;br /&gt;&lt;br /&gt;Plug-in support. Again why write an IDE that does not support plug-ins? That way you don't have to write everything, the programming minions will fill in the holes. I have written plug-ins for Eclipse and for IntelliJ. I have downloaded and used a metric boatload of plug-ins for both. It is awesome. Damn you Apple, you only give us one IDE and we are only allowed to run it your way.&lt;br /&gt;&lt;br /&gt;SVN integration is crappy. It does a poor job with even the simple tasks of adding new files or deleting files from the repository. I end up doing a good chunk of my SVN processing outside of the IDE. That is just sad. I can't believe the IDE can't handle deleting files and keeping SVN up to date. I must manually do the "svn rm {file}" every time. Do iOS developers never remove files?&lt;br /&gt;&lt;br /&gt;I find Xcode 4 to be sorely lacking as an IDE. I have no hopes of Apple fixing any of the short comings. It is free to anyone paid and signed up for the developer program and competition free so why should they bother? Maybe in house they have some other better tools. Maybe other companies have found other editors to use. People are pumping out apps for iOS using this POS and for many it appears this is the only IDE they have ever used so they think it is perfect as they don't have anything to compare it against. I have used a number of other tools and Xcode pales in comparison.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7011088610511063646?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7011088610511063646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/things-i-dont-like-about-xcode-4.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7011088610511063646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7011088610511063646'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/things-i-dont-like-about-xcode-4.html' title='Things I don&apos;t like about Xcode 4'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7873605033217135278</id><published>2011-04-12T15:38:00.000-05:00</published><updated>2011-04-12T15:38:18.052-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android xoom review'/><title type='text'>Life with Xoom</title><content type='html'>I broke down and bought a Xoom. Actually I bought it for my wife for her birthday. She has an Android phone and uses it all the time. She also has a nice HP laptop that is running most of the time. She is a stay at home mom but probably gets more done in office productivity apps than I do. She really knows her way around Excel and Word.&lt;br /&gt;&lt;br /&gt;Why get the Xoom? I have had much better luck with Android over iOS. I liked the higher resolution screen and the choice of Flash. Various web sites, including Soap Opera Digest - one of her favorites, use Flash. So do a number of kid sites like Nick Jr. I don't care for Flash as I think too many have abused it but that does not mean I refuse to use it in the proper situations. So far the sites I have visited that need Flash have run without a hitch.&lt;br /&gt;&lt;br /&gt;My wife tends to fall asleep well after I do. She has been using her phone while laying next to the me in bed before she nods off. She likes to read email, scan various websites and wants to save tree via eBooks. She also wants a second monitor at times for her laptop. She also loves the instant on of the phone to check weather and email but, like me, does not like to type anything more than a few sentences on a tiny keyboard. Now she can read even more sites, actually respond to email and wants to buy some eBooks.&lt;br /&gt;&lt;br /&gt;For these needs the Xoom appeared to be a really nice fit. So far that has turned out to be the case. I love the instant on, the ability to hold it in one hand and read websites, the fast enough typing speed (not full touch typing but fast two finger typing). There are a number of fun games to play on it and the games are more enjoyable in the large format. Angry Birds is great, you do have to manually zoom out every level which is annoying but being able to see the whole level for each bird shot is very helpful. Setting up multiple email account was easy as is switching between them.&lt;br /&gt;&lt;br /&gt;I used the about:debug setting of the browser to tell the world I am a desktop instead of a phone and most sites agree and show me a full web experience. I tried Opera and thought it was OK and FireFox which appears to work decently. FireFox does not scale images all that great, might no be using the GPU where the built in browser does.&lt;br /&gt;&lt;br /&gt;Kids enjoy it, hit power, check homework central, grades, search for essay information all from anywhere in the house. It has become the family pass around machine. Battery life has been great. Even Angry Birds does not kill the battery like my phone does.&lt;br /&gt;&lt;br /&gt;We went WiFi only. Did not want another data plan in the house. Might pick up a BlueTooth keyboard at some point.&lt;br /&gt;&lt;br /&gt;Downsides - Honeycomb does not seem to be finished. I am really hoping since Motorola went vanilla here that I will get upgrades as soon as Google has them available. I like a lot of the things they did but you have to not think it will be just like your phone. Various parts of the UI have moved. It has crashed a couple of times and I have had programs running in the background playing sounds that you can not see in task manager so I had to do a reboot. The browser will crash too, that is why I have been playing around with Opera and FireFox.&lt;br /&gt;&lt;br /&gt;I am converting my Android phone game - Grid Hunt - to Honeycomb. Lots of cool things in the API including fragments. It is nice to have so much more screen space to be able to display more game information. I plan on adding multiple player settings, two player mode and more scoring statistics.&lt;br /&gt;&lt;br /&gt;There is one area I think all tablets are failing at - supporting multiple users. All are just like a phone, power it on, you are the one user. I want my wife and I to have separate desktops layouts, default tabs open in the browser, default email settings etc. I don't care about switching users with both logged in at same time, just log one out and the next one in - basically reload settings. I know just sharing it playing games between my son and I would be a big help. Right now Stupid Zombies has many completed levels I have not actually played.&lt;br /&gt;&lt;br /&gt;I do like that I was able to connect to our network drives via SMB easily. I can copy files from the Xoom to the network to back them up, look at many files (DOC, XLS, PDF, etc.) right off the network on the device etc. We keep most of our documents on the network drive at home as it is backed up regularly.&lt;br /&gt;&lt;br /&gt;I rarely am a first adopter of anything. This was a great gift for the wife / family. It gives me a chance to convert my game and be in on the early set of Android 3.0 ready applications. I really hope it gets a number of updates from Google / Motorola. It is very useful as is but needs tweaks before I would recommend it to less tech savvy friends and family. I am happy with the purchase but really want some updates to fix the crashes and to tweak the UI.&lt;br /&gt;&lt;br /&gt;My neighbor bought the Samsung tablet in late January. I was telling him about the Xoom when he dropped by to borrow my power washer and he thought it sounded pretty cool. He is very happy with his tablet in that his work provided laptop can take 10 minutes to fire up due to all the corporate crap it must run and it being low on physical memory. He has a standard 8 AM meeting with a spreadsheet. He fires up the tablet, has the spreadsheet ready to peruse and can have the laptop come on-line when it ready. He has gotten a lot of use from the tablet. I hope to feel that way months and years after my purchase too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7873605033217135278?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7873605033217135278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/life-with-xoom.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7873605033217135278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7873605033217135278'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/life-with-xoom.html' title='Life with Xoom'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7224378427341456214</id><published>2011-04-06T20:56:00.000-05:00</published><updated>2011-04-07T07:33:01.921-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode sucks apple crash'/><title type='text'>My note to Apple after more Xcode pain</title><content type='html'>After having beaten my head against a wall for the last couple of hours I can not express how disappointed I am with Xcode and iOS development in general.&lt;br /&gt;&lt;br /&gt;I just wanted to submit version 1.1 of my app to the app store. I had archived the app, or so it seemed, but I was unable to find the archive on disk to submit via App Loader. After searching the HD over and over having no luck I finally found a web posting stating that anyone who upgraded a project from Xcode 3.2 to Xcode 4.0 was hosed. You had to manually delete some settings from the project file to get the archive to appear in the Organizer.&lt;br /&gt;&lt;br /&gt;Thanks so much for reporting success to me over and over when it really was not successful. That just makes my day. Don't report success if it does not happen. Please have your %$$#@ QA team test your products. Apple seems so worried about NDA on a stinking IDE that it really does not get tested. Please let people test this stuff before you waste so much of my time.&lt;br /&gt;&lt;br /&gt;After I got the archive to work I pressed Validate and Xcode crashed. Next time I pressed Submit and it crashed again. I rebooted just in case the other work I had done had annoyed your fine IDE. Nice going QA, love that you did not test submitting an app via the IDE, the IDE I am forced to use to submit to the one app store out there. Again what a huge waste of my time.&lt;br /&gt;&lt;br /&gt;I search the web again. Known problem. Fixed, I can only hope, in XCode 4.01. Yeah, thanks Xcode for NOT telling me an update was available.&lt;br /&gt;&lt;br /&gt;I realize Apple users are too stupid to install patches. So nice of you to think about the dumb, the ones not already in your QA department, and force me to download 4.6g of Xcode for the 3rd time. Yes, I love hogging my bandwidth for 10 hours, please more sir.&lt;br /&gt;&lt;br /&gt;You owe me about 30 hours of wasted time using your untested products so I can spend more money to submit them to the ONE and ONLY app store. I can only hope the updated app does not get rejected for some crazy reason. And I really hope the 4.01 works, I bet it breaks something else that will haunt my dreams.&lt;br /&gt;&lt;br /&gt;It has not been any sort of pleasure working with Apple, Xcode or the Macbook. It took us over a month to get our simple account straightened out. Every interaction I have had with Apple has been painful. I don't find Mac products to be friendly or easy to use. In fact I hate them but it pays the bills so I work on both our Android and iOS apps. The Android side is so much more pleasant and easy to work with I can't even begin to tell you.&lt;br /&gt;&lt;br /&gt;UPDATE: 4.01 did not crash when I pressed Validate but it showed yet another issue. I had to do some more web research to find out how to fix that. Validate passed, Submit worked and the app is out on the app store. Of course even after downloading 4.6g of crap it is now downloading iOS 4.3 library. Why is that not included in a 4.6g download already? When does "user friendly" have to equal "bandwidth stupid"?&lt;br /&gt;&lt;br /&gt;&lt;continuedownload&gt;&lt;br /&gt;&lt;startlife&gt;&lt;br /&gt;&lt;/startlife&gt;&lt;/continuedownload&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7224378427341456214?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7224378427341456214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/my-note-to-apple-after-more-xcode-pain.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7224378427341456214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7224378427341456214'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/my-note-to-apple-after-more-xcode-pain.html' title='My note to Apple after more Xcode pain'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7711574392509093210</id><published>2011-04-06T07:48:00.000-05:00</published><updated>2011-04-06T07:48:42.471-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile android iphone hardware'/><title type='text'>What office hardware do you have?</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;When you only work on desktop or web applications your office space tends to stay pretty standard as far as hardware goes. Once you add mobile to your list things get out of hand.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I have my main development Win7 64-bit based PC with dual 20" LCD monitors. Attached to that is my wireless Sennheiser headphone base unit. Very happy with that device. I have a MS Natural 400 keyboard which really helps in wrists but does take up more room than a regular keyboard. Mouse mat with a gel wrist rest and a MS mouse.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Sitting just to the right of all of this is my new Macbook Pro 15". I have an external mouse connected to that. While I like the touch pad it does not work very well when dragging items around and I don't like to use the keyboard and mouse just to open a link in a new window. If I need to do any graphics work the touch pad just does not cut it for me.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Laying about in various places I have my phone for hardware Android testing, a version 2 iTouch and a version 3 iTouch for camera code interaction. Behind the dual monitors there is a mini-hub and I have a power strip on my desk to plug-in the laptop each day. I take the Mac home at night allowing me to work from home if need be.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I have a stuffed Duke (the Java mascot) and a stuffed Android Robot, not sure if has a name? The cast of Futurama in diecast sits atop my mini-tower PC case.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Working in the land of mobile sure has added to the clutter. Previously it was just the main PC, now I have stuff scattered all about and I have to switch keyboards and mice often during the day. I find myself going for the wrong keys from time to time.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;This does not even count the clutter of my on-screen desktop. I usually have Eclipse, Paint.NET, Pidgin, Media Monkey, PSPad, File Explorer, Chrome and at least one Android emulator running on my PC. On the Mac side I use Spaces and I have Xcode, IntelliJ, JEdit and Firefox running. Why not Chrome on the Mac? There is an extension for FireFox to handle SQLite files for FireFox that I use. During any given day various other programs and utilities are opened and closed.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I use PSPad and JEdit to keep open various files with code snippets and random thoughts for the platform I am on. If I think of something I need to add to the code late I just type in a note to myself. For PSPad I tend to have about 6 files open some with to do lists others with blocks of code I am experimenting with or code I downloaded from the web I am using for ideas. I just JEdit on the Mac as it was free. PSPad is great when I am experimenting in HTML as you can quickly type something in and run it to see how it looks.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;My browsers tend to have a number of open tabs, work email, two personal email accounts, Java Docs, JIRA for bugs and some sites I have recently searched via Google. A few years back this would all have been system overload but now having files open all over the place seems to be the norm. I shut down the Mac every night but leave the PC running, just turning off the monitors as I leave. The Mac starts up plenty fast enough and having it at home is nice.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7711574392509093210?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7711574392509093210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/what-office-hardware-do-you-have.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7711574392509093210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7711574392509093210'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/04/what-office-hardware-do-you-have.html' title='What office hardware do you have?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2301579493966189991</id><published>2011-03-29T19:59:00.000-05:00</published><updated>2011-03-29T19:59:42.145-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android 3.0 honeycomb display bugs issues ExpandableListView'/><title type='text'>Running my app on Honeycomb - why these changes?</title><content type='html'>My boss bought a Xoom tablet. Pretty sweet device. I have played with the Samsung Tablet a couple of times and I like it too. I have not played with an iPad, I have only seen them for a brief period of time. Makes me pine for one of my own but of course they sold out the WiFi only version rather quickly.&lt;br /&gt;&lt;br /&gt;I have installed our software on the Samsung 7" tablet and it ran without a hitch. Of course that is running 2.2 and really is just a big version of a phone. I was expecting the same to happen on the Xoom but I was wrong.&lt;br /&gt;&lt;br /&gt;I had to install the Motorola USB device driver first. No big deal. I now have a variety of USB drivers on my development box as I have installed our app on my T-Mobile Samsung Galaxy S, a Verizon phone, an HTC and some others. After that we kicked it into dev mode and moved the software across then things got ugly.&lt;br /&gt;&lt;br /&gt;I am using a pretty simple Relative Layout View in a List Activity and two simple views (with some minor special variations) in an Expandable List View. Both looked crappy, labels on top of things, other areas to tall and some layouts just missing data / not sized properly at all.&lt;br /&gt;&lt;br /&gt;First up I was creating the Group header view in code for the Expandable List View. I was not using DIP but a hard coded number. This is the wrong way to do Android programming. I was using sample code from the web. I had converted the Items of the Expandable list to XML so I converted this area also quickly solving that issue. I thought this area looked a little off when I ran it in the 1.6 emulator at one time. Both the 1.6 emulator and the Xoom use 160 dpi instead of the 240 dpi of my phone. I should have fixed this earlier.&lt;br /&gt;&lt;br /&gt;Next was the labels on top of each other. Turns out the &lt;span class="Apple-style-span" style="color: cyan;"&gt;layout_below&lt;/span&gt; setting works differently in Honeycomb. I had this type of layout&lt;br /&gt;&lt;br /&gt;label1: &amp;nbsp;data1&lt;br /&gt;label2: data2 &amp;nbsp; label3: data3&lt;br /&gt;&lt;br /&gt;I had label2, data2, label3 and data3 using &lt;span class="Apple-style-span" style="color: cyan;"&gt;layout_below="@id/label1"&lt;/span&gt;&amp;nbsp;which worked for label2 but maybe not for data2 and for sure not for label3 and data3. I used &lt;span class="Apple-style-span" style="color: cyan;"&gt;layout_alignBaseline&lt;/span&gt; instead to align data2, label3 and data3 to label2 and now it seems to look as it should on all platforms if you do the next step.&lt;br /&gt;&lt;br /&gt;Honeycomb does not consider "" to be the same as " " when it comes to control height sizing. If you give it the empty string "" it thinks the size of the area is really small. If you give it " " (notice the SPACE in there) it will correctly calculate font sizes for the TextView. Very annoying and I really don't have a clue why they decided to do this. I understand when things are NULL vs. "" or " " but that control has a font size so I should get back metrics for the font being used not the content and "" should give same results as " " as it has for a long time on the Android platform. I had to adjust all the display items in my Map converting "" to " " as I found them. Small waste of processing time but I decided not to do an OS version check.&lt;br /&gt;&lt;br /&gt;For the Item view in the Expandable List View I had to change from &lt;span class="Apple-style-span" style="color: cyan;"&gt;android:layout_height="wrap_content"&lt;/span&gt; to &amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;android:layout_height="20sp"&lt;/span&gt; forcing the items to have a height otherwise they got shrunk to nothingness.&lt;br /&gt;&lt;br /&gt;Finally I had to change the background color of my items from null to white because Honeycomb gives the items selected state and that does not paint using the backgroundDrawable I was setting via code. For the first item in the group I was drawing the top left and top right corners rounded. For the final item I was drawing the bottom left and right corners rounded. I know in XML you can set up the normal, selected etc. states but you can not do this in code. For now I have ripped out the rounding of the corners. I am going to try and put that back in tomorrow by bookending the text view group with rounded corner zones. I really liked the way it looked so I hope I can battle it back into place. Not sure why Honeycomb selects the first item in each group but it does. Could be this area would have looked crappy on a phone with a D-Pad too. I already have enough variations of the view in the res directory for my potential item types that doing more sets for each the possible corner types seems a bit overkill.&lt;br /&gt;&lt;br /&gt;At least all of the changes I made have left things looking just fine on all the other flavors I test under but I was really surprised I had to make any changes at all. I thought 3.0 would run just like 2.x but with extra features. I will say the preview mode in Eclipse has a setting for 3.0 and it showed the layout being ugly like it is on the device. I also ran the rather slow 3.0 emulator and it matched the device too. At least you can fix things without having access to the physical hardware.&lt;br /&gt;&lt;br /&gt;I also find it kind of annoying that the iPad got a ton of press when it sold out quickly but you did not see the same press on the Xoom. Apple is a master and getting their name in the press. Android Tablet is not a thing like the iPad but a general name for tablets from various folks such as Motorola, Samsung, LG just to name a few. Guess it is harder to get press when that is the case. I reserver judgement on the Xoom until I have had a chance to use it more. It still appears to be a flawed device that is an update or two away from being very usable. Google appears to have pulled off their standard Beta release that may stay Beta for a year or may whip into shape with releases just weeks apart. I really hope they push updates to the Xoom quickly as it seems to be vanilla Honeycomb.&lt;br /&gt;&lt;br /&gt;One thing I feel both tablet OS versions are missing is multiple user login. I know we use it at home on our various Windows boxes and I use it on my Macbook. I really think people will share tablet devices in the family and they need to step up and allow you to have individual background, web browser and email address settings. I don't need a "switch user" as much as I want a "log user out / log in as new user" functionality. Since Google decided to do a Tablet version of the OS they really should be the first to implement this. Apple seems to lean toward one iOS version for iPhone, iTouch and iPad which will make it a bit harder to pull this off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2301579493966189991?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2301579493966189991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/running-my-app-on-honeycomb-why-these.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2301579493966189991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2301579493966189991'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/running-my-app-on-honeycomb-why-these.html' title='Running my app on Honeycomb - why these changes?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8741882107123350278</id><published>2011-03-20T17:59:00.000-05:00</published><updated>2011-03-20T17:59:06.346-05:00</updated><title type='text'>AT&amp;T buys T-Mobile, how annoying</title><content type='html'>We used Cingular and never had any issues with them. AT&amp;amp;T bought Cingular and we had problem after problem with them. Constant billing issues, false charges, etc. We had to call them every month to clean something up. Hated their customer service too.&lt;br /&gt;&lt;br /&gt;We finally said the hell with it and paid the fee to get out of our contract. We switched to T-Mobile as they had much better rates and we went to a no contract plan. We have had pretty good luck with T-Mobile. The coverage can be a bit spotty and you will drop you call a few blocks from our house coming in from the West. The price is good and we like the unlimited text and web. A lot of people my wife talks to are on T-Mobile so we get to talk to them for free. So far we have had no issues with custom service either, they have always been very helpful.&lt;br /&gt;&lt;br /&gt;Now AT&amp;amp;T comes along and will probably screw this all up again. I am not looking forward to the buy out at all. I cringe at what will happen to our billing. I am sure the rates will go up. I hope we get better coverage and less dropped calls but I am sure there will be so much more pain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8741882107123350278?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8741882107123350278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/at-buys-t-mobile-how-annoying.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8741882107123350278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8741882107123350278'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/at-buys-t-mobile-how-annoying.html' title='AT&amp;T buys T-Mobile, how annoying'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-1522944542679332374</id><published>2011-03-10T13:13:00.000-06:00</published><updated>2011-03-10T13:13:53.514-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android tablet decision future'/><title type='text'>Owning a tablet - is it in your future?</title><content type='html'>I have noticed a couple of things since getting an Android phone. First off I search for stuff on the internet a lot more. This is mostly due to easy access. I was sitting in the car waiting on my son to come out from his clarinet lesson and I spent most of the time on the web looking for birthday presents for my other son. As I found something interesting I did a long press, Share, Email sequence to send it to my wife to discuss later. Worked like a charm.&lt;br /&gt;&lt;br /&gt;I do crossword puzzles at home nearly every night. Something you can pick up, work on for a bit while waiting on some aspect of food to cook, put down and come back to later. I will look up answers on the web to obscure things like "author of book {book name here}". Personally I am not a fan of those types of clues but they do turn up often in the more difficult puzzles. Phone works pretty good for that even though I long for a keyboard.&lt;br /&gt;&lt;br /&gt;In the car the kids may ask a question and we will look something up. At night while watching things on TV I might want to check out DZone, SlashDot or some other tech site. Maybe I am researching something or looking up information on a home repair. I can do it on my phone in the living room as most of it is content reading. Nothing to fire up, phone is already on so pretty much instant access. Maybe I will switch to a game for a few minutes or check out LOL cats as my son is brushing his teeth getting ready for bed showing him the funny ones. Nice way to unwind the night.&lt;br /&gt;&lt;br /&gt;A few friends and neighbors now have tablets. At first I really had no desire to own one. First I don't think I could bring myself to buy something from Apple as they annoy me and second there is the cost. Of course the more both my wife and I use our phones the more I can see a tablet being really handy. My wife really likes to read, text and email at night in bed. I tend to fall asleep well before she does. Laptops are a pain, tablets seem to be about the right form factor.&lt;br /&gt;&lt;br /&gt;I tend to be a cheap bastard so I am not looking at the Xoom at this point. I also realize the truly cheap ones will be super crap and most will not have access to the Android Market which is a must. Finally I really want it for in the house so I want WiFi only as I don't want to pay for another data plan. I would love to share my phone for 3G access to use on the road though. I could see it being used by the whole family for a number of activities. Could be one of those things we fight over enough that we end up picking up another one. Kind of like the DVR, once you have one you pretty much end up with more of them.&lt;br /&gt;&lt;br /&gt;Just doesn't seem like the Android tablet market has quite shaken out. I like the size of the Samsung Tablet, the 7" size seems to be a good hand size especially for eBook reading. 10" appears to be a bit big but I have not used one enough to really know. I think we are going to get an iPad 2 at work and since I will be the lead developer on that I should get a good chance to check it out.&lt;br /&gt;&lt;br /&gt;I also hate to be behind the technology curve by too much. The minute you buy one you are screwed. Never know if they will update to the next Android version. Best to get one with a version you can live with. Is 2.1 or 2.2 enough on a tablet? Will I drool over 3.0 and the dual processor speed? If it really is for web browsing and email then the older version are more than adequate. I will play games on it and newer games might not work on the older stuff which would really stink.&lt;br /&gt;&lt;br /&gt;Don't think now is the time to buy. Let more come out, let some go on sale, let the rules change so a device that does not have phone support is still allowed full Android Market access. Check out who is willing to update OS versions and who abandons you once the check clears.&lt;br /&gt;&lt;br /&gt;Yesterday I install the app I am writing on a Samsung Tablet owned by our QA lead and I got a chance to play with it for a bit. The screen is not as nice as my phone, not a big surprise as that would be a really big expense, and the glare of the office&amp;nbsp;fluorescents&amp;nbsp;does not help but it seems like a nice tablet. Excellent size, fast enough and familiar as it is same OS version I use. Wanted to see Angry Birds running on it out of curiosity but that was not to be. He got a deal on it at Costco and is really happy with it.&lt;br /&gt;&lt;br /&gt;Best just bide my time...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-1522944542679332374?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/1522944542679332374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/owning-tablet-is-it-in-your-future.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1522944542679332374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1522944542679332374'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/owning-tablet-is-it-in-your-future.html' title='Owning a tablet - is it in your future?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2620231042659667451</id><published>2011-03-04T09:37:00.000-06:00</published><updated>2011-03-04T09:37:42.595-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone android emulator snapshot close view fragmentation'/><title type='text'>More fun with mobile development</title><content type='html'>My quest to get both the iPhone and the Android &amp;nbsp;applications in sync and released continues. Of course I find more differences every day.&lt;br /&gt;&lt;br /&gt;I have set up the Android SDK and emulator for the BA on the project. This has been a great help. She can test the program without a physical device and can grab screen shots for documentation. It has not been great in that the emulator snapshot functionality has bitten us repeatedly.&lt;br /&gt;&lt;br /&gt;Why use snapshot? If you don't it takes a long time for the emulator to fire up. Not very friendly when someone stops by for a quick demo. I think the best settings are as follows:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Tell the virtual device you want to use snapshots on its edit screen or when initially created&lt;/li&gt;&lt;li&gt;Start emulator and tell it to "save to snapshot" on exit&lt;/li&gt;&lt;li&gt;Once it starts turn off Japanese keyboard stuff (not sure why this is on by default always)&lt;/li&gt;&lt;li&gt;Install your APK files via adb&lt;/li&gt;&lt;li&gt;Shut down emulator&lt;/li&gt;&lt;li&gt;Start emulator, select "Launch from snapshot" and turn off "Save to snapshot"&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If you continually have it save to snap shot it will corrupt the snapshot at some point. This has happened to me repeatedly. The second bit of fun, when you delete a device it does NOT delete the snapshot. This means if you delete the device then create a new one with same name you get the old corrupted snapshot to kick in. You can manually delete them in the {user dir}\.android directory. The AVD manager should really take care of this. This does mean when I update the APK I need to get a new save snapshot after I install it. Means I can't automate that process which stinks.&lt;br /&gt;&lt;br /&gt;I added a menu to the Android app with and About and Logout buttons. Very easy to do and I love having access to a menu button always on the phone. It also makes it easy when you are helping someone with their device - "Hit the menu button" is easy but "Find the menu somewhere on the screen or get out of the app and go all the way back to Settings to see if there are settings for the app you just closed somewhere in there" is not as friendly.&lt;br /&gt;&lt;br /&gt;On the iPhone side you are on your own when it comes to coding. I decided to add a button to the title bar off to the right. On the iPhone the left side is used for the "back" button, the middle for the name of the current view. Makes more sense to me to have the back and menu buttons off the screen the way the Android did it but on the iPhone you have a bit of text telling you where "back" will go. Of course you can do the same thing on the Android if you so choose, Apple just does not give you a choice, one button to rule them all! Reminds me of their battle to avoid two button mice for the longest time.&lt;br /&gt;&lt;br /&gt;What should logout do? Turns out closing an app on the iPhone will get you rejected from the app store so that is not an option. Returning you to the login screen appears to be the way to go. On the iPhone the user MUST be the one to press the HOME button to close an app. Of course that does not really close the app anymore depending on what device you use but we better not use the fragmentation word as it only applies to the Android right?&lt;br /&gt;&lt;br /&gt;I spent a good deal of time this morning on Stack Overflow to find this line of code:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;[self.navigationController popViewControllerAnimated:NO];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;When they select logout from the popup menu the view needs to close. Not that I would have figured out this line by scanning the API documentation. At least it is one line of code and not too contorted. I then added a global variable (shudder) to the main control so each view could check that and if we are in the process of logging out we also close ourselves during the view will appear processing. When we hit the Login screen it does not close but instead just clears the variable. Working like a champ during my testing.&lt;br /&gt;&lt;br /&gt;This does bring me back to the evil "fragmentation" word. It is thrown at the Android side of things all the time due to screen resolution and other hardware differences. Yes, I have code in my app to handle these differences. No, it is not fun to write and test. Yes, I have an emulator that helps. No the emulator is not a job to work in.&lt;br /&gt;&lt;br /&gt;What about on the Apple side? You have various OS versions with some being multitasking and others not. Just tell them to upgrade right? Wrong, some are now stuck at a revision. The second generation iTouch that I use for testing just got added to the stuck list. I already have code in place to check for multitasking in our app. I have been affected by iOS fragmentation.&lt;br /&gt;&lt;br /&gt;The new iPad is said to be really speedy compared to the old one. I had lunch with a friend yesterday who expressed concerns with their iPad app and timing issues. Even the simulator in Xcode now lists multiple options - iPad 3.2, iPhone 4.0, iPhone 4.1, iPad 4.2 and iPhone 4.2. They just released GM of 4.3 so I will need to grab that too. The simulator runs a ton better on the Mac than the Android emulator on the PC but it also gives a false sense of speed.&lt;br /&gt;&lt;br /&gt;Let's just kill the fragmentation&amp;nbsp;rhetoric. It affects every developer no matter the platform. We have dealt with it for years. It is affecting Apple more than they care to admit. It may limit them from doing a smaller screen iPhone nano. I know not to hard code to screen resolutions but I do see sample code that does on various websites when looking up iOS issues.&lt;br /&gt;&lt;br /&gt;You can tell me tablets and phones are different beasts and I will agree. You should not just scale up your phone interface for the tablet, it should become a new fuller featured interface instead. That is one of the early bitches about the Xoom, not enough native applications. Even tossing them into two buckets you still have fragmentation due to iOS differences due to lack of upgrade options. I don't want to see these old devices in the landfill.&lt;br /&gt;&lt;br /&gt;Both Apple and Android have fragmentation. It should no longer be listed as a Pro or Con when deciding with camp to join. End of rant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2620231042659667451?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2620231042659667451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/more-fun-with-mobile-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2620231042659667451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2620231042659667451'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/03/more-fun-with-mobile-development.html' title='More fun with mobile development'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5670799118864254288</id><published>2011-02-23T15:45:00.000-06:00</published><updated>2011-02-23T15:45:04.614-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPhone iOS XCode Android XML optimization'/><title type='text'>Second iPhone provisioned and optimized Android code</title><content type='html'>It looks like all the adjustments I made in Xcode to the project file paid off. I was able to easily provision another phone today for our Business Analyst. I did the update to the provisioning profile in Organizer, plugged in her phone and did a Run. The application copied over right away. She can now do screen shots for promotional material for both the iPhone via her own device and for the Android using the emulator.&lt;br /&gt;&lt;br /&gt;On the Android side of things I noticed it was taking a long time to deal with some server data. I finally had the chance to check that out today. I put in a new timing object and looked to see where the hold ups happened to be. It was not in the server call itself, the XML data came back in under a second, but it was in the XML parsing. We are using the XML Pull Parser that comes with the Android SDK. Listed as just a little slower than SAX and much faster than DOM.&lt;br /&gt;&lt;br /&gt;I figured out how to do profiling via traceview and found the slowness to be in our start tag processing code. I looked over that code and eliminated an unneeded StringBuffer, over creation of an ArrayList object, some string comparison clean up, removal of instance of check and some if statement cleanup. I was able to cut the parsing time from ~20 seconds to ~6.5 seconds in the emulator. It runs in ~2.2 seconds on my Galaxy S phone. I still want it faster but this is a huge and very&amp;nbsp;noticeable&amp;nbsp;speed improvement. I need to run similar timings on the iOS side of things. My iTouch is out in QA land so I can only test in the simulator at this point which can be very misleading.&lt;br /&gt;&lt;br /&gt;I need to take my optimizations and move them into the main branch of our desktop Java code. Speed improvements always help - well as long as they don't break something. Fast and broken is still broken.&lt;br /&gt;&lt;br /&gt;At this point I have the two mobile apps running pretty smoothly and graphically pretty close to the same where it should be and different in places where it does not need to be. I did more tweaking on the lower DPI screen in the emulator for the Android to get the look we need. I adjusted some HTML code on the iOS side to give a better layout look. Very happy with the results. They can start using screen shots for the glossy promotional stuff any time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5670799118864254288?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5670799118864254288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/second-iphone-provisioned-and-optimized.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5670799118864254288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5670799118864254288'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/second-iphone-provisioned-and-optimized.html' title='Second iPhone provisioned and optimized Android code'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2824216387033938677</id><published>2011-02-22T09:43:00.000-06:00</published><updated>2011-02-22T09:43:09.626-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android iPhone iOS provisioning profile xCode'/><title type='text'>One iPhone provisioned</title><content type='html'>I made a number of updates to our iOS application including some related to multitasking. Everything was running fine in the simulator so I needed to put it on the iTouch to verify things worked sans multitasking. No go. It decided the profile was screwed so I could not install it. I found an old profile and deleted that but still no go. Looked on the web and found you have to manually open the project file outside of Xcode and remove the old provisioning lines. Gee thanks Apple for not even fixing this in Xcode 4!&lt;br /&gt;&lt;br /&gt;I installed JEdit on the Mac for simple text editing via a free editor some time back. Wish I had PSPad but this&amp;nbsp;serviceable. After you figure out the project file is a directory even though it does not look like one and you do a right click and Show Contents you are able to see the project file. I made a copy in a backup directory then I removed the provision profile line and saved it.&lt;br /&gt;&lt;br /&gt;Fired up Xcode but it still was annoyed so I opened the plist file and set everything in the Code Signing Identity to automatic iPhone developer and it finally worked. Since I had success on the iTouch I asked the QA person to try their phone again and it installed without a hitch. Somewhere the Gods shown upon me today and I was able to get two devices working with minutes of each other. Nice sense of accomplishment but really people, this should not even need to be discussed, it should just work.&lt;br /&gt;&lt;br /&gt;My next worry is also related to hardware. We plan on getting a new Macbook Pro when the new line ships this week (wink wink nudge nudge) according to the rumor mill. Will I be able to move over the profiles? Will everything go down the toilet? Will Xcode 4 hate the new hardware and just go belly up? The answers to these and other mysteries next week. Might need to call Robert Stack. That would get a great Mac website for questions - Robert Stack Overflow. I am very nervous this is going to be a massive cluster. Apple has given me no reason to believe otherwise. All experiences thus far have lead to non-working code releases with every attempt to do anything logical.&lt;br /&gt;&lt;br /&gt;Today I move back to the Android to make similar changes. I already have the multitasking changes in place, that was easy, but need to do some minor UI tweaks to get them in sync. I really have no fear of any issues on that side. It will just work as it has in the past.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2824216387033938677?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2824216387033938677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/one-iphone-provisioned.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2824216387033938677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2824216387033938677'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/one-iphone-provisioned.html' title='One iPhone provisioned'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6861074759431749855</id><published>2011-02-21T14:50:00.001-06:00</published><updated>2011-02-21T14:50:55.055-06:00</updated><title type='text'>Xcode 4 crashes a lot</title><content type='html'>I have been updating our iOS application and I am using Xcode 4.0 Gold Master. It crashes at least 3 times a day. I just hit [Continue] and move on but this is not a good omen for a Gold Master. I have never been in the loop during an Apple Gold Master experiment so I don't know how responsive they will be to fixing things. I am curious to see what happens. I figure I get the privilege of downloading the entire 3.8g of Xcode fun if they fix anything as so far Apple does not appear to deal in patches like the rest of the industry.&lt;br /&gt;&lt;br /&gt;Skipping the crashes I like the changes made to Xcode. Being able to keep multiple files open in tabs is very handy. Once you find things that have moved about they appear to work as expected. It is faster for what I am doing. There are more warnings to help clean up your code. I love the integration of Interface Builder.&lt;br /&gt;&lt;br /&gt;I really wish the code completion would start right after you hit '.' instead of waiting for you to type the first letter. I don't know what I am looking for always so I have hit Ctrl + SPACE a lot. I am still new to the whole iOS thing so I did not know a CGRect did not have a width but it had a size.width. Waste of time / keystrokes to not have the IDE help you in this area. Is there a way to enable this somewhere?&lt;br /&gt;&lt;br /&gt;It still takes me a bit of time to find help on the Internet. Seems like I just don't think the same way or use the same words to describe things as Apple does. It usually takes 3 searches to find what I want whereas when I search for things in Java or C# I almost always find the results in the first search set. It really gets frustrating. At times I wonder if they try too hard to be different.&lt;br /&gt;&lt;br /&gt;Off to figure out applicationDidEnterBackground and applicationWillEnterForeground so I can refresh data on phones that support multitasking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6861074759431749855?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6861074759431749855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/xcode-4-crashes-lot.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6861074759431749855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6861074759431749855'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/xcode-4-crashes-lot.html' title='Xcode 4 crashes a lot'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-1852393408070102556</id><published>2011-02-19T09:48:00.000-06:00</published><updated>2011-02-19T09:48:34.273-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS iPhone android SQL Java'/><title type='text'>Technical challenges when switching jobs</title><content type='html'>I changed jobs in October for the better. The old place was full of politics and&amp;nbsp;alcohol. Since I have a family and don't have time to drink every night after work I really did not have a chance to move up and I got tired of doing the work but getting none of the credit because I was not a drunken sod. Add to that the anti-Java mentality and it became a hostile work environment. In the 14 year history of the company a Java developer was never named employee of the month even though the Java product was around one half of company licenses. The other half of licenses was based on the C++ product.&lt;br /&gt;&lt;br /&gt;The new job pretty much involves getting work done which I really like. Of course it has been mentally challenging for sure. I worked at the old place for 4 years so I knew the software inside and out. I had pretty much rewritten a good portion of it before I left. It needed it in that there were performance issues, the code was not using Java Generics and it really was not very object oriented. If I never see code like &lt;span class="Apple-style-span" style="color: cyan;"&gt;parent.parent.parent.parent.setEnabled()&lt;/span&gt; again that will be too soon. You may laugh but this was all over in the code and you never knew what each parent happened to be but pretty much everything had a variable named parent.&lt;br /&gt;&lt;br /&gt;Previously it was all Java all day with just a little bit of C# mixed in for some utilities I wrote, just to keep my skills up, they could have been written in Java. &amp;nbsp;Later there was more C# done very poorly by a new team.&lt;br /&gt;&lt;br /&gt;Now I program in Java using MigLayout and JIDE on the main application, Java using the Android SDK, Objective C for iOS, SQLite on both Android and iOS and HTML on the iOS. On a lot of days I switch between all of them. Plus I am learning a new industry and a new Ruby based server. When I see a combobox I know how to fill it in but I may not understand the data. I will see a name of a file in the source tree but I might not know how to get that dialog to appear when running the code. I also use multiple IDEs - Eclipse, IntelliJ and XCode.&lt;br /&gt;&lt;br /&gt;Honestly just switching out one language, server API or IDE can wear you out but to do them all at once is a shock to the system. The other team members know the server, IntelliJ and the main Java stuff very well so I can always ask for help in those areas and they gladly offer up advice. The code is well written and has been easy to jump in and be productive. I came from 4 SPACE indent and braces on a separate line to 4 SPACE indent with braces on the same line but that seems to toggle every job I take and it just does not bother me.&lt;br /&gt;&lt;br /&gt;On the Android side one team member has done a little work there and he wrote the base of the application I am working one. It is great to have the server communication in place. I have polished up the UI and am now working on the next major enhancement. He is a great sounding board for ideas as he has used the API.&lt;br /&gt;&lt;br /&gt;On the iOS side no one but me has done anything. The guy who wrote the initial application left to start another company. The code is oddly written and not commented. I have cleaned it up the best I can, have commented it and have addressed the open bugs. I end up on Google searching a lot during the day and don't always feel very productive.&lt;br /&gt;&lt;br /&gt;During the various interviews for other companies I got turned down because I did not know SQL well enough or I had not written a full blow application using technology X. I have worked with a number of excellent programmers and I know technology can be picked up rather easily. Once you are at a company you will almost always have to learn something new. The new place gave me a chance because I had solid Java skills and was willing to give the other stuff a shot. The other team members did not want to mess with iOS but I figured what the heck. I don't revel at the thought of coding with Objective C in Xcode but I am learning a lot.&lt;br /&gt;&lt;br /&gt;The SQL barrier always annoyed me. I was told after numerous job interviews that they wanted someone with more SQL skills. I was probably too honest in the interviews about my skills. I don't like to oversell. I know SQL but I am no master. I am not the person to go to for performance tuning on a query. I can't rattle the benefits of inner and outer joins. I can read the code, I can query the data but I have had a DBA get things set up. I enjoy GUI programming much more than server side programming. When I asked how much actual SQL a developer wrote during a week they would admit there was not a lot. You were mainly using what was already there, just like I do pretty much every place I have worked. They just had this desire for everyone to be an expert in it. Companies need to wake up and hire excellent programmers not just people who hit a check list. I would not want to be hired as a DBA but that was not the job description. Their loss.&lt;br /&gt;&lt;br /&gt;I am using SQLite on both the Android and iPhone side. Granted this is limited SQL work. I am not setting up a huge number of tables with indexes out the wahzoo and joins all over the place but I have designed the tables and wrote all the code to manipulate them. I had to look stuff up on Google to find out the limitations of SQList and its syntax heck I even had to look up some very basic syntax. I have used ADB on the Android side to verify my table columns and rows. None of it is rocket science and really this is some of the easiest code to write. Doing multi-threaded GUI programming is much tougher.&lt;br /&gt;&lt;br /&gt;On the IDE side I enjoy IntelliJ. Past experience had it running too slow but that is not the case today on the faster hardware and improvements they have made. I have written a plug-in for IntelliJ to verify MigLayout code. I use the Eclipse key mapping so I can switch between the two with ease.&lt;br /&gt;&lt;br /&gt;I now have Eclipse set up to work nicely with the Android SDK. You can do Android work with IntelliJ too but I find Eclipse to be the IDE of choice on that side of the house. Mainly because Google does the plug-in for Eclipse and keeps it up to date. I am using 3.6 with the Android source installed so I don't have the code assist slow down issue any more. I have a Samsung Galaxy S phone and I use three flavors of the emulator - 1.6 lower dpi, 2.3 matching my phone dpi and Samsung Tablet. Seems to let me test things and solve any "fragmentation" issues. I also have the emulator set up for the BA I work with and the QA team.&lt;br /&gt;&lt;br /&gt;For the Mac I have a Mac mini running a 20" screen. I only have one iTouch authorized to run code and QA has that most of the time. You can look other my other posts to see the fun I am having trying to get another device provisioned. They are going to buy me a MacBook Pro soon so I can do more Mac experimentation at home. I recently upgraded to Xcode 4.0 which is much nicer than the 3.x series. Still my least favorite IDE but I am getting better at it. It just seems a few years behind both IntelliJ and Eclipse. Part of the issue is Objective C - it is C based making it harder to write an IDE. You can even see this on the PC side, it is more difficult to refactor C and C++ code than it is for Java code. The rest is Apple being the only IDE game in town. If there were competition in this area on the Mac I am sure things would improve.&lt;br /&gt;&lt;br /&gt;I will get into a groove on all the areas listed in due time. Right now on Friday's I come home mentally fried. On the main Java app I am pretty sure of what I am doing. JIDE has very nice controls. I have used MigLayout in the past and prefer it over any of the Java layouts. The rest of the coding is pretty straight forward.&lt;br /&gt;&lt;br /&gt;Android is going nicely but there are some speed bumps. I find answers pretty quickly on-line. The official Android docs could use more examples but have solid content. I can almost always find sample code on Stack Overflow. The API is well laid out and method names make sense. I know Eclipse so moving around in the IDE is second nature. I can put the app on any phone with ease, people walk buy, I plug it in, press run and it is on their phone. Love that.&lt;br /&gt;&lt;br /&gt;The iOS side gives me the best and worst feelings. I feel a real sense of accomplishment when I get something to work because it is a more difficult to do for me on that platform. The worst is that I am never sure if what I did was the right thing. Did I release the memory properly? Did I use the right API calls? Did I write code where there was an existing API call I could have used? Some of the calls see so crazy, such a trimming a string, that I feel there has to be a better way but usually there is not. You get to the point of diminishing returns trying to look up better ways of doing things.&lt;br /&gt;&lt;br /&gt;Having a Mac available at home is going to be a big help. I can experiment with the OS, install some tools that will make things easier, learn the keyboard shortcuts and play around in Xcode giving me a chance to experiment with one off projects just like I do on the Android.&lt;br /&gt;&lt;br /&gt;The job switch has been worth it. I feel a weight lifted off my shoulders from fighting the management. Now I am fighting technical challenges but that is OK. That is something you can beat over time. Electrons don't harbor crazy thoughts and follow illogical rules. Get it working, get it shipped and get started on the next version. Working with sane people is so nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-1852393408070102556?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/1852393408070102556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/technical-challenges-when-switching.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1852393408070102556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/1852393408070102556'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/technical-challenges-when-switching.html' title='Technical challenges when switching jobs'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-305398356904934533</id><published>2011-02-16T15:30:00.000-06:00</published><updated>2011-02-16T15:30:53.740-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone provisioning xcode'/><title type='text'>iPhone provisioning</title><content type='html'>We want to set up another QA device as the only actual device I have tested our app on is an iTouch. A QA staff member has an iPhone and is willing to have me install the application on his phone. This should be easy but it is not. In fact it still is not working.&lt;br /&gt;&lt;br /&gt;First I had to have my boss log in to our iOS developer account and provision the identifier off his phone. Easy enough. Then I fire up Xcode 4 and click all over the place in organizer and finally get it to recognize the phone then it does some rather long communications with it before it settles down. I then attempt to build and put the app on the phone. No dice. It does not like something about the phone and keys and profiles. I fiddle around with it for a bit and look up what I can on Google. Still don't have it working but I needed to be done so he could get back to work.&lt;br /&gt;&lt;br /&gt;I will do some more looking around on Google to see what I can find. Sounds like this is a very common problem and people just clean / build / clean / clear / clean / build until it finally works. No one so far has had a nice solid solution.&lt;br /&gt;&lt;br /&gt;It took us a month to get anything working with our iOS account as it was. Apple had to cancel the whole thing and recreate it at one point. This has been nothing but a huge PITA. I am very&amp;nbsp;underwhelmed with the whole iOS developer experience as far as hardware goes. They generally treat you like a crook and you just feel lucky if you can get any of it too work and once you do you don't know how you got it to work and you just hope you never have to touch it again.&lt;br /&gt;&lt;br /&gt;I need to provision a few more devices so I hope I can get this one working and I can learn enough to apply the knowledge to the next set. This is really just stupid and you should not fight your developers tooth and nail and every turn. Let me put my code on whatever device I choose!&lt;br /&gt;&lt;br /&gt;Really a total opposite to my Android experience. A support person got a new phone last night and asked for the latest build to be put on it. I walked it over to my desk, plugged in my USB cable, did a Run in Eclipse, selected her phone from the list of devices and it was installed. Less than 1 minute passed and I turned it back over to her. I have installed it on 5 different phones in the office doing the same procedure. With one I had to install some USB drivers first adding a few minutes to my time. Otherwise it has been dead simple. My app being installed on any phone I like. Simple.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-305398356904934533?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/305398356904934533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/iphone-provisioning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/305398356904934533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/305398356904934533'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/iphone-provisioning.html' title='iPhone provisioning'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7627089223147475207</id><published>2011-02-15T15:55:00.000-06:00</published><updated>2011-02-15T15:56:06.952-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode eclipse ios android'/><title type='text'>Bug fixing on the iPhone using Xcode 4.0</title><content type='html'>QA completed a round of testing on the iPhone application so I dug back into Xcode and fixed them. Always a little nervous when I get back into iOS development as I don't spend much time there but it went pretty smoothly.&lt;br /&gt;&lt;br /&gt;First off I now have Xcode 4.0 running and it is an improvement over the 3.x series. You can now have tabs of open files. You must manually create the tab then select content in it. The file view tree stays in sync with the tab you are looking at as far was what is expanded / collapsed which threw me off at first. I had the XIB open in a tab and wanted the M file open in another but when I switched to another tab the tree adjusted too and I did not see the M file. I had to expand my way down to it before I could open it. Annoying as I was just looking at the file in the tree I wanted and it disappeared.&lt;br /&gt;&lt;br /&gt;I don't know if I closed the Utility Pane or if it defaults to off but I was lost trying to figure out where the alignment, color and other settings for a widget in Interface Builder went until I figured out how to turn that on. I looked all over in the menu system and finally did a help search. I did not think of the name "Utilities" for this pane thus I kept overlooking it in the View menu.&lt;br /&gt;&lt;br /&gt;I really like having Interface Builder integrated in the IDE. You no longer will forget to save changes you are tweaking in IB at the same time you are adjusting some code. It also has been updated in a number of areas making it easier to use. I still am not at home in it but was able to pull off everything I needed quickly once all the required panes were visible.&lt;br /&gt;&lt;br /&gt;The source control integration is much nicer. The files are flagged with (A) and (M) icons so you know what has changed. You get a quick difference window at commit time. I wish it kept the last commit comment around or a drop down to let you get to older ones.&lt;br /&gt;&lt;br /&gt;I had initial troubles getting the code to run on the Simulator until I added i386 as a&amp;nbsp;Valid Architecture. That was not obvious at all and it took some web searching to figure it out and then more time in IDE to find out where to update the value.&lt;br /&gt;&lt;br /&gt;A Table View was painting oddly. The original code author had set up some hard to read colors and I had changed them back to defaults I thought. It looked just like a normal Table View when compiled with 3.x but was screwy looking in 4.0 until I set the Background to default then it was fine. I did not notice any other differences in the code between 3.x and 4.0 builds. This is not a very big app, login screen, pick from a list, show appointments, appointment details plus an editor screen for notes and one for dates. We are not using tons of widgets or any bizarre build configurations but I am happy the changes were minimal.&lt;br /&gt;&lt;br /&gt;Very happy that Apple updated the one and only IDE you can use to do iPhone work in. They have made a lot of needed changes and I hope they continue to improve it in a timely manner.&lt;br /&gt;&lt;br /&gt;I just did some updates to Eclipse, the IDE I choose to use on the PC for Android Development, and it is also working better. The code assist would pause for long periods of time under 3.6 but now that I have downloaded the Android source code that is no longer an issue. Plus I can debug into the Android code if needed.&lt;br /&gt;&lt;br /&gt;Right now I am working on phase two on the Android side and have created some new custom widgets along with getting my feet wet with SQLite. I have a few tables running with some fake data now. I need to create a large dataset for test data for a new control that allows you to scroll to / search for a record similar to what you have for Contacts on both Android and iOS.&lt;br /&gt;&lt;br /&gt;I will need to port all the existing code over to iOS when I have the Android stuff in place. At least with my initial experience with Xcode 4.0 that appears it will be less of a chore than originally thought. I was basically tweaking and bug fixing the original iOS code and this time I will creating a lot of things from scratch. I am sure that will give me a much better understanding of iOS / Xcode / IB / Objective C.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7627089223147475207?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7627089223147475207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/bug-fixing-on-iphone-using-xcode-40.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7627089223147475207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7627089223147475207'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/bug-fixing-on-iphone-using-xcode-40.html' title='Bug fixing on the iPhone using Xcode 4.0'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6043796331593540181</id><published>2011-02-10T09:55:00.000-06:00</published><updated>2011-02-10T10:01:38.717-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPhone Android programming'/><title type='text'>Android vs. iOS developer differences</title><content type='html'>I am working on an update to our mobile application. I will do the work first on the Android as I am more comfortable in Java then port it after the initial management and QA approval rounds to the iOS. Doing it in sync is a waste of time as you make constant changes to both instead of just getting one right then doing a much easier port.&lt;br /&gt;&lt;br /&gt;This does not mean I ignore the iOS for the first chunk of development. I need to make sure anything I do fancy pantsy on the Android has a match on the iOS side. I end up doing a lot of web searches to see if I can do something on the iOS side.&lt;br /&gt;&lt;br /&gt;It actually gets scary to see what you find in web forums on the iOS side of things. Maybe it is what I am looking up but I tend to find the questions asked by iOS developers to be programming 101 while on the Android side they tend to be medium to tough questions.&lt;br /&gt;&lt;br /&gt;Examples you say? Sure, here are two that just made me cringe.&lt;br /&gt;&lt;br /&gt;I need to use an Expandable List on both platforms. Found some nice sample code for each side and I have the Android piece running in a prototype. When I found some sample code on the iOS side it had just two groups so the code was really simple like the following (shown language agnostic):&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;if (group == 0)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp; text = "Group 0"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;text = "Group 1"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;Someone posted&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;I tried&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;if (group == 0)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp; text = "Group 0"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;text = "Group 1"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp; text = "Group 2"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;and I get a compiler error about the else? Plz help, what am i dong wrong?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is programming 101, how to use if / else if / else and you must love the grammar and spelling to go along with the lack of basic programming knowledge. I have not seen questions this basic in a long time of doing development in Java and C# but ran into it quickly for iOS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Second example involves SQLite. I wanted to make sure it was available under iOS as we need to cache some data between application sessions that is rather sizable. Again I found reasonable samples on both sides but the comments on the iOS forums made me shudder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;OMG this is prefect! thx, but it only adds, how to delete, plz help me!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The blog author was very nice and posted a response on INSERT adding and DELETE removing with pretty much the exact syntax between the two. Really folks this is a simple Google search to find the results. Is this coder going to ask each SQLite question on this forum? How hard is it to be introduced to a concept then look for depth via web searching?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are more examples out there, these are the quick ones I have found. I know this is not a good sampling and there are many all star iOS developers because I have seen many fantastic apps but there also appears to be a number of "how the hell did you get into this line of work" developers looking to make fast money on the iOS side of things.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C based languages are bad enough to learn without lacking basic programming knowledge or the willingness to look up very simple answers. SQLite on the Android side seems pretty straight forward. A little screwier on the Objective C side as it is C based and not NSString etc. based so I will have to write more code just to convert objects about.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any of you come from the iOS side looking at Android programming and finding things just opposite of what I have found or do you also find iOS Q&amp;amp;A forums full of some really inane questions? Are people coding on the iOS just to try and make some quick cash?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6043796331593540181?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6043796331593540181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/android-vs-ios-developer-differences.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6043796331593540181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6043796331593540181'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/android-vs-ios-developer-differences.html' title='Android vs. iOS developer differences'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5832338592983492236</id><published>2011-02-04T07:42:00.000-06:00</published><updated>2011-02-04T07:42:01.124-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hardware upgrade tablet SSD'/><title type='text'>Upgrade fever just aint what it used to be</title><content type='html'>Way back when PC Week, InfoWorld and Computer Shopper were monster magazines there was a ton of fun things to read about new hardware. Processors were getting faster, video cards made performance jumps in leaps and bounds, sound cards were not on the motherboard but something you bought as a separate item. That has pretty much all gone away and it is making hardware pretty darn boring.&lt;br /&gt;&lt;br /&gt;I have run my current computer for a bit over 4 years. It handles pretty much anything I toss at it. Sure I might not be getting over 100 FPS in the latest game and I am only running 1680x1050 but I am not seeing stuttering or any real game issues so what the heck. I am running the on-board sound on my Intel motherboard and Intel does not officially support Win7 drivers but even this has caused few issues.&lt;br /&gt;&lt;br /&gt;The problem is I have the upgrade fever. Don't really need to upgrade but the fever has set in. Of course it shows up just in time for Intel to announce a flaw in their chips.&lt;br /&gt;&lt;br /&gt;I have a better box at work than I do at home. It has more memory, a better processor, better graphics card and an SSD drive so it boots really fast. I boot it about once a month due to some MS update otherwise the machine just remains on all the time. After reading reviews on NewEgg I find these drives seem to have a higher failure rate than I would be happy with although none have failed at work and no one I know that owns one has had a failure either. I currently have dual 250g drives at home and neither is close to full. I am not a big collector of movies or music. All the music on my PC I also have the physical CD for in a cabinet. I rip them so I can listen to them via Media Monkey as its random play feature seems to work were as the one in MS Media Player sucks.&lt;br /&gt;&lt;br /&gt;I put together a price list at one point of parts - i7 processor, decent motherboard, memory, mid level graphics card, large power supply, SDD drive and mid tower case. By the time you do all that and you look at getting a legal copy of Win7 64bit you might as well just by something off the shelf. I would not spend the big bucks on Alienware or another boutique vendor but there are a lot of solid configurations, some even with water cooling, available and the OS is already included via some MS kickback they get.&lt;br /&gt;&lt;br /&gt;But I always run into not being able to get the perfect configuration. They use some weird motherboard or a graphics card two steps below what I want or no SSD option or a suspect power supply. Maybe I find the perfect configuration then the price is shot through the roof pointing me right back to building my own.&lt;br /&gt;&lt;br /&gt;In the end it will probably not be much of an upgrade and I will be out the cash and I will be reinstalling tons of software - Office, various IDEs, media players, USB drivers, utilities, games, text editors etc. and will really have nothing but eaten up time and 10FPS gain to show for it. Hardware used to be fun.&lt;br /&gt;&lt;br /&gt;I guess this is why phones and tablets are the rage now. Something new. The PC and the Mac are boring. Let's go find something else that is in a constant upgrade cycle so we can again compare what we have to our buddies. My tablet is dual core, mine has 7.1 sound system, mine has 10 cameras. People upgrade phones like they once upgraded computers. Now pretty much any computer out there can run most games and can run all the productivity software with zero issues.&lt;br /&gt;&lt;br /&gt;Talk me out of the upgrade, talk me into an upgrade, point me to a reasonable vendor with a great gamer build at a reasonable price, help a buddy with the fever!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5832338592983492236?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5832338592983492236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/upgrade-fever-just-aint-what-it-used-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5832338592983492236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5832338592983492236'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/upgrade-fever-just-aint-what-it-used-to.html' title='Upgrade fever just aint what it used to be'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-8148645159198112951</id><published>2011-02-03T07:54:00.000-06:00</published><updated>2011-02-03T07:54:26.926-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android game publish results admob'/><title type='text'>My first Android game - how is it going?</title><content type='html'>I published my first, and only at this point, Android game titled Grid Hunt back on December 9th. I decided to go the ad based route and hoped to make back the cost of the phone. Seemed like a small dream and believe me the dream became even smaller.&lt;br /&gt;&lt;br /&gt;Stats at this point:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;1759&lt;/span&gt; Downloads / Installs with &lt;span class="Apple-style-span" style="color: cyan;"&gt;424&lt;/span&gt; of those active.&lt;br /&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;$4.50&lt;/span&gt; or there abouts (AdMob site is having issues this morning) in ad revenue.&lt;br /&gt;&lt;br /&gt;At this point I have not had a single deposit made back to my checking account as I have not hit the minimum for that yet and have not even covered the &lt;span class="Apple-style-span" style="color: cyan;"&gt;$25&lt;/span&gt; it takes to put something on the market. So I would say it is rather disappointing. I did not have huge dreams of Angry Birds money or even making it into the thousands of dollars but this is a pretty solid hit of reality.&lt;br /&gt;&lt;br /&gt;I have only had 4 comments on the game so far and just as many people have bothered to rate it. Friends and family seem to enjoy the game but even they don't post comments. I have had one crash the first day it was out and fixed it right away. It is at version 1.8 as I have made various improvements over time. Of course with this massive success rate the desire to pour more time into it is rather low. I would like to add a two player mode but I don't know if that would spark more than an extra 50 cents into my Ad Mob account.&lt;br /&gt;&lt;br /&gt;The only marketing I have done is via this blog. Not sure where else to try and do things and I am not a spam king who puts a comment in every stinking website they can find that will allow it. I did submit and have the game accepted on Amazon so I am curious if that will drive any more traffic to the game.&lt;br /&gt;&lt;br /&gt;I have some ideas for some other applications that are not games. I should give one of them a shot to see what happens. I am doing Android programming at work so I am keeping active but I have not done any more personal work on it since the release of this game. Since this is a newer job, just started it in October, I am mentally burnt out by the end of each day so it has been hard to sit at home and do more work. Add to that my younger son has been using what it technically his laptop a lot more and I don't have something to use out with the family while watching TV.&lt;br /&gt;&lt;br /&gt;I guess you hear a lot of success stories around iPhone and Android applications and few stories like this where the dollar amount is below a sawbuck. Should I have charged 99 cents for it? 5 sales and it would beat what I have done so far. I doubt switching to a paid app now is a good idea unless I could find some super awesome way to market it.&lt;br /&gt;&lt;br /&gt;What did I get out of this experience? My new job involved Android development. I needed to learn more about it and did so by writing a game during the week I had off between positions. I always recommend to anyone to take a least a few days off between jobs. I learned a lot about the API and how to code a lot of things I would not run into coding business applications - advanced graphics and sound being a few of them. I already knew Eclipse but I learned how to set it up for development and debugging. Installing the proper USB drivers for my phone to get ADB to recognize it on my main machine and my son's laptop helped me do that a lot quicker at work. I learned the ins and outs of the Android Market. Small device variations came into play as I watched someone play it on a Samsung Tablet and I made modifications to make that a better experience. All in all the new job came out way ahead on this so I actually came out ahead too. Anytime you can be better, faster and generally more productive at work it is a winning situation.&lt;br /&gt;&lt;br /&gt;I still enjoy Android programming more than I do iPhone programming. I have run into a ton more hassles working on our iPhone application at work. Between the oddities of Xcode, the ugly syntax of Objective C, the massive pain of the iOS Developer website, the inability to place code I have written on any device without the consent and written approval of Apple has pushed me to always write, test and debug for the Android first and port to to iPhone second.&lt;br /&gt;&lt;br /&gt;I have a feeling the mobile arena is the future. Writing for a small, limited device is fun again and it kind of reminds me of writing for the Atari 800. Honestly writing for the PC has almost gotten out of hand. Everyone expects so much for each PC program. Hey, you don't have a ribbon control like Office for your one off utility! Where is the animation? I need more colors and every button needs a high quality icon designed by a graphics artist. Why can't this import every graphics file format known to man? Seems you need to know your base language plus about 10 different 3rd party support tools to write anything. When you hit the phone you say "these are the widgets, let's use them and get the information to the user" and that is accepted. I have written some custom controls already but they have been small and limited just like they should be.&lt;br /&gt;&lt;br /&gt;It has only been a few months. Things may pick up or maybe it has already peaked. There are new apps on the market daily pushing mine further down the search list. I guess I can dream of hitting the $25 mark so I can call it a wash...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-8148645159198112951?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/8148645159198112951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/my-first-android-game-how-is-it-going.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8148645159198112951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/8148645159198112951'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/02/my-first-android-game-how-is-it-going.html' title='My first Android game - how is it going?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5518637637357385602</id><published>2011-01-25T07:36:00.000-06:00</published><updated>2011-01-25T07:40:56.467-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android froyo 2.2 T-Mobile updated'/><title type='text'>Updated my phone to 2.2 Froyo</title><content type='html'>Samsung finally honored us with the 2.2 (Froyo) update for the Galaxy S line of phones. Of course there was no way to know about this other than monitoring the forums on T-Mobile as this is not an OTA update, you have to use Keis and manually do the update. This was all explained with images on the T-Mobile forum.&lt;br /&gt;&lt;br /&gt;A quick copy of all my pictures / videos was performed. Basically I copied everything off the SD card. I lost nothing here so this was not required but still advised.&lt;br /&gt;&lt;br /&gt;I downloaded Keis, installed it, did a reboot, ran it and it needed to install an update to itself. Next I plugged in the phone and told it to start up in Keis mode after I connected the USB cable. It said it was connecting but did not so unplugged and plugged in again and it worked. I was not using the cable that came with the phone but that did not appear to be the issue. I was using a USB port on the back of my machine via a USB extension cable.&lt;br /&gt;&lt;br /&gt;It then said I had updates and downloaded them the put them on the phone with a single phone reboot. I lost my home screen icons as it put the ones out there that Samsung and T-Mobile decided I needed the most. Deleted all that crap and reset to what I basically remember my phone being set to and I was off and running.&lt;br /&gt;&lt;br /&gt;I must say I was expecting more initially. Things really look the same. There are little tweaks here and there, good tweaks so far, but nothing major seems to have changed. I don't know what I expected but I guess I wanted some WOW factor that I did not get.&lt;br /&gt;&lt;br /&gt;The tweaks I have noticed:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;GMail application has more buttons that don't scroll off screen when you scroll the text of the message. Reply, Reply All, Next Msg, Prev Msg, etc. This is very nice.&lt;/li&gt;&lt;li&gt;GMail - easy access to more than one account with account name along top of screen.&lt;/li&gt;&lt;li&gt;Bluetooth (BT) - turn it on and you instantly see what devices it is scanning against to connect to.&lt;/li&gt;&lt;li&gt;BT - turn it off from notification drop down and it just turns off, no need to pop up screen and press the check box to toggle it off&lt;/li&gt;&lt;li&gt;Settings menu now has color icons&lt;/li&gt;&lt;li&gt;Menu screen search control has drop down of things to search against (All, Web, Apps, Contacts)&lt;/li&gt;&lt;li&gt;Accuweather on daily briefing has new layout and more information&lt;/li&gt;&lt;li&gt;AP Mobile news on daily briefing has news type tabs&lt;/li&gt;&lt;li&gt;You can stop auto rotation from the notification toolbar&lt;/li&gt;&lt;li&gt;WiFi calling application (I have not used this)&lt;/li&gt;&lt;li&gt;New USB debugging enabled icon&lt;/li&gt;&lt;/ul&gt;I am sure there are a number of other things but this is what I ran into after piddling around with the phone post update for an hour or so and doing my normal routine with it such as turning on BT just before getting in the car this morning and shutting it off when I get to work.&lt;br /&gt;&lt;br /&gt;The update was smooth enough and did not appear to break anything so I also updated my wife's phone. She has the exact same model. I showed her the changes I had found and asked if they liked / wanted them first. Of course it had to redownload the binaries. Thought maybe it would have cached them to disk but I guess most will only update one phone so that is understandable. I wrote down what she had on her home screens and tried my best to recreate them after the reboot. She will enjoy a lot of the changes more than I do as she gets a lot more email, uses the calendar more than I do and checks the weather more often too.&lt;br /&gt;&lt;br /&gt;Good to be up to date. I have not tried out any Flash games or sites as of yet. Don't know if the phone is any faster / slower than it was before. I connected to both of my Blue Tooth devices this morning (ODBII reader I use with Torque and standard car BT talk on phone + music) without a hitch.&lt;br /&gt;&lt;br /&gt;I have not had the phone for long and have never rooted it or really done anything out of the norm with it. I use it as my main development device at home and work. I had to install new USB device drivers to get ADB to work again. They installed via Kies installed at home and work. So far so good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5518637637357385602?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5518637637357385602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/01/updated-by-phone-to-22-froyo.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5518637637357385602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5518637637357385602'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2011/01/updated-by-phone-to-22-froyo.html' title='Updated my phone to 2.2 Froyo'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2979420244212877335</id><published>2010-12-30T08:19:00.000-06:00</published><updated>2011-01-06T11:29:12.343-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPhone Android date wireless headphones'/><title type='text'>Synchronized Android and iPhone development</title><content type='html'>I have been working on both the Android and iPhone. We plan on releasing a new version of our app on the iPhone and the first version ever on the Android. My goal was to get the Android side to match the feature set of the iPhone side. Of course I ended up making some improvements on the Android side while I was at it. That meant I had to move those changes over to the iPhone.&lt;br /&gt;&lt;br /&gt;At first I was pretty worried it was going to take a long time to move the changes over. Turns out I know just enough on the Xcode side that I was able to move almost all the changes over in less than one day. I am still not a big fan of Xcode / Objective C but I am getting faster at using it.&lt;br /&gt;&lt;br /&gt;Since I had them both running it was time for some side by side comparisons. First thing I found out was our appointment recurrence code was not correct on the iPhone. The original author is no longer with the company so I needed to just figure it out. I had written that code from scratch on the Android earlier in the week. Lots of bitmask operations and all sorts of fun date manipulations. I thought porting it would be a big pain but it was not bad. I just looked up "day of week NSDate" and a few other things to be able to get to the source code snippets I needed. The one big difference is pulling time in Java is in milliseconds and in seconds in Objective C so I changed my math by a factor of 1,000 to fix that. Everything else ported very cleanly.&lt;br /&gt;&lt;br /&gt;Below are my thoughts on differences I found. I am not saying either one is better than the other, just listing differences and annoyances I found with each platform. I have not used either platform for an extensive period of time.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Differences:&lt;/b&gt;&lt;br /&gt;&lt;i&gt;(iPhone is really a version 2 iTouch, Android is my Samsung Galaxy S)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt; - Top of screen is used to show where you are and have a button to get back to previous screen. Gives you a bit of an odd look as the "Title" of the screen is not centered due to the button to its left.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Android&lt;/b&gt; - Title is over data and centered. There is a back button on every phone to take you back to the previous screen. Of course you don't always know where back happens to be.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt; - Layouts we are using take longer to generate and paint. Most likely due to slower hardware and I don't believe the layout code being used is very optimized. It is using WebUI for some things and I am sure that part of the issue.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt; - rotating phone forces you to watch the rotate animation. Look, animations are cool and all but I really just want to get work done. Maybe they should allow you to turn that off.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Both&lt;/b&gt; - the standard date picker stinks. They are both very similar with iPhone doing a fancier pinball wheel display but they both suck when you want to get to a specific date quickly. On the Android side phones are not consistent in what they show, some show the day of week which I think is very useful and others don't. &amp;nbsp;Pressing a [+] button 10 times to get to a date in the past is crappy. Trying to stop a spinning wheel with any sort of accuracy is no fun either. At least on the Android you can click on a field (month, day, year) and just type what you want. On the iPhone all you get is the spinner.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Both&lt;/b&gt; - Each platform has a perfectly fine date chooser in their base calendar applications. Oddly only the one on the Android allows you to rotate the screen. What logic Apple used to decide which base apps supported screen rotation and which ones don't truly escapes me. I need to find or write a date selection control similar to the base calendar controls that shows an entire month at a time with simple arrow keys to change month or year. Obviously people can accurately finger pick a date this way.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Android&lt;/b&gt; - I wish you could just plug-in any phone and dump the APK to it. Instead I end up hunting down USB drivers to make things work. Some phones have the USB drivers on them and will transfer them to the computer when you plug them in and others require a web search. We need to set up a mini-market on a server so I can just put the app there to let QA get to it. Once the driver is installed the copy to device is very easy, just the initial setup that stinks.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt;&amp;nbsp;- You must provision each device with Apple to install anything on it. All devices use same USB driver. Every time you plug in a device is fires up iTunes and wants to sync which I find annoying. I run / debug in the simulator and only plug in the device for final testing. I have only ever used one iPhone device on my Mac so I don't know what will happen when I attempt to plug-in another one.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt; - I hate typing my password, which has numbers and uppercase letters. Too many presses to navigate to numbers etc. Android is easier with the long press to get to the one number I have in my password. Of course I have to type this a ton of times a day during testing. This is where the Simulator comes in handy, just type on the keyboard.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Android - &lt;/b&gt;Fonts look better. &lt;b&gt;Bold&lt;/b&gt;&amp;nbsp;looks more bold. I am using bold to help the data stand out from the labels. It just looks better on my Android device than on my iTouch device. I know it is a much better screen. I really want to see what it looks like on an iPhone 4.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt; - Touch input seems a bit more accurate. We have images next to certain lines of text that you press to invoke a mini-text editor. Seems to work easier on the iPhone. Could be a bigger touch target, could be screen differences.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone&lt;/b&gt; - If you have a table with sections headers and you scroll the table the section header gets stuck at top of screen until the next section header hits it, the first section header then scrolls off and the second section header sticks. This is actually a pretty cool effect that you get for free.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPhone - &lt;/b&gt;I still don't like Interface Builder and Xcode being separate applications. I did set up Spaces on the Mac and I plan on running each on their own virtual screen. I wish I had a dual monitor setup on my Mac like I do on my PC. I find it too easy to click off the UI element I am working on to get the focus rectangle to disappear so I can see what the layout looks like and accidentally click on some part of Xcode meaning the whole focus shifts and I have to meta+tab back to Xcode. This should be fixed with Xcode 4 when that gets released.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Totally random side note that still applies to this as it affects my programming&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I asked for and got a set of Sennheiser wireless headphones for Christmas. The wired headphones I used at work had a pretty short wire and if moved to my right to use the Mac I would get a tug. Wireless seemed the way to go. I checked with some buddies and most said wireless sucks in general unless you get Sennheiser. The RS-120 seems like the way to go, decent price and rechargeable.&lt;br /&gt;&lt;br /&gt;The verdict? I am very happy with the headphones. They were shutting off on me at first then I found a web post that you need to crank up the volume out of the computer and use the volume adjustment on the headphones to tweak the sound. Once I did that no more issues in that area.&lt;br /&gt;&lt;br /&gt;Sound quality is very nice. They do a good job covering my ears. I can still hear people around me if needed. Could be a little more bass but that could be my sound source too. I did some tweaking in my sound card settings panel to help them out.&lt;br /&gt;&lt;br /&gt;They are lighter than I figured they would be. I have Sony wired headphones that weigh more. Nice to not have much weight on your head. Good padding on the top of the adjustable over the head band.&lt;br /&gt;&lt;br /&gt;The one thing I don't care for involves pausing sound. If the headphones are not getting a sound signal they output static, not super loud in my case as I don't run them loud at work but if your sound feed stops you get an earful of static. I generally hit the off switch on the headphones and pause button at same time. I also start the music before I put the headphones back on. User training but I wish it just went silent instead of static.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-2979420244212877335?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/2979420244212877335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/synchronized-android-and-iphone.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2979420244212877335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/2979420244212877335'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/synchronized-android-and-iphone.html' title='Synchronized Android and iPhone development'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-7072191087756071181</id><published>2010-12-21T08:32:00.000-06:00</published><updated>2010-12-21T08:32:18.653-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode apple trouble iTouch'/><title type='text'>Finally have my app on the iPhone building / installing</title><content type='html'>This has been a long drawn out battle with the Mac, Apple and Xcode but I finally have my app running on the iTouch. It all starting trying to get an account with Apple so I could get a developer key. The account got hosed and it took many phone calls and emails to get it fixed. It was over a month and a total refund with cancellation of account to make it happen.&lt;br /&gt;&lt;br /&gt;Yesterday I finally get a developer certificate set up. I plug in the iTouch which fires up iTunes which wants to do an install of latest iOS. I let it do that and then fire up Xcode where it says it can not work with the attached device even though it is registered with Apple under my account. I try to provision it but that only annoys it as I am not the company administrator. After looking up various things on the web I land on the dialog that states my SDK it out of date so Xcode can't deal with the device.&lt;br /&gt;&lt;br /&gt;Hit the Apple site to download the SDK update, it is 3.5g! Honestly I could download every Java IDE out there for pretty much every OS and not add up to 3.5g of download. There is no "upgrade" either, you download the whole damn thing. Guess that makes it easier for Apple and keeps every Apple user out of trouble but it is a huge waste of bandwidth. Nothing I can do about it so I start the download knowing I will not be able continue my experiment until the next day.&lt;br /&gt;&lt;br /&gt;This morning I installed the new SDK. That goes cleanly so I plug in the iTouch. It does not recognize it but asks to talk to it for a bit to discover things. No problem there. Do a build but it will not work on the device as the architecture does not match. I dig around in project properties - and remember this has all worked just fine in the iPhone simulator - and change it all from armv7 to armv6 and armv7. Build and it is mad, clean and build and it is still mad. Do more Google work and find another place you have to set it to armv6. Build and mad, clean and build and it seems to be mad but still it pops up on the device.&lt;br /&gt;&lt;br /&gt;Runs just fine but I see a small change I want to make so I adjust the code and the build / run on device is no longer mad. Everything appears to be in working order at this time but it sure was a long battle. I know I had a minor battle with my Android phone to get proper USB drivers installed but everything else was very smooth. Even the USB battle only took a few hours tops, the iTouch battle was over a month. I really wanted this in place before Apple shut down for the holidays. Happy it is working but very frustrated with the overall developer experience with Apple.&lt;br /&gt;&lt;br /&gt;Today I get to go back and work on the Android code base. Will be much happier over there but I am really glad I got the code pushed to the iTouch finally.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-7072191087756071181?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/7072191087756071181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/finally-have-my-app-on-iphone-building.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7072191087756071181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/7072191087756071181'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/finally-have-my-app-on-iphone-building.html' title='Finally have my app on the iPhone building / installing'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-5548231033432917815</id><published>2010-12-09T20:38:00.000-06:00</published><updated>2010-12-09T20:38:42.471-06:00</updated><title type='text'>I published my first Android game tonight</title><content type='html'>Must say this is a big ball of stress that I can throw back into the void. I began working on the game in October while I had some time off between my old and new job. Always good to take a little time off after giving notice.&lt;br /&gt;&lt;br /&gt;If you have an Android phone and like logic puzzles do a search on "&lt;span class="Apple-style-span" style="color: cyan;"&gt;Grid Hunt" &lt;/span&gt;on the Android Market and give it a shot. The game is free. I decided to go the AdMob route to see how that works. Seems like a good time of the year to release a game. Lots of people will be getting new phones and people will be taking time off so they will have some extra gaming time. I know I hit the market every so often to see if there is something new to play for a few minutes.&lt;br /&gt;&lt;br /&gt;Actually writing the game was the easy part. It became a real headache when I tried to tie in AdMob. There is not much in the way of documentation which is very unlike the rest of my Android experience. First off I wrote a game so I was using the full screen. I had forgotten that I plugged my view directly into the activity instead of doing it via the XML file. I put all the AdMob stuff into the XML and of course nothing happened.&lt;br /&gt;&lt;br /&gt;I changed the code to use the XML to drive the view which meant a shuffle of some other things as I was not using the XML based constructor. I got that working but no AdMob so I shoved in a simple label and it painted on top of my game screen. I realized my game code was a custom view so I needed to tell the layout manager what my size happened to be. I added the following code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; * We want to take up almost all of the screen&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;@Override&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;protected void onMeasure(int width, int height)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Display display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;int dispWidth = display.getWidth();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;int dispHeight = display.getHeight();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;setMeasuredDimension(dispWidth, dispHeight - 48);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This put the label at the bottom of the screen. I was then able to piddle around with the AdMob code to get it to appear. I really don't remember everything I did to get that to happen. I needed to get some options configured and I finally got some output in the less of reliable Android log window of Eclipse. I was able to get the special code line from the log console to show the test ads.&lt;br /&gt;&lt;br /&gt;I configured a private key and used the really handy Eclipse export signed APK menu item and created a nice ready to roll APK.&lt;br /&gt;&lt;br /&gt;I wanted to get this rolling tonight but I wanted to clean up the help text and add some separators in the options dialog. I plugged in my phone and it would not install the app! What the heck is going on here? I have been using my phone at work to develop our app there and I have been using IntelliJ. I did find a quick answer on the web. I just need to adjust the time out value in Eclipse. Then it started working again but not until my wife closed the door to the office due to my choice words of "I don't need to to ^%%$# happen to me tonight!"&lt;br /&gt;&lt;br /&gt;When I tried to pull up the options screen it crashed. How could this happen? Turns out when I switched to the other XML style view loading I used same variable name hiding the one in the main class. I thought I had that warning enabled in Eclipse but I did not as I had started a new Eclipse workspace when I renamed parts of the project which annoyed SVN. I hate that part of Eclipse, I want my workspaces to all have the same warnings settings. I enabled nearly all warnings, fixed a few of those in the code and did the easy fix for the view issue. Once I figured it out so I was back on my way to having a fully functional app.&lt;br /&gt;&lt;br /&gt;The Android Market Website was really easy to use. I plugged in my information and uploaded the file along with screen shots and descriptive text. I knew I had an issue with new ads not appearing but I though that would only happen after it was on the market. I was wrong. Ads still were not working, you got the first one but it never changed. So I checked the AdMob site and set it to override the interval then the ad did not show up at all! I unpublished the app and started doing Google searches.&lt;br /&gt;&lt;br /&gt;I found out I have to set the interval which I tried to do in the attrs.xml file but I had no luck there. I never got the other attributes to work via the XML file but I did not really care to override the base colors. Now I needed something to work. I piddled around with that for too long and then found I could just do it directly in code so I set it up for 30 seconds. It worked as I tested the phone via the debug cable so I put it out on the web again after upping the version numbers.&lt;br /&gt;&lt;br /&gt;Of course I sent out a note to all my buddies that have Android phones and put an update on my LinkedIn profile. Finally the brain dump on the blog. I sure learned a lot and I still think this is easier than the iPhone hell I have been going through with just getting a developer certificate. I still can't put my iPhone code on a stinking device.&lt;br /&gt;&lt;br /&gt;I know I have been using a lot of things I learned from my game development for my work development. I was able to really chug along today at work on the login screen that I am redoing. Now I can take all my market place set up knowledge and use that too. We will not use Ad Mob for the app I am doing at work but if this game makes me a few bucks I am sure I will write a few more apps outside of work and I plan on using ads again. Since I now have real working code to look the next time it should fall into place really easily.&lt;br /&gt;&lt;br /&gt;It will be interesting to see what comments I get on the game, how much money I am able to make off of it and how many downloads occur. I have some ideas for a two player mode which would make a really nice update if the games gets a few eyes on it. Always good to have an update after the game has been out a bit and I don't think there are many two player games out there. This will not be two playing at same time but one player solving the board then another player getting the same board and trying to beat the time or each player designing a board for the other to see who can screw the other one up the worst.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-5548231033432917815?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/5548231033432917815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/i-published-my-first-android-game.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5548231033432917815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/5548231033432917815'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/i-published-my-first-android-game.html' title='I published my first Android game tonight'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-6604992692986582079</id><published>2010-12-09T09:42:00.000-06:00</published><updated>2010-12-14T07:36:20.359-06:00</updated><title type='text'>MigLayout Verification plug-in for IntelliJ - what it was like to write it</title><content type='html'>I am happy to report I have written my first plug-in for IntelliJ. It gets around the issues I reported in a previous post about MigLayout using strings for constraints and those strings are validated at run time. This puts in you the fun situation of writing code, running it, getting an error, fixing it and repeating until you have the constraint syntax correct.&lt;br /&gt;&lt;br /&gt;That is no longer an issue if you use the MigLayout Verification plug-in for IntelliJ. I have submitted it to Jet Brains but have not heard back from them as of yet. You can grab it and manually install it from the MigLayout form if you want to give it a shot.&amp;nbsp;&lt;a href="http://migcalendar.com/forum/viewtopic.php?f=1&amp;amp;t=3411&amp;amp;p=7538#p7538"&gt;Download from MigLayout forum&lt;/a&gt;. This will be moved to a permanent spot on his main page soon and hopefully available from JetBrains too.&lt;br /&gt;&lt;br /&gt;If you look at the forum you can see the author of MigLayout is an IntelliJ user and is using the plug-in himself. I needed to contact him as I am using MigLayout code in my plug-in and I wanted to make sure that was OK with him per his license agreement. He was very kind and allowed me to use the code meaning the parse logic and errors you get are the exact same as the ones you would get at run time.&lt;br /&gt;&lt;br /&gt;What does the plug-in do for you? It allows you to highlight the lines of text in your Java code that use MigLayout, press Alt+Shift+Y and it will find every constraint error in the code showing them to you in a console view. You can click on each error to have it pop to that line of code highlighting the string in error so you can fix it. Notice it is every error so you can quickly clean them all up. It handles layout, row, column and component constraints.&lt;br /&gt;&lt;br /&gt;On a side note I am happy I did not try to name this blog based on a language. A lot of blogs are C# Corner or Java Jabbering etc. Since I end up all over the place - Android, iPhone, Java, C#, plug-ins, etc. that would have been pretty misleading.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What was it like to develop an IntelliJ plug-in?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Not easy which is a shame. The big issue was the lack of documentation. I figured IntelliJ had been out for a long time, they are in the process of finalizing the version 10 release and there appear to be a lot of plug-ins so there must be web sites about it and various bits of on-line help. That just was not the case. The only help I found was directly on the IntelliJ forums and a lot of that was many years out of date. See very bottom of this post for code snippets to solve the issues I mention.&lt;br /&gt;&lt;br /&gt;I wrote the guts of the program using a MigLayout based test program. A basic text area with a button to parse and a listbox with the errors I found. I needed to get the code processing in place first as I have to skip comments, combine lines of code that span multiple lines, split out the string pieces, do RegEx processing and guess if it really is constraint etc. No need to do all that work with the plug-in overhead. Once I had that running I contacted the MigLayout author to see how he felt about things.&lt;br /&gt;&lt;br /&gt;The initial plug-in documentation seemed pretty easy, set up an action, query the editor and parse. I have written Eclipse plug-ins in the past, in fact it was a whole RCP, so I remember how involved that can be. Very powerful but very involved with XML things here and linking three files perfectly via string names to tie it together. This was going to be so much easier.&lt;br /&gt;&lt;br /&gt;First thing you can't just developer a plug-in using the out of the box community edition of IntelliJ. You have to install GIT and download the full source project. This is 1g worth of data. It failed on me the first two times. I had to make sure my machine did not come anywhere near going to sleep during the process. After that initial 1g hit was another 1/2g of deltas that got automatically downloaded. GIT is an all or nothing download so it does not restart in the middle if things to awry. It takes a really long time to download. Finally you have to build the program with a simple ant build script. No problem if you have ant installed and configured which I did not but that was easy to do.&lt;br /&gt;&lt;br /&gt;It then creates a ZIP file for Windows and the proper images for the other support OS platforms. Honestly if would be nice if they just posted the 80 meg zip file I needed for Windows. This is a fully functional version of IntelliJ along with plug-in SDK support that you install.&lt;br /&gt;&lt;br /&gt;You point your running instance to this new instance as the plug-in SDK and you can start code development. So far so good but there is very little sample code to get you started. I did a lot of source code scrounging and using the little bit of on-line help I could fine. I was able to figure out how to get the project, editor and document so I could pull out the selected lines. I found a way to determine what line number I was on and I could run my already functional parser and show the errors in an alert dialog. I wanted a console window.&lt;br /&gt;&lt;br /&gt;Others have asked on the forums about the console window and I pieced together various posts to get it working but all I could output was straight text lines. I wanted you to be able to click on them to jump to the spot in the code of the issue. Others had asked the question with no answers. I did my first release to the developers at work without that support. In the end I did figure out how to use the printHyperlink call to do what I wanted.&lt;br /&gt;&lt;br /&gt;Hot keys threw me off for a bit too. I misread the dialog and thought you put in two hot keys, a primary and a secondary but it really meant if you put in two the user would have to do them in order. I wanted different hot keys for the default key mapping vs. the Eclipse key mapping I use. I did not figure out how to do that so I finally found Alt+Shift+Y that was free in both mappings. Since access to the feature also appears in the Code menu you can still use it even if that key sequence is not available in your mapping.&lt;br /&gt;&lt;br /&gt;Even getting to the name of the currently edited file was not something I was able to find on the forums. I pieced together how to do that too. While doing that I realized there were various deprecation warnings. I like my code to be warning free so I went about fixing those. Remember I said a lot of forum post are years old, many from 2004. I was able to clean up all the warnings and the new code looked better and is easier to read. One clean up just created new deprecation warnings around the console view. I was finally able to piece all that together and ended up with warning free.&lt;br /&gt;&lt;br /&gt;The hyperlink stuff into the console window was confusing. Each hyperlink you create needs to implement an interface but the only call you get is&amp;nbsp;&lt;span class="Apple-style-span" style="color: cyan;"&gt;public void navigate(Project project). &lt;/span&gt;You don't even get the text they clicked on! I was hoping to have one generic link click listener but instead I had to create a new object that implements the interface taking the text of the link in the constructor. From there I had to figure out all the editor document access to pull lines and selection model processing to scroll to and highlight the errors.&lt;br /&gt;&lt;br /&gt;I am very happy with the end results and will get a lot of use out of the plug-in as I am sure others in the office and hopefully you will too. I don't have a good code formatter for blogspot so below are my code chunks that may help other plug-in developers.&lt;br /&gt;&lt;br /&gt;UPDATE: The plug-in has been accepted by IntelliJ and is available from their website. &amp;nbsp;&lt;a href="http://plugins.intellij.net/plugin/?idea_ce&amp;amp;id=5887"&gt;MigLayout Verifier at JetBrains&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Imports I am using for all of the below&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;import com.intellij.execution.filters.TextConsoleBuilder;&lt;br /&gt;import com.intellij.execution.filters.TextConsoleBuilderFactory;&lt;br /&gt;import com.intellij.execution.ui.ConsoleView;&lt;br /&gt;import com.intellij.execution.ui.ConsoleViewContentType;&lt;br /&gt;import com.intellij.openapi.actionSystem.AnAction;&lt;br /&gt;import com.intellij.openapi.actionSystem.AnActionEvent;&lt;br /&gt;import com.intellij.openapi.actionSystem.PlatformDataKeys;&lt;br /&gt;import com.intellij.openapi.components.ServiceManager;&lt;br /&gt;import com.intellij.openapi.editor.Editor;&lt;br /&gt;import com.intellij.openapi.editor.SelectionModel;&lt;br /&gt;import com.intellij.openapi.project.Project;&lt;br /&gt;import com.intellij.openapi.ui.Messages;&lt;br /&gt;import com.intellij.openapi.vfs.VirtualFile;&lt;br /&gt;import com.intellij.openapi.wm.ToolWindow;&lt;br /&gt;import com.intellij.openapi.wm.ToolWindowAnchor;&lt;br /&gt;import com.intellij.openapi.wm.ToolWindowManager;&lt;br /&gt;import com.intellij.ui.content.Content;&lt;br /&gt;import com.intellij.ui.content.ContentFactory;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Creating an associated console view in actionPerformed(AnActionEvent e) method&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (project != null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ToolWindowManager manager = ToolWindowManager.getInstance(project);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ToolWindow window = manager.getToolWindow(id);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (window == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TextConsoleBuilderFactory factory = TextConsoleBuilderFactory.getInstance();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TextConsoleBuilder builder = factory.createBuilder(project);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;view = builder.getConsole();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;window = manager.getToolWindow(id);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (window == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;window = manager.registerToolWindow(id, true, ToolWindowAnchor.BOTTOM);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ContentFactory contentFactory = ServiceManager.getService(ContentFactory.class);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Content content = contentFactory.createContent(view.getComponent(), "", false);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;window.getContentManager().addContent(content);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;window.show(new Runnable(){&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void run() {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Nothing for us to do here&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Jumping to a line of code and highlighting text on that line&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;public void actionPerformed(AnActionEvent e) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;Editor editor = e.getData(PlatformDataKeys.EDITOR);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;String findMe = "Text to find on line"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;int line = {line in document you are processing - 1 based}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;int lineStart = editor.getDocument().getLineStartOffset(line - 1);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;int lineEnd = editor.getDocument().getLineEndOffset(line - 1);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;TextRange textRange = new TextRange(lineStart, lineEnd);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;String lineText = editor.getDocument().getText(textRange);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;int pos = lineText.indexOf(findMe);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;if (pos != -1) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;SelectionModel selModel = editor.getSelectionModel();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;selModel.setSelection(lineStart + pos, lineStart + pos + findMe.length());&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ScrollingModel scrollModel = editor.getScrollingModel();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;scrollModel.scrollTo(new LogicalPosition(line - 1, col), ScrollType.MAKE_VISIBLE);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Getting file name of active editor&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;public void actionPerformed(AnActionEvent e) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;VirtualFile virtualFile = e.getData(PlatformDataKeys.VIRTUAL_FILE);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;String fileName = virtualFile.getName()&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Getting selected text and line where it starts&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;public void actionPerformed(AnActionEvent e) {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;Editor editor = e.getData(PlatformDataKeys.EDITOR);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;SelectionModel selModel = editor.getSelectionModel();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;int curLine = editor.getDocument().getLineNumber(selModel.getSelectionStart());&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;String selText = selModel.getSelectedText();&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2188951568343415255-6604992692986582079?l=kevsaidwhat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kevsaidwhat.blogspot.com/feeds/6604992692986582079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/miglayout-verification-plug-in-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6604992692986582079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2188951568343415255/posts/default/6604992692986582079'/><link rel='alternate' type='text/html' href='http://kevsaidwhat.blogspot.com/2010/12/miglayout-verification-plug-in-for.html' title='MigLayout Verification plug-in for IntelliJ - what it was like to write it'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14017088108968329074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_FjshqhoV_co/TBwp17vVhKI/AAAAAAAAAAM/qFx3UD-9s7Q/S220/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2188951568343415255.post-2154121508401240146</id><published>2010-11-20T22:09:00.000-06:00</published><updated>2010-11-20T22:09:28.964-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='miglayout java dialog layouts'/><title type='text'>MigLayout - you really should try it</title><content type='html'>At my new job they used the NetBeans GUI editor to create their panels / dialog boxes. At some point they started to use MigLayout now want to replace all the existing panels. I started with around 220 and now have about 160 to convert.&lt;br /&gt;&lt;br /&gt;So why use MigLayout? Why not GridBagLayout or one of the other Swing layouts? My previous job used GridBayLayout for everything even when a very simple BorderLayout would work. I wanted them to switch to MigLayout but it never happened. I have used MigLayout for a few of my side projects and I really like it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MigLayout Pros:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Handles all your layout needs - if you draw it you can lay it out&lt;/li&gt;&lt;li&gt;Very simple to learn - string driven&lt;/li&gt;&lt;li&gt;Easy to read even if another developer did the initial layout&lt;/li&gt;&lt;li&gt;Very concise making for compact code&lt;/li&gt;&lt;li&gt;Will handle Mac vs. PC differences in button layout ([Cancel] [OK]&amp;nbsp; vs [OK] [Cancel])&lt;/li&gt;&lt;li&gt;Handles high DPI settings&lt;/li&gt;&lt;li&gt;Will handle insets for 
