Saturday, 17 October 2015

Android: Programmatically get list of installed apps on an Android device

Getting details of all the installed apps on an Android device is incredibly simple – here’s a utility method which I hope will prove useful.
private List<ApplicationInfo> getListOfApps() {
        // http://developer.android.com/reference/android/content/pm/PackageManager.html
        // Class for retrieving various kinds of information related to the application
        // packages that are currently installed on the device.
        PackageManager packageManager = getPackageManager();
       
        // Get a list of the installed applications
        List<ApplicationInfo> listOfApps = packageManager.getInstalledApplications(PackageManager.GET_META_DATA);
       
        return listOfApps;   
    }

Wednesday, 10 June 2015

iTunes Connect - taking the pain out of app store submission with launchkit screenshot builder

You've put a lot of hard work into building your app for iPhone or iPad and then you get the frustration of having to create your store listing. Creating a good store listing can make a huge difference to how your app performs so it's vital you add as much information as you can and screenshots are probably the number one thing users will want to see. Then it hits you, you need to create screenshots for 4.7, 5.5, 4 and 3.5 inch screens! ARGH!

However, it's not as bad as you think thanks to launchkit screenshot builder. This great on-line tool allows you to upload a set of screenshots (in one size), and choose text to accompany them and will then generate and email you the images you need to upload directly to iTunes Connect.

Example from launchkit's site.
It's as easy as that - a huge time saver!

Thursday, 28 May 2015

App Support

For any support queries please contact rdmacken@gmail.com with as much detail as possible to help resolve the issue.

Sunday, 17 May 2015

IOS Development: Keyboard shortcut to switch project windows in XCode

Being new to IOS development you may get frustrated with this one as well - how do I quickly change project windows in XCode?

The shortcut is the Command and tilde key:

CMD + ~ 

This is saving me a ton of time - I was previously having to go to Window -> [selected project].

Any other handy keyboard shortcuts for beginners?

Saturday, 11 April 2015

App Development: Overcoming Writers Block

Writers block - the curse of no longer being able to produce creative content. It's affected writers for years, but is also a very common problem for app developers. When it comes to app development, what can we do about it?

The causes for app writers block are mostly similar to traditional writers block, for example:

Since these are already known problems traditional strategies for overcoming them can also be applied.

  • Cut off the Internet! Is procrastination your problem - too many notifications or fun things to look at elsewhere? It's amazing how productive you can be if you turn off the internet for 30 minutes - a kick start is all you need. 
  • Exercise. You may not be doing any app development because you feel lethargic - exercise can help this and make you feel more alert. 
  • Brainstorm ideas. Get a bit of paper, and write down mind maps or random ideas you have. 
  • Change your location. A change of scenery can do you good - get out the house and head to a coffee shop or park and see if that can help inspire you. 
Picture by  photosteve101


The above techniques all transfer well to app development. However, the best technique I have found is to plagiarise! Ok - maybe not really plagiarise, but look elsewhere for inspiration. It's easy to think that you need to always do something unique, but taking another idea and making it better or with a different twist is a great way to get your creative juices flowing. Check out the top apps in various categories on as many app stores as you can. If you do only Android - check the iTunes store as well and vice versa. 

Monday, 6 April 2015

How to: Install Gradle on Windows

Step 1: Download the latest version of Gradle from the official site.

Step 2: Extract the contents into a folder e.g. "C:\gradle-2.3".

Step 3: Open up the environment variables window. To do this:


  1. Right click on your computer and click "Manage"
  2. Click "Advanced System Settings"
  3. Click "Environment Variables"
Step 4: Add new System Variable (or user variable if you only want it on your user account).



Step 5: Click New and enter Environment Variable as "GRADLE_HOME" and value as the bin directory of your Gradle installation path from step 2 e.g. "C:\gradle-2.3\bin". Press OK. 

Step 6: Find the "Path" variable and press Edit. Scroll to the end of the text and add the text "%GRADLE_HOME%". Remember to separate from previous entry with a semi-colon ";". 

Step 6: Press OK to exit the environment variable window and advanced system settings. 

Step 7: Open up a command prompt window. (press windows button and enter "cmd" as a shortcut). 

Step 8: Check Gradle version by entering text "gradle -v". If installation has been successful you should see something like the following: 

C:\Users\username>gradle -v

------------------------------------------------------------
Gradle 2.3
------------------------------------------------------------

Build time:   2015-02-16 05:09:33 UTC
Build number: none
Revision:     586be72bf6e3df1ee7676d1f2a3afd9157341274

Groovy:       2.3.9
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.7.0_25 (Oracle Corporation 23.25-b01)
OS:           Windows 8 6.2 amd64

You should now be set up for using Gradle. 

Tuesday, 10 February 2015

