Wednesday, February 27, 2013

What to install on a new machine?

What do you install when you get a new machine? As a developer you have to install a lot more things than a normal user.

For a Window box I need the following:

  • Java SDK
  • 7 Zip
  • Eclipse
  • Android SDK
  • Sublime Text
  • Chrome, FireFox, Opera to test websites (IE is preloaded)
  • SmartGit, Tortoise, TFS (what ever version control you currently use)
  • Console2 (allows you to do transparent / tabbed command lines)
  • Greenshot to get easy screen shots, annotate and crop them
  • System Internals (lots of tools, need most of them)
  • Paint.NET (so far my favorite free paint program)
  • Hoekey (run things off Win+key combinations)
  • Pencil (quick wireframes)
  • MediaMonkey (music and other files)
  • Python (for quick scripts and easy file parsing)
  • Picasa (for fast photo viewing)
  • Various USB / ADB drivers for Android phones (Motorola, Samsung, HTC)
For a Mac I need the following:
  • Java SDK
  • Eclipse
  • Android SDK
  • Xcode
  • Sublime Text
  • GIMP (for painting chores)
  • AppCode (if company will pay for it, I like it better than Xcode)
  • Source Tree (if using GIT)
  • Chrome, FireFox, Opera (Safari already there)
Both 
  • Chrome extensions, FireFox extensions or both
  • Current set of bookmarks (auto imported by Chrome)
  • Existing code snippets I have collected over the years
  • Music
  • Wireless headphones (not really an install, just plug them in)
It can take a bit of time to get it all set up but it really is not that big of a list. Most things are already on the box ready to roll. If it is a totally fresh machine you have to install the latest updates from Apple or Microsoft before you move along too far. I try to carry most of my list on a USB key so I can hit the ground running instead of eating up bandwidth trying to get the required bits on my first day.

My new job will provide a MacBook Pro. I need to get used to GIMP again. I have been using Paint.NET mainly for the past year. I have had positions where I have both a PC and a Mac and I have cheated and used the PC for a lot of my graphics work just because I am familiar with it. I have Photoshop Elements at home and I use that too. I will also have to spin my head into Linux command line usage. Not that I need the command line very often on a Mac but when you need it you need it bad and don't want to have to look up every command.

In general it is not too hard to switch between a Mac and a PC. I will have the same keyboard - a Microsoft Natural 4000, at home and work. They layout just works better for me. Some of the keystrokes on the Mac will mess me up for a bit. I used to switch between the two every few minutes as I was doing Android work on one and iOS on the other or I was testing our main Java app on both so I would be testing layout differences.

Always interesting to start on a new machine then to start realizing what you are missing. Some program that you only use so often. Of course in the old days you had to dig out a CD or a floppy disk and install it. Now as long as you remember the name you can download and install it off the internet. Physical media is not used much. 

My wife got a new laptop and I was able to set it up pretty quickly. It is a Lenovo laptop I got refurbished from Microcenter as I did not want a machine with Windows 8 and I wanted something with a lot of RAM and a good processor. Save but sturdy. Why not Win8? Am I not a tech? Yes I am a nerd but she would be the only one in family with Win8 and I just did not want to mess with it. I have not heard good things at this point. Generally skipping every other release of Windows has been a safe bet.

I was able to install things quickly. I had to dig out or Quicken CD but everything else came off the web including an install of Office 2013. She was up and running easily and does not use the machine for development so my list about was cut pretty short. She does a great job keeping her documents and what not on our home server so everything was there. Calendar, Contacts and emails are done through Google as they sync with her phone so all of that was ready too. The cloud sure has made things much easier. The home server, which is backed up Mon, Wed, Fri, also helped a lot. It serves as a printer server too.

Ready to get my new Mac going. I will add to the list if I find other things I needed to install.

Sunday, February 24, 2013

What programmers want

I had a recent one on one with my boss and he was baffled about something. Multiple programmers, including me, had asked for larger monitors. Well it did not have to be a ton bigger but we wanted a better pixel count. The company standard is 20" monitor using a 1440x600 resolution. That is pitiful. Heck the 15" laptop has 1440x900. For him to order better monitors it was going to take some effort on his part and he really did not feel like doing it.

