Showing posts with label software engineering. Show all posts
Showing posts with label software engineering. Show all posts

Sunday, April 19, 2020

Mobile Development Is All Edge Cases


I've been a professional software developer since '98, that's 22 years of doing this stuff.  Most of my career has been in embedded development, but the field is pretty broad, I'm not a guy that's coding on 8-bit baby processors but rather fully capable 32-bit Posix-based operating systems, a couple of gigs of memory and peripherals.  Even so, mobile development (that on phones, tablets, or IOT) is arguably more complicated.

The complexity can be misleading and under-appreciated, partly because the misconception "It's just Java, you know Java?", partly because the Android libraries manage a good deal of the complexity, and partly because many true complexities are simply overlooked.  Let's just peek at the complexities of mobile development and hopefully you'll leave with a new perspective.

Multi-Applications

Unlike most embedded devices, phones/tablets have a never-ending list of applications that can be installed, run, uninstalled and such.  The user may choose to launch one, many or all applications at any given time.  Typical embedded devices have a fixed installation, dedicated purpose and go through a heavy quality assurance procedure.

Resource Reclaimation

Mobile applications are contending for device resources with all other applications.  The applications are independent and isolated from one another, but one complication that impacts each app is the possibility of the operating system terminating or restarting your app to preserve the resources for a contending app.  In other words, a properly developed app should gracefully address it being terminated at any time in order to reclaim the apps resources and give them to another.  This is the whole purpose of the Activity States, the appropriate handlers and a proper app should consider the impacts of it being terminated unexpectedly at any time, doing anything.

Network Connectivity

Dealing with wireless communication itself is a extremely complicated problem in itself.  A common misconception is that "with 4G connectivity is everywhere".  Sure, but unlike a fixed-line network connection, wireless signals come and go, especially when you are in motion.  Additionally, the type of network connection may change, yet still have a network connection.  This can manifest itself as a brief, or perhaps not brief, disruption of service.  The app could hang a bit, or worse simply crash.  If you want to observe an example of this, go into your garage, connect to your home network, start playing YouTube, then drive away.  The app will need to manage a network connectivity exchange from wifi to 4G, hopefully seamlessly; but don't count on it.  Managing this in the process of a network exchange can be a bugger.

Abrupt Termination

The operating system can clobber your app to reclaim resources, as can the user.  At any moment, regardless of what your app is currently doing, the user can simply pull-the-plug.


It's all edge cases, you simply can't rely on anything for a robust application.  You can ignore them, and your app can not manage them properly and honestly....you may get away with it.  Simply ignoring them however doesn't make them go away and if you're looking to develop a 'perfect app', these are the types of complications you need to consider and address.  You're standing on a stool and at any opportunity the user, operating system, resources can be abruptly kicked out from under you.  Handle every kick, or be prepared for a fall.

Sunday, February 2, 2020

Having a F.U Career

I recently heard of the term 'F. U. Money', I believe coined by the author Dan Lok in his . book https://www.amazon.com/F-U-Money-Make-Much-Please/dp/1599325748.  While I haven't read the book, the concept was shared in a podcast I listened to.  In general, the idea is to have sufficient resources to be able to walk away from a job that you may learn to hate.  The available F.U money allows you options where otherwise you may feel constrained.

There are a great deal of benefits the software engineering career offers, some of them are very apparent, others more subtle and even more are those that we in the industry may have grown to take for granted.  As a blue-class kid who was fortunate enough to move into the white-class professional world there are benefits that we may have grown accustomed to, but should never forget that aren't universal to all.

Money

Let's get the more apparent benefit out of the way, as well as the one that introduced the topic itself.  Software engineering can be a particularly lucrative career.  In my first year of employment, nearly immediately out of school I found that I was making $4,000 less than my father was making at the peak of his career.  My parents raised 7 kids on an annual income less that I was making at the entry of my career.  Growing up, money was never discussed so this revelation was honestly pretty uncomfortable but it was a significant moment for me as it embedded a long-standing sense of financial opportunity that many hard-working aren't afforded.  Money offers opportunities that many may never experience; international travel, memorial vacations, and stuff that we may not need but may certainly want.

Flexible Time

