DONN FELKER

Lessons Learned From the Software Industry

  • Home
  • About
  • Development Training
  • Fragmented Podcast
  • Learn to Work for Yourself
  • Contact

Connect

  • GitHub
  • Google+
  • Instagram
  • LinkedIn
  • RSS
  • Twitter

Powered by Genesis

A Stereotypical Day

May 19, 2015 by Donn Felker 2 Comments

It was a nice sunny day, maybe 70 degrees here in AZ. A perfect early spring morning.

I decided to go work at my favorite local coffee shop. I walked in and saw a guy in his mid 30’s covered in tattoos. Not just arms, but legs, hands, fingers … the whole nine – he was covered in them – some good some bad – that doesn’t matter though. He had a beard, he was sort of skinny, yet not a rail. He kind of looked like a hipster but also had some other type of other aire about him. Not sure what it was. He looked nice, but he also looked lost. That was my initial impression of him.

He was working behind the counter at the coffee shop; I thought he was the new guy – I’d never seen him before.

He was kind of awkward when replying to a couple of professional guys at the coffee bar and I dismissed him as some tattooed guy who is just trying to find his way in life. Just another guy who probably made a bunch of mistakes during his time on earth and is now working at a coffee shop, taking it day by day. I see it almost everyday in every city I visit. It is what it is. Secretely, I wished the best for him.
Everyone deserves a chance, right?

I get in line and a few minutes pass.

The tattooed guy starts talking to a customer. I’m in line behind the guy he’s talking to. Another gentleman approaches the two and interjects.

“He’s the owner of this place.”, says the newcomer.

He’s referring to the tattooed guy. That lost guy I was talking about above.

The tattooed guy admits he is the owner and that business is going quite well. The professional gentleman states that he wishes one of these shops were up in the northern part of the city because he loves this coffee shop. The tatooed guy states that hes looking to expand, reaches under the counter and grabs some business paperwork and starts thumbing through them – looking at numbers and charts, I presume.

The location of this coffee shop is in Scottsdale. Old town to be exact. The thing about Old Town Scottsdale – it is quite expensive here. It’s not a place I’d want to rent a commercial space. It’s very pricey. This place is nice, real nice. It’s defintely an expensive venture, and it is successful. Impressive.

What’s not impressive though?

That guy, the one I stereotyped a minute ago and dismissed as some nobody who is just trying to find his way …well … he is the owner of this place that I call my favorite coffee shop in all of Arizona. He’s not lost. He’s on his way, he has direction. I was wrong to stereotype him. I’m sorry tattooed guy – you have all of my respect and then some. I was wrong.

I order my coffee and step back and wait for it.

No more than 10 seconds later a man in black medical scrubs approaches the counter and puts down a recently emptied pint glass. This coffee shop also serves excellent micro brew beer and he just finished one.

I immediatly think to myself “its 8:10am on a Thursday, and that guy has already had a beer, what the hell?”

I take a longer look at him. He’s in his late 40’s or early 50’s. He looks tired. It’s obvious that he’s in the medical profession. Is he a surgeon or physician? Maybe. Probably. Is he a nurse or a staff member of a surgical team? Maybe. Probably.

I start thinking about why he might be drinking a beer this early in the morning.

I then remember that there is a hospital with a very active surgery center across the street. I can see it from where I’m typing this. My wife actually had a couple of surgeries at that exact location.

I also notice another woman in scrubs drinking coffee at the other end of the shop. I then realize that I see medical professionals in here a lot – I just had not really thought about it before. It makes sense – its a nice relaxing place and its close to the hospital. Its an excellent place to unwind.

Rewind a couple years.

I remember being in that exact same surgery center waiting room with my kids, terrified. I was in there hoping that my wife’s surgery would be a success and without a hitch (it did go well, both times – thankfully). I also remember seeing the others in the waiting room wearing exhausted looks of worry and fear.

I began thinking to myself – the waiting room at a surgery center/ hospital is not a place we go when we want to enjoy ourselves. We’re there because we have to be there, we’re there because we’re hoping women and men like the one who just put down an empty pint glass on the bar a second ago can help fix whats wrong with our loved ones.