First off he said everyone in the building wants a bigger monitor. I am sure that is true. He did not want to start a trend. Boy have I run into this in the past. At a previous position I asked for a second monitor and that ended up in a big tussle. I final got one by submitting the fact clients had dual screens and we were not testing against them. In fact we knew we had dual screen issues that were not being resolved. When the big boss was out of town the next guy down was willing to sign off on me getting one. Of course other developers wanted one too. They got it in their head they had to order then all at once. I suggested they order a couple a month and hand them out by seniority. It took them a full year before they decide to do this. How much productivity was lost during that time?

You are much more productive when using multiple screens. I have two at home as do both my sons and my wife. I use the dual screen mode on Note II. We are constantly cutting and pasting between multiple apps. I have tons of apps on a screen when developing: Outlook, SmartGit, IM client, Chrome, Command line, File Explorer, IDE, Sublime 2 text editor, TFS, Paint.NET and other apps as needed. Running all that with not enough pixels is silly. My main screen at home is 1920x1080 and my second screen is 1680x1050. My previous job had dual 24" monitors at 1920x1080. As a programmer you use all the room. We don't live in Outlook + Word or Outlook + Excel all day long. Even using TFS on that little screen stunk. Not that TFS is UI to love, but man did I have to scroll around a lot to see anything. I want to have the email client running that I can quickly glance at to see if an incoming note is important or not. If it can be dealt with later or I am just on a big CC list then I easily ignore it and keep coding. If I have to ALT+TAB toggle windows to read it then I have been interrupted.

If you are a manager take a look at what your developers have open at any point during the day. If they don't have a dual screen set up by now then shame on you! If you have crappy little monitors then fix it! I bought my 23.6" main screen for $119 at Microcenter. That is a very tiny investment. Spread it out over time if you have a big pool of developers but take care of them or they will leave.

Leave is just what I am doing. I asked for a bigger monitor, promises were made but it never happened. I asked for a tablet to test our Android code against and that never happened either. One of the devs has an older MacBook and his compile times suffer and no upgrade in site. The other Android developer was promised a MacBook Pro on the day he started and 4 months in it never happened. Other developers have asked for larger monitors and have not gotten them.

They day after my one on one, first I had in my four months as a contractor, I was offered another job. They all have dual screen setups with large monitors. I have been in that sort of environment in the past and really missed it. When my home layout beats the pants off my work layout it is time to move on. During my resignation meeting I explained why I was leaving. There were a lot of other issues but I did reiterate that developers need bigger monitors and proper equipment. This was not news to my boss. Others have complained and left too.

The boss is very non-technical. He still did not get it but was willing to get people what they needed. I was one of three to resign in a few week time period and more are going to leave as they are looking hard right now. When people leave it is because little things add up. Sure big things play into it to but it is when you start to total up all the issues that you decide to move along. At the very least as a manager you have some control over the equipment your developers are using. Do yourself a big favor and make sure it is up to snuff.

During any interview I ask what type of equipment I will have. Now I know I need to ask about monitor size and pixel count. Of course they can easily lie during the interview just as they did to the other developer about getting a Mac. I generally want to walk back and see a typical developer setup so I can confirm things. Are they sitting on a folding table? Are they low, mid or high cube walls? Do they allow headphones? Does anyone over decorate their space or is it all super minimal decoration meaning they probably move around a lot. Funny cartoons on the wall or all business? Notes, screen shots, white boards with collaborations? If they don't have any white boards that is also a red flag to raise. You can tell a lot about the environment with a quick glance at a typical work space.

What do developers want and how should I manage them?

1) Proper equipment - dual screen setup, and yes one of the screens can be the laptop screen but if that laptop is 13" they you really need a docking station and two big monitors. Mac laptops tend to have really nice screens so I am talking more about a Windows system here. A Mac user still needs a second monitor. Try to have both monitors be digital is possible. VGA stinks at higher resolutions.

2) Monitors with high resolution. Don't go super cheap here, they stare at them all day long. Get a name brand and a matching set if possible.

3) White boards or some way to collaborate with others. A quick flow chart, screen mock up or drawing simple notes can go a long way towards solving issues that need visuals.