Delivering constructive review feedback to technically superior employees


End of year reviews have either been recently completed or are in the process of being finalized. As a peer, scrum-master or manager you have probably been involved in delivering in some form feedback to the technical people in the team. In software development appraisals can quickly be dismissed as a box ticking exercise for management, but it doesn’t have to be this way. Camille Fourneir wrote a blog earlier today on this very subject where she actually emailed her team with a justification as to why the process is important. The process can be even harder if you are giving feedback on someone who has more experienced or specialist technical skills. Here’s some tips I have found help in constructing a useful, engaging appraisal process which helps you achieve the two main goals of a review process – highlighting achievements and identifying areas which can be worked on in the new year. This is useful for both people providing feedback on their peers, and for those managing others.

Image from freeimages
1. The review process is not one way!
Firstly the review process should be a two way process. If you are a manager, you are not just looking at a developers year and commenting on them; this is their chance to comment on your performance in relation to their role. For example, they may think you are good at dealing with impediments for the good of the team, but they find that you are sometimes a block between the development team and the end customer. This kind of feedback is invaluable to you and you should actively encourage it.
2. Include anonymous peer reviews in the process.
Secondly, contrary to point 1, the review process is not just a two way process – it should include peers. One person saying to another person they are good or bad at a specific thing can lead to confrontation or the person being appraised not believing the feedback; however if you get peer feedback from multiple team members with multiple people mentioning the same points, then it is harder to disagree with. A process which has worked well for me is for each team member to nominate 3-5 peers who can provide anonymous feedback on their performance. The appraiser collates the feedback to make it anonymous and provides it prior to the review starting to give the person time to review their feedback and take it in. Feedback from peers will generally resonate better than manager feedback, as you may work far more closely with your peers than you do a manager. This is also allows you to collate both technical and non-technical feedback from various roles within the company, removing the need for you to feel like you need to comment on someone's code if you yourself are not a developer for example.
3. Provide positive and negative feedback.
The third main point is that you need to provide both positive and negative (constructive…) feedback. It is important to celebrate the successes of the previous year. Even if someone has had an unbelievable year, you still need to give them something to work on the next year. The best employees will want constructive feedback so they can improve their performance – we are all professionals after all and the software development industry requires continuous self improvement.
The biggest failing in feedback processes I see is when peers only provide glowing feedback for their peers. Whilst this is great for the review meeting and egos can be massaged, it isn’t for the best of the person being appraised. Getting focussed feedback on areas to improve will be the best thing in the long run, especially if multiple people pick up on something. For junior members of the team giving feedback on someone with superior technical skills or for managers who do not have the same level of speciality in a technology this can be a challenge and intimidating. However, from experience, any honest feedback will be well received and will help gain respect amongst peers.
4. Regular reviews throughout the year.
The most common cause for uncomfortable reviews is when they are only done once a year. One to ones should take place throughout the year and should remove the opportunity for surprises when it comes to the review process. Is it really fair to land negative feedback after 12 months when you could have mentioned it in January and resolved the issue immediately?
5. The outcome of the review is not to encourage someone to aim for a managerial role – there should be a technical career path!
In software development there is a tendency to encourage our best engineers to progress to a point where their technical prowess is no longer used as they move to a management role – which is simply absurd. In reviews, the person being appraised may feel like they have to say they want to work towards management or a scrum-master role, purely as they want to show they have ambition even though it may not be the best thing for them. A good company will have a technical route for employees as well as a managerial route. Just because you are the best developer in the company, doesn’t mean you can’t improve and do more from a technical point of view. Make sure there is a career ladder people who don’t want to go into management can follow. Managers don’t need to get paid more than the best developers! Keeping your best developers developing if that is what they want to do will ultimately lead to you having a greater product.  Erik Dietrich describes this common problem in the following great blog post.
Related Posts:

Saturday, 7 February 2015

Kick-starting a development project with a solid testing approach - a 5 step process to ensure quality

Ask a developer about their feelings about testing and you can elicit a huge spectrum of opinions:
  • "It's someone else's responsibility"
  • "Unit testing is the way forward"
  • "Manual testing gets the best results"
  • "You can't make the software better through testing!"
Above are all things I've heard people say when talking about testing. However it is such a broad subject and we tend to focus on a very specific aspect of it (e.g. unit tests or manual tests) and we can sometimes miss the big picture. When kick-starting a new product or project, it's vital that you think about various aspects of testing up front - here's my 5 step approach to ensure you have quality software right from the beginning:
 
