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.
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.
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 noticeable 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.
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.
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.
Wednesday, February 23, 2011
Tuesday, February 22, 2011
One iPhone provisioned
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!
I installed JEdit on the Mac for simple text editing via a free editor some time back. Wish I had PSPad but this 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.
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.
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.
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.
I installed JEdit on the Mac for simple text editing via a free editor some time back. Wish I had PSPad but this 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.
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.
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.
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.
Monday, February 21, 2011
Xcode 4 crashes a lot
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.
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.
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?
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.
Off to figure out applicationDidEnterBackground and applicationWillEnterForeground so I can refresh data on phones that support multitasking.
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.
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?
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.
Off to figure out applicationDidEnterBackground and applicationWillEnterForeground so I can refresh data on phones that support multitasking.
Saturday, February 19, 2011
Technical challenges when switching jobs
I changed jobs in October for the better. The old place was full of politics and 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.
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 parent.parent.parent.parent.setEnabled() 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.
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. Later there was more C# done very poorly by a new team.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 parent.parent.parent.parent.setEnabled() 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.
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. Later there was more C# done very poorly by a new team.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Wednesday, February 16, 2011
iPhone provisioning
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.
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.
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.
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 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.
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!
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.
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.
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.
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 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.
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!
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.
Tuesday, February 15, 2011
Bug fixing on the iPhone using Xcode 4.0
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.
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.
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.
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.
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.
I had initial troubles getting the code to run on the Simulator until I added i386 as a 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
I had initial troubles getting the code to run on the Simulator until I added i386 as a 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.
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.
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.
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.
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.
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.
Thursday, February 10, 2011
Android vs. iOS developer differences
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.
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.
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.
Examples you say? Sure, here are two that just made me cringe.
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):
if (group == 0)
text = "Group 0"
else
text = "Group 1"
Someone posted
I tried
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.
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.
Examples you say? Sure, here are two that just made me cringe.
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):
if (group == 0)
text = "Group 0"
else
text = "Group 1"
Someone posted
I tried
if (group == 0)
text = "Group 0"
else
text = "Group 1"
else
text = "Group 2"
and I get a compiler error about the else? Plz help, what am i dong wrong?
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.
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.
OMG this is prefect! thx, but it only adds, how to delete, plz help me!
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?
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.
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.
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&A forums full of some really inane questions? Are people coding on the iOS just to try and make some quick cash?
Friday, February 4, 2011
Upgrade fever just aint what it used to be
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.
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.
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.
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.
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.
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.
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.
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.
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!
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.
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.
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.
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.
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.
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.
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.
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!
Thursday, February 3, 2011
My first Android game - how is it going?
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.
Stats at this point:
1759 Downloads / Installs with 424 of those active.
$4.50 or there abouts (AdMob site is having issues this morning) in ad revenue.
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 $25 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.
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.
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.
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.
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.
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.
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.
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.
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...
Stats at this point:
1759 Downloads / Installs with 424 of those active.
$4.50 or there abouts (AdMob site is having issues this morning) in ad revenue.
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 $25 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.
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.
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.
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.
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.
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.
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.
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.
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...
Subscribe to:
Posts (Atom)