Engineering Ideas #7
Tags: complexsystems, microservices, agile, culture
Published: 2020-02-21 18:56:29

---
title: Engineering Ideas #7
published: true
date: 2020-02-21 14:03:08 UTC
tags: complexsystems, microservices, agile, culture
canonical_url: https://engineeringideas.substack.com/p/engineering-ideas-7
---

### [Synthesizing data structure transformations from input-output examples](https://blog.acolyer.org/2020/01/17/synthesizing-data-structure-transformations/)

John Feser, Swarat Chaudhuri, Isil Dillig have created a program synthesizer capable of recreating pretty advanced functional algorithms:

> > We have used λ2 to synthesize a program originally invented by Barron and Strachey. Danvy and Spivey call this program “arrestingly beautiful” and believe it to be “the world’s first functional pearl”.
> 
> The program is required to produce the Cartesian product of a set of lists.
> 
> Barron and Strachey’s pearl to implement this transformation looks like this:
> 
> `cprod xss = foldr f [[]] xss where f xs yss = foldr g [] xs where g x zss = foldr h zss yss where h ys qss = cons(cons(x, ys), qss)`
> 
> Give the examples below,  synthesises exactly this program in ~84 seconds.
> 
> `[] -> [[]][[]] -> [][[], []] -> [][[1,2,3], [5,6]] -> [[1,5],[1,6],[2,5],[2,6],[3,5],[3,6]]`

You may say that this is very far from generating useful real-world programs. But think how long would it take you to write the algorithm above yourself? Is it less than 84 seconds? I think the machine power to apply brute force shouldn’t be discounted. And it’s easy to imagine the above synthesizer could be used to generate small utility functions in real projects.

### [There is no escape from the adaptive universe](https://lorinhochstein.wordpress.com/2020/01/19/there-is-no-escape-from-the-adaptive-universe/)

By Lorin Hochstein

> In his 2018 paper titled [The theory of graceful extensibility: basic rules that govern adaptive systems](https://www.researchgate.net/publication/327427067_The_Theory_of_Graceful_Extensibility_Basic_rules_that_govern_adaptive_systems), Woods describes the two assumptions of the adaptive universe:
> 
> 1. **Resources are always finite.**
> 
> 2. **Change is ongoing.**
> 
> At first glance, the assumptions sound banal. Nobody believes in infinite resources! Nobody believes that things will stop changing! **Yet, when we design our systems, it’s remarkable how often we don’t take these into account.**

### [Monolith First](https://martinfowler.com/bliki/MonolithFirst.html)

A refreshing perspective from Martin Fowler:

> I've noticed a common pattern.
> 
> 1. Almost all the successful microservice stories have started with a monolith that got too big and was broken up
> 
> 2. Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.
> 
> This pattern has led many of my colleagues to argue that  **you shouldn't start a new project with microservices, even if you're sure your application will be big enough to make it worthwhile.**

However, he himself acknowledged back in 2015 that this a very nuanced question and the opposite approach, as to start building a brand new system of microservices, might sometimes be a better alternative. At least, we shouldn’t choose it blindly.

> The counter-argument says that starting with microservices allows you to get used to the rhythm of developing in a microservice environment. It takes a lot, perhaps too much, discipline to build a monolith in a sufficiently modular way that it can be broken down into microservices easily. By starting with microservices you get everyone used to developing in separate small teams from the beginning, and having teams separated by service boundaries makes it much easier to scale up the development effort when you need to. This is especially viable for system replacements where you have a better chance of coming up with stable-enough boundaries early.

### [On Pair Programming](https://martinfowler.com/articles/on-pair-programming.html)

This is a practical overview of pair programming setup, benefits, and challenges by Birgitta Böckeler and Nina Siessegger. What I found most evocative though in this article is the conclusion, which echoes some of the ideas from Daniel Coyle’s [The Culture Code](https://engineeringideas.substack.com/p/the-culture-code-by-daniel-coyle):

> We talked a lot about the benefits of pair programming, but even more about its challenges. Pairing requires a lot of different skills to get it right, and might even influence other processes in the team. So why bother? Is it really worth the hassle?
> 
> For a team to be comfortable with and successful at pair programming, they will have to work on all the skills helpful to overcome its challenges: Concentration and focus, task organisation, time management, communication, giving and receiving feedback, empathy, vulnerability - **and these are actually all skills that help immensely to become a well-functioning, collaborative and effective team. Pairing gives everybody on the team a chance to work on these skills together.**
> 
> Consider this headline from Harvard Business Review: ["Diverse Teams Feel Less Comfortable - and That's Why They Perform Better"](https://hbr.org/2016/09/diverse-teams-feel-less-comfortable-and-thats-why-they-perform-better). The authors are making the point that "Homogeneous teams feel easier - but easy is bad for performance. (...) this idea goes against many people's intuitions".
> 
> In [this talk](https://www.youtube.com/watch?v=S92vVAEofes), Pia Nilsson describes measures her team at Spotify took to get over the uncomfortable friction initially caused by introducing practices like pair programming. Among other things, she mentions feedback culture, non-violent communication, [psychological safety](https://hbr.org/2017/08/high-performing-teams-need-psychological-safety-heres-how-to-create-it), humility, and having a sense of purpose.

### [The core values and practices for building software at ThoughtWorks](https://www.thoughtworks.com/insights/blog/what-are-our-core-values-and-practices-building-software)

Evan Bottcher distils the software design and development strategy to four core values:

- **Fast feedback** : unit tests, CI, pair programming

- **Repeatability** : automation, infra as code, containers, [data immutability](https://medium.com/@maximebeauchemin/functional-data-engineering-a-modern-paradigm-for-batch-data-processing-2327ec32c42a)

- **Simplicity** : software design, TDD

- **Clean code** : design, refactoring, collective code ownership

These principles apply to mobile and web development, backend development, data engineering, and Cloud and Dev Ops alike.

A simple answer to whether to practice TDD or not (or any other XP/Agile practice):

> So what if you don’t use TDD? **Then, I’d be asking what you have in place to ensure your design is simple and you have good, fast feedback.** If you can convince me that the thing you’ve replaced TDD with is working (or that you’ll know when it’s not), then I’ll be happy. Same with pair programming, or any others of our core practices.

### [Don’t Fuck Up the Culture](https://medium.com/@bchesky/dont-fuck-up-the-culture-597cde9ee9d4)

Brian Chesky (CEO of Airbnb) explains what culture is, in essence:

> Culture is simply a shared way of doing something with passion.

And why it is important:

> Why is culture so important to a business? Here is a simple way to frame it. The stronger the culture, the less corporate process a company needs. When the culture is strong, you can trust everyone to do the right thing. **People can be independent and autonomous. They can be entrepreneurial.** And if we have a company that is entrepreneurial in spirit, we will be able to take our next “(wo)man on the moon” leap.

I see parallels here with the idea from Ron Davison’s [The Fourth Economy](http://thefourtheconomy.com/yahoo_site_admin/assets/docs/the_fourth_for_createspace_27_june_12_introductory_section.17875431.pdf) (see [summary](https://taylorpearson.me/the-fourth-economy/) by Taylor Pearson) that one of the drivers of growth in the 21st century will be entrepreneurship.

* * *

You can subscribe to new Engineering Ideas [via RSS](https://engineeringideas.substack.com/feed) (e. g. using [Feedly](https://feedly.com/)) or [e-mail](https://engineeringideas.substack.com/subscribe).