LunarLincolnLunarLincolnLunarLincolnLunarLincoln
  • Home
  • Process
  • Services
  • Work
  • Writing
  • About
  • Contact
  • Home
  • Process
  • Services
  • Work
  • Writing
  • About
  • Contact
Oct
31

A Brand New Android Studio – 3.0!

  • Posted By : Travis Smith/
  • 0 comments /
  • Under : Coding

There are few events in life that give developers such bliss and excitement as when their favorite tools receive a healthy refresher. Earlier this week the kind and hard-working folks over at Google released the official version of their long-awaited upgrade to Android Studio. It wasn’t an unusually long wait (Google seems to release new major versions roughly every 6 months), but the anticipation of diving into its new features has kept me watching Android Studio’s Stable Channel for months.

In the events leading up to Google I/O in May, the Android Studio team had teased the community with some incredible new features for Android Studio 2.4. Many developers, myself included, had our collective fingers crossed for a surprise release at the event and were shocked when Google announced official support for Kotlin in Android development. Additionally, they boldly nixed the 2.4 version of Android Studio from existence, bumped to a clean version 3.0, and continued pushing out numerous betas and release candidates. Now, many moons later, we’re blessed with a well-tested and feature-packed development environment ready for production use.

Without any further ado, let’s talk about some of those new features.

Kotlin

A few years ago, Kotlin burst onto the Android scene and was met with both praise and skepticism. JVM languages like Kotlin aren’t uncommon and most aren’t well suited for Android development (with the notable exception of Groovy, which Gradle uses). However, continued Kotlin development attracted more and more followers. Plugins were made for Android Studio and soon Kotlin became a common concept for cutting edge developers. Google must have been keeping its eye on Kotlin as well, and for the first time in Android’s history, Google announced full first-party support for another programming language to sit alongside Java (ignoring the NDK, since Google most certainly does!). Kotlin’s concise syntax shares similarity with numerous other languages, notable Swift, Apple’s preferred iOS and Mac OS development language. It addresses numerous Java shortcomings such as null safety, a lack of class extension functions, and easy threading support via coroutines. The full list of Kotlin features is long and you can read about them here!

Java

On the topic of languages, Java got some love this time around as well. For a multitude of reasons, Android’s Java doesn’t always have the same functionality as the base language. One of the most common criticisms of Java is its verbosity, especially with anonymous classes. You know, the ones you make to implement callback interfaces like View.OnClickListener. Java introduced support for lambda expressions, which are essentially abbreviated functions to reduce repetitive boilerplate code, in Java 8. However, Android struggled to provide support for lambda expressions; you had to use the experimental (okay, buggy) Jack toolchain or the 3rd party Retrolambda library. Finally, Android developers can use natively-supported lambda expressions. This is a huge plus for libraries like RxJava which rely on numerous single-method interfaces, making them prime candidates for lambda expressions and drastically reducing code length.

 

Android Studio

The last new piece I’ll talk about is an upgrade to Android Studio itself. For as long as I can remember, I’ve been using the Android Device Monitor to profile the performance of my apps. It was a little ugly and a little hard to use, but it got the job done. Google used its magic and transformed it into the Android Profiler. Earning a proud place next to the Build and Stop buttons, the Android Profiler button opens CPU, memory, and network monitors right within the Android Studio window and sits nicely next to Logcat and your other bottom toolbar menus. You can monitor performance, view payload information, find laggy parts of your apps, admire the very pretty interface this amazing suite sits within, and more. I’m eagerly looking forward to testing my apps and improving my code using these upgraded profiling tools.

I could go on but instead you should go download the new version of Android Studio yourself and play around!


Feb
29

Solving Hard Software Development Problems

  • Posted By : Travis Smith/
  • 0 comments /
  • Under : Coding

One luxury we as programmers often take for granted is the vast wealth of others’ experiences available for perusal at our fingertips.  Rarely do we encounter a software development problem so challenging that Google and StackOverflow cannot offer assistance. However, when working with cutting edge technology, these elusive obstacles arise more frequently and I’ve dealt with my fair share of them here at LunarLincoln.

While there is no steadfast problem-solving algorithm, most code artisans (I’m hoping this name sticks) will first consult the web.  More often than not, the hunt ends here.  An experienced developer will know the specific keywords that will help narrow the search for the solution to their problem.

giphy-2

But what if you encounter a problem that nobody knows how to solve?
Worse, what if nobody else has ever tried to do what you’re doing?

This is where we have to break out the big guns. Let’s use an example.

When I worked on Compass, I was tasked with figuring out how to stop it from draining the user’s battery so much.  At the time I hopped on the issue, Compass was tracking location data, motion data, HealthKit data, calendar events, photos, weather and more.  All the time.  Yikes.