'Punching a Clock' with a pre-defined start/end time is pretty common in a variety of careers.  I remember when I was washing dishes at a diner in my youth, walking in the back door, making my way to the break room, sifting through the stack of time cards and literally punching the clock.  I remember being warned when there were times clocked in as little as 3 minutes late.  I don't recall resenting the act, simply taking it as a part of the job and 'normal'.

White-collar jobs, blue-collar jobs there are plenty of jobs that require fixed schedules; customer facing roles, dependencies of other teams, HR 'ass in seats' policies....  Largely though, our particular career offers flexible time.  Come in a bit late, take a long lunch, pick up your sick kid from daycare or skip out in the afternoon to watch your daughters pre-school play....our career typically accommodates such events in the form of flexible time.  Come in late, work late....get in your 40 hours and don't take advantage of the policy.  Some more progressive companies simply state 40-hour work weeks are a legacy.....just get your job done.

This is an extraordinary benefit and should never be overlooked.  There are plenty of folks that can't simply leave abruptly from work for an emergency without consequences.  Some folks need to request vacation months in advance with a genuine possibility of it being denied. 

Opportunities

Opportunities can be abundant, software is everywhere from every governmental agency to the most cutting edge phone.  You're only limited to your imagination in seeking employment; roll your own services and provide them to direct customers, navigate Craigslist and perform one-off gig services, become a contractor or seek permanent employment.  The vast spectrum of opportunities gives you individual power.  The knowledge that you're not stuck with your current employer, location, or industry is empowering.  Imagine devoting your entire life as a steel worker knowing there are limited mills in your area and only a handful in the entire nation.

Diversity Of Industry

Whether you are a natural history nut, a medical device junkie, a yoga enthusiast, or an amateur personal trainer.....you can always find a pairing of such fields with software.  Create a museum tour app, a blood pressure monitor, the next Peloton stationary bike, or an electronic yoga instructor...there is always a potential pairing of software with a diverse spectrum of fields.  You'll never be trapped in a specific industry and if you later find you tire of medical devices pack up your virtual camp and move on to another industry.

Location Flexibility

We are pretty lucky right at this moment, employment is high and demand for software engineers along with it.  The nation, and namely the world, offers amazing life opportunities and digital nomads likely could find an interesting job prospect in nearly any region of the world they aim to set up camp.  Also, with the growing acceptance of remote workers we will likely soon view our job and location as completely independent of one another...at least I predict in my lifetime.


While money was the kindling of the post, we in the industry have a set of FU values.  FU if a company is undervaluing you, FU if your corporate policy doesn't offer flex-time, FU if your company products are not a good match for your interests  and FU if you feel stuck in your current city.  More importantly, appreciate these perks of the industry while acknowledging that we are lucky to have them many in other careers don't have them.

Cheers.

Monday, May 20, 2019

Bubble Gum Engineering

A few years back I worked for a defense contractor that suffered from what I call "bubble gum engineering".  'Bubble Bum Engineering' refers to the practice of adopting a new technology followed by discontinuing after a short period of time. Kind of like spitting out the bubble gum after the flavor is gone.

Our program was complex, a mission-critical self-propelled fully automated weapon system, and taming that complexity with a compressed schedule was a challenge, but one that we capable of addressing. What made the program more challenging than it needed to be was the fact that some of our software managers would take business trips across the country for meetings, and this gave them opportunities to sit next to anonymous vendors peddling their 'wares' and ample time to read up on the new 'sexy' methodologies. They'd drink in the articles or vendor solicitations with wide eyes and eager wallets only to bring back these 'snake oils' announced by a routine all-hands meeting.

Off we'd go with a dramatic change of direction, fast-n-furious with new training, new procedures, and new development mechanisms! Then, shortly after we'd settle in on the new methodology the bubble gum had lost it's flavor to our managers, who'd replace it with the even newer methodology/technique acquired on their last business trip.

Time-after-time we'd be directed a change of course, time-after-time we'd accept these new challenges with depleting zeal slowly chipping away at our schedule, our software stability, and our morale.

I've learned through these challenging trials that there is a limit to reducing the complexity of a problem. Fact is, the problem space of a program defines the minimal complexity of the system, however there is no limit (read that as infinite) to the addition of added complexity. You can take a moderately difficult problem and make it infinitely complex. That is the lesson I learned from that experience anyway.