solid testing approach
  1. Test input early in software lifecycle. You need to think about testing as early in the project as you can. When looking at designs, for example, you should think about negative tests and edge cases to help guide your design decision process. If you have testers within your team then this is great and you should get them involved in the design; if you don't have test resource the developers need to take on this mantle (they should also do this if there are testers involved in the project). Testing then happens as the software is developed with close interactions between the testers and developers and quick feedback loops. This is a very agile approach which works really well. Leaving testing until the last minute just doesn't work. Getting them involved early also allows them to start writing test scripts which is important for step 3.
  2. Automated test environment setups. A huge mistake people can make is leaving the test team to spend hours setting up test environments for every set of tests they do. This is such a waste - for every 1 hour spent testing you can easily burn 7 hours doing server and data setup. Investment in automated deployments for test purposes early on is a time well spent. There are also some really good by-products of emphasising this at the start of a project; you start to think about how the software would be deployed, how it would be upgraded potentially, how you load data into the system and also helps you consider your installation times. You will want it to be as efficient and quick as possible so any benefits your test team gain from this, your customers will gain when your product goes out the door.
  3. Manual test scripts. In modern software development people sometimes baulk at the idea of not just manual tests, but writing test scripts for this. However, there is no substitute for getting a real person do testing. They find things a system can't, they can pick up usability issues etc. By writing test scripts at the design stage, the test team can test the design or mock ups without any software needing to be developed. Things that are missed in the design can be picked up at this stage. The test scripts should be well structured and repeatable as the manual test scripts can then be used as a basis for automation test scripts. A huge by-product of well written test scripts is you can then scale up your test team when you need to (e.g. before release) with new people who are unfamiliar with the product as the tests should be detailed enough for them to step through. You can scale up using test resource from other teams in your organization, from outsourcing potentially, or even by getting your development team to run through the tests.
  4. A path to automation. If done correctly, the manual test scripts will provide you a set of repeatable steps that are always tested with every release of the software. The automated test environment setups give you a one click ability to setup the system on which to run this test. If you automate this manual test and marry it up to run on the automated deployment, then you have a quick and easy path to having good automation coverage. You don't need to automate everything - in fact I'd just automate the core 20-50% of your product. The time saved here in the long term will be enormous. Every time a developer commits, you can spin up a new test environment and then run your automated tests; if the tests fails the test team do not even need to do anything with this build and hence do not waste any time. Efficiency starts to go through the roof.
  5. Regular bug purges. A bad habit to fall into is to leave bugs for later, as you are adding a great new feature. This ends up with a big backlog of bugs and a lot of technical debt. If this is a long term project - avoid this at all costs. There are various approaches to keeping your bug count low; rotate a developer onto purely bug fixing every iteration, assign 20% of your iteration capacity just to bugs, make every 3rd or 4th iteration purely a bug fixing iteration. Do whatever of these suits but make sure you do it. With a good continuous integration system and automated deploys and tests, the chances of bad code and major defects creeping in decreases which should help to keep this figure low.
Of course there are various other things that need done when thinking about testing a product and it will vary depending on project size, team sizes and skillsets. However, following the five steps above as part of your development process will ensure you have a quality driven approach to your product.
How do you approach testing? Are there any other things that should be done in the initial stages of product development which are big wins? If so please leave a comment below.


Related Posts




Thursday, 29 January 2015

Managing programmers and the programming mother******* mentality

I came across the following great site on Stumbleupon today - programming-motherfucker.com - and as a developer had a great laugh before realising that in my day job I'm really the guy the site is having a swipe at!

The site aims it's gun firmly at the door of managers, whether they practice agile, XP, Scrum, waterfall etc and pokes fun at the agile manifesto:

Screenshot of the alternative manifesto from http://programming-motherfucker.com/ 
Whilst the site may be a bit tongue in cheek (obviously taking inspiration from Pulp Fiction), a huge challenge of managing developers can be the fact they can see you as a roadblock in the way of them producing code. Ultimately you are responsible for the success or failure of a project and as a result you have probably applied a process to the team to help you ensure your team are progressing in the correct direction. So how, as a manager, can you break down this perception from members of your team who have this mentality?

Before I start, I'll confess when I started my first programming job I agree 100% with the sentiment of this site - I thought the people managing me had crazy processes which did nothing but slow me down. Over time and as I progressed through the ranks, I guess my mentality has changed - that or I've been broken by managers ;-)

Firstly put your cards on the table and explain why a certain process is in place. If you are transparent and can explain why you have a process - truthfully - then you will gain respect. If you use a tool like JIRA or Rally to manage workload, explaining that its really to help you manage people's workload and help plan releases and how their use of these tools allow you to do that will at least help them understand. The key here is to ensure that firstly the admin they are required to do is as little and efficient as possible, and secondly to get their input into the process and how they think it could change to make their work easier. At the end of the day a business and jobs survives because it makes money, if someone cannot accept that then you shouldn't employ them anyway.