compassiconintegrations1

Unsurprisingly, most phones didn’t react well to this kind of stress, and the largest complaint we got from testers was the drain it had on their phones.

Since everybody knows that premature optimization is the root of all evil, I had lots of avenues of attack.  The first matter of business was to figure out the biggest culprits.  Using Apple’s Instruments program, I was able to run the app and observe the battery usage levels as well as find out which parts of the app were consuming most of the CPU cycles.  As it turns out, recording a user’s location was creating huge spikes in battery consumption.  Knuckles cracked and fingers wiggling, I was ready to take a stab at it.

Adventure Time Deer

The first thing I did was dig into the current implementation to see how it worked.  The app was always tracking location, even in the background, with the highest quality accuracy.  And that’s great for results, but bad for battery.  Fortunately, I had a place to start looking for a solution.  Todd had a pull request ready which he said improved battery life but was ruining the accuracy of the location data.  His idea was to use geofencing.  He would wait until a user stopped moving, disable the GPS, and activate a geofence around the user.  When a user had moved a significant distance, the geofence would trigger, and the app would resume high accuracy tracking until the user stopped moving again.

I thought that was a brilliant solution, but as I researched all my options for tracking location, I learned it wasn’t going to work as we wanted.  Geofencing just didn’t offer enough precision.

giphy

The location logger app

The location logger app

The second solution was the phone’s motion coprocessor.

We were already tracking the user’s activity state, and I opted to hijack this information to determine when to activate and deactivate the GPS.  When a user is stationary, turn off the GPS.  Otherwise, crank it up.

Now I needed to create the algorithm to make this happen.  To iterate on the fine details of algorithm, I created a really small, ugly, but highly functional app that tracked my location and let me plug in my actual activity state (to make sure the motion coprocessor was accurate).  I would walk and drive around the neighborhood to test its accuracy while measuring its battery consumption. (Ben even went on runs to test the running measurement, and may or may not have eaten it on a piece of random construction material. Sorry Ben!)

The location accuracy visualizer app

The location accuracy visualizer app

When the tests were done, I would export the data and compare the location data to the route I actually took.  I created another tester app just to map the travel lines.  Using this, I could see whether my algorithm was precise enough to meet our needs.

In the end, I was able to create massive gains in battery performance without any noticeable hit to location accuracy.  Of course, the app still needs a lot of battery, but my models showed that multiple more hours of idle use could be seen, especially when stationary.

This form of rapid prototyping helped immensely in crafting a solution to this open-ended problem.

Surely this wasn’t the only way to solve this problem, nor is this guaranteed to be the best solution.  But one of my favorite ways to tackle a problem is to build myself some proper tools.

 

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” – (Probably not) Abraham Lincoln


Feb
16

Startup Growing Pains and Working on my Google-fu

  • Posted By : Jennifer Bennett/
  • 0 comments /
  • Under : Business

You see in the news all the time “Startup acquired in $$$$ deal” or “Local Startup hires 2983742742 new employees”. But how do those companies get to that point? Growth is hard guys. Can’t we just work in our own little bubbles?

When starting LunarLincoln, we knew some of the basic things we needed, and we knew we wanted to be one of those companies in the news with fantastic results, but connecting the dots from point A to point B – well, we weren’t so sure about how that worked.

How do you get from the beginning to the end?

200

Things we knew to do:

  • Register a company
  • Pick a name
  • Build a website
  • Get some clients through word of mouth or past contacts
  • Promote on the interwebs
  • Go to events/meetups
  • DO GREAT WORK

But doing the work is the easy part. We knew how to do that, whether it was code or design.

But how do you do all that other stuff that gets in the way of work?

Things we had to google in the past year during super-growth-time (and are still not sure we did it the “best” way).

  • How to rent commercial office space
    • What’s a CAM?
    • Why are there no office/commercial spaces that are small/medium sizes and NOT in a coworking space?
    • What are some commercial real estate sites that AREN’t horrible to use?
    • What do you mean we have to build the office after we rent it?
    • Where do you buy office furniture? Should we even buy “office” furniture?
  • How to properly interview developers
    • Average salaries for developers in the southeast
    • Good interview questions
    • How to fire an employee
  • How to write an employee handbook, offer letter, contract, etc
  • How to find a lawyer
    • How to negotiate contracts
    • How to leverage your legal team when problems arise (Why can’t you pay on time!!!)
  • How to find an accountant
    • How to use Quickbooks
    • Why is Quickbooks the devil?
    • Alternatives to Quickbooks
  • Do we charge sales tax in Tennessee for development?
    • Why do we have to pay tax on our stuff (I’m looking at you Schedule B)?
    • Payroll taxes, sales tax, federal tax, unemployment tax – why so many taxes?
    • How to not miss a random tax payment
  • How to buy small business and health insurance
    • Tech insurance
    • Dental & vision insurance
    • Rental insurance
    • ALL the stupid insurance (I left out workers comp, short term disability, & long term disability ugh)
  • How to set up a company 401k
    • Why are 401ks so expensive?
    • What is a simple IRA?