Back to the man in the black scrubs …

It’s also obvious that this gentleman is off work – he looks wornout and has a stack of papers near his chair. I’m sure he had a long and late night (and/or early morning).

Back to the counter – He orders another beer.

He returns to his chair and starts reviewing some paper work, taking a moment every few minutes to lean over a bit, rounding his back and then he grasps his head like a basketball player palms a basketball.

Its apparent he’s under some level of duress.

I’m not sure why he’s here, but I have a suspicion that its because what he just went through at work this morning called for a beer, or two … or more.

I can only imagine the things that he sees and deals with. Its very possible someone died in front of him this morning. Its very possible he did everything he could to save this persons life. I can only imagine the level of stress that can bring.

So … who am I to judge him for drinking a beer at 8:10am? I should’nt be worried about it and I won’t be worried about it anymore.

Its also very possible he’s an alcoholic who is feeding his addiction, but I like to give people the benefit of the doubt. It looks like he was at work and looks like he had a long night.

What’s the moral of this story?

Its quite simple … both of these guys are having a stereotypical day and I just stereotyped them both within the first minute of seeing them. It wasn’t right.

We need to all act more compassionate towards each other and realize why we feel the way we do, even during our first impressions. Perhaps they’re wrong, most likely our first impressions are wrong.

 

 

 

 

 

Filed Under: Uncategorized

RxJava with Dan Lew

April 1, 2015 by Donn Felker Leave a Comment

We recently released Part 2 of our two-part series on RxJava with Dan Lew on the Fragmented Podcast. Download it on iTunes, Stitcher, PocketCasts or your favorite player or simply listen online.

Enjoy!

Filed Under: Uncategorized

Announcing Fragmented – A Podcast for Android Developers

February 20, 2015 by Donn Felker 9 Comments

Fragmented Podcast Cover

I’d like to formally announce the launch of a new podcast – Fragmented. The Fragmented Podcast is hosted by myself and Kaushik Gopal. Kaushik reached out to me earlier this year to discuss the possibility of starting a podcast around Android Development. We discussed it and we found that we had a lot of the same ideals in regards to Android Development. We clicked and we also found that our goals around the podcast and what we wanted to share with the public were very much in line. Therefore, we decided to go for it.

In Fragmented we’ll talk about Android Development, best practices, patterns, practices and we’ll have occasional Android developer on the show.

Please subscribe and let us know what you think.

  • Subscribe in iTunes
  • Subscribe in PocketCasts
  • Subscribe in Stitcher

 

Filed Under: Uncategorized

Robolectric ShadowTaskStackBuilder

January 6, 2014 by Donn Felker 1 Comment

I’m a proponent of unit testing and once you figure out how to use Robolectric its great for helping you unit test Android. That is, until you run into an instance where a Shadow class is not implemented and you get some obscure error while running the unit test. Such thing happened recently when trying to get some code under test.

The code previously used a Context#startActivitiy(…) to start the Activity. I’m building some deep linking framework for a client for their Android app and I needed to use the TaskStackBuilder in order to build the back tasks properly. The code looked similar to this:

The code above starts and Activity and if the Activity defines a parent activity in the AndroidManifest.xml the entire task stack will be built and the activity will be started. My existing unit test to test this looked like this:

The goal was to make sure the test above still passed when I moved from the traditional Context object to a TaskStackBuilder instance for starting the Activities. Unfortunately moving to use the TaskStackBuilder made the test fail with a framework exception. Robolectric does not have a ShadowTaskStackBuilder. So I built a very rudimentary one that would help my test pass, its not 100% perfect by any means but it should give you a jumping off point if you want to extend it as it needs a bit of work.

Writing the Shadow

When the test is run in Robolectric and configured to use this Shadow (as shown below) the code above will set up a new instance of TaskStackBuilder and use the Shadow to manage as the execution. In What we’re actually doing is avoiding all of the actual Implementation of TaskStackBuilder all together so we can get this test to pass. The code builds a TaskStackBuilder and then when the addNextIntentWithParentStack(Intent intent) method is called the intent is saved locally in the shadow. When the user calls startActivities on the TaskStackBuilder, we intercept that and simply call context.startActivity(intent). Since the context is an instance of Robolectric.application this works out great.

