Showing posts with label test. Show all posts
Showing posts with label test. Show all posts

Saturday, November 10, 2012

Life at the new job and a Galaxy Note as my testing device

Life at the new job has been interesting. They did not have an official place for me to sit on the first day so I took over the office of a guy who is on vacation. They found a place over in customer support so I moved there for a bit and now will move to a more permanent home in what use to be a small conference room that is being divided into 4 cubes. I will be in there with another Android developer and two iPhone developers. Will help us share a lot of ideas.

For my main testing device they gave me a Galaxy Note - original version not the new II. For some reason I thought it was going to be much larger as all the reviews jump all over that. It is larger than my main phone, a Galaxy S Vibrant. I actually like the size. Larger than my phone but not a tablet. I have been using it a lot a night to see what I think of it as I have considered getting a Note II when it goes on Black Friday sale, or at least I hope it goes on sale.

I wish the S-Pen worked a bit faster. I am hoping it does a better job keeping up on the Note II. On the model I have I must slow down my standard writing speed to have it draw what I think it is going to draw. I should not have to adjust to what the device can do, it should keep up with me. I have used the phone as a mini whiteboard. Again, drawing speed is a little slow but if I match the pace it works well. Using it to jot down notes at home is also handy, it sits right next to me and saves me from hunting down paper to remember something like "out of cat food". You can easily erase mistakes in your drawings too. I think this could be a great feature.

As far as a testing device it is really nice. Samsung seems to be very quick to grab back memory you once used and to kill activities as you move between them. It allows me to simulate low memory usage that would occur on a phone. This really comes into play as I am doing a lot of importing of images from the camera activity which is one area you can quickly run into memory limitations. I have been able to fix all the issues I have run into and make my code much more low memory proof than previous code I have written. Allowed me to learn all sorts of interesting things about Android programming.

After using the phone for about a week I would say it is a winner. I have been using it at night instead of my Xoom when I put my son to bed. At that time I am generally reading web pages, using Pulse or maybe playing a game. Being able to do that with one hand is really nice. I don't know if a 7" tablet would allow me to do the same thing or not as I don't have access to one. The Note fits in the hand without cramping. The screen is very bright and readable. I only charge is once a day. Web pages tend to be read in landscape mode but that works just fine. You get the side to side space you need for most websites but you do have to to a bit more scrolling vertically as you read pages. Nothing that is annoying, just something to keep in mind.

After I have time to test the S-Pen drawing speed on a Note II and it goes on sale I will probably buy one as my next personal device. I love the Xoom tablet and use it a lot. My phone is getting older and it only runs 2.2 which is pretty crappy. I need to use some of the new Android OS features to keep up with the programming world.

Working strictly on mobile development at my job has been nice. No shifting gears between iOS, Android and desktop Java during the day. One keyboard, mouse, language and IDE to keep straight.  I am happy I know Objective C so I can look at the code and see what they did as my first project is a conversion of the automatic check deposit functionality, thus me taking a lot of pictures. I am sure my cube mates are sick of hearing the sound of a camera shutter as am I. Friday morning I fixed my threading issue so I stopped taking pictures and started looking into the server API for send the deposits.

Being as I am a contractor I get to work Monday which the perms have the day off for Veteran's Day. I will be happy when I convert to a full time person allowing me to have all the bank holidays off like I did when I worked in the stock market industry.

Tuesday, June 12, 2012

Testing your code, pretend you are an end user

What is one of the best ways to test your code? Pretend you are an end user. Run it like you bought it instead of like you are testing it.

Near the end of this release I add export to CSV for the scheduler. People want all sorts of reports so why not let them export the data and do whatever they fancy in Excel? Works like a charm. I was doing some other testing and though "Hey, I will just export the data so I can sort it and see it in Excel to fix this bug!". Whammo, I hit a bug right away in the Export dialog.

I just wanted to export the appointment ID, start time and duration so I deleted all the other fields in the list box but then I could not add any back. The list box was reporting a selected index of 4 (the original count of items in the list) even though there were no items in the list. I changed the code to ask the backing data model for the row count so I could insert at the proper place and one bug fixed.

Next I wanted to sort the exported data. The problem is recurring appointments exported with the start date of the recurrence not the data of the grid which means they sorted in front of non-recurring appointments. When I export data I want the date to be the same for all appointments and just for the time to change. I fixed that issue too in the fixes branch and trunk.

Here I am using the software like an end user and finding bugs. Most developers are afraid to test like an end user. We are scared of finding bugs. We tend to test in a little vacuum, testing small bits of code in very isolated conditions. No user runs your program like that. They dive in and hit every menu item and button trying to make it do what they want. They multi-select, drag and drop, double click, press disabled controls and have all sorts of fun. You need to do that too. Beat on your program like it owes you money.

For the days leading up the release I just ran the software and found a number of usability issues. Why can I set default cell width for open / closed business hours but not overall row height? Why is the pivot set per view and not just once for grid? Either you like Time as a row or a column and don't want that to change if you change the other axis to Category, Provider or Facility. Yes it annoyed the technical writer that I changed this late in the game but the code and writing took us an hour and this is something that would annoy the user every day. It annoyed me after playing with the program for an hour.

You can't depend on your QA staff to be an end user. A lot of the time they are running through regression testing scripts following a very narrow path through your code. They don't mind finding bugs so they will beat on things in odd ways but it is still a view with blinders on. Those test tend to skip over usability and look at functionality. Yes, you can follow these 10 steps to get from Y to Z but why are there 10 steps? Can we do it in 5? Export was two layers deep in a menu but is something that many will use everyday to print out a reminder call list. I put it as a button on the main toolbar. Once I did that I made a note to make the toolbar layout configurable so those who don't use that button don't need to see it. I plan on implementing that in the next release.

It is so easy to just keep adding features figuring that will make clients happy but remember they are still using the existing features on a daily basis and those should be easy to use with as few steps as possible. I save off the settings they used the last time the exported data. Who wants to reconfigure that everyday? Maybe you do three types of exports. I allow you save as many named export as you want. Where do you write the file? I default to the user home directory. What if you give that export definition to another person? They don't have a directory called c:\users\john.doe so I write out {home.dir} instead of c:\users\john.doe and do replacement text when you load the export definition. Don't annoy your users, computers are there to eliminate steps and avoid the mundane.

Allow multiple ways to do things. Some people are mouse / menu folks and others use hot keys. If you use hot keys use them all over otherwise heavy keyboard users will be annoyed. Some like toolbars and will use tooltips to see what they do if the icon is not obvious. Others are text oriented and want to find what they want in the menu. Menus need to be logically laid out with descriptive text. I hate a menu that has "Preferences", "Options" and "Tools" - those words mean the same thing to me and I always pick the wrong one when I want to change a setting. Microsoft I am looking at you here with nearly every Office application. Use you tech writing team or someone you consider to be a wordsmith to help here.

Take the time to nurture your application. Don't just keep throwing more stuff at it watching it bloat up. Consolidate smaller dialogs when possible. No one likes to bring up 10 dialogs to get their initial preferences in place or to have to remember where to find some obscure setting.

You want them to be able to quick find and use every feature you have. Why waste time coding it if no ones knows it is there?