Sean Morris's Portfolio
  • Portfolio
  • About
  • Blog

Better Analogies for Software Development

9/1/2024

0 Comments

 
Summary:
On a very regular basis, I find myself explaining to colleagues why it is the case that software development is so expensive and difficult to do well. I've found success by introducing three new analogies. These are software development as 1) highway construction 2) developing a space mission 3) founding a modern nation state. I discuss the pros of each of these analogies and provide a critique of the most commonly otherwise used analogies of building construction and gardening.

The Old Metaphors - Building Construction and Gardening:
David Thomas and Andrew Hunt discuss two analogies for software development in their classic book "The Pragmatic Programmer" (see Chapter 7 section 40 of 2020 edition): 
Analogy
Good for Emphasizing
Building Construction
Simple, linear, repeatable, processes.
Gardening
Need for constant management and intervention (pests, weeding), emphasis on external conditions (no rain), things not going according to plan (hurricane took out tomato stakes).  
They make the point that the building construction metaphor is more palatable for business stakeholders because of the emphasis on structure, reliability, and predictability. However, they note that, in practice, software development is much more like gardening because of how constantly a team needs to be able to observe, manage, and respond to changing conditions. 

A critique of the construction metaphor:
  1. In my experience, the most useful part of the construction metaphor is about the plumbing. Most people who live in houses don't understand how plumbing works, and they never want to have to think about it. It is clearly a specialized skill, and it helps frame the importance of getting something right because you don't want your toilet to back up, when, say, your extended family is visiting for Christmas. Business partners are also happy to not ask questions about plumbing because it's dirty and we all know it needs to get done. 
  2. The construction metaphor can be souped up by comparing the development process to the building of a skyscraper or hospital, for example (hospital is my preference). Clearly, these require specialized expertise and, in the case of a hospital, are also clearly occupied by specialists themselves who have and require expensive equipment and facilities (surgical rooms, HVAC systems, large passageways for accessibility compliance). However, in my experience, the hospital construction analogy doesn't resonate with the experience or imagination of most business stakeholders. Why exactly, might be a subject for another post. 

A critique of the gardening metaphor: 
A garden metaphor is less useful if you are building something that you want to operate at scale, with, say, millions of users.  Etymologically, a garden refers to an "enclosure" and my experience suggests that that most people conceive of a garden as small and most often managed by a small number of relatively low-wage workers.