That list above – there was hardly ever a simple google answer. The internet always had 200 different ways to do each task. What was right for us? What was right for Nashville? What was right for a tech-services company?

Late at night after sifting through the conflicting advice and moaning “whyyyy, whyyy” at the wall about the most recent puzzling question, we would joke that there had to be some sort of AA meeting for startups.

200-4

So, my lovely internet peoples. I would welcome with open arms any of the following:

  • Not a tech mentor, not a design mentor, but a small business mentor. A fairy godmother of answers. A veritable Ask Jeeves
  • Some sort of “How do you do this business thing?” Question-Time Meet-up
  • A wonderously detailed forum or QA series on a local tech site so I can quit trawling page three of the Google search results
Maybe these things already exist…
…but, I’m just too tired to google them right now.

I just want to get back to the work part of work.


Nov
14

One Design to Rule Them All – Android’s Material Design

  • Posted By : Jennifer Bennett/
  • 0 comments /
  • Under : Coding, Design

Google has debuted a new style guide for their recent OS – Lollipop. It is called Material Design and the internet is BLOWING UP with articles about this new guide. Well we’re about to jump on this bandwagon too and explain why this is such a big deal.

dogdoorThe #1 problem Android has had since its creation is also it’s own selling point. Diversity. Many different phone manufacturers made many different phones and added their own “takes”, if you will, on the Android interface. Free market! Do what you want! Anything goes!

That sounds great, right? Right!?!

One person’s “diversity” is another persons “market fragmentation”. Alot of ugly, bloated, inconsistent interfaces were made. There are over 4,000 different phones to potentially design for! Every company wants to add their own bizarro system apps. See below:

verizonbloatware

Look at all that bloatware – plus Verizon – you’re using three different icon styles. wtf.

So, after almost a decade of Android phones – Google has taken a stand on their ever growing phone market.

Enter: Material Design.

So is this just a new, shiny band-aid on a giant over-designed problem? Actually – Google has done a wonderful job.

materialdesign

It incorporates the growing trend for flat design, but most importantly, it clearly and thoroughly addresses gestures, touch, and movement. As screens become larger, interactions are critical. Consistency across devices allow users to feel knowledgable and comfortable with ALL Android devices. Moving menu buttons or changing the direction screens swipe is the equivalent to putting your wallet in the wrong pocket. It’s just wrong, and leaves the user feeling disoriented.

Fortunately Material Design sets best-practices for all aspects of Android design and development. Google is already implementing it across all of their wide-reaching features – setting the example for others. I’m excited to see developers and manufacturers begin implementing these changes and can’t wait for a newer, cleaner Android (that doesn’t require me to root my phone). It’s beeeeyutiful.

beautiful

Will this be a game changer for iOS design snobs? Open software outside of Apple’s restrictive app store PLUS beautiful interfaces? We’ll see.

e665z

PS. Wiley (who worships at the foot of the golden apple) believes I am being too optimistic about this new design spec. Rebuttal article is forthcoming.

PPS. Travis is very excited about the new elevation feature (DROP SHADOWS ZOMG) – (But I agree!!! Putting things underneath other things – what a novel idea).


Recent Posts
  • Copious Communication
  • Initial Questions for a New Mobile App Project
  • Gif TV: A LunarLincoln Product
  • Onboarding other peoples code
  • What’s in a name?
  • Don’t build it all. Picking a Platform.
  • Talk to your Users
  • Design for Fat Fingers
  • A new look
  • Hourglass for Jira
Archives
  • May 2021
  • September 2020
  • November 2019
  • October 2019
  • June 2019
  • April 2019
  • February 2019
  • January 2019
  • October 2018
  • August 2018
  • June 2018
  • April 2018
  • January 2018
  • October 2017
  • August 2017
  • June 2017
  • February 2017
  • January 2017
  • September 2016
  • July 2016
  • April 2016
  • March 2016
  • February 2016
  • October 2015
  • September 2015
  • July 2015
  • May 2015
  • February 2015
  • December 2014
  • November 2014
  • September 2014
  • May 2014
  • April 2014
  • January 2014
  • December 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • December 2010
Categories
  • Agency
  • App Advice
  • Branding
  • Business
  • Business
  • CaseCollage
  • Coding
  • Design
  • Design
  • NSVille
  • Uncategorized
  • Web Design
Copyright LunarLincoln 2023. All Rights Reserved