Releasing a great app is more than having a unique idea. It takes teamwork, collaboration and the will to be the best. At Novoda we make awesomeness happen. This talk is about our process from coding dojos to group design and iterative sprint planning with our customers. We'll describe some of our best practices as well as some of the components that can make a good app great.
This includes:
- Day-to-day processes: pairing tennis, gif code reviews and toggling hidden features.
- Work Environment: hack & tells, continuous communication & kicking ass at Tekken.
- Releasing the app: polishing & quantifying can get you top of the class and not listening to Google can get you expelled.
Finishing with some bonus Android coding tips and tricks and crazy AOSP anti-patterns.
6. We’re gonna talk about...
- Improving day to day craftsmanship
- Creating a positive working environment
- The final few steps to awesomeness
- Opinionated bonus material
57. Activity lifecycle callbacks
public interface ActivityLifecycleCallbacks {
void onActivityCreated(Activity activity, Bundle savedInstanceState);
void onActivityStarted(Activity activity);
void onActivityResumed(Activity activity);
void onActivityPaused(Activity activity);
void onActivityStopped(Activity activity);
void onActivityDestroyed(Activity activity);
void onActivitySaveInstanceState(Activity activity, Bundle outState);
}
public class MyActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks { … }
public class MyApplication extends Application {
@Override public void onCreate() {
super.onCreate();
registerActivityLifecycleCallbacks(new MyActivityLifecycleCallbacks());
}
}
58. Fail Gracefully! Do not crash out there
public class ReportingUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
// Do necessary crash handling
crashlytics.reportCrash("user crash captured", ex);
}
}
private void swallowExceptionsInRelease() {
if (!BuildConfig.DEBUG) {
Thread.UncaughtExceptionHandler handler = new ReportingUncaughtExceptionHandler();
Thread.currentThread().setUncaughtExceptionHandler(handler);
}
}
Not recommended to use on your main thread
59. newInstance all the things!
public class WidgetImageLoader {
private final Retriever memoryRetriever;
private final Retriever fileRetriever;
public static WidgetImageLoader newInstance(Context context) {
Retriever memoryRetriever = MemoryRetriever.getInstance();
Retriever fileRetriever = FileRetriever.newInstance(context);
return new WidgetImageLoader(memoryRetriever, fileRetriever);
}
WidgetImageLoader(Retriever memoryRetriever, Retriever fileRetriever) {
this.memoryRetriever = memoryRetriever;
this.fileRetriever = fileRetriever;
}
}
Releasing a great app is more than having a unique idea. It takes teamwork, collaboration and the will to be the best. At Novoda we make awesomeness happen. This talk is about our process from coding dojos to group design and iterative sprint planning with our customers. We'll describe some of our best practices as well as some of the components that can make a good app great.
This includes:
- Day-to-day processes: pairing tennis, gif code reviews and toggling hidden features.
- Work Environment: hack & tells, continuous communication & kicking ass at Tekken.
- Releasing the app: polishing & quantifying can get you top of the class and not listening to Google can get you expelled.
Finishing with some bonus Android coding tips and tricks and crazy AOSP anti-patterns.
hi we are
we work for
recently did
we are here to talk about craftsmanship
so serious we put it on our business cards
craftsmanship is about taking pride in your work
proud of the quality of what you do
individual quality & as a company
requirement to make a chair
coder, makes chair and it works! but it’s wobbly and unstable
craftsman, designs the chair, takes time and pride in his creation
craftmanship benefits our customers because...
Give you a taster of a lot of things, then go google
problem:
unknowns around creating a new application
nobody knows what to do, do you just jump in and start coding? Where does this lead
when you start writing code, learn something new from the boss and you have to start again
you have written the same feature as someone else / duplication
- Great for explaining complicated concepts
- Somewhere to focus a discussion
- Good to refer back to at a later date (take pics)
- Getting everyone into a room to discuss & understand the big picture
- sparking inspiration
- solving problems when they arise, discussing architectural issues
- Your team is everyone in the company not just other developers
- Great insight into design from the other side
- Help them help you, resources naming, explaining DPI
- Two heads are always better than one
- Another pair of eyes gives you another perspective
- Catch bugs earlier
- Tennis can be a TDD style pairing, one person writes a test the other resolves the test
- Document and confirm the code as you work
- Catch mistakes earlier
- Communication can also spark solutions from elsewhere in the office
- Have coding practices in your company
- Respect and look after the code you write
- helps people feel a part of something
- avoid spaghetti with meatballs
CODE REVIEWS should be an essential thing in your day to day craftsmanship
- Give more visibility to all team members of what’s being made in the project
- Another barrier to bugs appearing in your code
- Once merged, it becomes everyone’s code
GITHUB
- GitHub GUI for reviews
- Whole team visibility
- Lack of formal process
- Code reviews can get repetitive!
- Creates engagement and conversation
- Whole office visibility
- Gives everyone a sense of responsibility
- stops "well it works on my machine"
[Assume people know what a CI is]
- Another way to engage with the code AFTER writing it
- Automatic code review
- Hardening of the code against potential bugs
- Sonar gives you more detailed info & history of the results
- You’ll have to spend some time in the beginning to set it up & get the right ruleset
Other ways of improving craftsmanship includes things like CIgame
- Encourages ppl adding tests + fixing issues from static analysis
- Promotes discussion
- Fun! ( Newsletter )
Work in a structured agile way or otherwise you’ll end up making this MONSTER
- If you don’t have stories / aims your app will look like this and you’ll never ship it
- Using a story tracking system
- Implement and iterate
- The master branch must always be stable
to help improve our day 2 day craftsmanship we ..
we believe in the YAGNI acronym
- You ain't gonna need it! Talk about pictures on the slide (thing around her face - so complicated / napkin/tissue GSD and it woks)
- Gold plating - Seriously you ain't gonna need it!
- Pragmatism is a form of YAGNI
- Its about ignoring hypothetical situations
- Do whatever fixes your problem, don’t think of building libraries too early!
- This is what I have - this is my answer (broken cable + cellotape = fixed cable)
- can talk about why microsoft didn’t call it windows 9 (pragmatic solution to avoid the if(version.startsWith(“windows 9”)) )
Image: http://drwsxce6xtjnu.cloudfront.net/photos/image1s/4157/large/HRDCdBjgQficgd24ID4q
State problem:
Ever been working somewhere and you feel like you can’t speak because of the eery silence
or the walls are grey, the floor is grey, it feels dull & uninspiring
you do the same thing everyday clock in clock out
management come in, things seem to happen and you are the last to know
- Everything we do at Novoda promotes transparency
- Gives a sense of involvement and really empowers people
- Follows on from standups, news, pairing, reviews
- Talking is great
- Everyone feels involved and contributing
- Standup! 10-15 minutes max
- Company involvement
- Industry learning
- Creates a great environment for learning
- Pushes people to learn outside of their normal subjects
- Same as H&T's but hands on
- Promotes micro skills
- Can alleviate office discussions (example how often to commit)
- Allowing communication
- Allows cross skill learning
- Fast feedback
- Big desks allow people to move easier with their laptop
- Encourages pairing, Never have a reason not to pair
- Always approachable
- Because you can
- Promotes mobility
- Closer to the xbox lol
- Healthy!
- Ikea furniture hacking
- We encourage remote working
- I work in Liverpool, Xavi in Barcelona, we have London, Berlin, NY
- Sometimes communication is hard
http://www.wandisco.com/images/blog/hermit.gif
- WE found the internet
- Instant chat, webcams, calendar events, synchronised workspaces
- Screenhero is like you’re next to each other
FLASHES
- Having responsibility of the CI means you need feedback
- Remote workers can ping it for webcam chat
- Sometimes Step away from the code!
- the best inspiration for a problem is not thinking about the problem
You spend 8h/day with workmates - have fun!
- Organising post release/postwork events
- Talking to colleagues informally about a problem outside of the work environment
- Having a close nit workspace makes work so much more fun
- Inspirational ideas
one of the best ways to Improve your working environment is hiring best ppl for YOU
- Take your time hiring, don't base it on skill set alone,
- if you wouldn’t pair & have a beer with the candidate, don’t hire!
- Trust your current employees to be involved
You’ve got your app DONE you’ve implemented all your features
Ship it right? Not quite
You need to solidify and harden what you have
You need to enchant, wow and amaze your users
- The final 5% that takes 95% of the time
- You DO want to be featured
- You DO NOT want your app to crash or be laggy on a random device
- It DOES make all the difference
The first rule To achieve awesomeness is Don’t do anything in the main thread - Developer guidelines
- Get off the main thread!
- Developer options
Strict mode is a tool to help you GTFO the main thread
- Great for spotting long running operations on main thread
- potential memory leaks
- mention NoTils strict mode helper
- Sometimes you might be doing everything on background threads but the app still feels laggy
- Developer options → Onscreen GPU profiling
- amount of time it takes to draw each frame of the UI
- the green bar 16ms threshold = janky
- Tip: Use Hardware layers when a view’s contents don’t get modified often
- Avoid invalidating if unnecessary
Laggy can also come because your app has overdraw
- Developer options → Show Overdraw areas
- performance optimisations that will make the app buttery smooth
- Some quick wins by removing duplicated View backgrounds
- windowBackground ftw! First thing the user sees, can use xml drawables
- Make sure there is time to polish
- Set aside a week or two with no new features
- Android docs help you a lot
- Enchant your users
- Especially now we are moving to material design
Widget
- Entry point for your app right on the homescreen / lockscreen
- Increase engagement
Wear
- Think what your app can 'notify' users about
- Want to be featured?
Daydream
- Another engagement point for your app
- Quick win after using content providers
Live wallpaper
- Promotes discussion of your app with other potential users
Second screen / chromecast
- Want to be featured?
- Libraries for quick win
Content Provider
- Empower you to easily use other Android features
- Abstract away the database
- Link SQLiteProvider
Sync Adapter
- Increase your apps perceived freshness
- Keep your app out of the high power consumption list
Deep linking
- deeplinking / deepsearch for google search
Image: http://cdn1.smosh.com/sites/default/files/legacy.images/smosh-pit/072011/working_out_like_a_boss.gif
- Make those changes & ship it often
- Play store ratings / reply to comments
- beta communities
- Analytics are your friend
- A Bn testing is so powerful
- Guidelines of design
- Guidelines of app listing
- Guidelines of user experience
- Design - you won't get featured
- App listing - your app will be disabled / removed
- UX - your app will suck
In a company of multiple developers, there needs to be some common code and some common knowledge
to stop the wheel being invented over an over
Here are some of the things we think (the more opinionated side)
- Even though Google advocates the best, AOSP is not
- Crazy try catches, random thread spawning, flags and 1000 line methods
- Android examples are great for understanding the API useage
- Android examples are shocking for architecting an app
- Ever tried to use two examples together?
- Common sense now, stop dragging those dead bodies along with you
MinSdk 16 means you’re targetting about 87% of the Android ecosystem
- Now you have mid sdk 16 forget the Activity lifecycle!
- Great for releasing resources and public facing libraries
Another pro tip is try to fail gracefully is use Uncaught Exception Handler (java API)
- Did you know you can stop your app crashing
- Fail gracefully
Use it in the threads spawned for extra work
- Dependency injection is great
- Dependency injection frameworks are overkill
- If you do want to use them, understand what they are doing first by doing it
avoid object creation chaining all over your code (it’s in one place instead) + testability
We hope thats given you some insight into craftsmanship
Maybe these chairs make a bit more sense to you now
We covered a lot of topics, so catch us afterwards if you want to discuss anything in more depth