Three Alternative Metaphors
Considering the points above, it's natural to consider alternatives that emphasize the complexity, specialization, and scale requirements necessary to build a modern software application that adds business value. Here are my three favorites:
Analogy
Good for Emphasizing
Highway construction
Painstaking coordination between stakeholders (neighborhood meetings, politics, federal funding, approvals from affected municipalities, top-down long-term planning by civil engineers, public comment periods). The long-range effects of important design decisions (consider New York vs. Los Angeles).
Founding a modern nation state
Security (customs), Diplomatic issues (negotiations with legal departments), Bureaucracy (legal and administrative systems), Currency systems (central banks, information, and monetary policy). ​
Space mission
Risk (e.g. Challenger Explosion), Exciting opportunities in new frontiers, cutting edge science-backed research, rigorous testing, professionalism.
I started using the highway construction analogy after listening to a fascinating podcast about the "Big Dig" - which was, at the time, the most expensive highway project in U.S. history. This one is good for a very not romantic but extremely necessary of software development - gathering stakeholder buy in. Obviously, this is most useful in contexts where everyone knows that the project is useful but where political will needs to be mobilized (probably because it's not very sexy). 

I started using the founding a modern nation state when I was in a situation where I needed to emphasize an effort to different modules of the same website into a "federation" in which these separate entities submitted to a new set of administrative standards (In the analogy, the different modules were like different colonies that had their own cultures but now needed to come together just like the original American colonies needed to in order to form the United States). This is useful because it can inspire a revolutionary feeling to team members who need a way to understand why administration is important. If you want to emphasize the less sexy parts of software development, you can talk about the extensive bureaucratic functions of a modern nation state (post office, central bank, customs, trade negotiations, judicial systems for governance). The benefit of this analogy is that most people don't understand that the modern full-stack developer has to worry about all of these things. Often, I find, subject matter experts don't know, for example, how much time a developer needs to devote to making sure that that feature doesn't expose a security risk (customs), or establishing standards for how different pieces of an application communicate with one another (e.g. postal service if you want to emphasize the system, central bank if you want to emphasize the value of the information being transmitted).  

I started using the space mission analogy when there was some discord in one of my project teams and wanted to both respect the professionalism of members of the team and politely reframe the issue as being larger than ourselves. The Challenger Disaster analogy that this affords is useful if you need to remind people of stakes of failure. Finally, this analogy inspires the imagination in a way that others don't - there is something inherently interesting about "the final frontier" of space where - unlike the garden - there are clearly new horizons to explore and develop. 
0 Comments

Custom Lambda Function to Reconcile Two Lists

5/1/2024

0 Comments

 
Say you have two lists - one from Aaron, and another from Zora. You want a formula that tells you which items are in which lists so that you can follow up with both parties to get them back on the same page. 

At least, as of right now, Excel doesn't have an easy way to do this, so I wrote a custom Lambda function to do it myself. Here's a simplified example in action: ​
Picture
The function produces an array (from a #SPILL formula) that includes a couple of useful elements:
  • headers for clarity
  • a "Distinct" column that shows all of the unique (non-duplicated) values 
  • two columns with Boolean values (1 or 0) indicating whether or not the unique item is in the given list
  • a "Category" column that codes the given item into one of 3 categories. Generically: 
    • 1. List 1 Only
    • 2. List 2 Only
    • 3. Both Lists
This way, you can easily target the discrepancies between the two lists (the Category 1s and 2s) or the commonalities (Category 3). 

If you just want to use this Lambda, here's the code you can copy and paste into the "Refers To" field in your name manager: 
Lambda To Paste Into "Refers To" Field of Name Manager

    
Description to Paste Into "Comment" Field of Name Manager

    
Picture

More Information

Special thanks to Excel MVP Owen Price at Flex Your Data for the inspiration and base method for this formula from his Simple Frequency Table (Owen is an Excel MVP and it's obvious why because his posts are awesome).

I have given more descriptive names to my LET variables (e.g. what Owen calls "X" I call "list1LogicalMatrix"), but his matrix multiplication method is the core feature - otherwise I am simply rearranging the data produced by it. For a great explanation of how this works, I recommend visiting Owen's Simple Frequency Table post. 
Full Lambda Formula (Including Parameters at the End)

    
Good luck! Happy to hear feedback / comments! 
0 Comments

Categorizing Pizza Places in Boston With Data Science

11/28/2020

0 Comments

 
As part of a IBM certificate in data science I earned in 2020, I put together a project that categorizes pizza places in Boston based on their geography.

TLDR Takeaway: K-means clustering is a very cool technique for partitioning a dataset into distinct clusters, but it's difficult to apply to real-estate opportunity analysis just because there are so many variables to take into consideration. 

Introduction and Problem

How can restaurants make use of data science and geographic data to identify expansion opportunities? This analysis is an exploratory step in this direction. 

With Python, we can leverage Foursquare’s location data to help identify possible new opportunities for restaurants in specific geographic areas. We can help answer questions like:
  • Is there already saturation in a given neighborhood or for a specific type of food?
  • What kinds of establishments are already popular in a certain neighborhood?
  • What kinds of geographic locations could be ripe for new development?

This small project will use geographic data for the city of Boston to identify food establishments of a particular type (in this case, Pizza Places) to determine whether certain neighborhoods may already be showing some saturation already. In addition, we will use this same information to understand if the existing neighborhood locations serve as sufficient categories for which to group these pizza places. Are all pizza places in the Financial District the same, or is there more variation between neighborhoods than within neighborhoods geographically?

Data Sources

1. City of Boston Neighborhood Data

The city of Boston has more than 20 distinct neighborhoods – each with a unique character. You can read more about each neighborhood [here](https://www.boston.gov/neighborhoods). For example, the North End was originally a neighborhood of Italian immigrants but more recently has become an upscale location for tourists with plenty of Italian-style dining options. The neighborhood of Brighton is known for being a slightly more affordable area and typically caters to young professionals.

The city of Boston posts its location data publicly on its website to help real estate developers, researchers, and city planners have access to this information. In this lab, we will download one of the city’s more popular neighborhood datasets simply called “Boston Neighborhoods”, available [here]( https://data.boston.gov/dataset/boston-neighborhoods/resource/13ee2b65-6547-4168-b112-83995f138602).

2. Foursquare Geographic Data

In this project will also be downloading and accessing data from Foursquare. Foursquare is a company that provides location data and intelligence to its customers - primarily web developers - for use in their applications. In this project, we will be making a limited number of calls to Foursquare’s API to pull data about pizza places in areas of the city of particular interest.  We will be using the Foursquare [explore endpoint]( https://developer.foursquare.com/docs/places-api/endpoints/) to get venue recommendations in the “Pizza Place” Category.

Analysis

To begin, we will be pulling those pizza place categories that correspond to the top 50 locations of the geographic center of each of the neighborhoods in question. These geographic centers we will identify through Google.  

To make this assignment more practical, we will be excluding several neighborhoods in our analysis. This will include most of the larger, outlying neighborhoods outside of the city center (including Brighton, Allston, Dorchester, Roxbury, Mattapan, the Harbor Islands, Roslindale, West Roxbury, and others).  

Dictionary and Libraries: To complete this project, we will also be downloading a number of python scripting libraries. This includes:
  • Pandas library to work with data
  • Numpy library to work with vectorized data
  • Json library to analyze json data from the City of Boston
  • Geopy library to find location data for Boston
  • MatplotLib library to plot our data
  • Folium to render our data in a map
  • SkLearn to run a Kmeans clustering algorithm to group the restaurant data into clusters

Neighborhood Centers

Picture

Pizza Places from Foursquare

Picture

Pizza Places Categorized by Geography

Picture

Results and Discussion

As you can see from the maps above, even though 12 clusters were specified in the kmeans algorithm, these 12 clusters do NOT correspond to the same neighborhoods as mapped initially in this project. While the downtown core consists of 4 major neighborhoods (North End, West End, Downtown, Beacon Hill) there are 4 clusters that do not correspond to these neighborhood boundaries. Cluster 10 transverses both the North End and Downtown, Cluster 3 transverses the West End and the North End, Cluster 0 transverses Chinatown and Downtown, and Cluster 2 transverses Downtown and the South Boston Waterfront (Seaport).

One large takeaway from this analysis is that the South Boston Waterfront (Otherwise known as the Seaport District) has a dearth of pizza restaurants in general. Although this section of the city has been under extensive development recently, there is a paucity of pizza restaurants in this section of the city. Anyone who desired pizza who happened to be in this area would have to cross the fort point channel to get downtown.

Another key takeaway is that the neighborhoods are not a particularly useful starting place from which to begin our analysis. In order to get a fuller picture of the most operative development opportunities for Pizza Restaurants around the city, more research would be necessary to understand zoning restrictions and also the general socioeconomic status of any development area in question. Like McDonald’s, a pizza chain might fit best along highly trafficked areas of sprawling suburban areas.
0 Comments

    Archives

    September 2024
    May 2024
    November 2020

    Categories

    All
    Agile Development
    Custom Excel Lambda Functions
    Data Science

    RSS Feed

    View my profile on LinkedIn
© 2024 by Sean Morris. All rights reserved. 
Portfolio |  About