• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Dion Almaer

Software, Development, Products

  • @dalmaer
  • LinkedIn
  • Medium
  • RSS
  • Show Search
Hide Search

Mindful Abstraction; Pay attention to each level of turtle not just the top one

May 16, 2013 Leave a Comment


Abstraction empowers learning, but can also empower a lack of meaning

Is abstraction always a good thing? In my early days of programming I thought so. When learning I thought so. It is how we can grow, right? I have started to question the balance of abstraction more and more recently, across software and programming, and beyond.

My abstraction in programming journey

Kent Beck said it well:

“First you learn the value of abstraction, then you learn the cost of abstraction, then you’re ready to engineer.”

In my early programming days I thought a lot about data and algorithms. Then I started programming Java and I got too obsessed with OO design and abstractions. The gang of four and all of those pattern books. Pattern matching is good…. so patterns are good! Of course, when I would go beyond the high level conversation I found that one of the most important pieces of information about the patterns was the “context” piece. I keep finding that context is king when it comes to pattern matching!

From spaghetti code to rotini code

We have all seen how bad spaghetti code and architecture. Thousands of lines of brittleness, crippling connections between components, bringing your application development to a crawl. For awhile it was en vogue to use objects as the True Way to get modularization. You end up with solutions such as OSGI. Incredibly modular, but to many people it can be taken too far.

The new Android Studio is using IntelliJ, which made me happy since I was always an IDEA over Eclipse guy. One of the reasons in the Google IO session for the switch was that the Android dev tools team was finding it too hard to get done what they needed too. This is a sad thing to see since Eclipse is meant to be a platform for building tools! I remember meeting with some of the founding members of the Eclipse project and how they felt like they built the framework but then it all shipped…. before it was truly packaged together.

The problem with hyper abstraction is that there are tons of small components that barely do anything and you can’t easily see how they work together. Zooming between the forest and the trees is incredibly hard. For every piece of business logic you are fighting with interfaces and abstract classes and configuration files and then FINALLY you get to some actual code that does something. Have you ever seen this code? It feels more like Rotini than Spaghetti, but in some ways it is even harder to understand.

When you have a hammer everything looks like a nail. When you are first armed with some patterns and libraries the same can happen. You try to work out which abstraction to put on the problem and it is hard to be mindful of what the actual problem is and spend too much time on implementation details.

So, too much abstraction can be bad, and the art is in knowing where not to abstract (as Kent said).

Abstraction and Language

You can take this further into language itself. As soon as you name something you create a new abstraction. These become building blocks and when used wisely allows you to go up the stack and get new learning and understanding. The danger of having these names is that they can quickly join your subconscious and you may stop understanding the “why” and “how”.

For example, a friend was talking to me about the notion of condensation. I learned about it in some science class, but once I had a name for it I moved on. At this point I have forgotten how it actually works. How does water get on the other side of the glass again? I no longer question it, I couldn’t talk to how it would be different if you changed water with wine, or switched the glass bottle to plastic. I have lost the understanding of the concept and am left with the name and move on. I think this can be so very dangerous, especially when you see it stack together with chains of information.

The notion of the “waterfall” methodology came from a misunderstanding. A paper on the flaws of waterfall was not understood, and someone took the EXACT OPPOSITE message and talked about how it was a good thing. Fast forward and this flaw grows and grows and boom. A large part of the industry ends up running in the wrong direction.

There is a constant balance and tension, and you need to be able to jump up and down the stack. The more I experiment, the more I am mindful on which level of abstraction makes sense for my problem at hand, and I remember to jump down the stack regularly so I don’t lose sight of the context.

I no longer climb up and up and up, but enjoy a balanced journey in my path through abstraction.

Share this:

  • Twitter
  • Facebook

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Twitter

My Tweets

Recent Posts

  • Generative AI: It’s Time to Get Into First Gear
  • Developer Docs + GenAI = ❤️
  • We keep confusing efficacy for effectiveness
  • The holy grail of a Web SDK
  • The rise of the extensible app platforms

Follow

  • LinkedIn
  • Medium
  • RSS
  • Twitter

Tags

3d Touch 2016 Active Recall Adaptive Design Agile Amazon Echo Android Android Development Apple Application Apps Artificial Intelligence Autocorrect blog Bots Brain Calendar Career Advice Cloud Computing Coding Cognitive Bias Commerce Communication Companies Conference Consciousness Cooking Cricket Cross Platform Deadline Delivery Design Desktop Developer Advocacy Developer Experience Developer Platform Developer Productivity Developer Relations Developers Developer Tools Development Distributed Teams Documentation DX Ecosystem Education Energy Engineering Engineering Mangement Entrepreneurship Exercise Family Fitness Founders Future GenAI Gender Equality Google Google Developer Google IO Habits Health HR JavaScript Jobs Jquery Kids Stories Kotlin Language Leadership Learning Lottery Machine Learning Management Messaging Metrics Micro Learning Microservices Microsoft Mobile Mobile App Development Mobile Apps Mobile Web Moving On NPM Open Source Organization Organization Design Pair Programming Paren Parenting Path Performance Platform Platform Thinking Politics Product Design Product Development Productivity Product Management Product Metrics Programming Progress Progressive Enhancement Progressive Web App Project Management Psychology Push Notifications pwa QA Rails React Reactive Remix Remote Working Resilience Ruby on Rails Screentime Self Improvement Service Worker Sharing Economy Shipping Shopify Short Story Silicon Valley Slack Software Software Development Spaced Repetition Speaking Startup Steve Jobs Study Teaching Team Building Tech Tech Ecosystems Technical Writing Technology Tools Transportation TV Series Twitter Typescript Uber UI Unknown User Experience User Testing UX vitals Voice Walmart Web Web Components Web Development Web Extensions Web Frameworks Web Performance Web Platform WWDC Yarn

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Archives

  • January 2023
  • September 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • November 2021
  • August 2021
  • July 2021
  • February 2021
  • January 2021
  • May 2020
  • April 2020
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • April 2019
  • March 2019
  • January 2019
  • October 2018
  • August 2018
  • July 2018
  • May 2018
  • February 2018
  • December 2017
  • November 2017
  • September 2017
  • August 2017
  • July 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012

Search

Subscribe

RSS feed RSS - Posts

The right thing to do, is the right thing to do.

The right thing to do, is the right thing to do.

Dion Almaer

Copyright © 2023 · Log in