The second thing which really really helps, is to be good technically in the first place. If you are not only a manager, but a good programmer (mother******) then they wont feel like you are bullshitting them. I talk about this in my post can someone from a non-technical background manage a team of programmers?

You have to accept that you can't force people to do something, if you want them to do it well. Unit tests are a great example; you can force people to do them but they'll end up writing rubbish tests. If the programmers are engaged in why the team wants unit tests, then they'll write good tests.

The last thing you should do, is look at the table above and work out where you currently sit - are you closer to the "They Claim to value" column or the "They Really Value" column. If you are to the right, you should look at what you can do to move to the left. Have you gone too far in trying to manage the team that you have actually moved away from the basic principles?

It's an interesting topic - how do you deal with programmers who have this attitude? If you are a programmer what do you think managers can do to be more effective?

Monday, 26 January 2015

Top 5 tips for when interviewing developers

Interviewing can be a stressful experience, not only for the interviewee! However, having a plan in place for how you want the interview to go and a set of good questions will take a lot of stress out of the experience.

1. Know what you are looking for before the interview.


You are hiring for a reason. You have a position to fill and probably a specific skills gap you are trying to fill. Write down the top 5 skills you need, what behaviours you expect from the person, what experience you expect etc. This should have been done at the CV sifting stage but it's still worth having clear in your head before the interview. 


2. Start the interview with technical questions on the top 5 skills you require.

They are in the interview as their CV has noted the key skills you are seeking - so start off (maybe after a welcome and explaining the process) with a few questions on these key skills. Make sure you know what answers you are expecting. A good candidate will answer these questions with ease, and more importantly will help them relax which helps with the rest of the interview. If the candidate doesn't know the answers, then you should try (within reason) to help get them to the answer you are looking for. If you can't - move on.

Note: at this stage, if a candidate has not answered well you may already know the outcome of the interview. It can be tempting to end the interview early, but you can leave yourself in a tricky situation legally as all candidates deserve the same opportunity in terms of questions. Law in different countries (especially around equality etc) can be a minefield so if in doubt seek advice from a member of the HR department. 

3. Get the candidate to solve a problem.

There is nothing better than seeing someone in action to help you make a judgement call, so challenge them to do something. Some people ask the candidate to sit a practical programming test which is great, but can put a lot of potential candidates off. I find asking them to design on a whiteboard how they would tackle a problem is a far better and quicker option which allows you real insight into their problem solving skills.

When asking them to design something, how about a simplified version of the product you are working on? How would they architect it? Do they dive into the problem at a very low level or do they think about the high level problem and drill down? How do they react to you challenging their design? Can they accept criticism and adapt their design, or can they defend their design and convince you they are right? Offer to work with them after a while and see how they collaborate and interact with you. This simple exercise (only needs to take 10-15 minutes) is in my opinion the best way to separate the good candidates from the bad. You may also learn something yourself from it! If you don't want to ask them to design your current product, why not try something everyone knows, like a board game such as checkers, chess or monopoly.

Asking candidates to design a board game can give you a great insight into how they work and approach problems.


4. Hire better than what you already have, and different to what you already have.

This one is simple, but it's amazing how many people (bad managers) fall into this trap. You need to hire better people than you have/you are if the company is going to grow and your projects are going to be successful. Bad managers are scared that they will be outshone by the people they are hiring; the opposite is true - your projects will be more successful and your own reputation will grow. Soon you will be heading up more recruitment as you have a proven track record. Additionally, you will get to know most new starts who will have instant respect for you due to the fact you interviewed them. James Caan goes into detail on this here.

Diversity is also key; just because someone works or thinks differently to your or your current staff doesn't mean they are doing it wrong. Different approaches and views are always good and can help to provide the best solutions, so long as the person can collaborate and defend their decisions; but you will know that from point 3 above!

5. Ask how they keep their skills up to date.

Last but not least, good developers keep their skill sets up to date. Ask them how they do this? Do they read textbooks or blogs or both? Do they attend conferences or take part in hackathons? Don't expect everyone to do all of these, just one will do. However, someone who doesn't do one of these is a big warning sign for me that they lack the drive to keep improving and learning. Would you want someone not up to date in the latest technology and trends to be designing your next product?

This again can be a great opportunity to learn about new blogs or books that you should check out. For senior hires, ask what they would recommend to a junior hire straight from University? Again, questions like this will give you an insight into how they may mentor junior members of the team.

That is my recipe for interviews and has worked for me pretty well, but there are always new techniques to learn so if you have any experiences you would like to share please leave a comment below.

Thursday, 22 January 2015

Real time Google Analytics on the go

As I mention in most of my blog posts analytics is a key part of product development with Google Analytics being the key player in the market. When doing an A/B test knowing who your users are, where they are, when and how they interact with your app, website or blog will help you make informed decisions.

