<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anders Njøs Slinde on Medium]]></title>
        <description><![CDATA[Stories by Anders Njøs Slinde on Medium]]></description>
        <link>https://medium.com/@andersns?source=rss-2711ec6c31f6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*1S1H7L46H4siVFvICVW3yw.png</url>
            <title>Stories by Anders Njøs Slinde on Medium</title>
            <link>https://medium.com/@andersns?source=rss-2711ec6c31f6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:16:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andersns/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Help! I’m working in a large code base!]]></title>
            <link>https://blog.variant.no/help-im-working-in-a-large-code-base-4e16f76b895c?source=rss-2711ec6c31f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e16f76b895c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[teknologi]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Anders Njøs Slinde]]></dc:creator>
            <pubDate>Thu, 08 Aug 2024 14:34:13 GMT</pubDate>
            <atom:updated>2024-08-08T20:48:28.503Z</atom:updated>
            <content:encoded><![CDATA[<p>“Working in large code bases always suck” is a common sentiment. I have been thinking about this sentence for a few days. I don’t really think that it has to suck, but it often does. In this post I’m going to explore why large code bases might suck and how to alleviate some of the pain you might experience.</p><h3>Should you just run?</h3><p>Why not just run away screaming from a large code base? We all love a green field project, with new technology and a blank canvas. In a large code base you might not be able to create your own architecture, but you can learn a lot about architecture. Learning what works in the current architecture, and what is currently biting you in the foot. Are there some abstractions or naming everyone misunderstands? You can learn a lot if you can figure out why. It is also worth remembering large code bases are large for a reason. Often very good reasons. The organisation has invested in the code base because it has a lot of users and/or it is business critical.</p><p>Who has learned most about software development? A developer who spent two years getting their hands dirty in a large legacy code base, or one who has spent two years going from green field to green field project. Working in a large code base can teach you so much about software development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*igwgyqSwG18iqfu6oD7MgQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@geraninmo?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Geranimo</a> on <a href="https://unsplash.com/photos/birds-eye-view-of-river-between-trees-hl7ILaqrOqI?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><h3>Getting to know your large code base</h3><p>So you are just starting work in a team that maintains a large code base. What do you do your first few weeks to get your bearings? Maybe there is some documentation, it is probably wildly out of date and not very useful for a beginner anyway. So here are are some tips on where to get started.</p><h4>1. Outside view</h4><p>Get to know the system from a users perspective. What domain problems are solved by the code you’re going to work on. Start with the broad strokes. Getting familiar with the problem domain is an important step to be able to work on the code base effectively and efficiently.</p><h4>2. Technology and conventions</h4><p>What languages and frameworks are used in the code base? What are the important conventions in those? As an example I mostly work with dotnet and some might say that if you’ve seen one dotnet codebase you have seen them all. Getting up to speed on how dotnet projects are typically structured is going to be helpful as you dive into a large dotnet code base. The same is the case for many other stacks such as Java Spring Boot, Ruby on Rails etc.</p><h4>3. Inputs and outputs</h4><p>Reading the entire code base is probably not feasible. Instead I would recommend focusing on the edges of the application, aka the inputs and outputs. What I mean by that is to start looking at what the application outputs. The most important being of course the database. What are the important tables/collections, what data is stored there? Next get an overview of what important integrations the application has with external services. What critical dependencies are there on other systems? Are these systems maintained by a team in your organisation or by someone completely external?</p><h4>4. Implement something</h4><p>If you are working in a large code base, there is probably a corresponding large backlog associated with it. Now is the time to dive in. Ask the veterans on your team if there is a task you can take on. It doesn’t really have to be super important, or even part of the current iteration or priority, just something to get your feet wet, and your first code merged. It is important to get rid of the anxiety associated with submitting your first pull request over with as quickly and pain free as possible.</p><h4>5. Mental model</h4><p>Now you’ve spent some time with the code base. A good exercise to formalise and cement any knowledge is to explain it to others and/or write about it. Try using a simple diagramming program like excalidraw to map out your current understanding of the system. Think of this as an exercise to improve your own and your teams understanding of the system. Not a documentation job, you can throw the diagrams away afterwards if you’d like, and I probably recommend doing that as those types of diagrams are not particularly useful.</p><h3>Pains in a large code base and how to get comfortable with them</h3><p>So you are working in a large code base now. Knowing large code bases, you are going to meet quite a few pain points. In this section I will try to list a few pain points you can expect, and some tips on how to deal with them. My focus here has been on what you as an individual contributor can focus on. There are no easy fixes or silver bullets, but by putting in the effort over time you can make working with your large code base more pleasant.</p><h4>Features take a long time to complete</h4><p>There are probably a lot of layers to your large code base. And because of this you need to do quite a bit of work to complete a feature. You need to change the database schema, add an API call and implement the front end, maybe even more like an email notification or some other external integration. My number one tip here is to submit merge requests for each individual part of the feature, where possible. Use features toggles to make it more feasible. In most cases it’s not a problem to extend the database schema with the columns you need for your feature in its own pull request. This makes it easier to review your code and you get better feedback earlier.</p><h4>Hard to reproduce bugs</h4><p>Sometimes a user reports a bug and you can’t reproduce it locally. My first tip is to call the user, preferably with video, and have them walk you through how they experienced it. Take notes, screenshots or record the call so you don’t have to go back to them and ask them to do it again. Bugs are often hard to reproduce when application state has to be a particular way for the bug to happen. Get familiar with how to debug your tech stack. VSCode, Neovim and JetBrains IDEs have very good debuggers for most tech stacks now (node, dotnet, rust, go, java, etc). Learn how to use this debugger. Use conditional breakpoints, you can edit the value of variables and even time travel debug (running a code again without relaunching the program). The debugger lets you easily and quickly experiment with what state makes the bug happen. Ideally then you can write an appropriate test, that fails in the same way your user experiences. If it is easy to add or change your test suite, reproducing and fixing bugs is going to be a lot more pleasant and less time consuming. Being able to reproduce a bug, write a test, and then fix the implementation until the test passes feels very good.</p><p>Are you able to reproduce a bug, but can’t figure out what causes it? Learn how to use git bisect. Bisect lets you binary search through the git history, you feed it a known good commit id, and a known not good commit id. Then git bisect checks out each commit and you need to tell git if the current commit is good or not. Having an automatic test can be a time saver.</p><p>A side note about bugs, try to think of a workaround for your user. Is there a way they can continue using your product?</p><h4>There are three different ways of doing things</h4><p>Often you start a code base with a clear architecture, and you are happy with it for a while. Then as time goes on you want to do some thing in a different way. So you add that way of doing it, thinking that over time we can migrate everything over to doing it that way, but you don’t do that because we live in the real world. So now you have two ways of doing that thing. Over time this happens to other things. This becomes very painful to deal with over time, especially when you have to onboard new team members. You have to explain all those migrations you are supposedly in the middle of. Here I would firstly recommend exercising some restraint. I have been that guy who enters a code base thinking “ah time to fix every little architectural niggle here”. Realistically fresh people with this mind set are probably going to make things worse, not better. If you really want to fix a code base you need to deeply understand the trade-offs. A new way of doing something doesn’t just have to be better than the old way, it has to be so much better that its worth maintain **both implementations** for a long while.</p><p>Sticking to the known way of doing something until you are ready to move on is more often than not the right choice in my experience. Learn how to work in the architecture you have, instead of trying to change it and in the process making a mess. In dotnet and Java there are <a href="https://github.com/BenMorris/NetArchTest?tab=readme-ov-file#examples">libraries</a> that let you write automated tests that test that the rules of the architecture are respected. For example that the web-project does not reference the infrastructure layer. Consider using these. If nothing else they can be a good way of documenting how your architecture should be.</p><h4>I always feel lost in the code</h4><p>There is a lot of code in a large code base, obviously. It can be hard to find your way around in it, and to keep everything you need to know in your head at any given moment. I would recommend having a good system for taking notes, and keeping an engineering log or journal. I have a notebook where I write a log of what I have been doing each work day, and I use obsidian for for technical notes about the code base. This helps me clear my brain of information I don’t need to keep track off, making room for the information I need to accomplish the task I am working on.</p><p>Learn how to work with text files in the terminal. Get good at using tools like grep, fzf, cat, sed and maybe some awk and jq. Then you will be able to find and replace things in any code base and language. You don’t have to be a wizard, but know the basics and what each tool can do, then its easy to find out how to achieve what you need.</p><h4>We are X versions behind in the framework we use</h4><p>When working with a framework it is very important to look at how the framework authors version the framework. Do they use semantic versioning? When do they upgrade the major versions, and how often? Do they have a Long Term Support version that gets security patches longer? Find out the upgrade cadence your codebase needs to be on. Maybe you will be fine sticking to the LTS releases, and minor patches for security fixes. Upgrading can be a pretty tedious process. Write some scripts to automate upgrading the project. Using tools like bash, sed and jq to automate updating version references across your code base.</p><h3>Conclusion</h3><p>Thanks for reading! I hope something you read here can help you in your journey to becoming comfortable in large code bases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e16f76b895c" width="1" height="1" alt=""><hr><p><a href="https://blog.variant.no/help-im-working-in-a-large-code-base-4e16f76b895c">Help! I’m working in a large code base!</a> was originally published in <a href="https://blog.variant.no/">Variant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hva får man ut av å lese Mythical Man-Month (Fred Brooks, 1975) i 2022?]]></title>
            <link>https://blog.variant.no/hva-f%C3%A5r-man-ut-av-%C3%A5-lese-mythical-man-month-fred-brooks-1975-i-2022-a492920dd39e?source=rss-2711ec6c31f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a492920dd39e</guid>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Anders Njøs Slinde]]></dc:creator>
            <pubDate>Fri, 18 Nov 2022 20:40:00 GMT</pubDate>
            <atom:updated>2022-11-18T20:40:00.420Z</atom:updated>
            <content:encoded><![CDATA[<p>Hva får man ut av å lese Mythical Man-Month (Fred Brooks, 1975) i 2022?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fdGs7aiYJic2YKNh" /><figcaption>Photo by <a href="https://unsplash.com/@qmikola?utm_source=medium&amp;utm_medium=referral">Mikołaj</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Jeg leste nylig The Mythical Man-Month, av Fred Brooks. En bok om software project management som først ble utgitt i 1975, og ble utgitt på ny i 1995 (uendret, men med noen ekstra kapitler bak). Fred Brooks døde 17 november 2022, og ble 91 år gammel. Mens jeg leste boken samlet og morsomme og/eller interessante sitater som er verdt å dele.</p><p>Bokas gjennomgående tema er hvordan utviklingsprosjekter blir forsinket, og hvordan forhindre det. Boka er veldig ofte sitert, som er grunnen til at jeg var interessert i å lese den i sin helhet selv. Forfatteren selv kaller boka bibelen av programvareutvikling fordi “<em>everybody quotes it, some people read it, and few people go by it</em>”. Det er en bok som setter ord på mye en kanskje har tenkt selv, men som en ikke helt har klart å få ut til et sammenhengende poeng. 💡</p><p>Min største kritikk av boken er at forfatteren bruker veldig kjønnet språk. Det er alltid he/him, eller men/man. 🚹 Utenom det er boken veldig artig, lettlest og fortsatt relevant og nyttig.</p><h3>Planlegging og samarbeid</h3><p>Første delen av boken handler om hvordan en planlegger et prosjekt med tanke på arkitektur og menneskene som trengs.</p><p>Det er viktig med psykologisk trygghet for å få tidlig tilbakemelding på ideer og løsninger. Dette er noe som Fred Brooks ble vist rett i når <a href="https://rework.withgoogle.com/print/guides/5721312655835136/">Google prøvde å finne ut hva som skal til for å bygge et “perfekt” team</a>.</p><blockquote>By documenting a design, the designer exposes himself to the criticisms of everyone, and he must be able to defend everything he writes. If the organizational structure is threatening in any way, nothing is going to be documented until it is completely defensible.</blockquote><p>Det er også viktig at det er bred enighet og forankring til planer og arkitektur.</p><blockquote>Conceptual integrity in turn dictates that the design must proceed from one mind, or from a very small number of agreeing resonant minds.</blockquote><p>Hvis en som leder oppdager mennesker som er gode både teknisk og medmenneskelig så må man ta vare på disse.</p><blockquote>First, the man with strong management talent and strong technical talent is rarely found. Thinkers are rare; doers are rarer; and thinker-doers are rarest.</blockquote><p>Endringer vil komme, og det må man være forberedt på. Dette må gjenspeiles i hvordan man jobber og er organisert på.</p><blockquote>The first step is to accept the fact of change as a way of life, rather than an untoward and annoying exception.</blockquote><p>I 1995-utgaven er det et kapittel med ting han har lært siden 1975 (20år med læring), blant annet tar han frem at det er viktig at team eier sitt eget domene og problem.</p><blockquote>The key thrust [of recent years] was delegating power down. It was like magic! Improved quality, productivity, morale. We have small teams, with no central control. The teams own the process, but they have to have one. They have many different processes. They own the schedule, but they feel the pressure of the market. This pressure causes them to reach for tools on their own.</blockquote><p>For å lykkes må organisasjonen ha <strong>læreglede</strong>, og legge opp til at mennesker alltid lærer.</p><blockquote>Structuring an organization for change is much harder than designing a system for change. Each man must be assigned to jobs that broaden him, so that the whole force is technically flexible. On a large project the manager needs to keep two or three top programmers as a technical cavalry that can gallop to the rescue wherever the battle is thickest.</blockquote><h3>Hvorfor vi feiler</h3><p>Når systemer blir for komplekse vil det over tid bli tregere og tregere å introdusere ny funksjonalitet eller hensynta endringer i krav/behov.</p><blockquote>Less and less effort is spent on fixing original design flaws; more and more is spent on fixing flaws introduced by earlier fixes. As time passes, the system becomes less and less well-ordered. Sooner or later the fixing ceases to gain any ground. Each forward step is matched by a backward one. Although in principle usable forever, the system has worn out as a base for progress.</blockquote><p>Kanskje er det bortkastet tid å fikse bugs? 🤔 I hvertfall bør man være meget forsiktig. Han sier ikke noe om hvor han tar de prosentene fra, men det stemmer sikkert? 😂</p><blockquote>Fixing a defect has a substantial (20 to 50 percent) chance of introducing another.</blockquote><p>Fred Brooks mener også noe om vedlikeholdskostnad sammenlignet med utviklingskostnad</p><blockquote>The total lifetime cost of maintaining a widely used program is typically 40 percent or more of the cost of developing it.</blockquote><p>Ofte er det veldig utydelig hvorfor man blir forsinket på et prosjekt, det bare skjer liksom. 😢</p><blockquote>When one hears of disastrous schedule slippage in a project, he imagines that a series of major calamities must have befallen it. Usually, however, the disaster is due to termites, not tornadoes; and the schedule has slipped imperceptibly but inexorably</blockquote><p>Det er viktig med gode milepæler, og gode realistiske delmål.</p><blockquote>Chronic schedule slippage is a morale-killer.</blockquote><p>For at teamet, og de rundt, skal tro på det de holder på med må de føle at de leverer verdi.</p><blockquote>It gives the team credibility to itself. Your credibility determines your morale, your emotional state.</blockquote><p>Men hvordan definerer man gode mål?</p><blockquote>For picking the milestones there is only one relevant rule. Milestones must be concrete, specific, measurable events, defined with knife-edge sharpness. Coding, for a counterexample, is “90 percent finished” for half of the total coding time. Debugging is “99 percent complete” most of the time. “Planning complete” is an event one can proclaim almost at will.</blockquote><p>Boka sin tittel er basert på dette sitatet om estimater, og hvordan vi ikke klarer å skille mellom kostnad og fremdrift</p><blockquote>Our estimating techniques, built around cost-accounting, confuse effort and progress. The man-month is a fallacious and dangerous myth, for it implies that men and months are interchangeable</blockquote><h3>Konklusjon</h3><p>Før jeg leste boken var jeg ikke sikker på hva jeg kom til å få ut av den. Det jeg sitter igjen med til slutt er at mye av det vi holder på med er basert på tanker som ble startet allerede på 70-tallet. Vi har fortsatt mye å lære fra de som lagde programvare på den tiden. Selv om teknologien har endret seg mye seg siden den tid, så endrer ikke mennesker og organisasjoner seg like raskt.</p><p>Dette er en bok som setter ord på det mange som har deltatt i programvareutviklingsprosjekter kanskje har tenkt eller følt på. Fred Brooks oppsummerer dette fint med en historie om noen han møtte som satt og leste i boken hans.</p><blockquote>The stranger sitting next to me was reading The Mythical Man-Month, and I was waiting to see if by word or sign he would react. Finally as we taxied toward the gate, I could wait no longer: “How is that book? Do you recommend it?” “Hmph! Nothing in it I didn’t know already.” I decided not to introduce myself.</blockquote><p>Sier litt om tiden boken er skrevet i at det kommer sitater som</p><blockquote>“on a Model 165, memory rents for about $12 per kilobyte per month”</blockquote><p>$96 millioner i måneden for en iPhone 13 der altså. 💸</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a492920dd39e" width="1" height="1" alt=""><hr><p><a href="https://blog.variant.no/hva-f%C3%A5r-man-ut-av-%C3%A5-lese-mythical-man-month-fred-brooks-1975-i-2022-a492920dd39e">Hva får man ut av å lese Mythical Man-Month (Fred Brooks, 1975) i 2022?</a> was originally published in <a href="https://blog.variant.no/">Variant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>