4) Access to a printer. I don't print often but there are times it is very handy to print out a document or series of screen shots to jot down notes or to compare for consistency issues.

5) Fairly open internet access. I don't care about using Facebook at work. I don't even have a Facebook account but if I keep getting blocked from finding answers to technical questions on the web because some blog with the perfect answer has a cuss word on it then I am blocked from doing my job. When I worked at a large telcom company it was hard to get to any website at all. Never, ever block stack overflow or you can just forget getting anything done.

6) Special equipment. If you are doing iOS you need an iPhone / iTouch and an iPad. Yes it can be a shared resource but not something you only can have for an hour. If you are doing Android you need a crappy small screen phone, a normal phone, a Note or Note II and a tablet of some sort. The emulator only gets you so far.

7) Uninterrupted time. If you have meetings all through the day a developer does not have time to get is train of thought out of the station. Programming is not something you start and stop on a dime. Once you are in the flow you want to just keep going. Morning stand ups are fine but meetings all through the day are silly.

8) Time to test. Sure we love to pound out code but if there is always another big feature on our plate we tend to just get what we have running and not hit it hard with testing. There needs to be down time between large projects. It gives us time to clean up the code, find our own bugs, fix graphical glitches have seen from time to time. Code lives forever it seems. Nothing is ever done, it just ships.

9) Some real desk space. Yes we need to spread things out when we have documents to scan and screen shots to look at and people to sit next to us to code review and work together.

10) Comfortable chair. I have been at too many places that roll old conference room chairs at the developers. Ratty torn up furniture. Yes, that chair may have cost big bucks when it was new but it is now better off in the trash than handed to someone who sits most of the day.

11) The sense that we matter. Sales and Marketing my have all the flash but in the end without the software there is nothing. The rest of the company generally depends on what the developers produce. The sales staff tends to run feast or famine but when they brag up the big sales bonus it really does not help developer morale unless they have a bonus system too. Little things add up here. A staff movie afternoon works wonders. Doughnuts on a Friday. Gift certificates. Action figures. Free sodas.

12) Ask about the little things that are not going well and try to fix them. Stand up for your team.

13) Don't shoot down cool ideas because the proper team / person did not think of them. This was another sore area and the job I am leaving. The Android team was last in line. Some one designed the product and the iOS team implemented it. That team was not much on the idea front. When it got to us we had some cool ideas to clean up the interface, eliminate taps and full screens. It would have worked just as well under iOS but since it was already done we were told STFU. It was going to be hard for them to adjust the user story, to admit it was wrong to start with and to do new screen shots. The iOS app is not shipping, things are not done in fact they had a 2 to 1 developer advantage. The iOS team even wanted to make the changes, no developer push back but instead management decided not to do the right thing because it was not their idea. Aim for that 2 star rating! They originally hired a code monkey off shore team to do this and it failed. They decided to bring in senior level developers to do the project but now don't want to listen to them.

14) Have one on one meetings. This is the only way you will hear about the little issues that are adding up. My first meeting was way too late. Yes, I brought up all the issues via email or hallway conversations. There were no surprises to anything I said during my resignation meeting but it felt like everything was so informal leading up to me leaving that nothing was ever resolved.

15) Don't treat different teams differently. The Android team always felt like a step child. They loved iOS and even Windows tablets but made us feel like dirt. The UI team was Apple fanatics and hated Android and let us know. All screen shots were iOS with total Android afterthoughts. Your clients don't care about your opinion here. If you ship an Android version it better be the best darn Android version you can produce. It better not be iOS UI on Android. It better not ignore the back button, the action bar and other Android givens. Same on the iOS side. Don't be so generic it could run on anything. Use the iOS UI and be as iOS friendly as possible. It is is new code run on the iPhone 5 full screen.

16) Do code reviews. Being an programming army of one is tough. A code review can bring up better ways of doing things, find areas where objects can be created or removed, find duplicate resources, strings that are not in tables, code not following naming conventions and many other issues. They don't have to be this massive formal setup. Two developers looking at their dual screen set up just talking over the code works. Do them often so this does not get out of hand.