Checking these stats is important so when should you do it? I try to check my stats on the train to work in the morning with using Googles own app.



Take 5 minutes and try and learn from the data in front of you. I frequently can identify mobile devices for example which my apps don't run properly on, as it causes very low duration times and high drop off rates. Maximising what you have is really important!

Saturday, 17 January 2015

[Book Review] - Technical Blogging by Antonio Cangiano

Title: Technical Blogging
Author: Antonio Cangiano
Publisher: Pragmatic Bookshelf
Publish Date: March 1, 2012

As part of my new years resolution to more blog more regularly I started reading this book on the train into work on my iPad, finishing it within a week. As I mentioned in my post last week this book is great and has been a real motivator for me to take my blogging more seriously.

Book cover - image taken from the Pragmatic Bookshelf

I highly recommend this book to anyone who is a keen blogger or even someone who has a website or app who wants to increase their exposure to their product as the tips given in the book are transferrable. Antonio Cangiano is the author of many blogs - most famously Zen and the art of Programming and Math-Blog so he know's what he's talking about.

The book covers the following key topics:
  • Determining what kind of blog you are running (personal, company, general, niche etc)
  • The technicalities on how to create a blog
  • Creating content and maintaining your pace of blogging
  • Promoting your blog
  • Making money from your blog
The book focusses mainly on the Wordpress platform, but most of it is transferrable to other platforms (e.g. I use Blogger). 

The big takeaway I took from the book which I could instantly put into action were tips on how to ensure your blog more regularly (e.g. have blog entries in reserve in case you suffer writers block) and how to make your blog reach more readers. It's amazing what can happen if you just publish your best content onto reddit for example.

Has the book made any measurable difference to my blog? YES! 
  1. My number of posts has increased dramatically. More importantly I have a backlog of potential blog posts ready to get out there.
  2. Previously my record number of page views in a day was 54. This week I had 2500 in one day! 
  3. I've started to contribute back to the programming community which feels really good. Reading and commenting on other people's contents helps broaden my knowledge and get me more enthused in the industry.
Well worth picking up for the motivation alone.

Thursday, 15 January 2015

Privacy Policy

This Privacy Policy governs the manner in which MacKenzie Software collects, uses, maintains and discloses information collected from users (each, a "User") of the http://www.mackenziesoftware.com/ website ("Site"). This privacy policy applies to the Site and all products and services offered by MacKenzie Software.

Personal identification information

We may collect personal identification information from Users in a variety of ways, including, but not limited to, when Users visit our site, subscribe to the newsletter, and in connection with other activities, services, features or resources we make available on our Site. Users may be asked for, as appropriate, email address. Users may, however, visit our Site anonymously. We will collect personal identification information from Users only if they voluntarily submit such information to us. Users can always refuse to supply personally identification information, except that it may prevent them from engaging in certain Site related activities.

Non-personal identification information

We may collect non-personal identification information about Users whenever they interact with our Site. Non-personal identification information may include the browser name, the type of computer and technical information about Users means of connection to our Site, such as the operating system and the Internet service providers utilized and other similar information.

Web browser cookies

Our Site may use "cookies" to enhance User experience. User's web browser places cookies on their hard drive for record-keeping purposes and sometimes to track information about them. User may choose to set their web browser to refuse cookies, or to alert you when cookies are being sent. If they do so, note that some parts of the Site may not function properly.

How we use collected information

MacKenzie Software may collect and use Users personal information for the following purposes:
  • - To improve customer service
    Information you provide helps us respond to your customer service requests and support needs more efficiently.
  • - To personalize user experience
    We may use information in the aggregate to understand how our Users as a group use the services and resources provided on our Site.
  • - To improve our Site
    We may use feedback you provide to improve our products and services.
  • - To send periodic emails
    If User decides to opt-in to our mailing list, they will receive emails that may include company news, updates, related product or service information, etc. If at any time the User would like to unsubscribe from receiving future emails, we include detailed unsubscribe instructions at the bottom of each email or User may contact us via our Site.
How we protect your information

We adopt appropriate data collection, storage and processing practices and security measures to protect against unauthorized access, alteration, disclosure or destruction of your personal information, username, password, transaction information and data stored on our Site.

Sharing your personal information

We do not sell, trade, or rent Users personal identification information to others. We may share generic aggregated demographic information not linked to any personal identification information regarding visitors and users with our business partners, trusted affiliates and advertisers for the purposes outlined above.We may use third party service providers to help us operate our business and the Site or administer activities on our behalf, such as sending out newsletters or surveys. We may share your information with these third parties for those limited purposes provided that you have given us your permission.

Third party websites

