Maths from the Ground UpMaths from the Ground Up - Andrew Harmel-Law
http://andrewharmellaw.github.io
Sat, 12 Nov 2022 18:14:37 +0000Sat, 12 Nov 2022 18:14:37 +000060Chapter 3: A Reassuring Co-Incidence
<figure><figcaption>Image: Wave Particles Physics by Gerd Altmann, Pixbay licence (free to use) on <a href="https://pixabay.com/illustrations/wave-particles-physics-abstract-3488466//">PixBay.com</a></figcaption><img src="/assets/img/wave-3488466_1920.jpg" /></figure>
<p><em>NOTE: This post is part of my extended series on the “Experience of Development”. If you’ve not read the two-part introduction yet, it’s perhaps a good idea to hop over and check out <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">part 1</a> and <a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">part 2</a> before continuing.</em></p>
<p><span class="newthought">I wasn’t sure</span> if my ideas regarding the experience of development would make sense to anyone else. But then I saw a post on twitter from <a href="https://twitter.com/sergeybykov/status/1367696464969797633?s=12">Sergey Bykov</a> and I realised there were at least two of us thinking along similar lines. His tweet was something he said in <a href="https://www.microsoft.com/en-us/research/blog/orleans-simplifies-development-scalable-apps-cloud/">a 2015 Microsoft article</a> (the <em>italics</em> are mine):</p>
<blockquote>
<p>“People tend to equate computer science with mathematics, but I think of programming as more similar to physics,” he explains. “[…] I learned that when you have a problem in physics, first you must understand what pieces are involved, how they connect and how they influence each other. You build a <em>mental model</em> and only then would you try and solve the problem <em>and eventually apply math</em>.</p>
<p>“<em>When you program systems, it’s the same. You identify the pieces involved, how they interact, build a model, and then you apply mathematics and programming. In reality you spend a very small percentage of time writing code and more time figuring out why things don’t work as intended.</em>”</p>
</blockquote>
<p>W.o.w.</p>
<p>It was all there, in microcosm, but still all there. The problem-solution mental model which is constructed using substrate models. Even the conveying of those models to the outside world in the form of code, and the subsequent wrestling with the difference between what you thought would be the result, and what the result turned out to be.</p>
<p>In the article he was quoted in Sergey went on to use this realisation as a jumping off point to argue for simpler cloud programming models. My goal is to take this in a different direction. I want to interrogate further these elements which Sergey and I have both identified and see what more we can learn from them about the act of development and our experience of it. Perhaps this will also lead to improved programming models and languages, libraries and frameworks, but I really want to give we developers a better understanding of what happens to us when we code.</p>
<p><span class="newthought">It was thinking</span> about this specifically human, and consequently personal, aspect which made me pay closer attention to what Sergey described. While all the elements of my conjecture, as well as the supporting concepts, were there, was it all completely relatable?</p>
<p>Well no. And the differences between us are, I think, worth examining. I know this because of the interviews which I did with various friends from the Winter Tech Forum and their personal insights which they shared with me. I learned then that what you might think we would all do in the same way, is in fact a source of great variety.</p>
<p><span class="newthought">The first thing</span> which jumps out from Sergey’s quote is the suggestion (although I could be interpreting it a little literally) of a good deal of up-front mental-model manipulation - what he describes as the selection, connection, and interaction - all prior to his writing any code. I don’t doubt that this is how he does it. People I have interviewed have articulated similar approaches. If I were to describe this way of approaching things I might use verbs such as “construct”, “invent”, “shape” and “create”. It is as if Sergey and his ilk have an intimate knowledge and grasp of their substrate mental models, and from those, carefully combine these consciously and methodically to get to the result they need.</p>
<p>I however go about things in a different way. When I code I always feel as if I am working somewhat in the dark. Verbs I might use for a significant part of my process are “discover”, “find”, “explore”, and “recognise”. My approach to things has more in common with starting with a large lump of clay and then slowly but surely paring pieces away, sub-dividing, cleaving, differentiating, until the detail I need reveals itself.</p>
<p>Now it should be made clear that neither of these is better than the other. Nor am I suggesting that these are the only two types of experience of this aspect, nor that they even comprise the vast majority of the experience of developing code. But I do believe it is very interesting to think about why these differences might arise. Does it spring from how we are most comfortable thinking creatively to make things or solve problems? Does it highlight a more structured versus free-form ways of approaching matters? Might we argue one is more scientific and compositional while the other more sketchy and reducing? Could it indicate a predeliction for verbal or visual thinking? Or linear compared to non-linear thinking? It’s interesting to consider all these possibilities, but not yet, there are other posts for that, and we have another personal difference between myself and Sergey to consider.</p>
<p><span class="newthought">This second difference</span> is in the getting of the mental models into the outside world. Sergey seems to indicate he first thinks in terms that seem completely mental, and then, in a distinctly separate step expresses this by “applying mathematics and programming”. It sounds here as if (and again I could be way off base) the constructed problem-solution model is, for Sergey, truly an abstract one. That is to say, he’s not thinking in the constructs of the language or framework which he is going to use to encode his models outside of his mind. The conveying seems to be both a distinct step, and an act of translation into a specific syntax.</p>
<p>I however, am not so pure, nor so distinct. I still think largely in the constructs of the language which best represents the programming model I am targetting. For example, if I’m writing object-oriented, memory-managed code, there will be a lot of Java constructs and Java libraries swilling around in my mind.</p>
<p>So what do I mean by “not so distinct?” I mean, frequently I will use the act of drafting the code, of working with the syntax itself, on the screen in front of me, to help push along my mental-model manipulations. Sometimes this will be simply to get the fast feedback of the red squiggly lines telling me my conception won’t compile; but other times there is something about seeing the constructs out there on the screen in front of me, with their names and their syntax-highlighted, which gives me a clarity I need to lock something down and move to the next element.</p>
<p>In the first difference I shared what I knew from interviews: many folks think far more like Sergey in that regard and far less like me. Is it the same with this second difference? Of course. And just as before, I am in no way arguing for one way being superior to another, nor for these two approaches being the only ways it is done.</p>
<p>So again, what might these external manifestations of difference lead us to uncover? I believe that my reliance on the syntax more directly, and consequently on much, much tighter loops out of my head and into the IDE, are due to a far fuzzier way of thinking.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">It could also be because I’m just not as good a developer as many others I’ve worked with and spoken to. </span> One thing I do know is that as I code, my mind frequently transitions rapidly from small-scale to large-scale then back again, and this means if I don’t flush my buffers to the outside world regularly I am in danger of losing things - of losing pieces of mental model.</p>
<p>You can see this very clearly when I code. I’m always impressed when people write their functions starting at the top and working their way down to the bottom. I meanwhile jump around, between classes, between functions, between lines in a function. I drop TODOs everywhere when ideas come to me, and consequently the act of tidying my code is frequently an explicitly separate and significant step.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Pairing with me can be quite a labor of love. </span> Does it work for me? Yes, it seems to. Does it work for everyone? Definitely not.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I’ve had feedback on just this specific point. </span></p>
<p><span class="newthought">Having looked a little</span> at the two differences, what is <em>most</em> striking however is the similarity between Sergey’s “figuring out why things don’t work as intended” and <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">my conjecture</a> that the <em>experience</em> of this surprise is where much (though not all) of the emotion experienced in development comes from. How so? It doesn’t seem very significant when expressed how Sergey puts it does it.</p>
<p>Well, what is exciting to me, is that despite the <em>significant</em> differences in thinking and coding styles which I believe exist between Sergey and I (and backed up by experiences I’ve had with others) Sergey still thinks this mismatch aspect worthy to be called out. In fact, it’s so important that it justifies his proposal for a new approach to cloud-computing models. If someone who relies on syntax and code and the external loop as little as Sergey thinks the mis-match is important, then thats good enough for me.</p>
<p>That’s it for this post. I’m going to keep sharing these musings, and hopefully also begin to bring in some specific case-studies of how development is experienced by specific individuals. In the meantime I’d love to know what you think. If you have any thoughts or any other kind of feedback please leave a comment below, or reach out to me on <a href="https://twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/xp-of-dev/2021/04/13/the-experience-of-development-a-reassuring-co-incidence
http://andrewharmellaw.github.io/xp-of-dev/2021/04/13/the-experience-of-development-a-reassuring-co-incidenceTue, 13 Apr 2021 00:00:00 +0100Implications of the Silicon Valley Autonomous-Engineer Model
<figure><figcaption>Image: San Francisco Skyline, Public Domain, on <a href="https://www.piqsels.com/en/public-domain-photo-oinok">Piqsels.com</a></figcaption><img src="/assets/img/san-fran.jpg" /></figure>
<p><span class="newthought">In my previous post </span> I suggested a new way of looking at (and therefore comparing) organisations: <a href="/organisation/2021/03/27/the-organisation-as-collection-of-services">considering them as a collection of services</a> which they offer their members, and then looking at how each of those was delivered.</p>
<p>In the back-and-forth on twitter which followed, <a href="https://twitter.com/YellowBrickC">Krisztina</a> <a href="https://twitter.com/YellowBrickC/status/1378789326109212676">suggested </a>I have a look at a blog post on <a href="https://blog.pragmaticengineer.com/what-silicon-valley-gets-right-on-software-engineers/">how Silicon Valley-like companies “get” software engineers, while others don’t</a>. After a quick read, it seemed like a great opportunity to try out my approach. This post is the result.</p>
<p>Written by <a href="https://blog.pragmaticengineer.com">Gergely Orosz</a>, the main argument of the post is that the way Silicon Valley companies organise results in faster innovation at a company level, better professional growth for engineers, and more bang for their salary-buck. It’s well written and well-argued. From his biography it is clear Gergely has extensive experience working for multiple SV-type companies and I see no reason to doubt the accuracy of his conclusions on how they operate.</p>
<p>Gergely structures things by listing seven things which makes them realise these benefits. I’ll follow the same structure, tackling each in turn.</p>
<p><span class="newthought">First up is autonomy</span> . This is autonomy to select what to work on, autonomy to subdivide that work, and autonomy to decide how to tackle it. There is also autonomy as to how much time to invest in a given task (e.g. paying down tech debt or delivering new features). Unsurprisingly there is little / no micro-management. Engineers are self-managing.</p>
<p>Looking back at <a href="/organisation/2021/03/27/the-organisation-as-collection-of-services">the services I’ve identified</a>, which ones are at play here? We clearly have <strong>skill/resource allocation</strong> - this service is being performed <em>for</em> the engineers, <em>by</em> the engineers. It also seems as if <strong>decisions</strong> are happening (e.g. “should we pay this debt, or work on a new feature?”) and again, this is done by and for the engineers individually, or perhaps in teams. The post is generally individual-centric, but not exclusively.</p>
<p>Reading on a little we can also spot <strong>(long term) direction</strong> with the call to “solve problems that the business has” (how we know what these problems are is partially addressed later).</p>
<p><span class="newthought">In section two </span> we get our first explicit comparison with non-SV/traditional companies. Banks being mentioned specifically. Here we see how hierarchy is the solution in traditional companies for the services we have seen delivered by autonomous individuals (and potentially autonomous teams) in SV-co’s. In traditional companies <strong>decisions</strong> are taken higher up, by managers. No <strong>decisions</strong> are taken by developers<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I’d argue that there are, given that development is <em>all</em> design decisions, but I get the author’s drift here. </span>. I too have seen structures like this where <strong>decisions</strong> required lower down the hierarchy had to be packaged and sent up the line to the appropriate echelon, where a <strong>decision</strong> would be taken, and passed back down again to be implemented, most likely to a specific team which had (at least theoretically) the appropriate <strong>skills/resources to allocate</strong>.</p>
<p>This is compared (still interestingly using a pyramid-graphic) with the SV-co doing <strong>decisions</strong> at the bottom level, but taking into account “business context” which is passed down to them from higher up. That makes more sense. It could be argued that this “business context” is the <strong>(long term) direction</strong> which we could see was acted on above, but were unsure where it came from. This might also be input into the <strong>decisions</strong>.</p>
<p>We then move on to the next critique of non-SV/traditional companies: the problems around <strong>skill/resource allocation</strong> which arise from the fact that software engineers are expensive and need to be constantly fed with work. I have little argument with this diagnosis, and it’s interesting to see here the introduction of another key service (called out here as a skill that’s explicitly hired for) and that’s <strong>communication</strong>. In SV-co’s, where work is not being spoon-fed to engineers, and where engineers are expected to have an impact worthy of their salary, they have to ensure that they have the information they need to maximise this. I’ve met many engineers where this was clearly a skill of theirs, and (until the global pandemic) it was one of the articulated reasons Netflix didn’t open another development office - the impact of cross-site working on engineer-to-engineer <strong>communications</strong> was deemed to be too high to bear.</p>
<p>In the examples which follow, another service can be discerned in phrases such as “have we checked with the legal team?” and also “if we combined project X and project Y” and again “can we delay the project by a month, until the new infra is ready, to avoid double work”; this service is <strong>co-ordination</strong>. Clearly, if this information is not acted on, then it is only <strong>communication</strong>, but we can assume it is, and that <strong>co-ordination</strong> results.</p>
<p><span class="newthought">In section three </span> we get lots more information which could all be labelled “<strong>communication</strong>”. Compared to the non-SV/traditional co’s we are to believe there is a lot. It is interesting to note that one older SV-co, Apple, does not have such a transparent approach. It is also worth pondering if this is all the information, if it is <em>truly</em> open, or if there is an element of selection and boosting happening.</p>
<p><span class="newthought">Section four </span> introduces aspects which again touch on services we have already mentioned; namely <strong>(long-term) direction</strong>, <strong>communication</strong> and <strong>co-ordination</strong>. While it’s undoubtedly the case that these interactions and guidance-seeking do happen far more in SV-style co’s, I can’t help wondering if some of this is down to size, and location. I have known many people at non-SV/traditional places gain very similar insights and inputs but via un-official routes: meeting up after work, chatting in the canteen, etc.</p>
<p><span class="newthought">Section five </span> continues this theme for me. I’ve rarely witnessed the “up and over” style of <strong>communication</strong> being mandated, but it is true that when you do see peer-to-peer, probably cross-team <strong>communications</strong> and <strong>co-ordination</strong> it will be less frequent, more ad-hoc, and not relied upon as a definitive means of collaboration.</p>
<p>Gergely does have a point here about the hierarchy’s role in <strong>communication</strong> however. One problem I see again and again is that hierarchies typically <strong>communicate</strong> <em>down</em> relatively efficiently, but are terrible at facilitating <strong>communication</strong> <em>upwards</em>. He is also right that peer-to-peer <strong>communication</strong> is faster, and higher-bandwidth. But is frequently also has the blessing / curse (select those which apply) of being un-targetted and unfiltered, leading to information overload. I agree here that managers can play a role in mitigating these issues by facilitating the right conversations. This sentence adds nuance to the predominant view in his post that “engineers just talk directly to other engineers” and gives the hierarchy some residual role in <strong>comms</strong>. It’s also worth pointing out that it’s refreshing to see a post which argues for increased autonomy but <em>without</em> assuming that means the end of hierarchy. I’m agnostic about it, but it does show a degree of independent thought and nuanced consideration.</p>
<p><span class="newthought">Skipping section six </span> as it’s not relevant to this view, we arrive at the seventh. This is all about <strong>recognition</strong>, another of the services, although viewed through the lens of attraction of talent and the salaries they are paid. It could be argued that this is the section which closed the argument and is intended to justify the vast salaries devs can command. I’m not sure this section really lives up to that promise however. Admittedly, many SV-style co’s have infrastructure (discussed in section six which I intentionally skipped) to optimise the delivery lead time of developers features, but I’m not sure every SV-style co is jam-packed with devs delivering features of the calibre suggested, all day, every day. I also know that for many, the salaries can be a major source of stress when things aren’t working, and when a company is <em>solely</em> structured to provide <strong>recognition</strong> along these lines, many other things fall by the wayside, leading eventually to many products which are definitively a “success” but also of questionable social good. The “like” button mentioned in the article could be argued to fit this profile <a href="https://www.netflix.com/title/81254224">for example</a>.</p>
<p><span class="newthought">Given all this </span> , I have little issue with the underlying argument of the closing paragraphs (although I do take issue with the characterisation of devs in non-SV co’s as “factory workers” as much as I do the “10x engineer” trope). <a href="https://www.wsj.com/articles/SB10001424053111903480904576512250915629460">Software is indeed eating the world</a>, and those companies which see software as delivering value, rather than as a cost centre are storing up trouble for themselves. I do find it hard to believe however that these SV-co’s are comprised soley of devs and “managers”. Now, admittedly I haven’t looked at job postings recently, but I’m pretty certain there will be many other folks playing roles <em>directly related</em> to delivery of software not mentioned here. This tunnel-vision severely undermines the argument of this article in my mind, because by placing all the credit in the hands of a blessed few it makes you wonder about what’s missing.</p>
<p><span class="newthought">That thought </span> is what takes me onto other issues which arise from this incomplete view. What about the other services which the author doesn’t choose to mention? Namely, <strong>constitution</strong>, <strong>conflict management</strong>, and <strong>learning</strong>. I can take a guess at the latter. In many SV-co’s they hire devs who are deemed “senior” and beyond, so a majority of the fundamental learning has been achieved earlier in their career. What further learning does take place is typically “on the job”. (Netflix define their approach to this in their <a href="https://www.slideshare.net/kevibak/netflix-culture-deck-77978007">Culture deck (slides 119 and 121)</a>. I won’t go into this any further as the other two are far more important.</p>
<p>Now, Netflix are clearer on these also, most notably in their calling out their intolerance for “brilliant jerks”, but they are singularly notable for taking this standpoint. Elsewhere in SV-co’s there is frequently an ad-hoc, or worse still, lip-service approach taken to these <em>essential</em> elements. <a href="https://www.susanjfowler.com/whistleblower">Susan Fowler’s Whistleblower</a> goes into these topics in great detail, specifically in the case of Uber, which is one place the author has also previously worked. What Fowler calls out in her book is that not only were these aspects terribly implemented, they were set up in a way to protect the company, and those working there who were senior / had greater tenure / were cis, white, hetrosexual men, all at the expense of the individual. Subsequent events at the company have shown that what had grown up was in many ways a monoculture. Undeniably, the engineering was world-class. The products shipped helped Uber become one of the largest and most valuable companies in the world. The goals outlined in Gergely’s post were achieved. But at what cost? After writing this post, I’m more convinced that <em>all</em> services are provided by all organisations, but it is important to get them all right, not just the ones which seem to be directly making the company money.</p>
<p><span class="newthought">Well</span> , that’s my first end-to-end deployment of this lens on organisations. It was interesting to write, and helped me think about things in a methodical way. It also <em>felt</em> as if it made sense, allowing me to pull apart a few concepts into their constituent parts, and see some parts in light of others. But that’s just me. I’d love to know what you think. If you have any thoughts or any other kind of feedback please leave a comment below or alternatively reach out to me on <a href="https://twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/organisation/2021/04/07/org-as-services-article-crit
http://andrewharmellaw.github.io/organisation/2021/04/07/org-as-services-article-critWed, 07 Apr 2021 00:00:00 +0100Chapter 2: On Bit Depths and Fine Wines
<figure><figcaption>Image: Wine Glass by OnyxCambridge, Pixbay licence (free to use) on <a href="https://pixabay.com/photos/wine-glass-red-glass-of-wine-drink-2807553/">PixBay.com</a></figcaption><img src="/assets/img/wine-2807553_1920.jpg" /></figure>
<p><em>NOTE: This post is part of my extended series on the “Experience of Development”. If you’ve not read the two-part introduction yet, it’s perhaps a good idea to hop over and check out <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">part 1</a> and <a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">part 2</a> before continuing.</em></p>
<p><span class="newthought">There were some </span> great sessions at JavaOne 2008. Among the stand-outs for me were Josh Bloch and Neal Gafter’s <a href="http://www.javapuzzlers.com/">Java Puzzlers</a> (returning for the umpteenth time) and <a href="https://en.wikipedia.org/wiki/Kathy_Sierra">Kathy Sierra</a>’s talk about reverse engineering passionate users<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">You’ll need to rely on my memory for the contents of Kathy’s amazing talk because <a href="https://en.wikipedia.org/wiki/Kathy_Sierra#Harassment_and_withdrawal_from_online_life">some people are horriffic jerks</a> and that means the rest of us can’t hear from people like Kathy any more, despite the fact they’re awesome. </span>.</p>
<p>What struck me at the time about Kathy’s session was how she had no words on her slides. None. At. All.</p>
<p>What’s stuck with me far longer was her use of the concept of “bit depth”, which wasn’t the traditional technical one you’re probably thinking about. Kathy used it to differentiate the kinds of users of a given service or piece of software. The argument of her talk was to zone-in on one particular kind of user; the power users, and reverse engineer your system from what they would think were excellent features backed by a solid and coherent system model.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I believe this was perhaps an early version of her Badass Users book because reading <a href="http://seriouspony.com/badass-users-the-book">her site</a> now, a bunch of things definitely resonate. </span></p>
<p>She described these peeps as “high bit-depth users”. To explain this she explained how she understood wine. She had a low bit depth appreciation she said<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Apologies Kathy if I’ve got this the wrong way round </span>. That is to say, she could tell red wine apart from white wine, but that was it. Others had a higher bit depth, and the higher their bit depth, the deeper and richer their concepts of wine were. The greater their awareness of things like grape varieties, the wine-making process, the regions wine came from and the influence of ‘terrior’, as well as their knowledge and their sensitivities to subtle cues and differences. Consequently, their enjoyment was more subtle and nuanced too. Whereas for a low bit-depth drinker wine might be “good” or “bad”, for a higher it depth aficionado might be “forward on the nose” with “good legs” but still “not quite as good as the previous vintage”<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Can you guess which end of the field I’m placed at yet? A little Google is a wonderful thing. </span>.</p>
<p><span class="newthought">So what about </span> <a href="https://en.wikipedia.org/wiki/Joshua_Bloch">Josh</a> and <a href="http://www.gafter.com/~neal/">Neal</a>? Well, if you’ve not familiar with their regular sessions (and <a href="https://www.goodreads.com/book/show/127931.Java_Puzzlers">accompanying book</a>) let me fill you in. Both Josh and Neal had worked on key core aspects of Java. On top of this, Josh had also written (and frequently updated) the classic “<a href="https://www.goodreads.com/book/show/34927404-effective-java">Effective Java</a>” while Neal worked on Google Calendar and led the <a href="https://cr.openjdk.java.net/~dlsmith/jsr335/jsr335-0.6.2/index.html">Java lambda specification</a> team. This meant both of them were ideally placed to host an annual session where they posed a series of questions to the assembled audience which largely ran along the lines of “given this code, what would you expect the output to be?”</p>
<p>The reason they did this was to illuminate some of the darker, more subtle, and (some would argue) less obvious areas of the Java language and core libraries. It was intended to educate, but it was also terribly good fun.</p>
<p>And, just like Kathy’s talk, years later it’s come to strike a new resonance in me.</p>
<p>Now, in light of my theory of what makes up “<a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">the experience of development</a>” I think they were actively working to improve the bit depth of those attending their session. They weren’t just presenting facts. They’d explain why, draw out differences between Java versions, give a bit of history, and explain idioms which had come and gone, frequently as a result of things which were hard (or easy) in the Java development world at the time.</p>
<p>In expanding the Java dev bit-depth of those present, they were expanding the <a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">substrate mental models</a> of those in the audience. Sometimes it was as low-level as how fundamentals such as primitives worked. Other times we moved up a little to syntactic sugar behind various bits of syntax. Other times still it was about the internals of various collections libraries, and other still attempted to help people grokk that great darkness which is <a href="https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)">co/contra-variance</a>.</p>
<p><span class="newthought">With this all </span> in mind, let’s loop back to Kathy. As bit-depths increase, mastery does too. That in itself must surely bring additional elements to the experience of development. To have more detailed and nuanced substrate mental models must surely make them easier to work with, purely due to the ability it gives us to pick elements which do what we need more quickly, and consequently have fewer instances of surprise (especially puzzler-level surprises which in the many-sharp-edged world of Java can be real head-scratchers)<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I’ve even seen the pass-by-reference vs pass-by-value issue confound really solid devs for example. </span>.</p>
<p>But there’s something else which arises from greater bit-depth and it’s something which has a direct impact on <em>enjoyment</em>. I’ve seen this with wine, with golf, and with programming. The more expert a person becomes, the less they can like certain things unless <em>absolutely everything is perfect</em>. Wine experts are far less able to just enjoy a glass of “really nice plonk” as some call pretty good wine, because a few subtle elements - which those with a lower bit-depth experience don’t even register - to connoisseurs are glaring issues. Terrible golfers (me) are happy to have hit a few decent shots in a round of eighteen disastrous holes, while I’ve seen a friend who played off a single-figure handicap have a bad week after they shot a double-bogey on a single hole<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">They still won. That didn’t seem to matter. </span>.</p>
<p><span class="newthought">The same goes </span> for many high-bit-depth aficionados of programming languages. I’ve frequently seen them pick languages which are more “pure” and balk at having to sacrifice this purity in the name of getting things done, which generally means using a library or framework which does what they need, but which also forces them to do things in a style they feel is not their favourite.</p>
<p>I’m not saying this is bad. (I’d <em>love</em> to be that great at any language.) What I’m saying is, low bit-depth understandings of languages is almost always something which we will be motivated to improve on, for all but the languages (and frameworks / libraries) which we almost never touch. The higher levels of bit depth however, while they almost inevitably bring far greater knowledge and mastery of a language, can also frequently bring a reduced enjoyment of use, and perhaps even reduced effectiveness, when purity is not sacrificed sufficiently on the altar of pragmatism. (It can also lead in some cases to code which is nebulous and impenetrable to the average dev who isn’t at the same level of mastery. But that’s straying into the realms of the experience of developing with others which is a who other set of posts.)</p>
<p>That’s it for this post. I’m going to keep sharing these musings, and hopefully also begin to bring in some specific case-studies of how development is experienced by specific individuals. My next post begins this journey by <a href="/xp-of-dev/2021/04/13/the-experience-of-development-a-reassuring-co-incidence">attempting to do this from a personal perspective</a> (and perhaps even finds a supporter). In the meantime I’d love to know what you think. If you have any thoughts or any other kind of feedback please leave a comment below, or reach out to me on <a href="https://twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/xp-of-dev/2021/04/03/the-experience-of-development-bit-depths-and-fine-wines
http://andrewharmellaw.github.io/xp-of-dev/2021/04/03/the-experience-of-development-bit-depths-and-fine-winesSat, 03 Apr 2021 00:00:00 +0100Your Organisation Viewed as a Collection of Capabilities
<figure><figcaption>Image: Deadman Ranch Ancient Buildings, Public Domain on <a href="https://snappygoat.com/free-public-domain-images-deadman_ranch_ancient_buildings_37">SnappyGoat.com</a></figcaption><img src="/assets/img/deadman-ranch-ancient-buildings-223774.jpg" /></figure>
<p>(This post is second in a series. Part one, “<a href="/organisation/2021/03/26/is-your-organisation-broken">Is Your Organisation Broken?</a>” sets the scene for this post’s proposal of a new way to look at organisations.)</p>
<p><strong>UPDATE (Sat, 22nd January, 2022)</strong> - Changed “service” to “capability” and added another: “Org Design” to the table.
<strong>UPDATE (Sat, 29th May, 2021)</strong> - Added another service: “Membership” to the table.</p>
<p><span class="newthought">I’ve wondered for a long time </span> if there’s value in looking at <em>all</em> organisations through a lens which treats employees as consumers of capabilities the organisation provides, and then asks “how does the way you organise provide these capabilities?”</p>
<p>This might seem a bit meta, so here’s two examples. The multinational conglomerate Acme Corp follows a “traditional” model of organisations in that it is hierarchical, and bureaucratic. This model offers capabilities such as “work allocation” and “decision making” and in both cases (at least officially) these capabilities are provided via a “performed by a named individual at the appropriate level of management who follows a documented process” approach.</p>
<p>Meanwhile the small startup Mom & Pop Soda Shop Inc follows a “trust” model in that anyone is expected to spot things which need to be done, and are permitted to do them. This model comprises the same capabilities (“work allocation” and “decision making”) but here both are provided via a “all employees are empowered to do the right thing ad hoc and whenever required” mechanism.</p>
<p>How different organisations provide these “internal” capabilities will clearly vary greatly, but I think (bear with me) that <em>there is a finite set of capabilities that all organisations provide</em> purely by dint of their being an organisation. Sometimes an organisation will provide one or more of these capabilities explicitly, and other times it will provide some of them implicitly (or even by accident). Furthermore, some capabilities will be provided officially, and others unofficially. Sometimes both types will be at play at once, one most likely working more efficiently than another.</p>
<p>Finally, please note that this breakdown says nothing about the quality or fit of any of the capability implementations in a given organisation. The capabilities as delivered might be terrible, or they might be excellent. They might conflict with or contradict one another.</p>
<p>With this in mind we can get to the capabilities themselves. I am no org-design expert (I’ve just read a lot, and consulted in a lot of places, and like to nerd-out and find how other folks organisations work) but I <em>hope</em> that the items on this list are both collectively exhaustive and mutually exclusive. Finally I’ve tried to put them in order of importance. It is likely that in <em>all</em> organisations the first two capabilities are explicit. Only in larger organisations might later / all other capabilities be so.</p>
<p>I’ve tried to use a representative way of representing this which names the capability, gives the need it meets, the outcome it provides, and the value it delivers.<br /><br /></p>
<table>
<thead>
<tr>
<th style="text-align: left"><strong>Capability</strong></th>
<th style="text-align: left"><strong>Need</strong></th>
<th style="text-align: left"><strong>Outcome</strong></th>
<th style="text-align: left"><strong>Value</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><strong>Membership</strong></td>
<td style="text-align: left">Who is part of (and who isn’t part of) the organisation</td>
<td style="text-align: left">Members are sought, join and leave</td>
<td style="text-align: left">The right people are involved in the organisation.</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Skill / resource allocation</strong></td>
<td style="text-align: left"><br />Right people with the right tasks and required resources to perform them</td>
<td style="text-align: left"><br />Tasks and resources allocated.<br />Tasks performed</td>
<td style="text-align: left"><br />Quality outputs.<br />Personal sense of purpose<br />Accountability</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Communication</strong></td>
<td style="text-align: left"><br />Timely and accurate information required to perform a task</td>
<td style="text-align: left"><br />Information at the right place at the right time</td>
<td style="text-align: left"><br />Efficient and productive organisation</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>(Long term) direction</strong></td>
<td style="text-align: left"><br />Strategy/vision/mission/goals based on sensing world outside the organisation</td>
<td style="text-align: left"><br />Alignment and focus of effort (decision criteria)</td>
<td style="text-align: left"><br />Organisational purpose</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Decisions</strong></td>
<td style="text-align: left"><br />Good decisions made efficiently and effectively</td>
<td style="text-align: left"><br />Timely decisions rapidly made</td>
<td style="text-align: left"><br />Progress aligned with direction.<br />Efficient use of people’s efforts</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Co-ordination</strong></td>
<td style="text-align: left"><br />Groups of people (and resources) doing the right thing at the right time.<br />Keep in sync with others</td>
<td style="text-align: left"><br />Co-ordinated activities and allocation of resources</td>
<td style="text-align: left"><br />Reduction in waiting / blocking</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Constitution</strong></td>
<td style="text-align: left"><br />Clarity on what the organisation values and what it will (and won’t) tolerate</td>
<td style="text-align: left"><br />No “rogue” (i.e. contrary to the constitution) elements</td>
<td style="text-align: left"><br />Clear checks and balances</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Recognition</strong></td>
<td style="text-align: left"><br />Recognition for my skills and contribution (my value to the organisation)</td>
<td style="text-align: left"><br />Salary, job title, etc.</td>
<td style="text-align: left"><br />Sense of self-worth</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Conflict management</strong></td>
<td style="text-align: left"><br />People held to account for their actions (or lack of them)</td>
<td style="text-align: left"><br />Alignment to “rules of the game” and social norms.<br />Conflict resolution</td>
<td style="text-align: left"><br />Increased collaboration.<br />Predictability.<br />More efficient delivery of organisational goals</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Learning</strong></td>
<td style="text-align: left"><br />Personal development, additional / improved skills</td>
<td style="text-align: left"><br />Better skills available within the organisation<br />Feeling of personal satisfaction</td>
<td style="text-align: left"><br />Greater organisational productivity. Increased loyalty to the organisation</td>
</tr>
<tr>
<td style="text-align: left"><br /><strong>Org design</strong></td>
<td style="text-align: left"><br />Skills and insights in the membership deployed effectivel and efficiently</td>
<td style="text-align: left"><br />Org achieves its goals as closely as possible</td>
<td style="text-align: left"><br />Org structure is an enabler / multipler</td>
</tr>
</tbody>
</table>
<p><br /></p>
<p>That’s it for now. In my following posts I want to look at various organisations and organisational styles and see how these capabilities might map onto them. The next one takes these capabilities as a lens and <a href="/organisation/2021/04/07/org-as-services-article-crit">looks at a descripton of the “Silicon Valley Autonomous-Engineer Model” with all its pros and cons</a>.</p>
<!--Joe Schrag: It might be interesting to think around which are directly important to the members and which are a byproduct of the org. For example, for the individual, the need for community is huge, especially with shared purpose. To need others and to be needed. To be a contributor to the tribe. Seems like that could be 1 + 6 (skills + constitution). On the other hand, I would argue 5 (coordination) is not directly as important to the individual, but needed in an org.
It might be helpful to think of them in a hierarchy as well. A lot in common here with Maslow’s hierarchy.
Perhaps also worth noting that specific versions of some of these needs can lead to less desirable results. The one the comes to mind is conquest (perhaps part of 3). Some individuals have a need for it, and many orgs prioritize it. -->
http://andrewharmellaw.github.io/organisation/2021/03/27/the-organisation-as-collection-of-services
http://andrewharmellaw.github.io/organisation/2021/03/27/the-organisation-as-collection-of-servicesSat, 27 Mar 2021 00:00:00 +0000Is Your Organisation Broken?
<figure><figcaption>Image: Joos de Momper the Younger, CC BY-SA 3.0 via Wikimedia Commons <a href="https://commons.wikimedia.org/wiki/File:Joos_De_Momper_-_La_tour_de_Babel.JPG">Wikipedia</a></figcaption><img src="/assets/img/640px-Joos_De_Momper_-_La_tour_de_Babel.JPG" /></figure>
<h2 id="organisations-are-tools">Organisations are tools</h2>
<div class="epigraph"><blockquote><p>[An] organisation [...] is a tool for making people productive in working together.</p><footer>Peter Drucker, <cite>"Management’s New Paradigms” from “Management Challenges for the 21st Century” (1999)</cite></footer></blockquote></div>
<p><span class="newthought">The vast majority </span> of our organisations are broken, and they are broken because they have the wrong structure and function for the job.</p>
<p>Those which have, by some stroke of luck, both the right structure and function, will fail to change at the required time, and will end up with the wrong structure and function, and will therefore end up broken.</p>
<p>Even those which do change, and change when required, will change in the wrong way, and end up with the wrong structure and function; and will consequently become broken.</p>
<h2 id="our-organisations-are-wasteful">Our organisations are wasteful</h2>
<p>Why do I say “broken”? Surely this is too bold a claim? Is it too strong a statement? Are they not simply poorly-suited or ill-used? I would argue not.</p>
<p>Why do the organisations we work for (by investing our time and more) exist? Surely it is to produce things - either products or services - which have value to users, and then (if they are a commercial enterprise) to capture some of that value back in the form of revenue. And yet, to adapt <a href="https://channels.theinnovationenterprise.com/articles/weeks-of-coding-can-save-hours-of-planning">John Yorke</a>:</p>
<blockquote>
<p>“[these products and services] have no value until they are in the hands of a user and being used for a productive effort. So any activity not spent getting the next most valuable feature into the hands of a user quickly is just waste”</p>
</blockquote>
<p>Can any of us read this and honestly answer that they are not engaged in their work, day upon day, in the creation of a significant amount of waste? By “significant waste” I mean not simply waste due to slight inefficiencies; inefficiencies which, as by the sharpening of a blade or employment of a slightly different stance, can be smoothed away by kaizen-style small and targeted improvement. No, our waste is far, far grosser. It is the waste of producing things which have no definite value, and of working with and performing entire job roles, of complete departments, who cannot claim to be contributing to the organisation’s goal.</p>
<p>“Do you mean supporting roles?’ you challenge. “Not everyone is engaged in the daily task of making the next widget, and yet without my hiring / managing / planning / etc., the widget-making would itself be terribly inefficient, if not impossible. Your declaration is due to a misapprehension; an over-reduction of the complexities of modern business, and the ways in which they have evolved to efficiently operate.”</p>
<p>To which I would reply, “Are you so sure? Do you have ways to measure your impact? How can you be so sure that your efforts, both indirectly and directly related to production of your organisation are contributing?”</p>
<p>And then you might counter, “Just because there are no metrics” (for there are never any metrics) “does not mean we are not successful in our actions.”</p>
<p>And to this I would reply “In which case you must surely all be able to state your common goal, for if you at least know this then you are assured in being aligned and confident that you are all pulling together.”</p>
<p>And at this point inevitably, besides repeating the meaningless platitudes that these days take the place of real vision and strategy, there is silence; because these circumstances are the case everywhere, and if, by some miracle they are not at present, they will be soon enough, for the reasons I set out at the beginning.</p>
<h2 id="the-wasted-potential-of-people">The wasted potential of people</h2>
<p>This waste that we are all engaged in has a name. It is the worst waste of Lean; <a href="https://theleanway.net/The-8-Wastes-of-Lean">the wasted potential of people</a>.</p>
<p>But it is worse than this. Not only are our organisations wasteful, but also this waste is not what we (myself included) want. We want to contribute. We do not wish to be engaged in the generation of this waste, and yet if we are honest we know we are to a painfully significant degree.</p>
<p>Why is it so prevalent? It is because, as I have illustrated, despite all of our best endeavors, it is the structure and function of the organisations in which we work which prevents us from succeeding. If the means to resolve these issues were in the hands of the individuals who suffer from them, then there would not be such a magnitude of this kind of waste.</p>
<p>This is the reason why I can confidently state that our organisations are broken; because we all know it; because we see and feel it every single day.</p>
<h2 id="should-bad-strategy-not-take-the-blame">Should bad strategy not take the blame?</h2>
<p>Yet, if not already depressed by this dialogue, some fight on, raising the challenge “surely a great deal of these failures are strategic and not organisational; due to poor focus - or if we’re being kind - lack of clarity?”</p>
<p>But if this were the case, Simon Wardley would not have had to talk so directly and repeatedly to organisational matters in his <a href="https://medium.com/wardleymaps/doctrine-8bb0015688e5">key doctrines</a>. I am thinking here of the following (and would at encourage the challenger to take a look at them in detail) “be transparent”, “remove bias and duplication”, “optimise flow”, “think small”, “distribute power and decision-making”, “provide mastery, purpose and autonomy”, “there is no one culture” and “design for constant evolution”.</p>
<p>And here we must acknowledge the assistance that the respondent has given us by their challenge. Why is there so much on organisation, both structure and function, in the Wardley method? It is there because the problem of organisation echoes very closely the problem Simon Wardley identified regarding strategy; viz organisations and those who run them have no idea what structure and function they should cultivate. And just as with strategy, leaders are terrified of admitting this, and so blindly copy others, and make incredibly costly mistakes.</p>
<p>But it is worse - at least in strategy there are many different options to copy from, and this flailing around at least provides for some diversity of sport for Wardley as he discusses his approach. Meanwhile, in western organisations there is only one structure, and one set of functions, and what that structure and those functions are is where we shall turn next.</p>
<h2 id="a-potted-history-of-the-one-right-organisation">A potted history of the “One Right Organisation”</h2>
<p>All organisations are fundamentally the same structure, and operate the same functions. It need not be this way; but it is.</p>
<p>Let us consider how we got here. Why are organisations always the same in these regards? Astonishingly there are few who, if challenged on the street to extemporise on why organisations have developed into their current form and function, could articulate even part of an answer. This is despite the fact already mentioned that there is so little diversity, and that “organisation” of our kind is a relatively recent phenomenon.</p>
<p>We must turn to the great management thinker, Peter Drucker for a potted history. Firstly, the origins, and with them the hierarchy, and idea of a means of communication:</p>
<blockquote>
<p>“Back in 1870, […] large enterprises were first beginning to take shape. At that time, the only large permanent organisation around was the army. Not surprisingly, therefore, it’s command-and-control structure became the model for the men who were putting together transcontinental railroads, steel mills, modern banks, and department stores. The command model, with a very few at the top giving orders and a great many at the bottom obeying them remained the norm for nearly one hundred years.”
<br /><br />Peter Drucker, from “Management as Social Function and Liberal Art” in “The New Realities” (1988)</p>
</blockquote>
<p>Then came the subdivision into departments and beyond that into specialisation of individual roles:</p>
<blockquote>
<p>“By World War I the standard functions of a manufacturer had been developed: research and engineering, manufacturing, sales, finance, and accounting, and a little later, human resources (or personnel). During World War I, large numbers of unskilled, pre-industrial people had to be made productive workers in practically no time. To meet this need, businesses in the United States and the United Kingdom began to apply the theory of scientific management developed by Frederick W. Tayor. […] They analysed tasks, and broke them down into individual, unskilled operations that could be learned quite quickly”
<br /><br />Peter Drucker, ibid</p>
</blockquote>
<p>To many, myself included, this history is a revelation. That it rings true is important, but more significant is the lack of general awareness as to the ubiquity of this single model, or of the why. Surely these facts in themselves go a great way to explaining why so many competent, skilled, and motivated people persist in working with the structures and functions in which they find themselves, and with their every action, reinforce the status quo. For when there is only one, the natural assumption is that it must be “right” and the “only way” and so the best way to get on is to “work with the system”. Within this world, who has the chance to examine the system itself, and perchance entertain the possibility that it is, in fact, only one of many possibilities.</p>
<h2 id="beyond-one-right-organisation">Beyond “One Right Organisation”</h2>
<p>This is not a recently identified problem. Drucker sounded the alarm on the issue way back in 1999 (emphasis is the authors):</p>
<blockquote>
<p>“From the very beginning more than a century ago, the study of organisation has rested on one assumption: There is–or there must be–one right organisation. What is presented as the ‘one right organisation’ has changed more than once. But the search […] has continued, and continues today. ”
<br /><br />Peter Drucker, “Management Challenges for the 21st Century” (1999)</p>
</blockquote>
<p>He continued, in terms which still form a stinging accusation:</p>
<blockquote>
<p>“Immediately after World War I [… there] developed the principle of decentralisation. And now, in the last few years, we have come to tout the team as the one right organisation for pretty much everything.”
<br /><br />Peter Drucker, ibid</p>
</blockquote>
<p>But If our organisations are failing us, and they are all the same, what is the solution? Drucker concludes, and here gives us hope:</p>
<blockquote>
<p>“There is no such thing as the one right organisation […] It has become clear that organisation is not an absolute. It is a tool for making people productive in working together.”
<br /><br />Peter Drucker, ibid</p>
</blockquote>
<h2 id="what-are-the-alternatives">What are the alternatives?</h2>
<p>So we see that the situation is not as bleak as it may seem, and there are other reasons for growing optimism.</p>
<p>For one, the notion of organisational change is nowadays a commonly accepted, if always misapplied one, if for no other reason than <a href="https://a16z.com/2011/08/20/why-software-is-eating-the-world/">software is continuing to eat the world</a>. Secondly, the concept of “Organisational design” has, of late, become a buzzword, signaling that the concept has reached a point where in-depth consideration and investigation is likely possible. Thirdly, the continued successes of the lean movement - which bears with it a new product-focus - coupled with the dominance of DevOps in all things software-delivery - underpinned and bolstered the solidly statistical conclusions of Dr. Nicole Forsgren et al’s “Accelerate” - indicates that the ground may be set for what needs to come next: An extensive, diverse, and effective move to a new way of thinking about, and working with our organisations as tools - both in structure and function.</p>
<p>Given all this, how might we set about fashioning these new organisation-tools?</p>
<p>I have <a href="https://youtu.be/_jqPxGShb90">argued elsewhere</a> that the proto-skills for such a revolution are already widely available - systems thinking, distributed software design, evolutionary design. To this I would add further ingredients of service design, promise theory, and pattern languages as well as lessons learned from the various social and political movements of recent times.</p>
<p>The elements of a new approach are also to hand. Massive and collaborative co-design, and experimental rather than prescriptive discovery and adoption techniques will have significant roles to play. The change in approach will matter far more fundamentally than the destination, for we know from vast experience that we love to copy others, rather than finding what is right for us (just look at the “Spotify Model” and the Agile backlash).</p>
<p>But we must additionally change the cadence of our approach. There will never be a “one size fits all” solution, but it is clear that the “massive annual re-org” suits no-one. Smaller, more targeted, and near-continuous change will become the name of the day, dictated by the needs of the organisation.</p>
<p>The degree to which these elements differ from how we do things today will vary on a case-by-case basis, guided by their specific needs as well as the times they find themselves in. I am not calling for the next “best way of doing things” - to do so would be to fail to escape the trap that we have just described - rather I am arguing for an honest and full appraisal of where we find ourselves, and a collective and sustained effort to drive relevant and effective change.</p>
<p>So what to do first? How about a return to first principles? How about directly identifying and considering the needs we have as people working in organisations? If we did, what might this look like? If you’re excited to find out, so am I.</p>
<p>I’ll get into all these aspects and more in the later parts of this series. Next up, <a href="/organisation/2021/03/27/the-organisation-as-collection-of-services">a humble suggestion for a list of services that all organisations provide</a>.</p>
http://andrewharmellaw.github.io/organisation/2021/03/26/is-your-organisation-broken
http://andrewharmellaw.github.io/organisation/2021/03/26/is-your-organisation-brokenFri, 26 Mar 2021 00:00:00 +0000The Experience of Development - Part 4: The Timeless Way of Building
<p>But there is one more aspect I want to bring to the table. The experience of the wholly-internal castle construction. …..</p>
<p>The detail, granularity, and explicit-ness [SURELY THERE IS A BETTER WORD?] of our mental models is also highly significant. We are alo limited by how much we can “hold in our heads” [ALTHOUGH THE AMOUNTS VARY GREATLY FROM PERSON TO PERSON]. Admittedly, we do not need to hold all details as we have committed it to the screen [SCREEN? THERE IS AN ALMOST-IMMEDIATE RE-READING ASPECT HERE] but that does not mean we don’t need to be able to add to it, change it, improve it, and build on top of it.</p>
<p>Now we move to pleasure and confidence. [I’m NOT SURE WE DO.]</p>
<p>To joy.</p>
<p>To satisfaction.</p>
<p>[IF I WAS TO DESCRIBE MY EXPERIENCE OF DEVELOPMENT IN THREE WORDS I WOULD CHOOSE “CREATIVE”, “SATISFYING” AND “FRUSTRATING”].</p>
<p>In coding [“DEVELOPMENT”, OR “MAKING CODE-THINGS”?] we are engaged heavily in tool-use. Tools which are complex, multi-faceted, nuanced, and which must gel [“GEL” DOESN’T FEEL LIKE IT LINKS STRONGLY ENOUGH BACK TO WHAT WENT IN THE FIRST SECTION] with our wider expectations [BUT “EXPECTATIONS” DOES, SO PERHAPS…🤔] of what they are, how they are structured, and how they work.</p>
<p>As we become more familiar with a language, it’s associated mental model/philosophy, and it’s associated [REPEATS “ASSOCIATED”] libraries, frameworks and tooling we see not only how it succeeds, but how it fails; we see it’s limitations and shortcomings.</p>
<p>[WOULD THE VIRGINIA WOOLF QUOTES FIT IN HERE?]</p>
<p>DON”T FORGET ABOUT BIT DEPTH OF MENTAL MODELS (AFTER KATHY SIERRA)</p>
<p>[IT FEELS WE LEAP FROM WRITING TO READING HERE. AND FROM … ]</p>
<p>The perception of these things is different for different people. Their mental models of the language may vary greatly in their “bit depth”. [REFER OUT TO CATHY SIERRA.] So too may be someone’s comfort with the issues [AND SHORTCOMINGS?] which a language or associated ecosystem might throw up [NOT SURE I LIKE THIS IMAGE - 🤢 “PRESENT”?].</p>
<p>There is also the fact of someone’s comfort with a language’s syntax (or even style) [N.B. IN DEVS THIS IS ALSO VERY PECULIARLY FLOWS OUT TO THE PHYSICAL ENV - CODE-COLOUR, KEYBOARD, LIGHTING, ETC ALL CAN PLAY A ROLE HERE] and the ease with which they can consume this and conjoure up [I LIKE THIS PHRASE. BUILD IN MORE SKY-CASTLES LIKE THIS?] the associated mental model from it.</p>
<p>In this there is a strong association with how much detail can be represented as a “short-hand” and therefore manipulated effectively and effortlessly with confidence and skill. [THERE IS A MENTAL-EFFORT SIDE-BAR / DIGRESSION IN HERE TO PULL OUT.]</p>
<p>But we have not spoken of joy. The joy must come in great part from mastery, [WHAT ABOUT AUTONOMY AND PURPOSE? DO I EVEN WANT TO USE THIS WORD WITH ALL THE DISTRACTING CONNOTATIONS IT WILL BRING?] and the development of the same. But it can also come from both a lack of friction [MENTAL EFFORT AGAIN] and deployment [“MANIPULATION” / “DEFEAT” / “SUBDUGATION”?] of vast [VAST? REALLY?] complexity with little [“LITTLE”? HOW ABOUT “APPROPRIATE”? OR SOMETHING ELSE. THIS NEEDS TO BE UNPACKED TOO] mental effort.</p>
<p>There is also the potential joy in experiencing the pleasant surprise when something built from simple elements combines as hoped [“EXPECTED”? “HOPED” IS NICE HERE AS IT HAS THE ELEMENT OF FAITH IN IT…] (i.e. without a great deal of solid confidence) and works as planned, revealing a greater power [“POWER”? AGAIN THIS IS QUITE OVER-BLOWN] than had been imagined. [“THOUGHT POSSIBLE”?]</p>
<p>[<strong>**CHECK THE JOYS BELOW AREN’T ACTUALLY COVERED LATER ON</strong>**]</p>
<p>[THERE IS ALSO THE JOY OF HAVING USED ONE’S TOOLS EFFECTIVELY. MENTAL AND PHYSICAL. TO HAVE HAD THE RIGHT THINGS TO HAND TO HAVE APPROACHED IT ALL IN THE BEST WAY. TO HAVE FELT THE EXCITEMENT OF ALL THE PIECES OF THE MENTAL AND PHYSICAL PROCESSES WORKING TOGETHER AS ONE. ««< TDD COMES INTO THIS.]</p>
<p>[THERE IS ALSO HERE THE JOY OF A PROBLEM UNDERSTOOD AND BESTED, ]</p>
<p>[AND BEYOND THIS, THERE IS THE JOY FELT IN PRIDE OF CRAFTSMANSHIP - FIND ANOTHER WORD GIVEN THE CONNOTATIONS OF THIS ONE; OF A TIDY, JUST-ENOUGH SOLUTION.]</p>
<p>[AND THERE IS ALSO THE JOY IN AND OF A JOB COMPLETED. OF NEVER HAVING TO GO BACK SOMEWHERE. OF HAVING CONQUERED FRUSTRATION.]</p>
<p>[AND THE JOY OF HAVING LEARNED. OF HAVING UPDATED A MENTAL MODEL.]</p>
<p>How much of this is consious? It is not wholly correleated with mastery. [THERE’S THAT WORD AGAIN] You can consciously be struggling with something and be aware at [“OF”?] the lack of strength of depth of mismatch in mental models. [KEEP BRINGING IT BACK TO THE MENTAL MODELS.]</p>
<p>And this brings in [“BRINGS IN” SUCKS AS ENGLISH] another joy, in the construction of a new set of mental models and experiences in using them. In the experiencing of what is easier and harder, possible and impossible, in this new mindset. In the surprise at failing, and the surprise at learning. In the surprise in contrast between a solid, comfortable, established model and a new, unfamiliar, effervescent one. [AND THE JOY OF HAVING CAUGHT AND PINNED-DOWN/EXPRESSED THE LATTER.]</p>
<p>What about different modes of thinking? Both the “Happy Path” [CALL OUT TO BRUCE AND JAMES HERE] and the other paths? What about mode-swapping, both within a stack (e.g. from core language, to libraries, to framework, to tooling, etc.) and outwith (e.g. databases, etc.) Is there joy in these changes, in deploying multiple tools [AND ASSOCIATED MENTAL MODELS] to solve an overall problem? [DON’T LOSE THE THING-PROBLEM HERE. I’M LEAKING MY ANTI-DB BIAS HERE] Is there joy in staying in one place? [ONE HEAD-SPACE?] Is there joy in being challenged and overcoming complexity, and is there joy in understanding how it worked, and then finally distilling it down to the simplest, most elegant, most intentional and explicit solution? [LINK IN THE THREE DIFFERENT PERSPECTIVES OF TDD HERE TO.]</p>
<p>[IT FEELS LIKE THIS COULD GO RIGHT UP AT THE TOP - OR PERHAPS WHEN WE START GETTING TO TOIL/FRICTION/EFFORT.]
(Programming) Languages are built to provide abstractions. Sometimes they are more explicit than others. Sometimes they are more consistent than others. Sometimes they are more complete than others. Sometimes they are high level, other times they are low level. [SOMETIMES THEY ARE BOTH, EITHER CONSISTENTLY OR INCONSISTENTLY.] Sometimes they [AND THEIR ECOSYSTEMS] are fitted to [THE ENTIRETY OF] our task perfectly. Other times they are not - being incomplete, or having [“CAUSING”?] friction with our mental-solution model [IS THIS MY NAME FOR THE OTHER MODEL?] (Is it easier when we think in their model? “Thinking in Java” for example…)</p>
<p>[LANGUAGES WHICH FIT:]
“To begin with, there is the technical difficulty […] that the very form of the sentence does not fit her. It is a sentence made by men; it is too loose, to heavy, too pompous for a woman’s use.”
from the essay “Women and Fiction” by Virginia Woolf</p>
<p>“And this a woman must make for herself, altering and adapting the current sentence until she writes one that takes the natural shape of her thought without crushing or distorting it.”
from the essay “Women and Fiction” by Virginia Woolf (bold mine)</p>
<p>How much do we think of the mental models in the minds of others? How much do we care to express what is in our heads clearly, consistently and explicitly? How much do we think about reading again the code we have just output [THIS IS A HEAVY WORD, BUT I LIKE IT HERE] just now in order to get something to work?</p>
<p>[CONSIDER WHY I WANT TO QUOTE FROM WRITERS (AND OTHER ARTISTS?)]</p>
<p>[ANOTHER THOUGHT FOR EARLIER ON?]
How too does this play into Bruce’s ongoing question about control? Do we prefer to be falsely unsurprised or truthfully [?] (and frequently) surprised (and disappointed). IS THIS WHY SO MANY HATE TO EXPERIENCE THEIR CODE RUNNING AS IT WILL SHATTER THEIR ILLUSIONS?</p>
<p>[ALSO: WHAT ABOUT SYSTEM METAPHOR?]</p>
<p>N.b. “The Programmers Brain” from Manning https://livebook.manning.com/book/the-programmers-brain/welcome/v-2/</p>
<p>N.b. TED: How Your Language Shapes the Way You Think https://www.instagram.com/tv/CKXQYJwHckL/?igshid=1vigwv11mgh2s</p>
http://andrewharmellaw.github.io/2021/03/25/the-experience-of-development-the-timeless-way-of-building
http://andrewharmellaw.github.io/2021/03/25/the-experience-of-development-the-timeless-way-of-buildingThu, 25 Mar 2021 00:00:00 +0000Chapter 1: The Fine Balance
<blockquote>
<p>“My phrases have to be crammed with information. They have to be crammed with content. Not that a compromise is necessary. I think that so much of what I do with language is instinctive. You see I don’t really think of myself as creating the language, because language pre-exists; I just have to go where it is. I have to find it and it has to find me; and it’s as much about listening as it is about being active. You have an inner voice where the perfect novel is kept; the perfect sentence is kept; and your task is to mediate that to the world outside; and that’s the writer’s daily business.</p>
<p>But of course you don’t think of it like that, you just type fast. And because you’re accustomed, because you’ve been doing this for years and years it’s like starting a song. The rhythm won’t falter. The internal logic of the prose won’t let you down. In the same way I think that with a long book you sometimes have to forget about structure and trust that it’s doing itself; and it is.</p>
<p>But there’s such a fine balance between exerting absolute control, and letting go, so that the thing can happen.”<br /><br />
Hilary Mantel interviewed by Michael Rosen for “Word of Mouth”, BBC Radio 4.</p>
</blockquote>
<p><span class="newthought">Each of us approaches software development</span> in our own individual way, based on both our understanding of the-thing-we-are-trying-to-create-slash-the-problem-we-are-trying-to-solve, and on our grasp of the tools with which we are working.</p>
<p>In doing so, three things–the mental models that we construct, the pre-existing mental models which we call upon, <em>and</em> the means by which we mediate them to the outside world–are potentially called into question every time the code itself, that external manifestation of these mental models and bearers of our expectations, tells us what it can and can’t do. It is at this nexus that our internal conception of the-thing-we-are-trying-to-create-slash-the-problem-we-are-trying-to-solve is confronted with an alternate reality; the reality of syntax and compilers and CPU registers and electrons.</p>
<p>(For more detail on this loop, see part one of the introduction to this series: “<a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">A Conjecture</a>”. For detail on the nature of the models and some clarifying terminology, see the second part: “<a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">Models, All the Way Down</a>”.)</p>
<p><br /></p>
<figure><figcaption>Image: Gaea (1966) by Lee Krasner, CC BY-SA 2.0, via G. Starke on <a href="https://www.flickr.com/photos/157267975@N08/41443933070">Flickr.com</a></figcaption><img src="/assets/img/lee-krasner-gaea.jpg" /></figure>
<p><span class="newthought">The state of this alternate reality</span> is made manifest to us through our senses, and there then arises an overlaying of this input with our mental models and their predictions. The two are compared, and there are a variety of outcomes which can result.</p>
<p>If what our models predict matches up with what we have sensed then the reward of having crafted a cloud castle that we have successfully mediated into the world outside hits. We <em>feel</em> good. This is an experience of development. One of the primary ones which keeps us coming back for more.</p>
<p>But when the match fails, signaling that our mental-model hypothesis has been falsified–an all-too frequent occurrence in my experience–we react to this disparity, this “surprise”, in one of several ways. This too is the root of experiences of development.</p>
<p><span class="newthought">The type of reaction which arises</span> depends upon our confidence in which of the two should carry more weight. Do we trust what we expect? Or do we trust what we sense? Most importantly for our purposes here, how do we explain the discrepancies away? Let us enumerate the coping strategies here, for I propose that it is within these responses, conscious or unconscious, that many of the varieties of development experience lie.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I have tried to arrange these in order of magnitude, but clearly such an effort is very subjective. </span></p>
<p>Firstly<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">And most mundanely. </span>, we can doubt that we effectively mediated our mental models to the outside world, to the code. Did we make a typo? Did we forget a setting? Did we press the wrong button?</p>
<p>Secondly we can <em>maintain</em> our belief in the creation-solution mental-model we mentally constructed, but doubt that it is either a) a valid fit for the-thing-we-are-trying-to-create-slash-the-problem-we-are-trying-to-solve, or b) encodeable in our chosen language. Is our mental-model valid, but unsuitable for this situation?</p>
<p>Thirdly we can doubt<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">“Doubt” could just as easily be replaced with the word “question”, or with “become confused about”. The only differences are in how conscious we are of this feeling. “Doubt” will do for now. </span> the integrity of the thing we constructed in our heads: the creation-solution mental-model<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">See my previous post, ‘Models, all the way down’, for the classifications and definitions of ‘creation-solution’ and ‘substrate’ mental models. </span>, assembled in our quest to make / solve. Did we make an error in our mental model construction as it pertains to our situation?</p>
<p>Fourthly we can doubt our substrate mental models - the ones representing our languages, libraries/frameworks and tool chain.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Again, see my previous post ‘Models, all the way down’ for discussion of this. </span> Here we likely go back to the documentation, and update one or more of these substrate mental models as a consequence. Do we misunderstand the tools we are working with?</p>
<p>Finally we can doubt what we are experiencing, and act as if it’s not happening. This can directly lead to us being blind to things, not seeing them when they are there, because to “see” is to understand, even in a most basic way.</p>
<p><span class="newthought">How frequently this mis-match occurs</span> is clearly important. But what strikes me as more worthy of investigation is how different people, at different times, and in different contexts experience, and consequently (re)act / respond, both intellectually and emotionally to all these outcomes, both predicted, and surprising. It also seems significant to look into instances when the distinction between one possible coping strategy and another is unclear, or when it is <em>too clear</em>.</p>
<p>I intend to go into this in future posts, but for now I will stop here and leave you to ponder your experiences in this area. Does my formulation make sense? Is it gibberish? I know for one that it represents at most one half of the experience of development. The other half? That’ll be the subject of a later post: the experience itself of mentally constructing our cloud-castles. But first I’ve al least one cogitation on other aspects to share. Next up, <a href="/xp-of-dev/2021/04/03/the-experience-of-development-bit-depths-and-fine-wines">the difference levels of expertise make</a>.</p>
<p>P.S. I’d love to know what you think. If you have any thoughts or any other kind of feedback please reach out to me on <a href="https://twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/xp-of-dev/2021/03/15/the-experience-of-development-the-fine-balance
http://andrewharmellaw.github.io/xp-of-dev/2021/03/15/the-experience-of-development-the-fine-balanceMon, 15 Mar 2021 00:00:00 +0000Introduction Part 2: Models, All the Way Down
<figure><figcaption>Image: Fractral Octahedron, CC BY 2.0, via fdecomite on <a href="https://www.flickr.com/photos/fdecomite/5371928685/">Flickr.com</a></figcaption><img src="/assets/img/fractral.jpg" /></figure>
<p><span class="newthought">In part one </span> <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">of this introduction</a> I put forward the idea that the predictions arising from mental models play an integral role in software development. Unlike that post which was intentionally formal, this one derives far more from introspection and observation. I want to use this relative freedom to share some musings.</p>
<p>Specifically I want to think about what these models might be made from, and given that, consider the dynamics which we experience when manipulating these thought-units.</p>
<p>More prosaically, I also want to introduce terminology (which I’ll flag as side-notes) which I hope will make subsequent posts on the <em>experiences arising</em> from all these comprehensible.</p>
<p>In order to speculate like this, I need to go bring in one more collection of concepts which, despite not appearing so at the time, have continued to resonate with me, and feel relevant for us here.</p>
<p><span class="newthought">Back in 2016</span> I was trying to learn algebra. It was long overdue. It was also hard. Really hard. And <a href="/xp-of-dev/2021/03/07/the-experience-of-development-preface">once again</a>, someone from the Java Posse Roundup came to my aid.</p>
<p>During a conversation about my travails (it probably took place in a queue for coffee) <a href="">Todd</a> mentioned a book by Barbara Oakley which he’d found useful: <a href="https://www.goodreads.com/book/show/18693655-a-mind-for-numbers">“A Mind for Numbers: How to Excel at Math and Science”</a>.</p>
<p>I approached it with caution. I rarely have the cheek to say out loud how much I distain these “pop-Psychology” books<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I have a real Psychology degree forchirstssakes!#$%^*!! </span>, but I also frequently give them a try, and that’s what I did here, admitting to myself that anything which could give me even a toe-hold on the seemingly impossible cliff-face of mathematics would be of benefit.</p>
<p>It worked.</p>
<p>Before writing this post, I went back to the book and realised how much it contains. However I only want to bring out two elements here: the limited size of working memory, and a technique to tackle this called “chunking”.</p>
<p><span class="newthought">Working memory first.</span> It’s an enduring concept in cognitive psychology, having survived at least from the days of my degree<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">1993-97 </span> up to the present. It’s a concept of mental functioning usefully conceived of as a workbench. This workbench is where you do your conscious, front-of-mind thinking and decision-making. This “thinking” can function simply to keep information available, such as when you are trying to remember a phone number someone just told you, but it can also be more active and combinatorial, such as when you are trying to solve a maths problem.</p>
<p>It doesn’t seem like too big a leap to suggest that working memory is also the locus of active (thinking) work in software development. Whether that’s trying to piece elements together to create our solution, thinking to solve a problem, figuring out which language construct to use, or even remedying the surprise asrising from the aforementioned mis-match between expectation and sensed reality.</p>
<p><span class="newthought">Now a key</span> and inescapable fact about working memory is that it has a limited capacity. Oakley characterises it as being capable of containing a finite number of “chunks” as she terms them. She makes it clear that to have a “mind for numbers”<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">And, by implication, a mind tuned for performing any complicated mental-manipulation task </span> you need to be able to work effectively within this restricted space and clever chunk-fu is one way to do it. This “chunking” approach entails consciously, coherently and solidly forming shorthand chunk thought-units which can, while only taking up one of those precious chunk-slots, actually represent concepts of significant depth and detail.</p>
<p>Clearly when engaged in complex and conceptual brain work, “chunks” are incredibly valuable. But what are they exactly? Oakley offers us more detail:</p>
<blockquote>
<p>“Chunks are pieces of information that are bound together through meaning. You can take the letters ‘p’, ‘o’ and ‘p’ and bind them together into one conceptual, easy-to-remember chunk, the word ‘pop’. Underneath that simple ‘pop’ chunk is a symphony of neurons that have learned to trill in tune with one another. The complex neural activity that ties together our simplifying abstract chunks of thought - wether those pertain to acronyms, ideas, or concepts - are the basis of much of science, literature, and art.”<br />(A Mind for Numbers, Oakley, pp.53)</p>
</blockquote>
<p>She goes on:</p>
<blockquote>
<p>“Chunking the information you deal with helps your brain run more efficiently. Once you chunk an idea or a concept, you don’t need to remember all the little, underlying details; you’ve got the main idea—the chunk—and that’s enough.”<br />(A Mind for Numbers, Oakey, pp.53-54)</p>
</blockquote>
<p>I won’t labour the point any further. I hope all this feels super-familiar. Firstly as a description of daily development experience (which may or may not have a basis in neuropsychogical fact) but also secondly as a concept with exciting echoes and resonances for what I shared in the <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">previous post</a>, with regards to Friston’s ideas of mental models and their arising hypotheses.</p>
<p><span class="newthought">Given all this,</span> and given the fact that it frequently feels during development as if we are trying to wrestle a number of thought-elements within a finite mental space, how might we use the concepts I’ve lifted from Oakley to gain some insight?</p>
<p>The key question arises: “what might be the nature of the thought-units from which we build our mental-model castles?” I propose that these too are mental models; but more specific, more fundamental ones. My supposition is that, in order to fashion higher-order cloud castles, we manipulate smaller blocks of mental model, blocks which represent concepts we already have. <em>It is, I propose, mental models all the way down.</em> And it is these mental model blocks which are the things taking up the chunk-slots in working memory. Let me unpack this a little.</p>
<p>In <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">part one</a> of this introduction I conjectured that when I am developing software I am forming a model in my mind which I am continually conveying to the outside world in the form of code.</p>
<p>In performing this act of creativity I deploy the raw elements of what I know (or more precisely, <em>what I expect</em>) of my chosen programming language. I am using these pre-existing blocks of mental model, which comprise my idea of how the programming language and it’s constructs work — let’s call them the “substrate”<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">This is your first terminology alert </span> models — and from them construct my castle — let’s call that the “creation-solution”<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">This is your second terminology alert </span> model.</p>
<p><span class="newthought">From this it</span> quickly becomes clear that these concepts of “substrate” and “creation-solution” model are relative. From one perspective a mental model is the former (i.e. a LinkedList collection is to me a substrate model when I’m flat-mapping my way to a sum), but from another perspective it is the latter<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">We all know the core libraries we use for example are simply pre-formed building blocks created for us by others </span> (i.e. a creation-solution model when I’m implementing a quantum-safe collections library). This does not only between developers. It also happens within the same individual, depending on the viewpoint we hold at any given point in time during development. For example, one moment I’m creating a component or a microservice, the next moment I’m calling it.</p>
<p>Given that the difference here is only one of perspective, <em>and</em> given <a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">my conjecture</a>, both models can be expected to work inside our heads in exactly the same way: embodying a set of expectations of how the real-world (i.e. code) things they represent are structured and will function.</p>
<p>This fits brilliantly into Oakley’s chunks, because chunks are pieces of information formed from smaller-level pieces of information, bound together by meaning. Or put another way, mental models, comprising of smaller-level mental models. We, in short, construct mental models out of other mental models.</p>
<p><em>It’s models all the way down.</em></p>
<p><span class="newthought">Before I close</span> I must acknowledge the inevitable question: how do we work with (or against) these elements (and perhaps adopt other techniques from Oakley, knowingly or unknowningly) in our acts of development? Having thought about this <a href="/xp-of-dev/2021/03/07/the-experience-of-development-preface">for some time now</a>, and having spoken to, and watched others working with code, I am convinced that this area is one where a great deal of individual difference lies. Consequently I believe this will be a fruitful one to investigate, compare / contrast, and discuss, in the main body of this effort. My first steps into this form the topic of my next post: “<a href="/xp-of-dev/2021/03/15/the-experience-of-development-the-fine-balance">The Experience of Development - Chapter 1: The Fine Balance</a>”</p>
<p>P.S. I’d love to know what you think about all this. If you have any thoughts or any other kind of feedback please reach out to me on <a href="https://twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down
http://andrewharmellaw.github.io/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-downTue, 09 Mar 2021 00:00:00 +0000Introduction Part 1: A Conjecture
<p><span class="newthought">This is part one</span> of a two-part introduction. Taken together, my intention is to describe a means of looking at the experience of development. It is my hope that they provide an explanation for how it feels to write code.</p>
<p>This part is more formal - scientific even - but I have no empirical proof, only personal experience and subjective anecdote. Despite this I intend it to be taken seriously, and so have attempted to lay it out in an appropriate style. The second part, in the following post, is on shakier ground, and so is written far more conversationally.<br /><br /></p>
<figure><figcaption>Image: Gifu City, CC BY 4.0, via Wikimedia Commons</figcaption><img src="/assets/img/gifu_castle_in_sea_clouds.jpg" /></figure>
<p><em><span class="newthought">It is my conjecture</span> that the experience of development, that is to say, how it feels to write code, arises entirely from our responses to convergences of, and differences between, two things: on the one hand our mental models of our code, and on the other, our perceptions arising from the code as it physically exists, outside our heads, on computers.</em></p>
<p>I believe that such a view of our individual and collective experiences with code is a fruitful one, and intend to share both personal insights, and those of others, derived from looking through this lens. However, before I share posts related to the wealth of perspectives and explanations made possible by this thesis, I want to share why I have come to this conclusion; I want to introduce the ideas from an area of neuroscience pioneered by <a href="https://en.wikipedia.org/wiki/Karl_J._Friston">Karl Friston</a>, and I want to travel there via one of the great writers on the task of programming, <a href="https://en.wikipedia.org/wiki/Fred_Brooks">Fred Brooks</a>:</p>
<blockquote>
<p>The programmer, like the poet, works only slightly removed from pure thought-stuff. [They] build castles in the air, from air, creating by exertion of the imagination.
<br /><cite>Fred Brooks, The Mythical Man-Month</cite></p>
</blockquote>
<p>The fact this decades-old quote still resonates today is because it feels so true to us practitioners. I also intend to take licence from it to talk about the experience of development. There is a problem however; the act of development is conceived by a great many of us practitioners as a highly rational act. Is it possible to look through a lens which allows us to cater for this coldly logical aspect without losing our goal? the goal of describing a way to also address the softer, more unconscious, more esoteric side?</p>
<p>I am going to make such an attempt; an attempt which considers these imagination-castles (less prosaically admittedly) as elaborate, self-consciously-constructed mental models. Might it prove fruitful? Friston’s neuroscience here provides not only a useful perspective on <em>what mental models might actually be</em>, but also brings in the other aspect under consideration, <em>their place in human experience</em>.</p>
<p><span class="newthought">The first step</span> is to consider his take on mental models and their function as described by Hohwy in his book “The Predictive Mind”:</p>
<blockquote>
<p>The brain is a sophisticated hypothesis-testing mechanism, which is constantly involved in minimizing the error of its predictions of the sensory input it receives from the world. […] The hypothesis [is] generated on the basis of our model of the world, and the sensory deliverances coming from the world.
<br /><cite>Jakob Hohwy, The Predictive Mind, pp. 1-2</cite></p>
</blockquote>
<p>Let’s flip these statements round so they take us in the right direction. Friston’s theory posits that our neural states represent how we “believe” the world to be, and that we are constantly comparing the predictions these “mental” models make against the sense-data the world provides.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Note that here I’m putting more of an experiential spin on things for my purposes. Friston at this point is far more concerned with the neurological. </span></p>
<p><span class="newthought">With this in place</span> we can now bring in a second element from Friston (again summarised by Hohwy) that brings us another step closer to our conjecture. When our expectations fail to match up with the world-as-sensed we experience surprise, and when we are surprised we respond:</p>
<blockquote>
<p>[P]rior beliefs [are] harnessed in an internal model to generate predictions of the sensory input and then revise the model’s prediction (hypothesis), or change the input, to minimise the prediction error […]. This […] adds [an] all-important predictive element. […] If all this is done in a reasonably optimal fashion, the resulting hypothesis must then be close to the real world’s state of affairs, at least as signalled in the sensory input: nothing is a surprise.
<br /><cite>Jakob Hohwy, The Predictive Mind, pp. 44</cite></p>
</blockquote>
<p>The concept of “surprise” (or “surprisal”) here is important. Hohwy describes its function:</p>
<blockquote>
<p>Surprisal is a measure of how surprising it would be to observe the system in question in certain conditions, or having a certain sensory input. It is clear that this can only be assessed relative to its normal state, the state we are most likely to find it in.
<br /><cite>Jakob Hohwy, The Predictive Mind, pp. 84</cite></p>
</blockquote>
<p>Once again we can re-assemble this in terms as they relate to the conjecture. Our internal mental models can be considered as our beliefs of what should be, and the comparison of these model-beliefs with sensory feedback from the as-perceived outside world lead to a psychological response - characterised as degrees of “surprise” depending upon how close the model-hypothesis is to the sense-data.</p>
<p><span class="newthought">We’re almost there,</span> but these descriptions still feel so cold. Despite what has been presented, a reader could still confidently argue that we have not presented enough evidence of a place for recognisable <em>feelings</em>, for psychological <em>experiences</em>. Hohwy offers us a final step:</p>
<blockquote>
<p>The prediction-error minimization idea […] (Friston 2010) has extreme explanatory scope. […] Given this […] it seems reasonable to anticipate, even if only briefly, what it will have to say about further, deeper aspects of mentality.
<br /><cite>Jakob Hohwy, The Predictive Mind, pp. 241</cite></p>
</blockquote>
<p>He elaborates:</p>
<blockquote>
<p>In some sense, emotion arises as a kind of perceptual inference on our own internal states. […] Emotions then arise as interoceptive [the sense of the internal state of the body, both conscious and non-conscious] prediction error is explained away. […] We should expect that sometimes it is our expectations for arousal or interoceptive precision that determine where we end up emotionally.
<br /><cite>Jakob Hohwy, The Predictive Mind, pp. 242-3</cite></p>
</blockquote>
<p>Let us bring this one last time into our sphere. Hohwy proposes<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I think with some justification </span> that the consideration of the low-level neurological drive to minimise prediction-error in our mental models, as manifested by the surprise arising, can be taken broadly and explains many human phenomena. One of these is the wholly-internal concept of feelings, of emotion, specifically as means to “explain away” this generic “surprise” which arises from experiencing prediction errors.<br /><br /></p>
<figure><figcaption>Image: Gaius Cornelius, CC BY-SA 4.0, via Wikimedia Commons</figcaption><img src="/assets/img/clouds.jpg" /></figure>
<p><span class="newthought">We now have enough</span> to summarise: if Brooks is right, when we develop software, we construct mental castles, or more matter-of-factly, elaborate mental models. These castles are represented neurologically as a set of predictions of how they will manifest in the outside world. In accepting this, we also acknowledge that when castles are expressed — conveyed somehow — to the outside world and into code - that realm outside our minds - they must compile, the tests must pass, the executables must run, and they must achieve the goals we’ve set for them, in as many circumstances as we can conceive. <em>They must, in short, meet our model’s predictions; they must operate as we expect them to.</em></p>
<p>It is my conjecture therefore that the mental models we have created and subsequently mediated to the outside world in the form of code must match our reality because we expect them to; and when they don’t, we are surprised and it is our individual, nuanced, situation-dependent grappling with this surprise which gives rise to our equally individual experiences of development.</p>
<p><span class="newthought">In my next post,</span> “<a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">The Experience of Development - Introduction Part 2: Models, All the Way Down</a>” I introduce the other important element we need in place before we look through this lens: a deeper consideration of the nature of our mental models; of what they are composed, and how we manipulate these thought-units.</p>
<p>P.S. I’d love to know what you think. If you have any thoughts or any other kind of feedback please reach out to me on <a href="https:/twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture
http://andrewharmellaw.github.io/xp-of-dev/2021/03/08/the-experience-of-development-a-conjectureMon, 08 Mar 2021 00:00:00 +0000Preface
<figure><figcaption>This post, and those which follow it, are dedicated to Carl Quinn, and the rest of the Java Posse. Without you none of this would ever have happened. You inspired me. For that I am eternally grateful.
Thank you. 🙏 <br /><br />Image: Mt Crested Butte, Colorado, USA, taken by the author</figcaption><img src="/assets/img/mt-crested-butte.jpg" /></figure>
<p><span class="newthought">I first thought</span> about the experience of development in February 2014, shortly after watching <a href="https://twitter.com/joesondow">Joe Sondow</a> lead an afternoon hackathon session at the then-<a href="http://javaposse.com/">Java Posse Roundup</a> Open Spaces in Crested Butte, Colorado.</p>
<p>Joe was taking us through the <a href="https://getbootstrap.com/">Twitter Bootstrap</a> framework. When we all started, Joe with his MacBook plugged into <a href="https://twitter.com/BruceEckel">Bruce Eckel’s</a> flat-screen, the rest of us watching from the various sofas and easy-chairs dotted around the room, none of us knew much about it.</p>
<p>As he went about his process of deciphering how Bootstrap was constructed and how it worked, Joe narrated his thought process. Some of us pitched in now and then with suggestions, offering tips when he’d missed something, but largely we were sitting there, inside Joe’s head, seeing his IDE as if through his eyes. I was transfixed. <em>There were so many differences from how I approached the act of development; so many differences from how I experienced it</em>.</p>
<p>The conscious realisation of this only struck me later. While it had been unfolding in front of my eyes I had simply wondered at how Joe reasoned about code; how he had a command of the substrate parts - raw JavaScript and CSS, as well as his tools and what he could rely on them for; how he expressed his mental state as code in his IDE (and equally how he commented things out to see if the extent of what he thought he’d turned off was met by reality).</p>
<p>It was probably a day later (most likely prompted by yet another session which made me realise how massively different my mental conception of things were from others) that questions began to arise. Questions such as “is there a right way to think about the act of development?”, “how many ways do people think about development?” and the one which stuck with me far more than any other: <strong>“what is it like when people experience the act of development?”</strong></p>
<p>Over the years that followed this question never went away. I tried to grasp it myself at first, and kept an Evernote notebook full of glipses of people using emotive language with reference to code. I then found Kent Beck’s awe-inspiring preafce to his classic “<a href="https://www.goodreads.com/book/show/387190.Test_Driven_Development">Test Driven Development: By Example</a>”<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Someone needs to draw attention to the great prefaces and afterwords of Software books. There are a lot out there, and we miss out when we skip past them to get to the “real book” </span> and I could relate to it completely. He talked about discomfort, unease, fear, pleasure, and joy. But he was largely alone. Year on year I kept wondering if this was really something to investigate further, but I could never figure out how. I couldn’t even figure out how to make sense of my own feelings on the subject.</p>
<p>But slowly things began to come together. Once again the fecund minds of the attendees at the Java Posse Roundup (now re-styled the “<a href="https://www.wintertechforum.com/">Winter Tech Forum</a>”) was the source of virtually all my inspiration. Week after week came the externalised thought processes of people thinking out loud on the <code class="language-plaintext highlighter-rouge">#code</code> slack channel (shout outs to <a href="https://twitter.com/jackgene">Jack</a>, <a href="https://twitter.com/CJPhelps">Chris</a>, <a href="https://twitter.com/joeygibson">Joey</a>, <a href="https://twitter.com/harrison_briner">Harrison</a>, Jeremy, <a href="https://twitter.com/dhagberg">DJ</a>, <a href="https://github.com/wfhartford/">Wesley</a>, Gordon, <a href="https://twitter.com/quidryan">Justin</a>, Tom, <a href="https://twitter.com/runswithbricks">Marshall</a>, <a href="https://twitter.com/dinomite">Drew</a>, J, <a href="https://twitter.com/topher1120">Chris</a> and <a href="https://twitter.com/mattgrommes">Matt</a>). Then there was <a href="https://twitter.com/BruceEckel">Bruce</a> and <a href="https://twitter.com/_JamesWard">James</a>’ in-depth discussions on the act of language design and writing for those of “beginners mind” on the “<a href="https://twitter.com/HappyPathProg">Happy Path Programming</a>” podcast.</p>
<p>But best of all was the interviews that various attendees (<a href="https://twitter.com/CJPhelps">Chris</a>, <a href="https://github.com/wfhartford/">Wesley</a>, <a href="https://twitter.com/dhagberg">DJ</a>, <a href="https://twitter.com/dkarlinsky">Dmitry</a>, <a href="https://twitter.com/harrison_briner">Harrison</a> and <a href="https://github.com/swampdragons">Megan</a>) allowed me to stumble through, asking them about their experiences of writing code. I learned so much yet again. I had raw data points all over the place, and data points that were crisp and clear too - I am blessed that everyone I’ve met out at that self-organised conference in a church hall deep in the Colorado Rockies is so eloquent and self-aware. <br /><br /></p>
<figure><figcaption>Image: Crested Butte, Colorado, USA, taken by the author</figcaption><img src="/assets/img/crested-butte-view.jpg" /></figure>
<p><span class="newthought">However</span> , there was still something missing. I didn’t feel that confidence which I thought I’d feel before I took this to the world. To conquer my doubt it needed something to bring it together. I needed a lens to look through. I needed a hypothesis to test. I needed a something like a theory which to interrogate, to prove or invalidate.</p>
<p>Then one day, it all suddenly came together. I was catching up on the <code class="language-plaintext highlighter-rouge">#code</code> channel where Jack was describing a problem in <a href="https://golang.org/">Go</a>, or <a href="https://www.rust-lang.org/">Rust</a>, or something like that. That wasn’t in itself unusual; it’s what the <code class="language-plaintext highlighter-rouge">#code</code> channel is for; but how he described his experience resonated like a bell. What he articulated was his sense of <em>surprise</em> when how he’d <em>expected</em> something to work had been very different from how it <em>actually</em> worked. In that instant all the elements which had up to then been sloshing around my mind suddenly tessellated.</p>
<p>The unifying element, the structure around which all this formed, had been explained to me years before in Denver Airport by <a href="https://twitter.com/yakticus">Julie “yakticus” Amundsen</a>, was <a href="https://en.wikipedia.org/wiki/Karl_J._Friston">Karl Friston’s</a> idea of our mental models serving to predict the world, our experience of “surprise” when these model’s predictions fail, and the various ways we respond to reduce the impact of this experience. Yet again, I’d had the concept in front of me for years, and yet again it had come from conversations with a Roundup attendee.</p>
<p>The posts which follow this one are the result of this realisation. My hope is that not only will they be coherent, but also useful, and perhaps even enjoyable. The next two posts form the introduction: the first of these (<a href="/xp-of-dev/2021/03/08/the-experience-of-development-a-conjecture">Introduction Part 1: A Conjecture</a>) goes into my idea in far more detail. The second (<a href="/xp-of-dev/2021/03/09/the-experience-of-development-models-all-the-way-down">Introduction Part 2: Models, All the Way Down</a>) adds some related thoughts I’ve had, which, though less formal, still form an important background for the investigations, hypothesis testings, and resulting musings which follow, the <a href="/xp-of-dev/2021/03/15/the-experience-of-development-the-fine-balance">first of which</a> takes the concepts from the introduction and attempts to form with them a broad categorisation of the types of development experience, both based on personal, and non-personal reports and observations.</p>
<p>P.S. I’d love to know what you think. If you have any thoughts or any other kind of feedback please reach out to me on <a href="https://twitter.com/al94781">Twitter</a>. Thanks!</p>
http://andrewharmellaw.github.io/xp-of-dev/2021/03/07/the-experience-of-development-preface
http://andrewharmellaw.github.io/xp-of-dev/2021/03/07/the-experience-of-development-prefaceSun, 07 Mar 2021 00:00:00 +0000Gelfand: Chunk 27 - Proving Some Rules for Roots
<p><span class="newthought">Given the last chunk was proof-rich</span> it’s no surprise to find that this Section sees Gelfand asking us (with less help now) to do some more proving. Let’s see what we can learn, both facts-wise, and skills wise too.</p>
<h2 id="proof-for-a-b-ge-0-sqrtab--sqrtasqrtb">Proof: (For <span><script type="math/tex">a, b \ge 0</script></span>) <span><script type="math/tex">\sqrt{ab} = \sqrt{a}\sqrt{b}</script></span></h2>
<p>This one looks interesting. First we note that this isnt for all values of <span><script type="math/tex">a</script></span> and <span><script type="math/tex">b</script></span>. Negatives are excluded. Does that help us to our solution? Probably not, but it means we have less to worry about.</p>
<p>We need to both sides of our equality the same. Let’s start<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">As is usual. </span> by getting rid of the roots</p>
<div class="mathblock"><script type="math/tex; mode=display"> (\sqrt{ab})^2 = (\sqrt{a} \cdot \sqrt{b})^2 </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> a \cdot b = (\sqrt{a} \cdot \sqrt{b})^2</script></div>
<p>Then we expand the right-hand side.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Note, this isn’t a sum-of-squares or square-of-a-difference situation. We’re simpliy multiplying inside our parentheses, which makes expansion <em>far easier</em>. </span></p>
<div class="mathblock"><script type="math/tex; mode=display"> a \cdot b = \sqrt{a}^2 \cdot \sqrt{b}^2</script></div>
<p>and finally cancel out our right-hand side roots and squares and we’re there</p>
<div class="mathblock"><script type="math/tex; mode=display"> a \cdot b = a \cdot b</script></div>
<p>Awesome.</p>
<p>Before we move on, why not <span><script type="math/tex">a, b \lt 0</script></span>? Because you can’t root a negative number that’s why.</p>
<h2 id="tricks-arising">Tricks Arising</h2>
<h3 id="lose-the-roots">Lose the Roots</h3>
<p>When confronted by any expression with roots in it, it seems like a good idea to get rid of them as quickly as possible. It’s not failed me yet as an approach.</p>
<h3 id="sqrtab--sqrtasqrtb-is-a-handy-pattern"><span><script type="math/tex">\sqrt{ab} = \sqrt{a}\sqrt{b}</script></span> is a Handy Pattern</h3>
<p>It’s worth pointing out that <span><script type="math/tex">\sqrt{ab} = \sqrt{a}\sqrt{b}</script></span> is a handy pattern and expansion for you to have in your trick-box. While remembering that it’s _only for non-negative <span><script type="math/tex">a</script></span> and <span><script type="math/tex">b</script></span>, btore it deep in your chunk-bank, all cosy yet sprung, ready for quick deployment at a moment’s notice.</p>
<h2 id="proof-for-a-ge-0-b-gt-0-sqrtfracab--fracsqrtasqrtb">Proof: (For <span><script type="math/tex">a \ge 0, b \gt 0</script></span>) <span><script type="math/tex">\sqrt{\frac{a}{b}} = \frac{\sqrt{a}}{\sqrt{b}}</script></span></h2>
<p>Another interesting one. Again we note that this isn’t for all values of <span><script type="math/tex">a</script></span> and <span><script type="math/tex">b</script></span>. Again negative <span><script type="math/tex">a</script></span>s are out. That’s obviously for the same reason as the last proof. But why can’t <span><script type="math/tex">b</script></span> be zero? Because it’s the denominator in a fraction is why, and as you’ll no doubt recall from <a href="https://andrewharmellaw.github.io/2016/11/16/gelfands-algebra-chunk-1-fundamentals/">Chunk 1 - Fundamentals</a> that if you have a zero denominator, then the fraction is <em>undefined</em>.</p>
<p>With that out of the way, we can attack our proof. It seems sensible to do the same as usual and get rid of our roots first.</p>
<div class="mathblock"><script type="math/tex; mode=display"> \left(\sqrt{\frac{a}{b}}\right)^2 = \left(\frac{\sqrt{a}}{\sqrt{b}}\right)^2</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \left(\sqrt{\frac{a}{b}}\right)^2 = \frac{(\sqrt{a})^2}{(\sqrt{b})^2}</script></div>
<p>which after we tidy up gives us</p>
<div class="mathblock"><script type="math/tex; mode=display"> \frac{a}{b} = \frac{a}{b}</script></div>
<p>Proved.</p>
<h3 id="sqrtfracab--fracsqrtasqrtb-is-another-handy-pattern"><span><script type="math/tex">\sqrt{\frac{a}{b}} = frac{\sqrt{a}}{\sqrt{b}}</script></span> is Another Handy Pattern</h3>
<p>As long as we keep in mind the restrictions on applicability, <span><script type="math/tex">\sqrt{ab} = \sqrt{a}\sqrt{b}</script></span> is also a handy pattern and expansion. Wrap it up in your brainbox alongside it’s close cousin, where they can keep each other company.</p>
<h2 id="proof-sqrta2-ne-a-for-all-a">Proof: <span><script type="math/tex">\sqrt{a}^2 \ne a</script></span> for all <span><script type="math/tex">a</script></span></h2>
<p>I could hear <a href="https://en.wikipedia.org/wiki/Admiral_Ackbar">Admiral Akbar</a> in the back of my head here. The clear implication from Gelfand is that it’s not true for all <span><script type="math/tex">a</script></span>. Let’s try our go-to zero and negatives and see what we get.</p>
<p>Zero first.</p>
<div class="mathblock"><script type="math/tex; mode=display"> \sqrt{0}^2 = a,</script></div>
<p>The first question we get to is, do we square it or root it first? Let’s square it</p>
<div class="mathblock"><script type="math/tex; mode=display"> \sqrt{0} = a^2,</script></div>
<p>now root it</p>
<div class="mathblock"><script type="math/tex; mode=display"> 0 = a.</script></div>
<p>That works, and our <span><script type="math/tex">\sqrt{a}^2 = a</script></span> holds too.</p>
<p>And if we root then square?</p>
<div class="mathblock"><script type="math/tex; mode=display"> 0^2 = \sqrt{a},</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> 0 = a.</script></div>
<p>That works too. So we’re OK on the zero-front.</p>
<p>Now for negatives. Let’s try <span><script type="math/tex">a = -1</script></span>. But we know we need to tread carefully; there is a trap. Where could it be?</p>
<p>The “trap” here is one of convention and notation, the one we highlighted in <a href="http://localhost:4000/2017/05/09/gelfands-algebra-chunk-25-reduced-quadratic-equations/">Chunk 25 - Ramifications of Reduced Quadratics</a>. If Gelfand had wanted to be explicit about the negative-nature of <span><script type="math/tex">a</script></span> then he would have represented it as <span><script type="math/tex">(-a)</script></span> which you would say as “negative a”. The parentheses are important here. What we have here is slightly different, and is equivalent to <span><script type="math/tex">(-1) \cdot a</script></span>. Given that, let’s work it through and see what we get.</p>
<p>Dropping in negative <span><script type="math/tex">a</script></span> in the form of <span><script type="math/tex">(-1) \cdot a</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display"> (-1) \cdot \sqrt{1}^2 = a,</script></div>
<p>therefore</p>
<div class="mathblock"><script type="math/tex; mode=display"> (-1) \cdot 1 = a,</script></div>
<p>which means</p>
<div class="mathblock"><script type="math/tex; mode=display"> -1 = a,</script></div>
<p>or to returm to Gelfand</p>
<blockquote>
<p>when <span><script type="math/tex">a</script></span> is negative, <span><script type="math/tex">\sqrt{a}^2</script></span> is equal to <span><script type="math/tex">-a</script></span>.</p>
</blockquote>
<h2 id="some-lovely-new-notation---absolute-value">Some Lovely New Notation - Absolute Value</h2>
<p>One the side-reasons I’m writing this is to learn some <a href="https://www.latex-project.org/about/">LaTeX</a>. Consequently, it’s always nice to get some new notation as I have to go off and find out how to script it. Up next, the “absolute value of <span><script type="math/tex">a</script></span>”.</p>
<p>But first the concept. The “absolute value” of something is how far it is from zero. I.e. the absolute value of <span><script type="math/tex">10</script></span> is <span><script type="math/tex">10</script></span>, and the absolute value of <span><script type="math/tex">-10</script></span> is also <span><script type="math/tex">10</script></span>.</p>
<p>This is shown, as Gelfand has just used, using two vertical lines, one on either side of the symbol. Therefore, rather than writing “the absolute value of <span><script type="math/tex">a</script></span>” we can instead write:</p>
<div class="mathblock"><script type="math/tex; mode=display">|a|</script></div>
<p>So what is Gelfand doing with this new notation? Well it turns out there is actually a more formal way of using absolute values. When a number (or symbol) is positive or zero, we leave it alone. But when it’s negative we change it to be positive and write the following:</p>
<div class="mathblock"><script type="math/tex; mode=display"> \sqrt{2}^2 = |a| \lbrace a, \text{if } a \ge 0. -a, \text{if } a \lt 0 </script></div>
<h2 id="problem-231a">Problem 231(a)</h2>
<p>Gelfand asks us to prove the following</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{2 + \sqrt{3}} = 2 - \sqrt{3}</script></div>
<p>We can kick off by losing the fraction through multiplying both sides by <span><script type="math/tex">2 + \sqrt{3}</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">1 = (2 - \sqrt{3})(2 + \sqrt{3}),</script></div>
<p>then we can spot and apply the difference of squares pattern</p>
<div class="mathblock"><script type="math/tex; mode=display">1= (2^2 - (\sqrt{3})^2),</script></div>
<p>and then calculate out the result</p>
<div class="mathblock"><script type="math/tex; mode=display">1 = 4 - 3.</script></div>
<h2 id="problem-231b">Problem 231(b)</h2>
<p>Gelfand asks us to prove the following</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{\sqrt{7} - \sqrt{5}} = \frac{\sqrt{5} + \sqrt{7}}{2}</script></div>
<p>We can start by losing the fractions on both sides using our standard pattern</p>
<div class="mathblock"><script type="math/tex; mode=display">2 = (\sqrt{7} - \sqrt{5})(\sqrt{5} + \sqrt{7}),</script></div>
<p>which then leaves us with another nice pattern which we can spot as a difference of squares if we shuffle the <span><script type="math/tex">\sqrt{5} + \sqrt{7}</script></span> which is perfectly valid.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Which we will remember as the <em>Commutative Law</em>. </span></p>
<div class="mathblock"><script type="math/tex; mode=display">2 = \sqrt{7}^2 - \sqrt{5}^2,</script></div>
<p>leaving a very simple sum to verify our result</p>
<div class="mathblock"><script type="math/tex; mode=display">2 = 7 - 5.</script></div>
<h2 id="problem-232">Problem 232</h2>
http://andrewharmellaw.github.io/2017/05/19/gelfands-algebra-chunk-27-rules-for-roots
http://andrewharmellaw.github.io/2017/05/19/gelfands-algebra-chunk-27-rules-for-rootsFri, 19 May 2017 00:00:00 +0100Gelfand: Chunk 26 - Some Square Roots are Irrational
<p><span class="newthought">We’re stepping away</span> from quadratics completely for this Chunk. Like a dog following an interesting scent, Gelfand is off on what might to the uninitiated seem like a tangent. If you’ve been following along you’ll know that in fact you should be paying <em>more attention</em> at such times. It’s in these digressions that Gelfand typically hides gold which we will rely on later on in our journey.</p>
<p>We’re going to work through the next two problems in our traditional painful levels of detail. While interesting, the thing we are proving - that certain numeric roots are irrational numbers - is not the reason for our travails. The point is that Gelfand’s worked solutions are going to give us more than a few new mental tools for our problem-solving kitbag. Ones which we’ll need to chunk solidly if we are to progress much further than this.</p>
<h2 id="proving-sqrt2-is-irrational">Proving <span><script type="math/tex">\sqrt{2}</script></span> is Irrational</h2>
<p>Gelfand begins his solution<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Remember, there are <em>many</em> solutions to most problems in mathematics. Simply because this is the one Gelfand shows us does not mean it is the only one. We should however assume that (a) it is correct and (b) there are pedagogic reasons for choosing this one. </span> to Problem 226 by setting out his stall in a way that should now be familiar.</p>
<h3 id="laying-out-the-stall">Laying Out the Stall</h3>
<p>First he represents all the elements symbolically:</p>
<div class="mathblock"><script type="math/tex; mode=display">\sqrt{2} = \frac{m}{n}</script></div>
<p>The then points out that given this, there are four different possibilities in what this gives us. Firstly, that both <span><script type="math/tex">m</script></span> and <span><script type="math/tex">n</script></span> are odd, that <span><script type="math/tex">m</script></span> is even and <span><script type="math/tex">n</script></span> is odd, that <span><script type="math/tex">m</script></span> is odd and <span><script type="math/tex">n</script></span> is even, and that both <span><script type="math/tex">m</script></span> and <span><script type="math/tex">n</script></span> are even. He then points out that the last option can actually be expressed in terms of one of the other options if we divided it by <span><script type="math/tex">2</script></span> a number of times.</p>
<p>For example</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{8}{6} = \frac{4}{3}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\frac{162}{100} = \frac{81}{50}</script></div>
<p>We could at this point forge ahead with Gelfand, but let’s hold on a minute. We’re suddenly back in the world of odds and evens. Why?</p>
<p>Remember we’re trying to prove (i.e. demonstrate) that some numbers, for example <span><script type="math/tex">\sqrt{2}</script></span> <em>can’t</em> be represented in the form <span><script type="math/tex">\frac{m}{n}</script></span> where <span><script type="math/tex">m</script></span> and <span><script type="math/tex">n</script></span> are integers. This means what we’re actually looking for is this</p>
<div class="mathblock"><script type="math/tex; mode=display">\sqrt{2} \ne \frac{m}{n}</script></div>
<p>Next up, note the approach Gelfand is taking; he is proving something is the case, by taking all the options to disprove it, and showing that they are not possible.</p>
<p>This is why we have our three options which we prove in turn - Gelfand’s proof-approach is based on <em>an-odd-can’t-be-even</em> and <em>an-even-can’t-be-odd</em> statements of fact. For this to hold water, he needs to consider all the odd/even inputs, to be able to draw general odd/even conclusions.</p>
<p>With all this in our <a href="https://en.wikipedia.org/wiki/CPU_cache">level-one mental cache</a>, let’s continue.</p>
<h3 id="representing-odd-and-even-symbolically">Representing Odd and Even Symbolically</h3>
<p>Now we need to represent odd numbers and even numbers, but we need to use symbols, so that we’re proving things for <em>all odd</em> and <em>all even</em> numbers. We use something that we’ve seen before.</p>
<p>Evens are</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2k, </script></div>
<p>and Odds are</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2k + 1. </script></div>
<p>In both cases, <span><script type="math/tex">k</script></span> is any integer including <span><script type="math/tex">0</script></span>.</p>
<h3 id="proof-part-a---fracoddodd">Proof Part (a) - <span><script type="math/tex">\frac{odd}{odd}</script></span></h3>
<p>We start where Gelfand starts, by restating our (in)equality in terms of <span><script type="math/tex">k</script></span> (and also <span><script type="math/tex">l</script></span> which allows our numerator and denominator to be different numbers.)<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I’ve flipped the sides of the working that follows. Primarily to keep the reading flow, but also to keep you on your toes mentally. You can thank me later, dear reader. </span></p>
<div class="mathblock"><script type="math/tex; mode=display"> \sqrt{2} = \frac{2k + 1}{2l + 1} </script></div>
<p>Then we work this through, starting by squaring both sides</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 = \left(\frac{2k + 1}{2l + 1}\right)^2 </script></div>
<p>and re-writing the same a little more cleanly</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 = \frac{(2k + 1)^2}{(2l + 1)^2} </script></div>
<p>then rearranging</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (2l + 1)^2 = (2k + 1)^2 </script></div>
<p>and finally expanding the right hand side</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (2l + 1)^2 = 4k^2 + 4k + 1 </script></div>
<p>Now we can stop. We have what we need to prove our first inequality.</p>
<p>Considering the left hand side first. It comprises <em>some unknown value</em> <span><script type="math/tex">l</script></span> which is multiplied by <span><script type="math/tex">2</script></span>. Clearly for every possible value of <span><script type="math/tex">l</script></span>, this will be even. So the left hand side will always be even.</p>
<p>Now the right hand side. It comprises <em>two unknown values</em> <span><script type="math/tex">4k^2</script></span> and <span><script type="math/tex">4k</script></span> which are both multipled by <span><script type="math/tex">4</script></span>. Clearly these must both be even also, as to multiply something by <span><script type="math/tex">4</script></span> is the same as multiplying it by <span><script type="math/tex">2</script></span> and then multiply it by <span><script type="math/tex">2</script></span> again. But there is something left, a <span><script type="math/tex">1</script></span>. And we know from previously that odd numbers are obtained by adding <span><script type="math/tex">1</script></span> to even numbers. This means the right hand side will always be odd.</p>
<p>This is summarised much more pithily by Gelfand</p>
<blockquote>
<p>Contradiction: (even number) + 1 = (even number)</p>
</blockquote>
<h3 id="proof-part-b---fracevenodd">Proof Part (b) - <span><script type="math/tex">\frac{even}{odd}</script></span></h3>
<p>Up next, even divided by odd. We start in an equivalent place to before:</p>
<div class="mathblock"><script type="math/tex; mode=display"> \sqrt{2} = \frac{2k}{2l + 1} </script></div>
<p>Working this through as before, we again start by squaring both sides</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 = \left( \frac{2k}{2l + 1} \right) ^2 </script></div>
<p>then rearranging (no need for cleaning up this time)</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (2l + 1)^2 = (2k)^2 </script></div>
<p>next we expand the right hand side</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (2l + 1)^2 = 4k^2 </script></div>
<p>before expanding the left hand side</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (4l^2 + 4l + 1) = 4k^2 </script></div>
<p>and finally dividing both sides by <span><script type="math/tex">2</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display"> 4l^2 + 4l + 1 = 2k^2 </script></div>
<p>We can stop here as we have what we need to prove our second inequality.</p>
<p>Again reading from left to right, we start at the left where this half of the (in)equality is <em>exactly the same as the left-hand side in part (a)</em>. This means the right hand side will always be odd.</p>
<p>Now the right hand side. It is slightly different from part (a), comprising <em>some unknown value</em> <span><script type="math/tex">k</script></span> which is multiplied by itself (squared) and then multiplied by <span><script type="math/tex">2</script></span>. Clearly for every possible value of <span><script type="math/tex">k</script></span>, this will be even. So the right hand side will always be even.</p>
<p>Yet again we have something which is odd, equalling something which is even, which is not possible. Back to Gelfand again for the punchline:</p>
<blockquote>
<p>Contradiction: (even number) + 1 = (even number)</p>
</blockquote>
<h3 id="proof-part-c---fracoddeven">Proof Part (c) - <span><script type="math/tex">\frac{odd}{even}</script></span></h3>
<p>Finally, odd divided by even. We start yet again in our equivalent place:</p>
<div class="mathblock"><script type="math/tex; mode=display"> \sqrt{2} = \frac{2k + 1}{2l} </script></div>
<p>Working through again we square both sides</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 = \left( \frac{2k + 1}{2l} \right) ^2 </script></div>
<p>And then multiply both sides by <span><script type="math/tex">2l^2</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (2l)^2 = (2k + 1)^2 </script></div>
<p>before finally expanding the right hand side</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 \cdot (2l)^2 = 4k^2 + 4k + 1 </script></div>
<p>The result is pretty easy to read now given the practice we’ve had in (a) and (b). The right hand side is clearly always even, while the left hand side can only ever be odd. Back to Gelfand for one last statement:</p>
<blockquote>
<p>Contradiction: (even number) = (even number) + 1</p>
</blockquote>
<h3 id="in-conclusion">In Conclusion</h3>
<p>To conclude, we have shown that <span><script type="math/tex">\sqrt{2}</script></span> is always an irrational number, because we have shown that all the ways in which we <em>might</em> represent it as a rational number are impossible.</p>
<h2 id="what-about-sqrt3">What about <span><script type="math/tex">\sqrt{3}</script></span>?</h2>
<p>This is Problem 227. You can prove it using exactly the same method Gelfand laid out for us. I’ll not set it out here. I suggest you follow it through yourself however as the doing helps the chunking.</p>
<h2 id="we-cheated">We Cheated?!?</h2>
<p>We’re almost done. Hurrah! But Gelfand wants to keep us on our toes. Apparently we<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">Led by him admittedly. </span> cheated. What? How so? It turns out that the Greeks weren’t completely incompetent. When we <em>made up</em> <span><script type="math/tex">\sqrt{2}</script></span> we were in fact admitting defeat. <span><script type="math/tex">\sqrt{2}</script></span> means nothing except as</p>
<blockquote>
<p>“the positive solution to <span><script type="math/tex">x^2 - 2 = 0</script></span>”.</p>
</blockquote>
<p>It’s worth letting that sink in for a while, just to keep you frosty.</p>
http://andrewharmellaw.github.io/2017/05/16/gelfands-algebra-chunk-26-proving-irrational-roots
http://andrewharmellaw.github.io/2017/05/16/gelfands-algebra-chunk-26-proving-irrational-rootsTue, 16 May 2017 00:00:00 +0100Gelfand: Chunk 25 - Ramifications of Reduced Quadratics
<p><span class="newthought">There are times when you’re learning something new</span> and you just have to take a leap of faith and follow your teacher despite the fact you might not know where you’re going. This, for me anyway, is one such situation.</p>
<h2 id="considering-quadratics-in-certain-situations">Considering Quadratics in Certain Situations</h2>
<p><span class="newthought">Let’s go back</span> to our quadratic standard form, and just trust Gelfand is going to take us somewhere interesting (and useful). The whole of this section is handily conceived as a set of views of quadratics under certain situations.</p>
<p>Here is our starting point, the standard quadratic form:</p>
<div class="mathblock"><script type="math/tex; mode=display">ax^2 + bx + c = 0</script></div>
<p>And then we play with it a little. First up, we consider the situation if the co-efficient <span><script type="math/tex">a</script></span> was zero.</p>
<div class="mathblock"><script type="math/tex; mode=display">0x^2 + bx + c = 0</script></div>
<p>That gives us the following</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow bx + c = 0</script></div>
<p>Which we can solve for <span><script type="math/tex">x</script></span> as follows</p>
<div class="mathblock"><script type="math/tex; mode=display">bx + c = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow bx = -c</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x = -\frac{c}{b}</script></div>
<p>But here comes a bump in the road. Gelfand points out that this won’t always work. What if <span><script type="math/tex">b</script></span> is zero he asks? Dividing anything by zero gives an undefined result as we saw previously in the <a href="https://andrewharmellaw.github.io/algebra/2016/11/16/gelfands-algebra-chunk-1-fundamentals/">first Chunk - Fundamentals</a>.</p>
<p>Dang.</p>
<p>He then leaves us here, with just the stated Problem 225. How can we solve it?</p>
<p>Let’s go back a step and put <span><script type="math/tex">b = 0</script></span> into a previous step in our working.</p>
<div class="mathblock"><script type="math/tex; mode=display">bx = -c</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 0 \times x = -c</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 0 = -c</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow c = 0</script></div>
<p>This is more like it. We can then bubble this back up to the standard quadratic form and make a statement:</p>
<blockquote>
<p>If <span><script type="math/tex">a = b = 0</script></span> then <span><script type="math/tex">c = 0</script></span>, and if this is the case, then <em>any</em> <span><script type="math/tex">x</script></span> will satisfy the equation.</p>
</blockquote>
<p>Continuing in the standard form, Gelfand now introduces us to another common way of phrasing the exact same thing:</p>
<div class="mathblock"><script type="math/tex; mode=display">ax^2 + bx + c = 0</script></div>
<p>Here he shows us, if <span><script type="math/tex">x \ne 0</script></span>, then we can shuffle things as so</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 + \frac{b}{a}x + \frac{c}{a} = 0</script></div>
<p>This is known as the <em>“reduced” quadratic equation</em>.</p>
<p>Why do we do this? It’s all so that we can have different ways of looking at quadratics, so then our tricks can be applied<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">I.e. Pattern matched effectively. </span> in a greater number of circumstances. In this case, Gelfand tells us, if we can solve the reduced quadratic, we can solve any quadratic. That sounds handy.</p>
<p>There is one final point from Gelfand before we start mucking about with these reduced quadratics - there is another convention about writing these, and that is to use the following form, which I personally like as it hides those horrid fractions.</p>
<div class="mathblock"><script type="math/tex; mode=display">x^2 + px + q = 0</script></div>
<h2 id="fiddling-with-the-reduced-quadratic---when-p--0">Fiddling with the Reduced Quadratic - when <span><script type="math/tex">p = 0</script></span></h2>
<p><span class="newthought">Having learned from the previous section,</span> we should be wary of just considering this from only a single angle, and of assuming things stay the same no matter how the constituents vary. If you are, then that’s good, because it’s how Gelfand wants to approach it too. He has three angles on the reduced quadratic when <span><script type="math/tex">p = 0</script></span>. Let’s get ourselves to the starting blocks first so we’re assured of clarity.</p>
<div class="mathblock"><script type="math/tex; mode=display">x^2 + px + q = 0</script></div>
<p>Then we set <span><script type="math/tex">p = 0</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 + 0 \times x + q = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 + q = 0</script></div>
<p>Given this, let’s now look at the possible values for <span><script type="math/tex">q</script></span> one at a time turn.</p>
<ol>
<li><span><script type="math/tex">q = 0</script></span>, which means <span><script type="math/tex">x</script></span> has only one possible value: <span><script type="math/tex">0</script></span></li>
<li><span><script type="math/tex">q \gt 0</script></span>, which is impossible because <span><script type="math/tex">x^2</script></span> is <em>always</em> positive and added to positive <span><script type="math/tex">q</script></span> is <em>always</em> more than zero</li>
<li><span><script type="math/tex">q \lt 0</script></span>, which is where it gets interesting. So interesting in fact that we should break out of this list and examine things in more detail.</li>
</ol>
<p>We’re starting here</p>
<div class="mathblock"><script type="math/tex; mode=display">x^2 + q = 0</script></div>
<p>And if <span><script type="math/tex">q \lt 0</script></span><label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">Which means it’s negative. </span> we can re-write</p>
<div class="mathblock"><script type="math/tex; mode=display">x^2 + -q = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 = - (-q)</script></div>
<p>Now it’s important here to point out that this is slightly different from how Gelfand presents it. While his and mine are mathematically equivalent, I’ve made the fact that <span><script type="math/tex">q</script></span> is negative explicit symbolically. <label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Gelfand achieves the same by saying “is a (positive) number -q” </span></p>
<p>We’re now left with the fact that on one side we have the square of <span><script type="math/tex">x</script></span> which is equivalent to <span><script type="math/tex">q</script></span>. Clearly to get to <span><script type="math/tex">x</script></span> on it’s own, we need to square root <span><script type="math/tex">q</script></span>. This is why we suddenly launch into “Fact” territory; with a definition of roots.</p>
<blockquote>
<p>For any positive number <span><script type="math/tex">q</script></span> there is a positive number whose square is <span><script type="math/tex">q</script></span>. It is called the square root of <span><script type="math/tex">q</script></span>; its notation is <span><script type="math/tex">\sqrt{q}</script></span></p>
</blockquote>
<p>This is the first time Gelfand has really <em>properly</em> defined roots of numbers for us.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">He does admit we’d glimpsed it when we were factoring, but now, as we embark on some more general principles, it’s time to dive into the details. The fact I went away earlier and <a href="http://localhost:4000/2017/04/24/gelfands-algebra-aside-3-roots-roots-and-more-roots/">did it off my own bat</a> was to help disambiguate and prevent prior knowledge getting in the way of things. </span> Now he has deemed that we are ready to know the full picture.</p>
<p>Let’s follow along.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">I’m not sure why Gelfand makes a jump here with his symbol-usage, dropping the q we had a minute ago and using c instead. Suffice to say, the two are equivalent. I’ll keep going with q as I think it’s every so slightly easier on the mental muscles. </span></p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 = - (-q)</script></div>
<p>First we simplify, negative times negative is positive</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 = q</script></div>
<p>Then rearrange as per Gelfand</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 - q = 0</script></div>
<p>Then make <span><script type="math/tex">q</script></span> a square, which requires us to root it first</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 - (\sqrt{q})^2 = 0</script></div>
<p>And now we can factor using Difference of Squares</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow (x - \sqrt{q})(x + \sqrt{q}) = 0</script></div>
<p>This means that there are two solutions, <span><script type="math/tex">m = \sqrt{q} </script></span> and <span><script type="math/tex">m = -\sqrt{q} </script></span>.</p>
<p>At this point, Gelfand finally confronts the question which had, to me anyway, been in my mind since the start of this Chunk: “why are we considering this?”</p>
<p>The answer is a good one. The reason is we have proven that <span><script type="math/tex">x^2 = q</script></span> but we have also proven that <em>there is no other solution</em>. That is to say, there is no other way we could factor this if we want a zero result.</p>
<p>But why is this exciting? We’re now going on a bit of a history lesson and are about to find out that something which we now take for granted is in fact something which puzzled the Greeks for ages. Gelfand’s explanation refers to “several pages of a good calculus textbook” which means we’re thinking about lines here. What he wants us to get to is the fact that if we imagine a plotted line where the x-axis is equal to <span><script type="math/tex">x</script></span> and the y-axis is equal to <span><script type="math/tex">x^2</script></span>. On this line there is a point somewhere in that space which represents our <span><script type="math/tex">q</script></span>. To get there we travel along the line.</p>
<p>We start with <span><script type="math/tex">x = 0</script></span>. In this state the following is also true <span><script type="math/tex">x^2 = 0</script></span>. But what happens as we increase <span><script type="math/tex">x</script></span>? Well, as it increases, so does <span><script type="math/tex">x^2</script></span>. To begin with, while <span><script type="math/tex">x \lt 1</script></span> we can see that <span><script type="math/tex">x^2 \lt x</script></span>. <label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Go ahead try it with x = 0.5 and see for yourself. </span>. If you then jump forward a bit, to a <em>really big <span><script type="math/tex">x</script></span></em>, we can see that now <span><script type="math/tex">x^2 \gt x</script></span>. <label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Again, try it, this time with x = 100. </span></p>
<p>It doesn’t take a lot of imagination to realise that if you pick a value of <span><script type="math/tex">x</script></span> <em>in between</em> <span><script type="math/tex">0.5</script></span> and <span><script type="math/tex">100</script></span>, you will get a value of <span><script type="math/tex">x^2</script></span> <em>in between</em> <span><script type="math/tex">0.25</script></span> and <span><script type="math/tex">10000</script></span>. You could keep going <em>ad infinitum</em> and end up with something approaching a line. The point Gelfand wants us to grok is, somewhere on this line we will find <span><script type="math/tex">x^2 = q%</script></span>, and therefore we have proven that <span><script type="math/tex">q</script></span> exists, even if we can’t calculate it exactly.</p>
<p>The last parts of this section in Gelfand<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">And of <a href="https://andrewharmellaw.github.io/2017/05/16/gelfands-algebra-chunk-26-proving-irrational-roots/">the next Chunk.</a> </span> are concerned with stepping you through proving that, while numbers like <span><script type="math/tex">\sqrt{2}</script></span> and <span><script type="math/tex">\sqrt{3}</script></span> <em>exist</em>, we can’t represent them via <a href="https://www.mathsisfun.com/definitions/rational-number.html">a rational number</a>. This is where the Greeks became unstuck as they only had integers and rational numbers based on integers. Luckily, we now have other types of number, the irrational numbers which we introduced in <a href="https://andrewharmellaw.github.io/2016/11/16/gelfands-algebra-chunk-1-fundamentals/">Chunk 1 - Fundamentals</a>, and also encountered in <a href="https://andrewharmellaw.github.io/2017/04/25/gelfands-algebra-chunk-24-equations-schmequations/">the previous Chunk - Equations, Schmequations</a>.</p>
<p>However, seeing as we’ve covered a lot in this chunk, we’ll stop for now after the next small section.</p>
<h2 id="tricks-arising">Tricks Arising</h2>
<h3 id="more-than-a-subtlety-of-notation---the-difference-between--2-and--2">More Than a Subtlety of Notation - The Difference Between <span><script type="math/tex">-2</script></span> and <span><script type="math/tex">(-2)</script></span></h3>
<p>We need to cover a little convention in notation. It is the fact that there is a difference in maths between <span><script type="math/tex">-2</script></span> and <span><script type="math/tex">(-2)</script></span>. What is it? If we the same “squaring” operation on both of them you’ll see it.</p>
<p>We’ll take the second one first</p>
<p><span><script type="math/tex"> (-2)^2 = -2 \cdot -2 = 4. </script></span></p>
<p>Now the first one</p>
<p><span><script type="math/tex"> -2^2 = -(2^2) = (-1) \cdot (2^2) = (-1) \cdot (2 \cdot 2) = (-1) \cdot 4 = (-1) \cdot (4) = -4. </script></span></p>
<p>That’s pretty subtle, but important.<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">Remember it - Gelfand uses it as the basis of another Trick in a few Sections time. </span></p>
<p>Consequently, if you have a value <span><script type="math/tex">x</script></span>, (which could be either positive or negative) and you then square it, and then you square root the result, you will be left with either <span><script type="math/tex">x</script></span> <em>or</em> <span><script type="math/tex">(-x)</script></span> depending on where you started. (This applies for <em>all</em> values of <span><script type="math/tex">x</script></span>.)</p>
<h3 id="sqrt2-is-irrational"><span><script type="math/tex">\sqrt{2}</script></span> is <em>Irrational</em></h3>
<p>The <span><script type="math/tex">\sqrt{2}</script></span> is an <em>irrational</em> number, so you can’t represent it as a quotient of two integers.</p>
<p>However, it’s not simply a convention like we have with <span><script type="math/tex">a^{-n} = \frac{1}{a^n}</script></span>. The problem here is that the fraction that represents <span><script type="math/tex">\sqrt{2}</script></span> would have a never-ending stream of numbers in the numerator-position if it were to avoid being approximation. That’s no good at all, and so we bring in instead the previously discussed idea of “irrational numbers”.</p>
<p>That’s <a href="http://localhost:4000/2017/05/16/gelfands-algebra-chunk-26-proving-irrational-roots/">the next Chunk</a>.</p>
http://andrewharmellaw.github.io/2017/05/09/gelfands-algebra-chunk-25-reduced-quadratic-equations
http://andrewharmellaw.github.io/2017/05/09/gelfands-algebra-chunk-25-reduced-quadratic-equationsTue, 09 May 2017 00:00:00 +0100Gelfand: Chunk 24 - Equations, Schmequations
<p><span class="newthought">After the “Well Tempered Clavier” interlude</span> we’re about to have a little more ground prepared for us before we dive into the next core concept. That means this should be an easy chunk for you. Enjoy it. For roots are coming.</p>
<h2 id="some-definitions">Some Definitions</h2>
<p><span class="newthought">This section in Gelfand (46)</span> begins with some definitions. I found it useful to take these and re-state them in my own terms.<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">It was useful to have to write it, and perhaps it will help you to have an alternative too. </span></p>
<blockquote>
<p>An <em>Identity</em> says “this expression is equal to that expression”. If <em>proved</em> (by applying standard algebraic transformations) then it holds for <em>all</em> values of the variables. That is also the standard mechanism by which an Identity is <em>refuted</em> - by finding values for the variables where the expressions are <em>not equal</em>.</p>
</blockquote>
<blockquote>
<p>An <em>Equation</em> says “these two expressions are equal”. It must be <em>solved</em> (i.e. you must find <em>all</em> the values of the variables for which the left hand side is equal to the right hand side).</p>
</blockquote>
<p>Note: Mathematicians don’t say an Equation is “unsolvable”, because they deem it to be solved if they prove it can have no solutions. To “solve” therefore means to find all, or prove that there are no, solutions.</p>
<h2 id="one-more-key-definition">One More Key Definition</h2>
<p><span class="newthought">Gelfand then introduces</span> some more terms for us in a short glossary (Section 47). It is worth highlighting an element in his definition of “solutions of an equation”.</p>
<p>This brings in the term “root” once again. You’ll recall that we’ve seen it before <a href="https://andrewharmellaw.github.io/tags.html#roots-ref">almost whenever we talked about Polynomials, and more</a>. To avoid confusion, this “root” is not the same as a “square” root. These are two entirely unrelated concepts. This is why I wrote <a href="https://andrewharmellaw.github.io/2017/04/24/gelfands-algebra-aside-3-roots-roots-and-more-roots">my previous aside</a> to help me get things super clear. I you skipped it, you might want to go back to it now. It’s short.<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">I promise. </span></p>
<h2 id="quadratic-equations">Quadratic Equations</h2>
<p><span class="newthought">There then follows a nice set of questions</span> where you’re asked to solve some <em>Quadratic Equations</em>, following on from Gelfand’s lead in Problem 223. I’m going to step through them here too. It’ll help set a nice pace prior to the next chunk.<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">Am I building it up enough? </span> Some differ a little from the solution in <a href="https://www.scribd.com/document/243387607/Gelfand-Algebra-Solutions">Durham</a> and so much the better. Please read his solutions too as it all helps.</p>
<h3 id="problem-224a">Problem 224(a)</h3>
<p>We start with</p>
<div class="mathblock"><script type="math/tex; mode=display">x^2 - 4 = 0</script></div>
<p>If we do a little fiddling</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow (x^2)-(2^2) = 0</script></div>
<p>then we can see the <em>Difference of Squares</em> which we can factor easily</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x + 2)(x - 2) = 0</script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display">x + 2 = 0 \rightarrow x = -2</script></div>
<p>or</p>
<div class="mathblock"><script type="math/tex; mode=display">x - 2 = 0 \rightarrow x = 2</script></div>
<p>Therefore the equation has two roots - <span><script type="math/tex">x = 2</script></span> and <span><script type="math/tex">x = - 2</script></span></p>
<h3 id="problem-224b">Problem 224(b)</h3>
<p>Now we begin with</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 + 2 = 0 </script></div>
<p>Let’s take a similar first step to (a)</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 + \sqrt{2}^2 = 0 </script></div>
<p>Hmmm, but this has a <span><script type="math/tex">+</script></span> rather than a <span><script type="math/tex">-</script></span> so we need to do some more shuffling before we have a <em>Difference of Squares</em>.</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - (\sqrt{-1} \times \sqrt{2})^2 = 0</script></div>
<p>Note in the step above the flip from <span><script type="math/tex">x^2 + ..</script></span>. to <span><script type="math/tex">x^2 - ...</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x - \sqrt{-1} \times \sqrt{2})(x + \sqrt{-1} \times \sqrt{2}) = 0</script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = \sqrt{-1} \times \sqrt{2} </script></div>
<p>or</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = -\sqrt{-1} \times \sqrt{2} </script></div>
<p>Why did we put in that step which takes us from <span><script type="math/tex">x^2 + ...</script></span> to <span><script type="math/tex">x^2 - ...</script></span>?</p>
<p>Because it makes it easier to factor as it allows us to use a <a href="https://andrewharmellaw.github.io/2016/12/17/gelfanfd-algebra-chunk-6-squares-sums-diffs-etc"><em>Short Multiplication Formula</em></a>.</p>
<h3 id="problem-224c">Problem 224(c)</h3>
<p>This time we have</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - 2x + 1 = 0 </script></div>
<p>This looks like a <em>Square of a Sum</em>, let’s see</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - 2x \cdot 1 + 1^2 </script></div>
<p>Yup, it is, which means we can factor</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x - 1)(x - 1) = 0 </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x - 1)^2 = 0 </script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = 1 </script></div>
<h3 id="problem-224d">Problem 224(d)</h3>
<p>This time we are presented with</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - 2x + 1 = 9 </script></div>
<p>Applying the result from 224(c), we can state</p>
<div class="mathblock"><script type="math/tex; mode=display"> (x - 1)^2 = 9 </script></div>
<p>And therefore</p>
<div class="mathblock"><script type="math/tex; mode=display"> x - 1 = ±3 </script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = 3 + 1 = 4</script></div>
<p>or</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = -3 + 1 = -2 </script></div>
<h3 id="problem-224e">Problem 224(e)</h3>
<p>This one looks familiar</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - 2x - 8 = 0 </script></div>
<p>Which is easy enough to rearrange (by adding <span><script type="math/tex">9</script></span> to each side)</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - 2x + 1 = 9 </script></div>
<p>Which means the answers are the same as 224(d), <span><script type="math/tex">4</script></span> and <span><script type="math/tex">-2</script></span>.</p>
<h3 id="problem-224e-1">Problem 224(e)</h3>
<p>Is this one as simple?</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - 2x - 3 = 0 </script></div>
<p>Again we can rearrange</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - 2x + 1 = 4 </script></div>
<p>Though we’ve not got a pre-canned answer for this one so we need to do some leg-work</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x - 1)^2 = 4 </script></div>
<p>And therefore</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x - 1 = ±2 </script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = 2 + 1 = 3</script></div>
<p>or</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = -2 + 1 = -1 </script></div>
<h3 id="problem-224f">Problem 224(f)</h3>
<p>And finally</p>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - 5x + 6 = 0 </script></div>
<p>We’re not able to keep applying our same pattern here so we need to look elsewhere. The “split similar terms” trick from <a href="https://andrewharmellaw.github.io/2017/01/17/gelfands-algebra-chunk-10-factoring">Chunk 10 - Factoring</a> seems like it might be handy.</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - 5x + 2 \times 3 = 0 </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - 2x - 3x + 2 \times 3 = 0 </script></div>
<p>Then we can change the signs of some of our elements so the final factoring is easy</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - 2x - 3x + -2 \times -3 = 0 </script></div>
<p>And we can they collect it all together</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x - 2)(x - 3) = 0</script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = 2 </script></div>
<p>or</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = 3 </script></div>
<h3 id="problem-224f-1">Problem 224(f)</h3>
<div class="mathblock"><script type="math/tex; mode=display"> x^2 - x - 2 = 0 </script></div>
<p>Again we have to think for ourselves a little here, but just as in 224(e) we can use much the same trick</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - x - 1 \times 2 = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - (1 - 2)x + (1 \times -2) = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow x^2 - (1 - 2)x + (1 \times -2) = 0</script></div>
<p>And then collecting it all together</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (x + 1)(x - 2) = 0</script></div>
<p>Which means that</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = -1 </script></div>
<p>or</p>
<div class="mathblock"><script type="math/tex; mode=display"> x = 2 </script></div>
<h2 id="tricks-arising">Tricks Arising</h2>
<h3 id="keeping-positive-or-negative-when-working-with-square-roots">Keeping Positive (or Negative) when Working with Square Roots</h3>
<p>You will have probably noted the trick in 224(b) which turned (positive) <span><script type="math/tex">\sqrt{2}^2</script></span> into (negative) <span><script type="math/tex">-\sqrt{2}^2</script></span>. It’s achieved by multiplying it by <span><script type="math/tex">\sqrt{-1}</script></span>. Why not simply <span><script type="math/tex">-1</script></span>? Because we need to square it again alongside the <span><script type="math/tex">\sqrt{2}</script></span> to get back to where we started.</p>
<p>I’ve got a feeling that this little thread is the thing that Gelfand is now going to tug on and end up pulling us up into a whole new level of Algebra-appreciation.</p>
<p>Onward!</p>
http://andrewharmellaw.github.io/2017/04/25/gelfands-algebra-chunk-24-equations-schmequations
http://andrewharmellaw.github.io/2017/04/25/gelfands-algebra-chunk-24-equations-schmequationsTue, 25 Apr 2017 00:00:00 +0100Gelfand: Aside 3 - Roots, Roots and More Roots
<h2 id="roots-bldy-roots">Roots, Bl**dy Roots</h2>
<p><span class="newthought">We need to talk about roots.</span></p>
<p>There are situations you come across occasionally, as you learn something new, or try and gain a deeper understanding of something you half know, when two <em>totally separate</em><label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Repeat after me “SE-PAR-ATE”. Good </span> concepts share a common-name, and hence you tie yourself in knots trying to figure out how they are related.</p>
<p>In algebra, “roots” are one of those situations; and the two kinds aren’t related, <em>at all</em>.</p>
<p>In our journey so far we have come across the term “root” in two different circumstances:</p>
<ul>
<li>to indicate a number which, when multiplied by itself one or more times gives a real, non-negative number - i.e. a square root is the number which, when multiplied by itself once, gives the square</li>
<li>to indicate the solutions of polynomial equations - when the function equals zero. <em>Also known as a “zero”</em></li>
</ul>
<p>So far so simple. We get that they aren’t related, and also that perhaps we should be more explicit and use the alternative terms for them (or at least qualify them.) But can it get more complicated?</p>
<p>Yup.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">You know maths is hard right? </span></p>
<h2 id="they-can-occur-together">They <em>Can</em> Occur Together…</h2>
<p><span class="newthought">When I’m trying to get my head round something</span> it helps if the two things I’m conflating are actually in real life nice and separate, living on separate continents as it where, completely unaware of each other.</p>
<p>No so with roots and roots.</p>
<p>Casting our minds back to <a href="https://andrewharmellaw.github.io/2017/01/20/gelfands-algebra-chunk-11-factoring-to-zero">Chunk 11 - Factoring to Zero</a> we see that square roots and others were our way to determine the zero-roots of our polynomials.</p>
<p>Urgh.</p>
<p>I’ll leave you to go back and read that section again. It was all correct, but perhaps I (and Gelfand) would have done better to point out the Root-Rubicon that was being crossed completely unknowingly mid-problem.</p>
<h2 id="further-reading">Further Reading</h2>
<p><span class="newthought">It turns out that once you explicitly separate these elements nicely in your head,</span> a lot of other things become a lot simpler.</p>
<p>There are two brilliantly simple pages covering these:</p>
<ul>
<li><a href="https://www.wyzant.com/resources/lessons/math/algebra/square_roots_and_radicals">Square Roots and Radicals</a> (from Wyzant.com)</li>
<li><a href="https://www.mathsisfun.com/algebra/fundamental-theorem-algebra.html">The Fundamental Theorem of Algebra</a> (from MathsIsFun.com)</li>
</ul>
<p>With all that cleared up, we’re free now to move on to <em>Quadratic Equations</em>.<label for="sn-id" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id" class="margin-toggle" /><span class="sidenote">(Is that the sound of knees knocking?) </span></p>
http://andrewharmellaw.github.io/2017/04/24/gelfands-algebra-aside-3-roots-roots-and-more-roots
http://andrewharmellaw.github.io/2017/04/24/gelfands-algebra-aside-3-roots-roots-and-more-rootsMon, 24 Apr 2017 00:00:00 +0100Gelfand: Rest 1 - The Well-Tempered Clavier, Tortoises, Hares and Greeks
<p><span class="newthought">I’m not (for now) going to provide any gloss or commentary on sections 44 and 45 of Gelfand,</span> nor do I see much purpose in adding to the builds provded by Durham.</p>
<p>I might come back to them later I suppose, but at the moment it seems unnecessary.</p>
<p>Instead, you can jump straight to Section 46 with <a href="https://andrewharmellaw.github.io/2017/04/25/gelfands-algebra-chunk-24-equations-schmequations">Chunk 24 - Equations Schmequations</a> or you can take a detour via <a href="https://andrewharmellaw.github.io/2017/04/24/gelfands-algebra-aside-3-roots-roots-and-more-roots">a disambiguation of the various meanings in Mathematics of the word “Root”</a>.</p>
<p>It’s your choice.</p>
http://andrewharmellaw.github.io/2017/04/13/gelfands-algebra-rest-1-the-well-tempered-clavier
http://andrewharmellaw.github.io/2017/04/13/gelfands-algebra-rest-1-the-well-tempered-clavierThu, 13 Apr 2017 00:00:00 +0100Gelfand: Chunk 23 - Embedding Progressions
<p><span class="newthought">As I mentioned at the close of <a href="https://andrewharmellaw.github.io/2017/03/23/gelfands-algebra-chunk-22-geometric-progression-sums">the previous chunk</a>,</span> this next part (Section 43) is one of Gelfand’s now-familiar “moar problems to embed and highlight subtleties and techniques from before” sections.</p>
<p>I used to think them a bit boring. I now realise that it’s in these that a good deal of the gold is hidden.</p>
<p>Consequently I’m going to go slowly. Again, possibly too slowly for some, but my aim is simply to make sure we squeeze out all the goodness and siphon it up into our brainboxes, ready for later deployment.</p>
<h2 id="problem-204">Problem 204</h2>
<p><span class="newthought">This is a nice problem to start with.</span> Let’s begin to tackle it as we always do by taking our inputs and laying them out nicely ready for deployment in solutioning.</p>
<p>We know that we can represent a value in an <em>arithmetic</em> progression<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">key point, we are going back in time a bit here </span> as the product of a starting value (which we’ll keep calling <span><script type="math/tex">a</script></span>), the difference between terms (which we’ll keep calling <span><script type="math/tex">d</script></span>), and numbers representing the position of the terms in the progression (which we’ll call <span><script type="math/tex">n_x, n_y</script></span> and <span><script type="math/tex">n_z</script></span>).</p>
<p>What is more, if two or more terms are to be in the same progression, then they will share the values of <span><script type="math/tex">a</script></span> and <span><script type="math/tex">d</script></span> - the starting value and difference respectively. (A small aside: it’s not actually this simple, progressions can have different <span><script type="math/tex">a</script></span> values, but still overlap in terms of terms [sic - sorry], but this simplified view works for us here.)</p>
<p>With that in mind, we can specify our fractions separately in terms of this before seeing if they hang together [sic].</p>
<p>Note I’ve arranged the fractions in increasing order of magnitude. This means our <span><script type="math/tex">d</script></span> will be positive. Things could just as easily go the other way, in which case <span><script type="math/tex">d</script></span> would be negative. This just keeps things simpler I’ve found.</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{5} = a + (n_x - 1)d</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{3} = a + (n_y - 1)d</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{2} = a + (n_z - 1)d</script></div>
<p>How can we simplify these? The easiest way might be to guess that the starting point, <span><script type="math/tex">a</script></span>, was zero. That leaves us with</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{5} = (n_x - 1)d</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{3} = (n_y - 1)d</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{2} = (n_z - 1)d</script></div>
<p>Now how do we shuffle these so that <span><script type="math/tex">d</script></span> is isolated in each?</p>
<div class="mathblock"><script type="math/tex; mode=display"> \frac{1}{5} = (n_x - 1)d </script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow d = \frac{\frac{1}{5}}{(n_x - 1)}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow d = \frac{1}{5} \cdot \frac{1}{(n_x - 1)}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow d = \frac{1}{5(n_x - 1)}</script></div>
<p>Nice.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">If you need a reminder about the rules for fiddling with fractions, take a peek back at <a href="https://andrewharmellaw.github.io/2016/11/30/gelfands-algebra-chunk-4-fractions-urgh">Chunk 4 - Fractions (Urgh)</a>. </span></p>
<p>We’re able to rearrange our other starter expressions in the same way. I won’t bore you with the working for them. Instead let’s jump to laying them all out side by side as an equality:</p>
<div class="mathblock"><script type="math/tex; mode=display">d = \frac{1}{5(n_x - 1)} = \frac{1}{3(n_y - 1)} = \frac{1}{2(n_z - 1)}</script></div>
<p>Now, we know that in our case, <span><script type="math/tex">n_x</script></span>, <span><script type="math/tex">n_y</script></span> and <span><script type="math/tex">n_z</script></span> are different values because they represent different terms in our progression. The question is, can we find values for them that mean everything still stays valid?</p>
<p>It’s at this point that I’m happy to make a mental leap and simplify things. I think the following is self-evident</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 5(n_x - 1) = 3(n_y - 1) = 2(n_z - 1)</script></div>
<p>And from this point, we can take a trick we know from finding common denominators and work out that <span><script type="math/tex">d</script></span> is <span><script type="math/tex">30</script></span><label for="sn-id-whetever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whetever" class="margin-toggle" /><span class="sidenote">Or you can take this from Gelfand’s tip, but I’m trying to be good and get there without it. </span> and from there work out <span><script type="math/tex">n_x</script></span>, <span><script type="math/tex">n_y</script></span> and <span><script type="math/tex">n_z</script></span>.</p>
<div class="mathblock"><script type="math/tex; mode=display">5 \times ((3 \times 2 + 1) - 1 ) = 30</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow n_x = (3 \times 2) + 1 = 7 </script></div>
<div class="mathblock"><script type="math/tex; mode=display">3 \times ((5 \times 2 + 1) - 1 ) = 30</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow n_y = (5 \times 2) + 1 = 11 </script></div>
<div class="mathblock"><script type="math/tex; mode=display">2 \times ((5 \times 3 + 1) - 1 ) = 30</script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow n_z = (5 \times 3) + 1 = 16 </script></div>
<p>We’ve actually overshot here. The question was only to find out if the three terms could exist on the same arithmetic progression. Clearly they do, at points <span><script type="math/tex">7</script></span>, <span><script type="math/tex">11</script></span> and <span><script type="math/tex">13</script></span> where the difference is <span><script type="math/tex">\frac{1}{30}</script></span>.</p>
<h3 id="was-there-a-shortcut">Was There a Shortcut?</h3>
<p>Hell yes. <a href="https://www.scribd.com/document/243387607/Gelfand-Algebra-Solutions">Durham</a> spotted the common-denominator trick based on the fact that <span><script type="math/tex">30 = 2 \times 3 \times 5</script></span> before any fiddling around. I’m guessing that kind of insight comes with practice and confidence. I’m personally happy that I worked it all the way through.</p>
<h2 id="problem-205">Problem 205</h2>
<p>We’ll keep going with our all-the-gory-details working for this next problem. Ignoring how Gelfand suggests we solve it for a second, let’s take a similarly slow and steady process like we did before and see where that gets us.</p>
<p>First up we know again that there must be a starting point <span><script type="math/tex">a</script></span>.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Because there always is. </span> There must also a ratio <span><script type="math/tex">q</script></span> and a number representing the position of the term in the progression (which we’ll again call <span><script type="math/tex">n_x, n_y</script></span> and <span><script type="math/tex">n_z</script></span>).</p>
<p>Yet again, if things are to be in the same <em>Geometric Progression</em><label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Note we’re not in arithmetic land any more. </span> then <span><script type="math/tex">a</script></span> and <span><script type="math/tex">q</script></span> <em>must</em> be the same in each case.</p>
<p>Now we can specify our terms in the form of expressions:</p>
<div class="mathblock"><script type="math/tex; mode=display">2 = a + q^{n_x - 1}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">3 = a + q^{n_y - 1}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">5 = a + q^{n_z - 1}</script></div>
<p>Let’s now try and isolate <span><script type="math/tex">q</script></span>, just like we previously isolated <span><script type="math/tex">d</script></span>.</p>
<div class="mathblock"><script type="math/tex; mode=display">2 = a + q^{n_x - 1}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow q^{n_x - 1} = 2 - a</script></div>
<p>Hmmm, this is about to get all kinds of complicated trying to drag <span><script type="math/tex">q</script></span> out into the open on this one.</p>
<p>Is there another way?</p>
<p>There is, and Gelfand wanted to show it to us but we prevuously ignored him. Let’s admit defeat and see what he has to say.</p>
<p>Rather than specifying our terms in terms [sic] of the progression we know nothing about, he’s going to help us specify them in terms of each other.</p>
<p>This sounds like a bit of a leap, but it’s far simpler once you see it.</p>
<p>Firstly however, why can we do this? The answer is that we already know they are related simply because of how progressions work - each subsequent term derives from the one before it.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">N.b. they are part of the same progression, the question relies upon it. </span></p>
<p>Before we get to it, we need one more piece of info - the knowledge of the order in which these terms appear in our as-yet-unknown progression. It’s a safe bet to start with their being in ascending order, but remember Section 42, <a href="https://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-21-geometric-progressions">back in Chunk 21</a>? There we found that sometimes in geometric progressions we can flip and flop from positive to negative and back to positive again. Don’t worry about that for now - Gelfand will come back to it later. Luckily we know that our terms are all positive, and so we are pretty safe in dealing with them in the order <span><script type="math/tex">2 \rightarrow 3 \rightarrow 5</script></span>.</p>
<p>With this in mind, we can now specifiy them in terms of each other. First up is <span><script type="math/tex">3</script></span>, specified in terms of <span><script type="math/tex">2</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">3 = 2q^n</script></div>
<p>Just to be super-clear, and remembering that all progressions accumulate as you go, you can specify later terms by taking prior ones, and multiplying them by powers of q. We don’t know what power, so that’s why Gelfand has used <span><script type="math/tex">n</script></span> here.</p>
<p>With that done we now specify <span><script type="math/tex">5</script></span> in terms of <span><script type="math/tex">3</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">5 = 3q^m</script></div>
<p>The pattern is the same - still a prior term multiplied by a certain power of the same ratio <span><script type="math/tex">1</script></span>, but because we don’t know how many terms are between <span><script type="math/tex">3</script></span> and <span><script type="math/tex">5</script></span> we have to have a potentially different power of <span><script type="math/tex">q</script></span> from the one we used before. We’ve got <span><script type="math/tex">m</script></span> to represent this.</p>
<p>With this, evidently simpler pair of expressions we can start putting them into a form where we can compare them. First, Gelfand begins to isolate the <span><script type="math/tex">q</script></span>s.</p>
<div class="mathblock"><script type="math/tex; mode=display">q^n = \frac{3}{2}</script></div>
<p>and</p>
<div class="mathblock"><script type="math/tex; mode=display">q^m = \frac{5}{3}</script></div>
<p>And then pulling them together by raising both sides of the former equality to the power of the latter, and vice versa.</p>
<div class="mathblock"><script type="math/tex; mode=display">q^{mn} = (\frac{3}{2})^m</script></div>
<p>and</p>
<div class="mathblock"><script type="math/tex; mode=display">q^{mn} = (\frac{5}{3})^n</script></div>
<p>Allows us to then combine as</p>
<div class="mathblock"><script type="math/tex; mode=display">(\frac{3}{2})^m = q^{mn} = (\frac{5}{3})^n</script></div>
<p>And now we can drop <span><script type="math/tex">q</script></span> altogether, because if we can prove that this new merged equality is valid, then we’ve proven the three starting terms can exist in a single geometric progression.</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{3^m}{2^m} = \frac{5^n}{3^n}</script></div>
<p>Simplifying again we can remove our fractions by multiplying the numerator of each by the denominator of the other</p>
<div class="mathblock"><script type="math/tex; mode=display">3^m \cdot 3^n = 2^m \cdot 5^n</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 3^{m + n} = 2^m \cdot 5^n</script></div>
<p>Now Gelfand gets clever, showing us a new trick, and one of the real points of this problem I’ll wager.</p>
<p>Clearly we can go no further trying to figure out <span><script type="math/tex">m</script></span> and <span><script type="math/tex">n</script></span>. Nor would it profit us to do so. But we could see what statements we can make about what we do have in our hands.</p>
<p>First up, Gelfand spots that the left hand side (<span><script type="math/tex">3^{m + n}</script></span>) <em>must</em> be odd. Seems like a leap? Try it out. This is because <em>an odd number, no matter what power it is raised to, is always odd</em>.</p>
<p>That’s great info. Now there are a few more moving parts on the right hand side (<span><script type="math/tex">2^m \cdot 5^n</script></span>). What can we say about that?</p>
<p>We know from what we just saw, that <span><script type="math/tex">5^n</script></span>, no matter what <span><script type="math/tex">n</script></span> is, will also always be odd. That leaves the <span><script type="math/tex">2^m</script></span>. We should now see that <em>even numbers, when raised to any power will always be even, except when raised to the power of <span><script type="math/tex">0</script></span></em>. E.g. in our case with <span><script type="math/tex">2^m</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">2^0 = 1</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^1 = 2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^2 = 4</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^3 = 8</script></div>
<p>Etc.</p>
<p>The final piece of the puzzle are the rules for multiplication of odd and even numbers. Let’s list them as it’s easier</p>
<ul>
<li>even numbers multiplied by even numbers always give even results</li>
<li>odd numbers multiplied by even numbers always give even results</li>
<li>odd numbers multiplied by odd numbers always give odd results</li>
</ul>
<p>If we put all this together, we can see that the left side of our equality will <em>always</em> be odd, but the right hand side can <em>only ever</em> be odd when <span><script type="math/tex">m = 0</script></span>.</p>
<p>So, following the trail of clues like <a href="https://en.wikipedia.org/wiki/Miss_Marple">Miss Marple</a>, we next need to look at what does happen when <span><script type="math/tex">m = 0</script></span>.</p>
<div class="mathblock"><script type="math/tex; mode=display">3^{m + n} = 2^m \cdot 5^n</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 3^{0 + n} = 2^0 \cdot 5^n</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 3^n = 1 \cdot 5^n</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 3^n = 5^n</script></div>
<p>Hmmm. That can’t be right, which means we can’t have these three terms being part of the same geometric progression. Problem solved.</p>
<h2 id="tricks-arising-pt-1">Tricks Arising (Pt. 1)</h2>
<h3 id="when-proving-equalities-remember-fundamentals">When Proving Equalities, Remember Fundamentals</h3>
<p>We knew above that our equality was actually an inequality because we remembered<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Prodded by Gelfand I’ll admit </span> that there are some fundamental truisms about odd and even numbers and what you get when you multiply them. There are probably others which are equally useful but I’ve not had to use them in a problem yet:</p>
<ul>
<li>dividing by zero giving “undefined” is one likely candidate,</li>
<li>anything multiplied by zero being zero being another,</li>
<li>and multiplication of positive and negative numbers being the last that I can think of.</li>
</ul>
<h2 id="revisiting-problem-204">Revisiting Problem 204</h2>
<p>It was super-useful to define the terms in terms [sic]<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Still sorry. </span> of each other in Problem 205. Could we have made things simpler for ourselves by taking a similar approach in Problem 204?</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{3} = \frac{1}{5} + (n \cdot x)</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{2} = \frac{1}{3} + (m \cdot x)</script></div>
<p>Then we can isolate the <span><script type="math/tex">x</script></span>s. The first equality is up first</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{3} - \frac{1}{5} = n \cdot x</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{(\frac{1}{3} - \frac{1}{5})}{n} = x</script></div>
<p>Then the second equality</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{1}{2} - \frac{1}{3} = m \cdot x</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{(\frac{1}{2} - \frac{1}{3})}{m} = x</script></div>
<p>Then combining</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{(\frac{1}{2} - \frac{1}{3})}{m} = x = \frac{(\frac{1}{3} - \frac{1}{5})}{n}</script></div>
<p>And dropping the <span><script type="math/tex">x</script></span> altogether</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{(\frac{1}{2} - \frac{1}{3})}{m} = \frac{(\frac{1}{3} - \frac{1}{5})}{n}</script></div>
<p>Then it makes sense to make the denominators of all the top-fractions equal:</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{(\frac{15}{30} - \frac{10}{30})}{m} = \frac{(\frac{10}{30} - \frac{6}{30})}{n}</script></div>
<p>And do the simple sums</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{\frac{5}{30}}{m} = \frac{\frac{4}{30}}{n}</script></div>
<p>And finally get to <span><script type="math/tex">m</script></span> and <span><script type="math/tex">n</script></span>.</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{\frac{5}{30}}{m} - \frac{\frac{4}{30}}{n} = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{n \cdot \frac{5}{30}}{m \cdot n} - \frac{m \cdot \frac{4}{30}}{n \cdot m} = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow \frac{n \cdot \frac{5}{30} - m \cdot \frac{4}{30}}{m \cdot n} = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow m \cdot \frac{5}{30} - n \cdot \frac{4}{30} = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow m = \frac{4}{30} </script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow n = \frac{5}{30}</script></div>
<p>A great deal of this was unnecassary, but it felt reassuring to work it all through. And to answer my own question, “yes, I think this way was easier.”</p>
<h2 id="problem-206">Problem 206</h2>
<p><span class="newthought">I got tied up on this problem for ages.</span> But it helped be embed<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Hence the title of this chunk </span> progressions far more deeply as a consequence.</p>
<p>In this problem, Gelfand is asking us to try and think about things differently. We know<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Because he has shown us </span> that the terms <span><script type="math/tex">2, 3</script></span> and <span><script type="math/tex">5</script></span> can’t appear in a <em>Geometric Progression</em> <em>in the order presented</em> because he showed us it was so. But what about if they occurred in another order? What, asks Gelfand, should we do in these circumstances?</p>
<p>It makes sense to look back at the previous two posts to see what is even possible in this regard. We see our first one in <a href="https://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-21-geometric-progressions">Chunk 21 - Geometric Progressions</a> section “The ‘Two Possibilities’ Subtlety”. Here we see that a negative quotient <span><script type="math/tex">q</script></span> can have our terms flipping from positive to negative.</p>
<p>There is another alternative in the next section of the same post - “The ‘is that Really a <em>Geometric Progression</em>’ Subtlety”. In this one we can see that after an initial value which could be anything, the rest of the progression is made up of zeros.</p>
<p>And the subsequent section contains our last possibility - “Flip it and Reverse it”. It gives us the possibility that our progressions don’t have an increasing quotient <span><script type="math/tex">q</script></span>, rather that it might have a decreasing one.</p>
<p>So which of these might change the game in our present <span><script type="math/tex">3, 4, 5</script></span> situation? Clearly the middle possibility, that the quotient is <span><script type="math/tex">0</script></span>, is out for us as we have three non-zero terms and this option allows us only one. If we were to tackle a progression of this kind it would be easy to spot.</p>
<p>That them leaves the other two.</p>
<p>The first possibility indicates we <em>could</em> have a negative quotient. We could still have a problem of this kind but sneakily stated only giving positive terms. Can this be happening here? The answer is “no”. Progressions of this kind must also work when the quotient is positive, and we know that this doesn’t work for us.</p>
<p>The last possibility is that our progression might be going in reverse because our powers (<span><script type="math/tex">m</script></span> and <span><script type="math/tex">n</script></span>) might be negative. (Remember <span><script type="math/tex">n^-2 = \frac{1}{n^2}</script></span>). However, being simply the mirror of the situation we investigated in Problem 205, it’s existence does not negate the existence of the former. Therefore, if a progression is impossible in one direction, it is impossible in the other too.</p>
<p>We can therefore conclude that there are no possibilities when this might be a geometric progression given these three numbers, and that after confirming that it is not a progression where the quotient is zero, our original approach sufficed to prove that the other two options were also impossible.</p>
<h2 id="tricks-arising-pt-2">Tricks Arising (Pt. 2)</h2>
<h3 id="removing-fractions-in-equalities">Removing Fractions in Equalities</h3>
<p>Remember this leap? I’m not sure we’ve pulled it out explicitly before.</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{3^n}{3^m} = \frac{5^n}{2^m}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 3^n \times 2^m = 3^m \times 5^n</script></div>
<p>Gelfand does it himself in his solution to Problem 205. You simply taken the numerator of one side, and multiply it with the denominator of the other side. That gives you one simplification. Then you do the reverse fo the other side.</p>
<p>Brilliant.</p>
<h3 id="think-logically---thats-maths-too">Think logically - that’s Maths too!</h3>
<p>We’re slowly building up a mental set of rules - things which we know always happen, and you can set these against each other logically to reduce the number of options you’re facing.</p>
<p>We saw this brilliantly in this problem. I’m betting it’ll come in handy again.</p>
<h2 id="problem-207">Problem 207</h2>
<p><span class="newthought">Not so much a problem as a statement this one.</span> We’re back at <em>Arithmetic Progressions</em> again, and you’re supposed to think about the difference as we have the first two terms.</p>
<p>In the case mentioned, we know we start with an integer, and then we have a second term which is also an integer. That means the difference must also be an integer. And if you add integers to integers, all you ever get are integers.</p>
<p>That means it is impossible to have an <em>Arithmetic Progression</em> where the first two terms are integers, but all subsequent ones are not.</p>
<h2 id="problem-208">Problem 208</h2>
<p><span class="newthought">This is a similar problem to 207,</span> but we’re now talking about <em>Geometric Progressions</em>. We saw in our discussion for Problem 206 (above) that <em>Geometric Progressions</em> can go backwards, and that when the powers of the quotient flip from positive to negative then we enter the realm of fractions with a numerator of <span><script type="math/tex">1</script></span>, and stay there. And what is such a fraction not? An integer, that’s what.</p>
<h2 id="problem-209">Problem 209</h2>
<p><span class="newthought">We’ve flipped back to <em>Arithmetic Progressions</em> again.</span> Remember that in this type, the difference must always be the same, and if the second term is less than the first, but also less than the third, then this doesn’t hold true, because as Gelfand points out, the difference, which might be of the same magnitude, would be positive and negative at the same time, which is <em>verboten</em>.</p>
<h2 id="problem-210">Problem 210</h2>
<p><span class="newthought"><em>Geometric Progression</em> once again.</span> Now it is handy to recall Problem 205 again. <em>Geometric Progressions</em> <em>can</em> flip-flop, from positive to negative, when the quotient is negative. That means it is possible to have a <em>Geometric Progression</em> where the second term is less than the first term, and also less than the third term.</p>
<h2 id="problem-211">Problem 211</h2>
<p><span class="newthought">Now we’re back on our own again.</span> Well, almost. Gelfand does give us a hint, but let’s see what we can make of things before we take him up on it.</p>
<p>First let’s lay out what we know:</p>
<ul>
<li>we’re talking about <em>Arithmetic Progressions</em>, which means all our terms can be calculated by the formula <span><script type="math/tex">x = a + (n - 1) \cdot d</script></span></li>
<li>we need to have “exactly one integer term” which means all terms must be the same</li>
</ul>
<p>Following this logic through, that means that to achieve this, then the difference between terms must be zero (<span><script type="math/tex">d = 0</script></span>).</p>
<p>Does that tell us what our starting point needs to be? Nope, we can pick anything we want (i.e. <span><script type="math/tex">a</script></span> can be anything).</p>
<p>Let’s see how that plays out:</p>
<div class="mathblock"><script type="math/tex; mode=display">n = 1 \rightarrow a + (1 - 1) \cdot 0 = a + 0 = a</script></div>
<div class="mathblock"><script type="math/tex; mode=display">n = 2 \rightarrow a + (2 - 1) \cdot 0 = a + 0 = a</script></div>
<div class="mathblock"><script type="math/tex; mode=display">n = 3 \rightarrow a + (3 - 1) \cdot 0 = a + 0 = a</script></div>
<p>Etc. Etc. ad infinitum.</p>
<p>It seems that you <em>can</em> have an <em>Arithmetic Progression</em> which contains exactly one integer term.</p>
<p>But there is a problem with this. Have we misunderstood the question? Does Gelfand <em>really</em> mean that we want to find an <em>Arithmetic Progression</em> which has one integer term, and all other terms are non-integers?</p>
<p>If that is the case, then it’s time to take him up on his offer of the hint.</p>
<p>Again, let’s start by laying out what we know:</p>
<ul>
<li>we’re still talking about <em>Arithmetic Progressions</em>, which means all our terms can be calculated by the formula <span><script type="math/tex">x = a + (n - 1) \cdot d</script></span></li>
<li>the hint tells us that we’re starting at zero, which means <span><script type="math/tex">a = 0</script></span>. This is our single integer</li>
<li>and it is also hinted that we use a difference, <span><script type="math/tex">d</script></span> of <span><script type="math/tex">\sqrt{2}</script></span></li>
</ul>
<p>Given all this, then the <span><script type="math/tex">n</script></span>th term will be <span><script type="math/tex">0 + (n - 1) \cdot \sqrt{2}</script></span>. It is essential that this be a non-integer when <span><script type="math/tex">n \gt 1</script></span> (i.e. all subsequent terms) if we are to find the progression Gelfand is looking for.</p>
<p>We can simplify this, stating that all terms other than the first (i.e. where <span><script type="math/tex">n \gt 1</script></span>) will be in the form <span><script type="math/tex">b \cdot \sqrt{2}</script></span>.</p>
<p>It is in this that we need to find our solution, well, actually the reason that <em>this is our solution</em>. How do we know that <span><script type="math/tex">b \cdot \sqrt{2}</script></span> will never give us an integer?</p>
<p>We can approach this from the reverse angle. If, instead of <span><script type="math/tex">d = \sqrt{2}</script></span> our <span><script type="math/tex">d</script></span> was an integer, clearly our progression would contain lots more integers, which is a failure. If on the other hand, our <span><script type="math/tex">d</script></span> was a <em>Rational Number</em> (a number that can be written as a ratio, i.e. as a fraction) then eventually, as we moved through the progression, we would get to a multiple of that fraction which was a whole number, an integer, and we woulf fail again.</p>
<p>What we need then is a number which no matter how many times you multiply it, <em>it never becomes an integer</em>. For that we need an <em>Irrational Number</em>. The simplest one of these that we know of is <span><script type="math/tex">\sqrt{2}</script></span>. That’s why Gelfand picked it.</p>
<p>This all seems a little mind-bending. We’ll get around to <em>Irrational Numbers</em> in a later chunk so please trust me and don’t worry about it too much for now.</p>
<h2 id="problem-212">Problem 212</h2>
<p><span class="newthought">Given what we’ve seen,</span> it’s now quite clear why Gelfand answers this problem with a single word - “no”. There is no <span><script type="math/tex">d</script></span> which we can use in an arithmetical progression which will give us one more integer after the starting figure <span><script type="math/tex">a</script></span>, and then never give us one again.</p>
<h2 id="problem-213">Problem 213</h2>
<p><span class="newthought">This one is a simple <em>Geometric Progression</em>,</span> but with a little bit of fiddling after the fact.</p>
<p>Remember this from <a href="https://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-21-geometric-progressions">“Chunk 21 - Geometric Progressions”</a>?</p>
<div class="mathblock"><script type="math/tex; mode=display">2^1 = 2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^2 = 4</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^3 = 8</script></div>
<p>Which came from</p>
<div class="mathblock"><script type="math/tex; mode=display">a \cdot q^{n-1}</script></div>
<p>Here, our numbers are just one less than that. I.e.</p>
<div class="mathblock"><script type="math/tex; mode=display">2^1 - 1 = 1</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^2 - 1 = 3</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^3 - 1 = 7</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^4 - 1 = 15</script></div>
<p>Which means the <span><script type="math/tex">100</script></span>th term will be <span><script type="math/tex">2^{100} - 1</script></span>.</p>
<h2 id="problem-214">Problem 214</h2>
<p><span class="newthought">I’ll come back to this once I get to <em>Quadratic Equations</em></span> which Gelfand points out in his Hint.</p>
<h2 id="problem-215">Problem 215</h2>
<p><span class="newthought">The Fibbonacci sequence</span> (which will be <em>incredibly</em> familiar to anyone who does any form of agile software development) is a geometric sequence which follows the pattern identified in Problem 214.</p>
<p>So what are we being asked to obtain in this problem? Gelfand wants us to find out what <span><script type="math/tex">A</script></span>, and <span><script type="math/tex">B</script></span> are.</p>
<p>The simplest way to do this is the approach taken by Durham (but here using my characteristic, every-microscopic-step-shown style). We know that this <span><script type="math/tex">A</script></span> / <span><script type="math/tex">B</script></span> formula helps you work out any given term in the Fibbonacci sequence if you know it’s position (i.e. it’s <span><script type="math/tex">n</script></span>).</p>
<p>We also know some of the answers already, and so given that we can plug our <span><script type="math/tex">n</script></span>, and our result into this formula for two scenarios and then cross-reference the results.</p>
<p>For us, that means calculating using the simplest two knowns which are the first and second terms: <span><script type="math/tex">1</script></span> (when <span><script type="math/tex">n = 1</script></span>) and <span><script type="math/tex">1</script></span> (when <span><script type="math/tex">n = 2</script></span>).</p>
<p>Here’s our starting formula. We’ll begin by using it with the first term (<span><script type="math/tex">1</script></span> with the corresponding <span><script type="math/tex">n</script></span> of <span><script type="math/tex">1</script></span>):</p>
<div class="mathblock"><script type="math/tex; mode=display">A(\frac{1 + \sqrt{5}}{2}) + B(\frac{1 - \sqrt{5}}{2})</script></div>
<p>Let’s rearrange for <span><script type="math/tex">A</script></span> first. We begin by plugging in what we know (a result of <span><script type="math/tex">1</script></span> and an <span><script type="math/tex">n</script></span> of <span><script type="math/tex">1</script></span>)</p>
<div class="mathblock"><script type="math/tex; mode=display">1 = A(\frac{1 + \sqrt{5}}{2})^1 + B(\frac{1 - \sqrt{5}}{2})^1</script></div>
<p>And then we can remove our powers of 1</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 1 = A(\frac{1 + \sqrt{5}}{2}) + B(\frac{1 - \sqrt{5}}{2})</script></div>
<p>And them remove the parentheses</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 1 = A \cdot \frac{1}{2} + A \cdot \frac{\sqrt{5}}{2} + B \cdot \frac{1}{2} - B \cdot \frac {\sqrt{5}}{2}</script></div>
<p>Then multiply everything by <span><script type="math/tex">2</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 2 = A + A \cdot \sqrt{5} + B - B \cdot \sqrt{5}</script></div>
<p>Then rearrange</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 2 = A + B + (A - B) \cdot \sqrt{5}</script></div>
<p>Now let’s rearrange for <span><script type="math/tex">B</script></span>. We begin again by just plugging in what we know (this time a result of <span><script type="math/tex">1</script></span> but an <span><script type="math/tex">n</script></span> of <span><script type="math/tex">2</script></span>)</p>
<div class="mathblock"><script type="math/tex; mode=display">1 = A(\frac{1 + \sqrt{5}}{2})^2 + B(\frac{1 - \sqrt{5}}{2})^2</script></div>
<p>And then we can apply our powers of <span><script type="math/tex">2</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 1 = A(\frac{1 + 2 \cdot \sqrt{5} + 5}{4}) + B(\frac{1 - 2 \cdot \sqrt{5} + 5}{4})</script></div>
<p>And them remove the parentheses</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 1 = A \cdot \frac{1}{4} + A \cdot \frac{\sqrt{5}}{4} + A \cdot \frac{5}{4} + B \cdot \frac{1}{4} - B \cdot \frac {\sqrt{5}}{4} + B \cdot \frac{5}{4}</script></div>
<p>Then multiply everything by <span><script type="math/tex">4</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 4 = 6 \cdot (A + B) + (A - B) \cdot 2 \cdot \sqrt{5}</script></div>
<p>Now we have these two pieces we can try and put them together. The first equation is equal to <span><script type="math/tex">2</script></span>, but the second is equal to <span><script type="math/tex">4</script></span>, so let’s double the first equation</p>
<div class="mathblock"><script type="math/tex; mode=display">4 = 2 \cdot (A + B) + 2 \cdot (A - B) \cdot \sqrt{5}</script></div>
<p>Now we can put both our equations together</p>
<div class="mathblock"><script type="math/tex; mode=display">2 \cdot (A + B) + 2 \cdot (A - B) \cdot \sqrt{5} = 6 \cdot (A + B) + (A - B) \cdot 2 \cdot \sqrt{5}</script></div>
<p>If we then simplify by subtracting <span><script type="math/tex">2 \cdot (A - B) \cdot \sqrt{5}</script></span> from both sides we get this</p>
<div class="mathblock"><script type="math/tex; mode=display">2 \cdot (A + B) = 6 \cdot (A + B)</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow 0 = 4 \cdot (A + B)</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow A + B = 0</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow A = -B</script></div>
<p>Phew! That’s quite a simplification. Now that we know what <span><script type="math/tex">A</script></span> and <span><script type="math/tex">B</script></span> are in terms of each other, we can go back to the first of our rearranged equalities and obtain first <span><script type="math/tex">B</script></span>, and then from that <span><script type="math/tex">A</script></span>.</p>
<p>Taking</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 = A + B + (A - B) \cdot \sqrt{5}</script></div>
<p>and swapping each <span><script type="math/tex">A</script></span> for <span><script type="math/tex">-B</script></span> we get</p>
<div class="mathblock"><script type="math/tex; mode=display"> 2 = (-B + B) + (-B-B) \cdot \sqrt{5} = -2B \cdot \sqrt{5} </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow B = \frac{-1}{\sqrt{5}} </script></div>
<p>And from there getting <span><script type="math/tex">A</script></span></p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow A = -B = \frac{1}{\sqrt{5}} </script></div>
<p>We could equally have done <span><script type="math/tex">A</script></span> first and from there obtained <span><script type="math/tex">B</script></span>, but I followed Durham to keep everything predictable.</p>
<h2 id="another-non-conclusion">Another (Non-)Conclusion</h2>
<p><span class="newthought">Blimey!</span> That was a lot. You’re probably reeling from the shock of it all. I’d suggest re-reading all this again, perhaps working through some other options of th last problem, and then taking a break.</p>
<p>See you in the <a href="https://andrewharmellaw.github.io/2017/04/13/gelfands-algebra-rest-1-the-well-tempered-clavier">next chunk</a>.</p>
http://andrewharmellaw.github.io/2017/03/24/gelfands-algebra-chunk-23-embedding-progressions
http://andrewharmellaw.github.io/2017/03/24/gelfands-algebra-chunk-23-embedding-progressionsFri, 24 Mar 2017 00:00:00 +0000Gelfand: Chunk 22 - Geometric Progression Sums
<p><span class="newthought">Just as <a href="https://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-20-arithmetic-progressions-progress">sums of arithmetic progressions</a> were interesting,</span> so are the sums of their geometric siblings. Here follows some more commentary on what Gelfand brings us in Section 42.</p>
<h2 id="problem-201">Problem 201</h2>
<p><span class="newthought">Let’s launch into some problems</span> and see what that gives us.</p>
<p>First up, Problem 201.</p>
<div class="mathblock"><script type="math/tex; mode=display">1 + \frac{1}{2} = 1\frac{1}{2} = \frac{3}{2}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 + \frac{1}{2} + \frac{1}{4} = 1\frac{3}{4} = \frac{7}{4}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} = 1\frac{7}{8} = \frac{15}{8}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 + ... + \frac{1}{2^n} = \frac{2^{n+1} - 1}{2^n}</script></div>
<p>where <span><script type="math/tex">n</script></span> is the number of fractions after the <span><script type="math/tex">1</script></span>.</p>
<h2 id="problem-202---two-routes-to-a-formula">Problem 202 - Two Routes to a Formula</h2>
<p><span class="newthought">This problem isn’t particularly hard to grasp</span> from the solution Geland provides, but it is instructive to examine the two routes, especially their intuitive leaps that Gelfand employs to get to the answer.</p>
<p>Let’s start with the first. We’ll begin where Gelfand does, with the sum</p>
<div class="mathblock"><script type="math/tex; mode=display">a + aq + aq^2 + ... + aq^{n - 1}</script></div>
<p>I’m guessing that Gelfand is hoping by now that we’re hungry to factor this into something more manageable. The first step in this is an easy one too - just pull out the <span><script type="math/tex">a</script></span>.</p>
<div class="mathblock"><script type="math/tex; mode=display">(a)(1 + q + q^2 + ... + q^{n - 1})</script></div>
<p>Can we go further? It seems sensible to try. Have we seen something like any of this before? Well, I personally couldn’t recall anything, but Gelfand is telling us we should have, and so I went hunting.</p>
<p>What I found was Problem 90<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Which I didn’t write about specifically; a possible explanation for my amnesia </span> which goes like this:</p>
<div class="mathblock"><script type="math/tex; mode=display">(1 - x)(1 + x + x^2 + x^3 + ... + x^{10}) = 1 - x^{11}</script></div>
<p>It’s not hard to see if you swap <span><script type="math/tex">x</script></span> for <span><script type="math/tex">q</script></span>, and then make it more generic and rearrange the sides, you have a <em>pretty</em> close<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Though not exact. </span> match for a bit of our current expression.</p>
<div class="mathblock"><script type="math/tex; mode=display"> \rightarrow (1 + q + q^2 + q^3 + ... + q^{n - 1}) = \frac{1 - q^{n}}{(1 - q)} </script></div>
<p>Close, but not the same as what Gelfand is referring us to:</p>
<div class="mathblock"><script type="math/tex; mode=display">q^n - 1 = (q - 1)(q^{n - 1} + ... + q + 1)</script></div>
<p>Can we simply swap our <span><script type="math/tex">1</script></span>’s and <span><script type="math/tex">q</script></span>’s? Yes we can<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">And here’s the working to prove it </span>:</p>
<div class="mathblock"><script type="math/tex; mode=display">(x - 1)(1 + x + x^2 + x^3 + ... + x^{10}) = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = (x - 1)1 + (x - 1)x + (x - 1)x^2 + (x - 1)x^3 + ... + (x - 1)x^{10} = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = (x - 1) + (x^2 - x) + (x^3 - x^2) + (x^4 - x^3) + ... + (x^{11} - x^{10}) = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = (-1) + (x - x) + (x^2 - x^2) + (x^3 - x^3) + (x^4 - x^4) + ... + (x^{10} - x^{10}) + x^{11} = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = (-1) + x^{11} = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = x^{11} - 1 </script></div>
<p>We can now pick up with Gelfand again. Now we know we can swap our <span><script type="math/tex">1</script></span>’s and <span><script type="math/tex">q</script></span>’s we have this:</p>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow (1 + q + q^2 + q^3 + ... + q^{n - 1}) = \frac{q^n - 1}{(q - 1)}</script></div>
<p>Now we can put this into our current expression and get the same answer Gelfand has</p>
<div class="mathblock"><script type="math/tex; mode=display">a \frac{q^n - 1}{(q - 1)}</script></div>
<p>Well done. Give yourself a slap on the back for following along.</p>
<p>The second path to this solution takes up the <span><script type="math/tex">S</script></span>-mechanism we’d seen before in Problem 200 (and prior to that too). This takes more insight, but consequently relies less on brute-force factoring and pattern-memory.</p>
<p>In this approach the first few steps seem obvious to me.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">And therefore I guess to you too. </span> It’s when we get to <span><script type="math/tex">qS - S = aq^n - a</script></span> that I want to pick up.</p>
<p>How do we get from this to the next step? We start where I just mentioned makes sense:</p>
<div class="mathblock"><script type="math/tex; mode=display">qS - S = aq^n - a</script></div>
<p>We’re aiming to re-jig to isolate <span><script type="math/tex">S</script></span>. First we factor the left hand side:</p>
<div class="mathblock"><script type="math/tex; mode=display">(q - 1)S = aq^n - a</script></div>
<p>Then we factor the right hand side:</p>
<div class="mathblock"><script type="math/tex; mode=display">(q - 1)S = a(q^n - 1)</script></div>
<p>Finally to isolate the <span><script type="math/tex">S</script></span> we move the <span><script type="math/tex">(q - 1)</script></span> across, getting what Gelfald showed us as the final step.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Provided we remove the parentheses. </span></p>
<div class="mathblock"><script type="math/tex; mode=display">S = a \frac{(q^n - 1)}{(q - 1)}</script></div>
<h2 id="problem-203---a-reminder-of-prior-tricks">Problem 203 - A Reminder of Prior Tricks</h2>
<p><span class="newthought">Problem 203 is to find out the gap in the solution to 202.</span> The solution is pretty easy to spot given the inputs.</p>
<p>The lesson learned is very clear though. This is another circumstance where our sums-of-geometric-progressions formula is not universally applicable. We could state it now as:</p>
<div class="mathblock"><script type="math/tex; mode=display">S = a \frac{q^n - 1}{(q - 1)}</script></div>
<p>when <span><script type="math/tex">q \ne 1</script></span>, and</p>
<div class="mathblock"><script type="math/tex; mode=display">S = na</script></div>
<p>when <span><script type="math/tex">q = 1</script></span>.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">This (and previous encounters with this kind of thing) sounds a little like a partial function which I know as a functional programming concept from Scala and Haskell. The <a href="https://wiki.haskell.org/Partial_functions">Haskell Wiki defines it</a> as “a function that is not defined for all possible arguments of the specified type.” That <em>sounds</em> like where we are, and if you look at the <a href="https://en.wikipedia.org/wiki/Partial_function#Discussion_and_examples">examples on Wikipedia</a> for the same topic it <em>looks</em> like where we are too. </span></p>
<h2 id="where-next">Where Next?</h2>
<p><span class="newthought">That’s Gelfand done now</span> on the core rules of progressions.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Both arithmetic and geometric </span> What he’s about to do is set up a bunch of problems for us to help embed and understand the subtleties of what we learned.</p>
<p>That’s the <a href="https://andrewharmellaw.github.io/2017/03/24/gelfands-algebra-chunk-23-embedding-progressions">next chunk</a>.</p>
http://andrewharmellaw.github.io/2017/03/23/gelfands-algebra-chunk-22-geometric-progression-sums
http://andrewharmellaw.github.io/2017/03/23/gelfands-algebra-chunk-22-geometric-progression-sumsThu, 23 Mar 2017 00:00:00 +0000Gelfand: Chunk 21 - Geometric Progressions
<p><span class="newthought">You might remember we had a sneak peek at these things</span> back in <a href="https://andrewharmellaw.github.io/2017/02/28/gelfands-algebra-chunk-15-polynomial-division-special-cases">Chunk 15 - Polynomial Division Addendum</a>. Now we can really get our teeth into it.</p>
<h2 id="definition---geometric-progressions">Definition - Geometric Progressions</h2>
<p><span class="newthought">As is our wont,</span> let’s again start with a definition, taken straight out of Gelfand, section 41.</p>
<blockquote>
<p>“A <em>geometric progression</em> is a sequence of numbers where each term is a <em>product</em> of the proceeding one and a fixed number. This fixed number is called the <em>common ratio</em> (or ratio) of the geometric progression.”</p>
</blockquote>
<p>I added the second set of <em>italics</em>. It highlights the key difference between these and <em>Arithmetic Progressions</em> - there we were adding, whereas now we’re multiplying.</p>
<h2 id="the-general-formula">The General Formula</h2>
<p><span class="newthought">In the solution to Problem 192</span> Gelfand shows us the general formula for the <span><script type="math/tex">n</script></span>th term in a <em>Geometric Progression</em>.</p>
<div class="mathblock"><script type="math/tex; mode=display">a \cdot q^{n - 1}</script></div>
<h2 id="the-two-possibilities-subtlety">The “Two Possibilities” Subtlety</h2>
<p><span class="newthought">In <em>Arithmetic Progressions</em></span> , we only had adding and subtracting and everything was easy. But now we have multiplication, and that means there are subtleties. Gelfand leads us to this with Problem 193.</p>
<p>He asks, given a progression with first term of <span><script type="math/tex">1</script></span> and third term of <span><script type="math/tex">4</script></span>, what is the second term?</p>
<p>You can get all mathematical, but just looking at it, it seems easy. These are the powers of <span><script type="math/tex">2</script></span> right?</p>
<div class="mathblock"><script type="math/tex; mode=display">2^0 = 1</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^1 = 2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^2 = 4</script></div>
<div class="mathblock"><script type="math/tex; mode=display">2^3 = 8</script></div>
<p>Etc. And in one way we’re right. But there are <em>two</em> answers. If we now look at the <em>Geometric Progression</em> formula, <span><script type="math/tex">a \cdot q^{n - 1}</script></span>, what is <span><script type="math/tex">a</script></span> and <span><script type="math/tex">q</script></span>?. If the second term is <span><script type="math/tex">2</script></span>, then <span><script type="math/tex">a = 1</script></span>, and <span><script type="math/tex">q = 2</script></span>. But can <span><script type="math/tex">q</script></span> be anything else and still give us <span><script type="math/tex">1</script></span> for the first term and <span><script type="math/tex">4</script></span> for the third? Yes, it can be <span><script type="math/tex">(-2)</script></span><label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Tip: Those parens are important if you’re using Google as a calculator. </span></p>
<div class="mathblock"><script type="math/tex; mode=display">1 \cdot (-2)^0 = 1</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 \cdot (-2)^1 = -2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 \cdot (-2)^2 = 4</script></div>
<p>And continuing on</p>
<div class="mathblock"><script type="math/tex; mode=display">1 \cdot (-2)^3 = -8</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 \cdot (-2)^4 = 16</script></div>
<div class="mathblock"><script type="math/tex; mode=display">... </script></div>
<p>What we’re getting strongly hinted at here is the fact that even powers of negative numbers are even, but odd powers of negative numbers are negative. Odd and even powers of even numbers are always even.</p>
<h2 id="the-is-that-really-a-geometric-progression-subtlety">The “Is that Really a Geometric Progression?” Subtlety</h2>
<p>If the common ratio (<span><script type="math/tex">q</script></span> in our formula) is zero, then you end up with progressions which look similar to this</p>
<div class="mathblock"><script type="math/tex; mode=display">1, 0, 0, 0, 0, 0, 0, ...</script></div>
<p>Where <span><script type="math/tex">a = 1</script></span>. If <span><script type="math/tex">a</script></span> equals anything else then that “anything else” will be the first value, and the remainder of the progression will be <span><script type="math/tex">0</script></span>s.</p>
<p>This is because</p>
<div class="mathblock"><script type="math/tex; mode=display">0^0 = 1</script></div>
<p>but</p>
<div class="mathblock"><script type="math/tex; mode=display">0^1 = 0^2 = 0^3 = 0^4 = 0^5 = 0</script></div>
<p>Gelfand notes that in some circumstances these are <em>verboten</em>, specifiying that the ratio is “non-zero”.</p>
<h2 id="flip-it-and-reverse-it">Flip It and Reverse It</h2>
<p><span class="newthought">So what happens</span> when we take a progression and write it in reverse? What happens to the ratio then? You might have guessed.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Perhaps casting your mind back to <a href="https://andrewharmellaw.github.io/2016/12/10/gelfands-algebra-chunk-5-powers">Chunk 5 - Powers: Positive and Negative</a>. </span></p>
<p>Yup, our ratio becomes <span><script type="math/tex">\frac{1}{q}</script></span>.</p>
<h2 id="dropping-steps">Dropping Steps</h2>
<p><span class="newthought">Can we drop every second step</span> and still be a geometric progression? Yah, because this will leave the ratio between each constant. Here the common ratio changes from <span><script type="math/tex">q</script></span> to <span><script type="math/tex">q^2</script></span>.</p>
<p>Can we drop every third? No, we can’t. Just as in arithmetic progressions, the ratio of the gaps is no longer constant (being <span><script type="math/tex">q</script></span> between some and <span><script type="math/tex">q^2</script></span> between others) and so these progressions are no longer geometric.</p>
<h2 id="back-to-roots">Back to Roots</h2>
<p><span class="newthought">The last part of this section</span> <label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">But not of this post </span> is interesting for a few reasons. Firstly, it gives us another (reverse) angle on the positive / negative aspect.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Via roots of the number kind. </span> Secondly, we’re back in the world of zeros<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">But not the polynomial-root kind. </span> not working for us. Based on what we’ve seen before now, we know that these aspects are where it gets interesting.</p>
<p>I’m now going to give a little more detail on Gelfand’s solution.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">As per, please ignore this if you’ve already got things nice and clear in your head. For me it personally helps to see all the gory, multi-step, micro-step detail. </span></p>
<p>First up, our first term: <span><script type="math/tex">a</script></span>.</p>
<p>Next our second term: <span><script type="math/tex">x</script></span>.</p>
<p>Then our third term: <span><script type="math/tex">b</script></span>.</p>
<p>To progress we need to know our common ratio, which I’m calling <span><script type="math/tex">z</script></span> for a second We can determine it using either <span><script type="math/tex">a</script></span> or <span><script type="math/tex">b</script></span>.</p>
<p>First using <span><script type="math/tex">a</script></span>:</p>
<div class="mathblock"><script type="math/tex; mode=display">z = \frac{x}{a}</script></div>
<p>(because <span><script type="math/tex">a = z^0</script></span> and <span><script type="math/tex">x = a \cdot z</script></span>)</p>
<p>Second using <span><script type="math/tex">b</script></span>:</p>
<div class="mathblock"><script type="math/tex; mode=display">z = \frac{b}{x}</script></div>
<p>(because <span><script type="math/tex">b = x \cdot z</script></span>)</p>
<p>Then we can remove our <span><script type="math/tex">z</script></span> altogether:</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{x}{a} = \frac{b}{x}</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x^2 = ab</script></div>
<div class="mathblock"><script type="math/tex; mode=display">\rightarrow x = \sqrt{ab}</script></div>
<p>We can then draw our conclusions.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">This works because we are looking for the <em>second term</em>, and it would also have worked for the fourth, and sixth etc, but not the fifth, seventh, etc. Remember, we saw before that even numerical roots have this special “could be positive, could equally be negative” property. There is a subtle alusion to this in problem 199. See if you can spot it. </span></p>
<ul>
<li>Conclusion 1: if <span><script type="math/tex">ab \lt 0</script></span> then the problem has no solutions. Why? Because you can’t square root a negative number.</li>
<li>Conclusion 2: if <span><script type="math/tex">ab = 0</script></span> then <span><script type="math/tex">x = 0</script></span>. That seems simple enough.</li>
<li>Conclusion 3: if <span><script type="math/tex">ab \gt 0</script></span> then there are <em>two</em> possible values for <span><script type="math/tex">x</script></span>: <span><script type="math/tex">\sqrt{ab}</script></span> and <span><script type="math/tex">-\sqrt{ab}</script></span>.</li>
</ul>
<h2 id="tricks-arising">Tricks Arising</h2>
<h3 id="sometimes-theres-no-answers-other-times-theres-more-than-one-answer">Sometimes There’s No Answers, Other Times There’s More Than One Answer</h3>
<p>Notwithstanding the aside about how <span><script type="math/tex">a^2 = b^2</script></span> in <a href="https://andrewharmellaw.github.io/2017/01/20/gelfands-algebra-chunk-11-factoring-to-zero">Chunk 11 - Factoring to Zero</a>, Problem 198 is the first time we’ve seen something where we need to think about different categories of input. It’s handy to have this in mind for the future.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Trust me, I’ve read ahead. </span></p>
http://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-21-geometric-progressions
http://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-21-geometric-progressionsTue, 21 Mar 2017 00:00:00 +0000Gelfand: Chunk 20 - Arithmetic Progressions Progress
<p><span class="newthought">This is another pretty straight-forward section.</span> I’m going to leave Gelfand pretty largely to his own devices, only occasionally providing a summary-gloss over the top. You might find it useful to read this chunk in it’s entirety, then work through the section in Gelfand, before coming back here again to check your chunk is embedded nicely.</p>
<h2 id="racing-through-the-sums">Racing Through the Sums</h2>
<p><span class="newthought">Section 39 ended with a question</span> about calculating the number of terms in a given <em>Arithmetic Progression</em>. Section 40 opens by using that technique to calculate the sum of the values in a specified range of a given arithmetic progression.</p>
<p>As is his general style, Gelfand begins by asking us to solve a specific problmem in our current domain. This comes in Problem 185.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">The solution to this problem might remind you of the Gauss solution to Problem 33 which we saw back in [Chunk </span></p>
<p>The next Problem<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Problem 186. </span> asks us to figure out a general formula for sums of terms. This is solved for us, and makes a lot of sense if we self-solved problem 185, and also if we looked back at chunk 2. The general formula is just a symbolic representation of this pairing <span><script type="math/tex">(a + b)</script></span> and subsequent multiplication of this by <span><script type="math/tex">\frac{n}{2}</script></span>.</p>
<p>Problem 187 then points out that we might have been tripped up had we had an odd number of terms.<label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">Dammit! </span></p>
<p>Those dashed odd-numbers again! Note that the forumla derived to calculate the answer is unchanged, but the mental model that you might be using to get there needs more detail.</p>
<p>Not content with explaining this to us numerically, Gelfand then breaks into some of his glorious imagery to explain the latest solution to the current problem in hand. Personally I found this second approach mentally-sticky (in a good way) and it’s lodged up in my brain box nice and solid with very little rehersal as a consequence.</p>
<p>There is a reason Gelfand gave us a picture, and also a reason for his stressing of the <em>arithmetic</em> in the name of the progression; it’s because he was about to introduce the next level of complexity in Problem 188.</p>
<p>This problem is about to illustrate a key property of the <em>Geometric Progression</em> that is known as “the odd numbers” - that their sums are always perfect squares.</p>
<div class="mathblock"><script type="math/tex; mode=display">1 = 1^2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 + 3 = 4 = 2^2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 + 3 + 5 = 9 = 3^2</script></div>
<div class="mathblock"><script type="math/tex; mode=display">1 + 3 + 5 + 7 = 16= 4^2</script></div>
<p>etc.</p>
<p>This all very good, but how do we <em>prove</em> this is always the case? By dropping to the formulas that’s how.</p>
<p>Remember, from Problem 186 the formula we need to calculate is</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{n(a + b)}{2}</script></div>
<p>And here <span><script type="math/tex">a = 1</script></span> and <span><script type="math/tex">b = 2n - 1</script></span><label for="sn-id-whatever" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-id-whatever" class="margin-toggle" /><span class="sidenote">The formula for calculating any nth odd number. </span></p>
<p>Putting the together we get</p>
<div class="mathblock"><script type="math/tex; mode=display">\frac{n(1 + 2n - 1)}{2}</script></div>
<p>And simplifying</p>
<div class="mathblock"><script type="math/tex; mode=display"> = \frac{n(2n)}{2} = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = \frac{n(2n)}{2} = </script></div>
<div class="mathblock"><script type="math/tex; mode=display"> = n^2</script></div>
<p>Proven! <span><script type="math/tex">n^2</script></span> it is.</p>
http://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-20-arithmetic-progressions-progress
http://andrewharmellaw.github.io/2017/03/21/gelfands-algebra-chunk-20-arithmetic-progressions-progressTue, 21 Mar 2017 00:00:00 +0000