17) Don't let one developer "own" something. Ever piece of code should be cross trained. Yes, you will have a developer that specializes in JSON parsing and one that does custom controls but they should each understand what the other is doing and be able to fix bugs in the code. I don't own any code I write. I type it up, comment it and check it in to source control. They company paid for it and it is theirs. If another team needs to take it over then have at it. To me if they never have need to ask me a single question about the code then I have done my job. There should not be anything magical about it, it should be standard easy to understand code. I should have commented any weirdness and things like "must call in this order to get around known bug in SDK" etc.

My next job will not be perfect but I know it solves a number of issues I have at the current one. I have learned how to interview the company I am applying at. I have reasons for asking for the things I do and I will continue to fight for the best, most productive environment I can have. We should all fight together so we don't have to fight anymore, all these things will just be a given.

Switching wireless routers

I had a Linksys WRT54G wireless router that I had been running for a number of years. My family started complaining of wireless dropouts on various devices, PC, tablet, phone, Wii, DVD player etc. I changed channels and tweaked other setting but nothing seemed to fix the issue.

Since you are not in the market for a router very often I polled my other technical friends and decided upon the NetGear R6300. This is a big step us as I tend to be pretty frugal and I have always dealt around the $50 range on a router. Microcenter had this baby on sale for $179. It was highly recommended and appears to have enough features to future proof me a bit so I went for it.

It has worked flawlessly. I have some devices that use the 5G side of things. Set up was very easy and it seems to have all the features I need. I have no idea why the old router was annoyed but I am guessing it was fighting with other routers in the area. Nice to have the problem solved. Not a single drop that has been reported to me at least. Printer hooked right up to it as has every device in the house.

Felt like changing clocks to DST. Run around the house and try to remember where every device is that uses the router and configure them. Was interesting to see which ones saw the 5G side and which did not. My main desktop is hardwired in so I did not have to worry about that, my son's machine or the Dish network wireless access point.

Wednesday, February 13, 2013

Eclipse dependency not found in workspace fix

I was getting the old dependency not found in workspace error in Eclipse. The other Android developer was not having this issue. We have multi-project workspace set up using Maven and POM.XML files. We had tweaked so many things and done a boatload of rebuilds and reboots of Eclipse with no luck. This error was staring us in the face.

dependency=[com.{problem class here}] not found in workspace

Finally I just selected the errors, right clicked the mouse and selected Delete. The errors went away. Full rebuild and they were still gone. Restart of Eclipse and yep, not there.

At some point in the process those errors got STUCK on and would not go away even though we had fixed the root of the issue. Seems stupid to Delete error messages but in the case it solved our problem.

Saturday, February 9, 2013

Taking pride in your work as a developer

What type of developer are you? One who takes pride in every last step of the process or one who just says "Tell me what to do and I will do it?". The world needs both types but I happen to fall into the camp of taking pride in every last bit of my work. At some companies this can make things rather interesting.

I am working on a contract currently where they developed an iPhone app first to prove out the server side API. There are 6 developers on the iOS side of the house. They brought in me and another Android developer that I had worked with in the past making for a pretty solid team right off the bat. They expected us to be 3 months behind the iOS team as we are out numbered 3 to 1 giving them plenty of time to shake out all the issues and solidify the core design.

We have run into a multiple issues. First we have already caught up with the iOS team. Most on that team were C# developers reassigned to Objective C. The other Android developer and I came in with a decent background in Android development. Of course that allowed us to quickly catch up as we are not learning Java and the Android SDK, we just need to buckle down and code. 

Since I have also done iOS development and I have access to the Objective C code base I have looked it over. The code does not look like Objective C. It looks like someone tried to force fit one language, C# in this case, into another language. Macros to emulate methods of C#,  no method definitions in the .H files, everything stuffed into dictionaries when other collections make more sense and a number of other issues that would drive a person who lives in Xcode bonkers. The code is very hard to read as it is not what you expect to see when you view Objective C code.

One of the steps we took in the process was to print out the screen shots, four to a page, from the user stories and cut them out. We saved paper but still gave us enough room to make notes. This allowed us to see the big picture of the project and divvy up the work of creating the screens in XML. The best thing it allowed us to do was find inconsistencies in the layouts. Did the date appear above the amount on one screen but below it on another? That happened in various places. Was it called Transaction ID here and Confirmation ID there? Yes it was.