Users may find advertising or other content on our Site that link to the sites and services of our partners, suppliers, advertisers, sponsors, licensors and other third parties. We do not control the content or links that appear on these sites and are not responsible for the practices employed by websites linked to or from our Site. In addition, these sites or services, including their content and links, may be constantly changing. These sites and services may have their own privacy policies and customer service policies. Browsing and interaction on any other website, including websites which have a link to our Site, is subject to that website's own terms and policies.

Advertising

Ads appearing on our site may be delivered to Users by advertising partners, who may set cookies. These cookies allow the ad server to recognize your computer each time they send you an online advertisement to compile non personal identification information about you or others who use your computer. This information allows ad networks to, among other things, deliver targeted advertisements that they believe will be of most interest to you. This privacy policy does not cover the use of cookies by any advertisers.

Google Adsense

Some of the ads may be served by Google. Google's use of the DART cookie enables it to serve ads to Users based on their visit to our Site and other sites on the Internet. DART uses "non personally identifiable information" and does NOT track personal information about you, such as your name, email address, physical address, etc. You may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at http://www.google.com/privacy_ads.html

Views Expressed in Blog
The views expressed in this blog are of MacKenzie Software only, and not that of anybody else including any current employers. MacKenzie Software is not responsible for views added to comments on this site, but will proactively monitor comments and remove any which are not acceptable.

Changes to this privacy policy

MacKenzie Software has the discretion to update this privacy policy at any time. When we do, we will post a notification on the main page of our Site, revise the updated date at the bottom of this page. We encourage Users to frequently check this page for any changes to stay informed about how we are helping to protect the personal information we collect. You acknowledge and agree that it is your responsibility to review this privacy policy periodically and become aware of modifications.

Your acceptance of these terms

By using this Site, you signify your acceptance of this policy. If you do not agree to this policy, please do not use our Site. Your continued use of the Site following the posting of changes to this policy will be deemed your acceptance of those changes.

Contacting us

If you have any questions about this Privacy Policy, the practices of this site, or your dealings with this site, please contact us at:
MacKenzie Software
http://www.mackenziesoftware.com/

This document was last updated on January 15, 2015

Privacy policy created by Generate Privacy Policy

Can someone from a non-programming background successfully manage or lead a team of programmers?

This is a question I have asked myself a few times over the last few years, and it can be a bit controversial:

Can someone from a non-programming background successfully manage or lead a team of programmers?

It's a good question. Of course, ultimately if you go up a few layers in an organization, the person at the top is invariably not from a programming background. I'm talking about direct leaders of the development team; the technical lead, the development manager, the scrum-master.

Over the years I've been managed by various different people from different backgrounds with varying success. I've also managed or led various development teams. Here's my general views on this:

Projects tend to fail, over-run or be massively underestimated in occasions when someone from a non-programming background leads a project. The following issues commonly arise:

    • The development team aren't involved in the work estimation and so it is hugely under-estimated. 
    • Requirements are not communicated effectively. Typically the initial requirement is paraphrased to the development team with key points which may hugely affect design omitted. This leads to rework or worse starting again. 
    • The lead may try to impose a bad design onto the development team, and due to their position the development team have to persevere with it.
Great example of bad design from Donald Norman's book - a great book for UI design. (Image from Amazon)

Some of the points above can be counter-acted with a strong development team - a team who are not scared to question decisions coming from the top. Additionally, agile teams can fair better where the development team are getting far more exposure to the end customer and the end requirements. 

Another thing which can commonly come up is that if the person leading the team does not have a good technical background, the development team can run over the top of them as they always delegate decisions to the team. I find good teams have strong leaders who will have a good technical vision but who will delegate some (or a lot) of decisions to the team. However, ultimately they have a vision and can quickly determine if the project is going off track. 

In conclusion, I think that having a development team led by someone not from a programming background is extremely dangerous, and from experience very rarely works. Adopting agile methodologies can help with mitigating some of the problems above, and strong minded development teams can overcome hurdles and ensure projects stay on track. 

I appreciate this is a generalisation, a bit controversial and every case is different so I'd like to hear your experiences - if you want to share please add a comment.

Monday, 12 January 2015

Android - Check for internet connectivity.

It's common to check for connectivity to the Internet within your Android app before you try and perform an operation. For example, if you were about to call an external REST call, you may want to check internet connectivity before performing the operation.

To perform the check I use the following utility method:

private boolean isNetworkAvailable() {
           ConnectivityManager connectivityManager
                 = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
           NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
           return activeNetworkInfo != null;

}

Remember you need the following in your AndroidManifest.xml in order for your app to connect to the Internet:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Sunday, 11 January 2015

[FIX: Eclipse - Android layout file] - Incorrect line ending: found carriage return (\r) without corresponding newline (\n)