Is this perfect? By all means, no. But it will help someone who is stuck. How can it be improved? If you look at the source of TaskStackBuilder you’ll notice it delegates the activity creation and starting of them to a class called ContextCompat and it also uses IntentCompat. The source of ContextCompat reveals the usage of two other classes: ContextCompatJellybean and ContextCompatHoneycomb as well as some other code. As you can see, its a mini pandoras box under the hood. My implementation above avoids all of the code below and allow us to trust that TaskStackBuilder is doing what its supposed to.

Simply assuming that code will work is dangerous in practice you could do the following to ease your testing anxieties:

• Implement Shadows for all of those (have fun with that)
• Write a test that checks to manifest to ensure that parent activities are set in the AndroidManifest.xml
• Write integration tests that ensure that the up state is working.

Using these Shadow

To use the Shadow, create your test class and annotate it with the @Config annotation as shown below:

Thats it. You now have a very naive implementation of ShadowTaskStackBuilder to use in your application.

Filed Under: Uncategorized

The Innocence is Lost

December 15, 2012 by Donn Felker

Around 6 years ago… my wife and I bought a reusable Christmas tree in Danbury, CT. Why? We didn’t want to go to the Walmart in White Plains, NY when we lived in the Bronx, NY because its a madhouse. So we drove up to Danbury, CT because they had a Walmart and it was more “chill” at the time (and probably still is). We were not sure if we were going to find a tree, but sure enough, we found one we loved and we bought it (though we were broke as a joke at the time). Since then we’ve used this tree every year and its the only tree our children have known (4 & almost 2). It has memories that I can never let go of.

Little did I know that nearly ~6 years later I’d reflect on this XMAS tree purchasing experience moment in our lives in a deep introspective way. My wife and I talked about our XMAS tree buying experience today. ~6 years ago today, when we were out buying our first (and only) tree our family has owned in Danbury, CT, we were in the same store that some of the unfortunate Newton, CT childhood fatality parents had been in during that same xmas season.

For those that dont know, Danbury, CT is the closest “larger” city/town that is near Newton, CT that has a Walmart. What does this mean? It means that … Most likely those same parents of the slain children were pregnant with the child that was slain yesterday (or already had a <1 yr old) at the time when we were in the store. We realized we may have actually ran into some of them while in the store (sure … small coincidence, but its a possibility) as back then we didn’t have children but were still high on the “newlywed” experience and were quite extroverted. We (wife an I) have an exact moment and place in history we can remember which can relate to the parents in that store. Happy, fulfilled, excited, full of joy. We now have children, (almost 2 and 4) … and we have no idea what these folks are going through.

The fact that we’ve shared the same path as those unfortunate parents at one point in our life makes us feel closer to them then the average american. That doesn’t make us better in any regard, but it sure does make it “hit home” a lot harder. We’ve seen those streets. We’ve driven those roads. We’ve sat at the same stop lights, we’ve experienced the same things. While it may initially seem shallow, to us it is still deep in retrospect.

In the end, we’ve shared the same sights as those families have, and now… those thoughts and memories are all those families have of their loved ones from here on out. Words cannot express how sad we feel for those families during this holiday season.

I wish I had something great/witty/etc to say here, but I don’t. When innocent children die its not something that can be replaced by words; mere silence is the only thing that fits … because the childhood laughter is forever gone.

 

Filed Under: Uncategorized

Next Page »
Donn Felker Google Android GDE Fragmented - An Android Developer Podcast

Projects / Apps

Caster.IO
Fragmented Podcast
American Express Android
Aaptiv
AndroidJobs.IO
Groupon
MyFitnessPal
Poynt

Books

  • Android Developer Tools
  • Android App Dev For Dummies V2 (V1)
  • Android Tablet App Dev for Dummies

Categories

  • Book
  • Business
  • Development
  • Health
  • Marketing
  • Misc
  • Mobile
  • Screencasts
  • Uncategorized