We were also able to find screen layout patterns and create generic layouts in code. We grouped all the screen shots of like type together and decided where we could use a generic layout to handle things. This let us start with a solid initial set of activities and fragments. We also looked for areas to share Action Bar code. We were able to quickly get fragments and activities in place.

What happened next is where things did not work out. Even though the company follows a flavor of Agile we were stuck in Waterfall. The product manager did not want to change any of the user stories on the iOS side even though he admitted they are wrong. He just wanted the Android team to follow the iOS design, inconsistent as it is, because if he changed a story he got in trouble.

There are various aspects of the project that look like this is the first attempt of a web designer on a mobile device and this is exactly what happened. Another reassigned person who did not put in the effort to really learn the new platform they were tasked to work on. The project looks ugly and out of place on the iPhone and even worse on the Android as it got a second level of ugly being a basic conversion from the iPhone. We were able to argue and remove the iPhone specific look and make it at least appear to be an Android application but we are struggling to get them to fix the consistency issues and to remove unneeded screens via a much cleaner interface. 

Yes, they see and agree with our suggestions but they don't want to take the time to update the iOS user stories and screen shots or have that team change the code. The iOS team is willing to put in the work. The project is no where near shipping as the server side API is not finished. In fact it is all still mock data. The server is not talking end to end to the real data providers yet so this is the perfect time to clean up the user interface on both applications.

When I speak with the iOS team they admit they gave up long ago. Just code and layout what was given to them by the UI team. In the Sprint meetings they did not bring up all the areas they felt were wrong on the iOS design. Dialogs that are justified to the top of the screen instead of centered. Hand drawn buttons where the iOS button looked nearly the same, extra screens and taps to get the where you needed to be, data displayed in the wrong order. They have been at the company for so long they just accept and do what is told of them. 

There are so many other things wrong on the iOS side I can barely stand to run the app. The keyboard covers the entry field so you can't even see what you are typing. I have no idea how this made it past QA let alone how the developer thought something that basic was good enough to toss over the wall to QA. Table data was hand laid out in Interface Builder and they did not space it evenly. A label is not base aligned with the data to its right. The don't have the back button on all screens. They don't support landscape except on one screen where they manually rotate the objects they paint to make it look landscape even though it really is not and you can tell that by the look of the main status bar.

I do run the iOS app as I want to make sure we are not missing a screen or dialog on the Android side. I have found various areas that are not in sync because it was not called out in our user stories. The user were copied over from the iOS Sprints to the Android Sprints. This means the iOS QA team also did not report issues when doing their work.

Luckily for us we have an Android QA person that also cares and calls out the issues and wants this to look as nice as possible on the Android platform. That is a huge help. Since we are highly outnumbered it is good to have one more in our camp.

Another issue we have is QA is under one manager. Development under another and Product Management / UI under yet another. All we can do as developers is make suggestions to our boss to make suggestions to QA and PM bosses to try and fix things. There is no accountability in place and things are falling apart. The UI and product manager have been with the company the longest and are very closed to suggestions.

To me the product manager should have the most pride in the application. He should want it to look the best on both platforms and fight to the bitter end to see that happen. Instead he just shrugs his shoulders and gives up. It is very sad indeed. He has put the Android team into waterfall mode, don't question anything, just do what they did on the iOS side, as long as they match it is easy to support. I know it does not look like an Android or an iOS app but it is better than the previous release which was a WebView wrapper around the main web site. That part is true, it does look a ton better than it used to but with some small tweaks it could be a stellar application.

I did get the PM to agree to a number of consistency changes. Then he came back in and told me to back out all of those changes to make it match the iOS side even though he knows that side is wrong. This is the part that is killing me as a developer that takes pride in his work. Look, the code changes are not tough to reverse but that is not the point. I know I will be releasing at some point in the future an inferior product. I am a contractor, I will have to do what the company wants but boy does it hurt. 

The next and final missing Android area of the product I will be working on hits sizing meetings next week. I am dreading these meetings as we have a new design in mind that eliminates 3 of the 7 screens in the current iOS design. The design we are suggesting makes it work like the Google supplied application on every Android phone. I sat down with the iOS team that wrote that area and they really like the new design. They are more than willing to change the iOS side to match it and agree it will match what an iOS user would expect to do instead of the web interface look that was provided by the UI and PM teams. I have a feeling I just get to shut up and roll over on Monday. Add to the fact one of the iOS developers who worked on this area resigned last week. While I have not had the chance to speak with him directly my guess is he was sorely disappointed with how the company operates too. He converted from contractor to perm employee just over a month back.