I hit this annoying issue today - I think due to copy and pasting code. Within my layout file in Android I'm getting the following error:

Incorrect line ending: found carriage return (\r) without corresponding newline (\n)



Closing the layout and deleting the problematic elements did not help. However, the fix is easy:


  1. Open your layout file. 
  2. Press Ctrl + Shift + F
  3. Save the layout file. 

Hope this saves someone time in the future!

Friday, 9 January 2015

The three key factors in an effective developer desk setup

Setting up your desk for efficient working is a vital step for any software developer, whether working from their home or in an office environment. In this post I set out a few tips on how to make your environment as effective as possible.

Note: This post is slightly different to my usual content, but I've been reading a book just now - Technical Blogging by Antonio Cangiano (responsible for Zen and the Art of Programming and Math-blog) - which stresses the importance of keeping up your pace of blogging when you start out. So while I've been too busy to blog as I've been building a new desk for my developer setup, I realised it formed a great subject for a blog post. I plan on writing a review post on the book (great so far) so look out in the future. 

To my knowledge there is no known ideal setup. There are three key factors you should consider when considering your setup:
  • Cost - what equipment can you buy
  • Space - how much space do you have (not to mention are you in a corner, open space, against a wall...)
  • Hardware requirements - some developers need one laptop, some need multiple machines, some need other devices attached such as mobile phones for app developers. 
As you can see in this post there is a huge development environment setup variety even in a workplace like Google. With that in mind you should focus on the three key factors above. 

When working with cost I recommend prioritising a good chair and desk. You will spend a lot of time (most likely multiple hours per day) so comfort is key. No matter what other equipment you buy, if you aren't comfortable you'll never sit at your desk and work. 