They don't want an architect or a leader. They want a faithful dog. I am not a dog. They pitched the position as an architect position where I was Android voice for the company. All I can hope for is my next stint does not have all of these issues, that they follow a truer flavor of agile or at least stick with one design pattern. I was told I was brought on to do the best Android product possible but that simply is not the case. It is such a struggle to not be true to myself when I am developing this code. I will do the absolute best I can for as long as I am there, that is who I am.

Saturday, February 2, 2013

My Note 2

I have had my Note 2 for a couple of weeks. It is an excellent phone, game unit and media consumption device. I pretty much like everything about it.

First it is not as big as you think it is. The sites that complain about that appear to have not taken the time to really use the device. Yes, it is bigger than pretty much any other phone out there but not 2x the size.

Second the battery life has been wonderful. Charge it every other day if you don't play a pile of games. I don't do that much calling or get very many texts so it is generally not busy doing much. It has never left me in the weeds for battery needs.

I am using Llama on the phone so it knows when I am at work turning off WiFi (they don't have it at my job which is another issue) and turning down the main speaker sound. At home it cranks up the sound so I can hear it in the house when I lay it down someplace and it connects to my WiFi. I have the sound muted at night. Works like a champ and is a great free program.

For games this is a perfect size. I have a Xoom tablet where I played most of my games in the past as the phone was too small. Not anymore. This really is a great gaming size. I have pretty much normal sized hands, not little lady hands or big basketball player hands. I would say just average for at 6 foot tall person. The games I have played seem to work the best on this phone over any other device I have used. Everything is in reach and the touch zones are the right size.

For IM this phone is awesome. I get to use Swype when I want or pull out the stylus and write. The hand writing recognition has been spot on. Nice job Samsung. Using Swype on this size of device is so much easier. Even just typing each letter works great. Keyboard is the right size and having the numeric entry area above the alpha part is super handy. I always need to type a number and not needing to switch keyboard layout is darn handy.

I have used the paint program to draw various things including screen wire frames for work. The stylus is very responsive. I need to practice my drawing skills and having this device in my pocket at all times is pushing me to do that. I don't find the stylus to be a gimmick.

The Calendar app is very usable. My wife and I have our shared calendars along with those of the kids and their school activities. Having the snap shot calendar widget on my home screen is super helpful and then using the Calendar app to dig into details or look farther into the future is really easy.

Web browsing shines on this thing in landscape mode. I generally request all pages as desktop pages. Landscape gives the proper width and font size to make it all very easy to use. Thanks to Google and Chrome and I have my bookmarks linked. I can quickly check out action on my favorite sites. Searching is easy with the various entry flavors.

I have used the dual screen mode. I don't use it often but when I need it the ability to have two apps open it is awesome. I was doing some research and needed to copy URLs from the browser to an email. I split the screen and had Chrome and GMail open at the same time. I sized them for Chrome to be 75% of the screen and could quickly copy and paste the links right into the email. This rocks! Sure I will find other uses for it too.

I don't feel I have figured out as many of the cool features as I could use on this device. I am working as a contractor so my time has been dedicated to that area right now. I am trying to scan more Note related websites to pick up new tips. So much of what this thing can do is a mystery and I want to learn all the short cuts and cool features to get the most out of it.

Really people, go to your provider and give this phone a shot. It really takes the smart phones paradigm to a new level. It has replaced my need to grab the tablet when I am at home. I type more and do more everyday. Heck I hardly fire up my desktop anymore expect to type in something super long such as this post.

I have to use the iPhone at work as a comparison device as I am writing the Android version of our software. That phone feels so tiny in my hand. My fingers want to wrap around it and hide the screen. Everything about it is tiny. You can barely see anything on a web page. Books have pitiful amounts of text. A map barely shows any farther than you can throw a rock with any sort of detail. Each screen has just a snippet of information on it. I can't go back to that size of phone for sure.