Space is the one you can't really impact. However, a good desk can help you manage your space effectively. You want a clear working area but you want everything close. When worried about space, I find using TeamViewer to remote onto other machines can be a really good space saver. In my desk environment, I like to use only one monitor as I find additional screens distracting; however, I'm usually switching between my windows desktop, a windows laptop and a Macbook Pro (I'm looking at attempting iphone app development in addition to Android now...) so using TeamViewer to control the two laptops works great for me and keeps my desk clear. 


The problem with hardware is that it again impacts cost and space. Cluttering up your desk can lead to loss of comfort and distractions. I suggest where possible, you use remote desktop or something like TeamViewer and store the hardware elsewhere.

A few other things to consider if you are planning a new setup:
  • Remember you'll probably need multiple power sockets!
  • Some speakers are well worth it if you like to listen to music as you work.
  • Can you get rid of a desk phone and use services like Lync or Skype?
  • Can you go paperless, so you don't need space for a printer.
  • If you run your own business remember to keep receipts for all equipment (desk, mouse, keyboard, computers) so you can claim them off your tax submissions.
As always additional ideas are always welcome so please leave a comment below.

Sunday, 4 January 2015

Top 5 free tools to help publish a mobile app

You have created your app, tested it and are happy with your end product. That isn't you done though, you need to make sure you have the right icons, screenshots, feature graphics etc. This last hurdle can be a pain but here's a few free utilities I've found over the years which are a huge help.

GIMP - [FREE] Image creation and manipulation.

GIMP is a great free application for creating and touching up your images. Need to tweak your screenshots, create a feature graphic or an advertisement? GIMP is your tool. It's a great free alternative to Adobe Photoshop.



Syncfusion MetroStudio - [FREE] Icons for your app

Metro Studio comes with over 4000 pre-made icons which you can customize to meet your needs - change the colors, change the size and export them to any format you want. See my Syncfusion MetroStudio tutorial for help in getting started.




Paint - Simple image software

Paint is a great simple tool for quickly cropping images and tweaking screenshots.

Image Resizer for Windows - [FREE] Change the size of your images and icons

You'll notice each app store has different image sizes for feature graphics and screenshots which is another pain when uploading your app to the store. Image Resizer for windows however is a quick and easy tool for resizing your images - simply right click in windows and choose your new dimensions and the tool generates a copy of the file with the new dimensions.


Android Feature Graphic Generator - [FREE] Create quick feature graphics 

This great website allows you to simple enter the text you want in your feature graphic and it will generate a nice feature graphic for you. Tweak the colors, fonts and even add images. A really quick win if you want to get your app uploaded quickly and Google Play now requires you have a feature graphic. 



If you have any other tools you recommend please add a comment and I'll check them out. If you found this post useful subscribe via email using the link at the top of this site.

Integrating Google Analytics into existing Android app

Analytics are key to measuring the success of your project or application and are a great way of identifying your users trends and demographics. Have you released an app and wondered who your users actually are? Well with analytics you could find out where your users are situated, what ages they are etc. The leader in this field is Google Analytics - this can be embedded into your mobile application, website and even your blog.



After a few frustrating attempts at integrating Google Analytics into an existing app I thought I should post a guide on how to do this.

1. Download the Google play services library and add it to your project.

You can do this by right clicking on the project you want to add analytics to in eclipse, choosing properties and then the Android tab. In the Library section, select Add and choose google-play-services_lib and select Apply.

2. Add the required permissions to AndroidManifest.xml.

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

These are required so your app can send the analytics content.

3. Add Metadata to your application. This should be added under the application tab.

<meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
<meta-data
            android:name="com.google.android.gms.analytics.globalConfigResource"

            android:resource="@xml/global_tracker"/>

We'll add global_tracker later.

4. Create the analytics application helper class.

import com.google.android.gms.analytics.Logger;
import com.google.android.gms.analytics.Tracker;
import com.google.android.gms.analytics.GoogleAnalytics;

import android.app.Application;

import java.util.HashMap;

public class YourApplication extends Application {

    // The following line should be changed to include the correct property id.
    private static final String PROPERTY_ID = "YOUR_ANALYTICS_ID";

    public static int GENERAL_TRACKER = 0;

    public enum TrackerName {
        APP_TRACKER, // Tracker used only in this app.
        GLOBAL_TRACKER, // Tracker used by all the apps from a company. eg: roll-up tracking.
        ECOMMERCE_TRACKER, // Tracker used by all ecommerce transactions from a company.
    }

    HashMap<TrackerName, Tracker> mTrackers = new HashMap<TrackerName, Tracker>();

    public YourApplication () {
        super();
    }

    synchronized Tracker getTracker(TrackerName trackerId) {
        if (!mTrackers.containsKey(trackerId)) {

            GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
            analytics.getLogger().setLogLevel(Logger.LogLevel.VERBOSE);
            Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(PROPERTY_ID)
                    : (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(
                            R.xml.global_tracker)
                            : analytics.newTracker(R.xml.ecommerce_tracker);
            t.enableAdvertisingIdCollection(true);
            mTrackers.put(trackerId, t);
        }
        return mTrackers.get(trackerId);
    }

}

5. Update AndroidManfiest.xml to include your application, e.g.:

<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:name=".YourApplication" >

6. Create the tracker xml files. 

Under the res section in your project create an xml folder. Create two xml files in this named ecommerce_tracker.xml and one called global_tracker.xml. Contents below - remember to substitute in your analytics tracking ids. These can be created following instructions here

ecommerce_tracker.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="ga_sessionTimeout">60</integer>
    <!--  The following value should be replaced with correct property id. -->
    <string name="ga_trackingId">**INSERT TRACKING CODE HERE**</string>
</resources>

global_tracker.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="ga_sessionTimeout">300</integer>
    <bool name="ga_autoActivityTracking">true</bool>
    <screenName name="**Path to Your Application e.g. com.company.YourApplication**">**YOUR NAME**</screenName>
    <!--  The following value should be replaced with correct property id. -->
    <string name="ga_trackingId">** INSERT TRACKING CODE HERE ** </string>
</resources>

Note the trackers are described as follows by Google 

APP_TRACKER, // Tracker used only in this app.
GLOBAL_TRACKER
, // Tracker used by all the apps from a company. eg: roll-up tracking.
ECOMMERCE_TRACKER
, // Tracker used by all ecommerce transactions from a company.

7. Send the screens

Add the following code to your onCreate method in your activity. This will send the screen views to Google Analytics.

// Get tracker.
Tracker t = ((YourApplication) getApplication()).getTracker(TrackerName.APP_TRACKER);

// Enable Display Features so you can see demographics in Google Analytics
t.enableAdvertisingIdCollection(true);

// Set screen name.
t.setScreenName("** YOUR SCREEN NAME  **");
       
// Send a screen view.
t.send(new HitBuilders.AppViewBuilder().build());

8. Update onStart and onStop

Add the following:

@Override
protected void onStart() {
super.onStart();
GoogleAnalytics.getInstance(this).reportActivityStart(this);
}

@Override
protected void onStop() {
super.onStop();
GoogleAnalytics.getInstance(this).reportActivityStop(this);
}

9. View results in Google Analytics.

You are now done and once users start using your app you should be able to see real time updates in Google Analytics. Note that the analytics aren't exactly real time - but it's good enough! 


Let me know if this helps you out or if you have any further questions and I'll try and help where I can.

EDIT: 11/01/2015 - updated section 7 to allow you to display demographics in Google Analytics.

Android Studio - How to change app icon (ic_launcher)

Changing your applications icon (ic_launcher) is a common occurrence when developing your android application. Here's quick steps on how...