The Value of Source Code

Philomatics
30 Sept 202417:46

Summary

TLDRThe video challenges the traditional view of source code as a valuable asset, arguing that its true worth is often much lower than expected. Drawing from real-world examples, the speaker explores the concept of 'Theory Building' in programming, suggesting that the real value lies in the understanding and mapping of the code to the real world, rather than the code itself. It emphasizes that documentation and source code can't fully capture this theory, and personal interaction is key to transferring this knowledge between developers.

Takeaways

  • 💻 Source code often has little standalone value, especially in evolving projects where the code changes frequently.
  • 🚀 Even well-written, clean code with good documentation is often less valuable than the thought process and real-world mapping behind it.
  • 🔑 The true value in programming lies in the theory and mapping of the code to real-world problems, rather than the code itself.
  • 🧠 Programming involves building a mental model or theory of how the real world maps to code, which is difficult to communicate through documentation alone.
  • 📉 Code, even if stolen, quickly becomes outdated and is often more easily rewritten from scratch than modified by an outsider.
  • 👷 Large companies are not concerned with using others’ code because it’s faster for them to build their own versions based on their needs.
  • 📚 Documenting every decision or theory behind a program is impractical and can't fully convey the programmer’s experience and intuition.
  • 🎯 Programming decisions are often based on intuition, experience, and context, which are not easily translatable to new developers through code or documents.
  • 🤝 Effective knowledge transfer in programming requires close personal interaction, not just reading code or documentation.
  • 🔧 There’s a need for better tools and environments that focus on the quick transfer of the mental models (theories) between programmers, especially for large or complex projects.

Q & A

  • What was the main argument presented in the video regarding the value of source code?

    -The main argument was that the actual value of source code is often much lower than people think, even in large projects. The speaker suggests that the true value lies not in the code itself but in the theory or understanding of how the code maps to real-world problems.

  • Why did the speaker consider Microsoft using their code to be unlikely?

    -The speaker found it unlikely that Microsoft or any other large company would use their code because the code was poorly written, changed frequently, and was difficult to understand. It would have been faster for a large company to build the software from scratch rather than decipher their code.

  • What is the 'Theory Building View' of programming as explained in the video?

    -The 'Theory Building View' of programming suggests that the true output of programming is not the code or technical artifacts, but the understanding (or theory) of how the code maps to real-world situations. This theory is built up in the programmer's mind and cannot be fully captured in documentation or code.

  • Why does the speaker argue that beautifully written code still has limited value?

    -The speaker argues that even well-written code with complete test coverage and documentation has limited value because it does not capture the full context and understanding (theory) of why the code is structured in a certain way. This understanding is tied to the programmer's experience and intuition.

  • What example does the speaker give to support the idea that source code itself is of limited value?

    -The speaker mentions Panic, a company whose source code was stolen by hackers. Panic did not worry about competitors using the stolen code, as they believed it would quickly become outdated and irrelevant without the ongoing context and improvements made by their team.

  • What are the three intangible aspects of programming theory that cannot be fully expressed in code or documentation, according to the speaker?

    -The three intangible aspects are: (1) the mapping of each piece of code to the real world, (2) the justification for why certain technical decisions were made, and (3) the ability to adapt the code to new requirements based on changes in the real world.

  • Why does the speaker believe it's often faster to rewrite code from scratch rather than modify existing code?

    -The speaker argues that it's often faster to write new code from scratch because understanding and modifying existing code requires rebuilding the entire theory of the program in one's mind. This can be more difficult than starting fresh with a new theory that fits the programmer's own experience and understanding.

  • What challenges do companies face when onboarding new developers, according to the video?

    -Companies face challenges in onboarding new developers because much of the value in a program lies in the theory that exists only in the original developer's mind. This theory is difficult to transfer through documentation alone and requires close personal interaction to fully understand.

  • How does the speaker compare learning to program to other skills like playing a musical instrument?

    -The speaker compares programming to learning a skill like playing a musical instrument, arguing that it requires personal interaction with someone who already possesses the necessary understanding. Just as you cannot learn to play an instrument by reading instructions alone, you cannot fully understand code without guidance from someone familiar with its theory.

  • What suggestions does the speaker offer for improving the transfer of programming knowledge?

    -The speaker suggests that programming tools like languages, IDEs, and version control systems could do a better job of helping transfer the theory behind code. For example, tools could provide better overviews or interactive sessions to help new developers quickly understand and modify existing code.

Outlines

00:00

💻 The Value of Source Code in Modern Projects

The speaker begins by challenging the viewer to consider the value of their source code, suggesting that it might be much lower than expected. He reflects on his experience working on a large-scale project that involved complex tech stacks like augmented reality (AR) and computer vision. Despite the advanced nature of the project, a new manager raised concerns about the security of storing source code on GitHub, which led the speaker to question the true value of source code, even for significant projects.

05:02

🔓 The Impact of Open-Sourcing Code

The speaker delves deeper into the implications of open-sourcing a project. Reflecting on his startup experience, he concludes that even if they had made their code public, it likely wouldn’t have impacted their business significantly. Codebases in startups change frequently, making them hard to maintain and understand, especially for outsiders. Even companies like Microsoft would find it faster to rebuild from scratch than to attempt to use his team’s evolving, complex, and often broken code.

10:03

💡 Programming as Theory Building vs. Production

The speaker introduces the concept of 'programming as theory building' by citing an article by Turing Award winner Peter Naur. This perspective contrasts with the more common 'production view,' which sees programmers as producers of technical artifacts like code and documentation. Instead, Naur’s view focuses on the theory or the mapping between the real world and the code in the programmer’s mind, which cannot be fully expressed through written documentation. This theory-building process is essential to understanding and maintaining software.

15:04

🤯 The Intangible Nature of Programming Knowledge

The speaker argues that certain aspects of programming knowledge are intangible and hard to capture in code or documentation. One key aspect is understanding how the real world maps onto the codebase. The speaker highlights that documenting every real-world factor or mapping decision would be impractical, especially in complex environments like a factory setting, where business processes are constantly evolving and hard to predict.

⚖️ The Trade-Offs in Programming Decisions

Expanding on Naur’s theory, the speaker explains that programming often involves making trade-offs based on experience and intuition. Documenting every technical decision or alternative path is not practical, as there are infinite possible ways to implement a solution. This highlights the challenge of onboarding new developers and the impossibility of fully capturing the reasoning behind every design decision in a written document.

🔄 Adapting Code to the Changing Real World

The speaker’s strongest argument is that the real world is constantly changing, and software must adapt to new requirements. He uses the example of a factory app where workers’ behavior changed after production, leading to a need for quick updates. Only developers who understand the underlying theory of the code can effectively implement these changes, as documenting every potential real-world scenario would be impossible.

🛠️ The Importance of Close Collaboration

Naur’s final point emphasizes that programming knowledge can only be transferred through close personal interaction. The speaker likens this to learning a skill like playing an instrument or writing, where written instructions alone are insufficient. New developers must work closely with those who understand the program’s theory to learn how it fits into the larger real-world context and how to manage unexpected modifications.

🚀 The Future of Programming: Theory-Driven Tools

The speaker concludes by addressing the original question: source code holds little value on its own because it lacks the context of the theory behind it. This explains why it’s often faster to rebuild software from scratch rather than modify an existing project. He suggests that programming tools, languages, and environments should evolve to facilitate the transfer of this theory between developers, and he teases his own ongoing research into creating such a language.

Mindmap

Keywords

💡Source Code

Source code refers to the human-readable instructions and statements written by programmers to create software. In the video, the speaker argues that while source code may seem valuable, its true worth is often overestimated because it quickly becomes outdated or difficult to reuse, as seen in the case of stolen code from the company Panic.

💡Theory Building

Theory building in programming, as introduced by Peta Nawa, suggests that programming is more about constructing a conceptual understanding (or 'theory') of how the code maps to the real world, rather than merely producing technical artifacts like source code. The video emphasizes that this theory is not easily transferable through written documentation but is critical for understanding and maintaining software.

💡Production View of Programming

The production view of programming is the traditional perspective that treats programming as a process of creating technical outputs (code and documentation) in response to requirements. The speaker contrasts this view with the theory building view, arguing that the former oversimplifies programming and ignores the deeper conceptual mapping required to make meaningful changes to software.

💡Code Obsolescence

Code obsolescence refers to the idea that code becomes outdated quickly as requirements change and improvements are made. In the video, the speaker illustrates this by explaining that even high-quality code, such as the stolen source code from Panic, becomes obsolete within weeks as new fixes and features are added.

💡Domain Knowledge

Domain knowledge is the deep understanding of the specific real-world context that the software is intended to address. The video argues that this knowledge, stored in the minds of programmers, is what makes their contributions valuable and difficult to replace, as it is intricately tied to the theory of the program, not just the code itself.

💡Technical Debt

Technical debt refers to the future cost of maintaining and fixing poorly written or hastily developed code. The video highlights how quickly-changing requirements and a lack of documentation often lead to technical debt, as was the case with the speaker's startup project, where code quality was poor and often broken.

💡AR (Augmented Reality)

Augmented reality (AR) refers to technology that superimposes digital information onto the real world, enhancing the user's experience. The video mentions AR as part of a complex software project that displayed virtual signs and information in real-world environments, showcasing the advanced nature of the system the speaker worked on.

💡Mapping

Mapping in programming refers to the process of associating pieces of code with specific elements of the real-world problem being solved. According to the theory building view, this mapping is essential to understanding and modifying the software. The speaker notes that without this understanding, new developers may struggle to maintain or extend the system effectively.

💡Software Onboarding

Software onboarding is the process of introducing a new developer to an existing codebase. The video argues that onboarding is often slow because much of the project's 'theory'—the conceptual understanding of how the code relates to the real world—cannot be captured in documentation, making it challenging for new developers to grasp the full picture.

💡Trade-offs

Trade-offs in programming refer to the decisions developers must make between competing solutions, each with its pros and cons. The video points out that documenting every decision and trade-off made during development would be impractical, as many are based on intuition and experience, contributing to why source code alone is not enough to understand a project.

Highlights

The value of source code, even for larger projects, may be much closer to zero than expected.

A personal experience working on an augmented reality project for mapping large buildings like malls and airports, which required custom-built solutions before modern AR kits.

A former manager's concern that storing code on GitHub could allow Microsoft to take the code and build a competing service was deemed unrealistic.

The realization that open-sourcing the project would have had minimal impact because the code was constantly changing, poorly documented, and complex to set up.

Panic, a well-known software company, had its source code stolen, but they weren't too concerned about competitors using it due to how quickly it became outdated.

Source code on its own is often not the most valuable asset, as it quickly becomes outdated and difficult to understand or maintain without the original programmer's knowledge.

The Theory-Building view of programming by Turing Award winner Peter Naur suggests that the true value in programming lies in the mental model or 'theory' a programmer builds to map the code to real-world problems.

The production view of programming, where programmers are seen as replaceable, is contrasted with the theory-building view, where programmers create valuable mental models that are difficult to transfer or document.

Theory-building emphasizes that the code is just a side product; the real output is the mental mapping between the code and the real world, which is often incommunicable through documentation alone.

The limitations of documentation: key design ideas, justifications for technical decisions, and adaptations to real-world changes are difficult or impossible to document fully.

New programmers need personal interaction with the original developers to acquire the theory behind the code, similar to learning a skill like playing a musical instrument.

The faster solution is often to write new code from scratch rather than modify existing code, as building the original theory in a new programmer's head is time-consuming.

The high turnover in the software industry is problematic because much of the value in a programmer's knowledge is tied up in their individual understanding of the code, which isn't easily replaced.

The example of a factory app demonstrates the complexities in business processes that cannot easily be documented, such as secret smoke breaks affecting data entry consistency.

Future programming environments could improve by optimizing for faster theory transfer between developers, potentially through more interactive or live onboarding methods.

Transcripts

play00:00

what's the value of your source code

play00:02

like seriously take a moment to think

play00:04

about this for your current project if

play00:07

you had to put a dollar value on your

play00:08

code what would that be in this video I

play00:11

want to argue that even for bigger

play00:13

projects this value is probably much

play00:15

closer to zero than you might think I

play00:17

also want to give you a new perspective

play00:19

on programming as a whole inspired by

play00:22

touring Award winner Peta Nawa I was

play00:24

confronted with this question a few

play00:26

years ago when I was working at a

play00:28

smaller company doing intern ation

play00:30

software so basically Google Maps in big

play00:32

buildings like malls airports and

play00:34

factories there was also an augmented

play00:36

reality mode so we could display arrows

play00:38

on the floor that show your destination

play00:41

or additional information like virtual

play00:43

signs or realtime info about machines

play00:45

and factories it was a pretty cool

play00:47

project and the text stack was super

play00:49

interesting there was a low-level

play00:51

computer vision component written in C++

play00:54

for crossplatform support a native layer

play00:56

for IOS and Android crossplatform

play00:58

rendering and webgo and a pretty complex

play01:01

admin interface for the web and you know

play01:03

this project started in the early 2010s

play01:06

so there was no AR kit or ar core that

play01:09

made it easy to include some AR like

play01:11

today we actually had to write that all

play01:13

ourselves with some computer vision

play01:15

libraries and we even worked together

play01:17

with a research institute to get this to

play01:19

work so basically this wasn't just

play01:21

something anyone could easily recreate

play01:24

on the team we just implicitly assumed

play01:26

that our code was really valuable and

play01:28

one of our major assets that then at

play01:30

some point a new manager joined the

play01:32

company and he had mostly worked in

play01:34

bigger companies before and he was super

play01:36

concerned with security so he argued

play01:38

that we shouldn't keep our source code

play01:40

in a cloud hosted GitHub repo he was

play01:43

worried that Microsoft the owner of

play01:45

GitHub might just be able to take our

play01:47

code and build a competing service now

play01:49

that's ridiculous of course Microsoft

play01:51

would never do something like this like

play01:54

they would never build an AI that just

play01:56

uses your private code AS training data

play01:59

like that would never happen right no

play02:02

but seriously back then this got me

play02:04

thinking why did this feel ridiculous

play02:07

like if we leave all ethical and legal

play02:09

concerns aside for a moment why wouldn't

play02:12

Microsoft or any other big company just

play02:14

use our code if they wanted to build a

play02:16

competing service and then going even

play02:19

further I thought what would happen if

play02:21

we just open- sourced everything if we

play02:23

put it all in a public repo with an open

play02:26

license like MIT our investors would

play02:28

probably have thought that we've got

play02:30

crazy but other than that what direct

play02:32

impact would that have had on our

play02:34

company after thinking about this for a

play02:36

while I think the answer back then would

play02:38

have been absolutely nothing would have

play02:40

changed you know we were still a young

play02:43

startup so our code was changing pretty

play02:45

drastically every couple weeks sometimes

play02:47

we change major parts of the

play02:48

architecture or rewrite components

play02:51

because the requirements changed so

play02:52

quickly as we discovered new things

play02:54

about our customers and as it often goes

play02:57

in such a situation the code quality was

play02:59

pretty bad half the time the build

play03:01

system was broken testing and

play03:03

documentation was basically non-existent

play03:06

and it was unlikely that anyone from

play03:07

outside the team would even have gotten

play03:09

the thing up and running even if they

play03:11

did it would be outdated a moment later

play03:14

so of course Microsoft would never take

play03:16

our code they'd be much faster just

play03:18

building it themselves from scratch than

play03:20

trying to understand the crummy code

play03:22

that we just hacked together but okay I

play03:24

hear you say maybe your code was crummy

play03:27

but my code is beautiful all right so

play03:30

let's take a step back and assume the

play03:32

opposite for a moment beautifully

play03:33

written clean code with complete test

play03:36

coverage oneclick build process

play03:38

well-written documentation of

play03:40

architecture and components would this

play03:43

actually have changed the situation I

play03:45

really don't think so you see in 2017

play03:48

there was an incident of a pretty

play03:49

high-profile source code theft the name

play03:52

of the company was appropriately Panic

play03:54

it's a company that makes high quality

play03:56

software for Mac and iOS and they've

play03:58

also released some games like Untitled

play04:00

Goose game and firewatch they had the

play04:03

full source code of most of their apps

play04:04

stolen by hackers the attackers

play04:06

threatened that they'd released the

play04:08

source code and demanded a ransom but

play04:10

Panic refused to pay and in a blog post

play04:13

they went through all the worst case

play04:14

scenarios of what the hackers could do

play04:16

with the code they said that the worst

play04:18

thing that could happen would be people

play04:19

building cracked versions of their apps

play04:22

that are full of malware but that was

play04:23

already happening anyways even before

play04:25

the source code was stolen just like

play04:27

with most software like don't get me

play04:29

wrong I'm sure this was a pretty bad

play04:30

blow for panic and I'm not arguing that

play04:33

stolen source code can't be damaging but

play04:35

was Panic worried about competitors

play04:37

stealing their high quality code in a

play04:39

blog post they wrote that they weren't

play04:40

too concerned with that mainly because

play04:42

it would quickly become outdated that

play04:44

source is already missing a ton of fixes

play04:47

and improvements we committed over the

play04:49

last week alone and 6 months from now it

play04:51

will be missing major critical new

play04:53

features in short it's old and getting

play04:56

older so this is really interesting

play04:58

right here we have a multi-million I

play04:59

doll company basically saying that they

play05:02

don't worry about competitors using

play05:03

their code so if the value is not in the

play05:06

code and documentation where is it and

play05:09

why is writing new code sometimes faster

play05:12

than understanding and modifying

play05:14

existing code I couldn't read my head

play05:16

around these questions until I stumbled

play05:18

upon this article programming as Theory

play05:20

building by touring Award winner panwa

play05:23

if you've ever taking a compiler course

play05:25

you might have used his work already

play05:27

since he's the n in backos now form

play05:29

anotation for specifying programming

play05:31

languages that is still in use today in

play05:34

his article na gives his view on this

play05:36

surely very simple and easy to answer

play05:38

question what is programming he says

play05:40

that most people view programming as a

play05:42

production process and he calls this the

play05:44

production view of programming he argues

play05:47

that some empirical observations in

play05:49

software projects can't be explained

play05:51

with this view but they can with this

play05:53

alternative Theory building view of

play05:55

programming I'm going to explain this

play05:57

with some real life examples from one of

play05:58

my previous Pro projects I was working

play06:00

at a factory where the workers were

play06:02

still using paper processes to document

play06:05

their work we made a custom tablet app

play06:07

to digitize this process now in the

play06:09

production view of programming we of

play06:11

course have programmers they get input

play06:14

from external stakeholders and they

play06:16

observe a slice of the real world that's

play06:18

relevant to the problem they then take

play06:20

this input and produce technical

play06:22

artifacts as output so basically code

play06:24

and

play06:25

documentation the problem with this view

play06:28

according to Nawa is that the technical

play06:30

artifacts are the final output while the

play06:33

programmers are viewed as easily

play06:34

replaceable Machines That Just Produce

play06:37

this output in contrast in his theory

play06:39

building view the focus is on the

play06:41

programmer who again observes the real

play06:43

world and as they write the code in

play06:45

their head they also build a mapping

play06:48

between the code and the real world each

play06:50

piece of the real world that's relevant

play06:52

to the problem needs to be mapped to

play06:54

some technical artifact that could for

play06:56

example be a specific class method or

play06:59

data structure an overall architectural

play07:03

decision or maybe simply a line in the

play07:06

documentation the main difference to the

play07:08

production view is that the code is just

play07:10

a side product the real product the real

play07:13

output of this process is the theory the

play07:16

mapping between the real world and the

play07:18

code so basically the arrows in this

play07:20

diagram are the real output everything

play07:22

else is just a side

play07:25

product now you might say well why don't

play07:28

we just take this Theory and put it into

play07:31

written documentation as

play07:33

well then it would be really easy to

play07:35

onboard new developers to our code so

play07:38

they can be productive really fast but

play07:40

nowah argues that exactly this step

play07:43

isn't

play07:44

possible he writes the code and its

play07:46

documentation has proved insufficient as

play07:49

a carrier of some of the most important

play07:51

design ideas a main claim of the theory

play07:53

building view of programming is that an

play07:56

essential part of any program the theory

play07:58

of it is something that could not be

play08:01

conceivably expressed but is

play08:03

inextricably bound to human beings now

play08:06

that's a pretty strong claim but I think

play08:08

that now has some really good Arguments

play08:10

for it he says that there are three

play08:12

different aspects of the theory that are

play08:14

just in the programers minds and go

play08:17

beyond what's visible in the source code

play08:18

or documentation these three aspects are

play08:21

intangible so they're difficult or even

play08:23

impossible to communicate indirectly via

play08:25

written documentation for the first one

play08:28

of these aspects now says the programmer

play08:30

must be able to explain for each part of

play08:33

the code and for each of its overall

play08:35

structural

play08:36

characteristics what aspect or activity

play08:39

of the world is matched by it so

play08:42

basically someone new to the project

play08:44

should be able to point at any piece of

play08:46

code and the original programmer can

play08:48

tell us how it's mapped to a specific

play08:50

object or situation in the real world

play08:53

and the other way around of course this

play08:55

direction is even more difficult as now

play08:57

our rides by far the larg largest part

play08:59

of the world will of course lie outside

play09:02

the scope of the code being Irrelevant

play09:04

in the context however the decision that

play09:07

a part of the world is relevant can only

play09:09

be made by someone who understands the

play09:11

whole

play09:12

world so basically not everything in the

play09:15

real world has a direct mapping to

play09:17

source code and of course we as

play09:19

programmers have to know and decide

play09:21

which parts are actually relevant to the

play09:22

problem at

play09:24

hand for bigger projects I just don't

play09:26

see how documenting all this information

play09:28

would be practical so for example the

play09:31

factory app that I mentioned earlier was

play09:33

itself pretty simple but the underlying

play09:35

business processes were super complex

play09:38

there were different assembly lines and

play09:39

machines involved also the environment

play09:41

was changing and evolving quite often

play09:43

workers changing their shifts around the

play09:46

Wi-Fi in the factory would go down or be

play09:48

unavailable in some areas machines would

play09:50

break down stuff like that and downtime

play09:52

in the factory was really expensive so

play09:54

the app had to be prepared to handle all

play09:56

these situations so even if we had had

play09:58

the time and budget to document all this

play10:01

I really don't see how anyone would have

play10:03

benefited from that documentation it

play10:05

would probably have been a couple

play10:06

hundred pages and it would have been

play10:08

really difficult finding the information

play10:10

that you're actually looking for but

play10:12

difficult is not impossible which is why

play10:14

I think this is actually the weakest

play10:15

argument naah makes for the theory

play10:17

building view so let's take a look at

play10:19

the other two arguments the second one

play10:21

is that for each mapping we could have

play10:23

chosen an entirely different

play10:25

implementation in the

play10:26

code so according to naah the programmer

play10:30

having the theory of the program can

play10:32

explain why each part of the program is

play10:35

what it is in other words is able to

play10:37

support the actual code with a

play10:39

justification of some sort so basically

play10:42

an explanation of why we made certain

play10:44

technical decisions he goes on to

play10:46

explain that this justification can just

play10:48

be pressed into a set of rules but

play10:50

instead requires intuition and

play10:52

experience in my opinion programming is

play10:54

a lot about choosing the right

play10:56

trade-offs based on your experience and

play10:58

compressing all these technical

play11:00

decisions which are often based on

play11:02

intuition into a written document seems

play11:05

really impractical to me like for major

play11:07

architectural decisions it makes

play11:09

complete sense to document this but

play11:11

imagine you had to justify in writing

play11:14

every single technical decision you make

play11:16

I think this would drive me insane and I

play11:18

wonder how much value this would

play11:19

actually provide to a newcomer who's

play11:21

being onboarded to the project also for

play11:23

each problem there's an infinite number

play11:25

of possible implementations that we

play11:27

could have chosen and new approaches or

play11:29

architectures are being proposed every

play11:31

day so we wouldn't just have to document

play11:34

why we chose the current implementation

play11:36

but also why we didn't choose any of the

play11:39

millions of other possible

play11:41

implementations so I think here it's

play11:43

pretty clear that it's impossible to

play11:45

document this aspect of the theory

play11:46

exhaustively but now let's get to Na's

play11:49

third and in my opinion strongest

play11:50

argument for the theory building view

play11:52

which is that the real world is

play11:54

constantly changing and with those

play11:56

changes come new requirements we as

play11:58

program programmers then have to decide

play12:01

how similar the new use case is to the

play12:03

features that are already built into the

play12:05

program like can we implement this

play12:07

functionality with any of the existing

play12:10

code or do we need to build entirely new

play12:13

components or abstractions to cover this

play12:15

use

play12:17

case now i writes designing how a

play12:19

modification is best incorporated into

play12:22

an established program depends on the

play12:24

perception of the similarity of the new

play12:26

Demand with the operational facility

play12:29

already built into the program I think

play12:31

here it's pretty clear that this is

play12:33

impossible to put into any kind of

play12:35

written documentation since it involves

play12:37

making decisions on how to deal with

play12:40

changes in the real world that we

play12:41

haven't anticipated yet otherwise we

play12:43

could have just Incorporated them into

play12:45

the design of the original program in

play12:47

the first place let me give you another

play12:49

real life example from the factory app

play12:51

so after having the app in production

play12:53

for a while we realized that the data

play12:55

entry was somehow inconsistent it took

play12:57

us a while to investigate but then we

play12:59

found out that this was because of some

play13:01

secret smoke breaks that the factory

play13:03

workers took and that management didn't

play13:05

know about once we figured this out it

play13:07

was super easy for us in the core def

play13:09

team to add a simple addition to the

play13:11

code to deal with this case but I think

play13:13

if we had handed the code over to the

play13:14

client already it could have been

play13:16

possible that they'd spend weeks to fix

play13:18

this since they didn't know where

play13:20

exactly to make changes to the code for

play13:22

this of course it would have been

play13:23

impossible to write down any hints or

play13:25

guidance for dealing with this case in

play13:27

advance since we didn't anticipate this

play13:29

at all in my experience such things

play13:32

happen all the time in software and only

play13:34

those that deeply understand the program

play13:36

can Implement new use cases while

play13:38

keeping the original structure of the

play13:40

program intact naah also brings up a few

play13:43

similar case studies where a different

play13:45

Dev team that took over the original

play13:47

code was struggling to make changes

play13:49

instead they made additions that

play13:51

destroyed its power and simplicity they

play13:54

didn't make use of the existing

play13:55

abstractions built into the program but

play13:58

instead came up with their own less

play14:00

elegant Solutions creating some kind of

play14:02

Frankenstein code monster so I think

play14:04

that altogether these three arguments

play14:07

make a good case for the fact that the

play14:08

theory can't be put into any written

play14:10

documentation but does that mean we're

play14:12

just screwed that we can't ever transfer

play14:14

the theory from one programmer to the

play14:16

other nowah says it's still possible but

play14:19

it requires personal interaction what is

play14:21

required is that the new programmer has

play14:24

the opportunity to work in close contact

play14:26

with the programmers who already possess

play14:28

the theory so as to be able to become

play14:30

familiar with the place of the program

play14:32

in The Wider context of the relevant

play14:34

real world situations and so as to

play14:36

acquire the knowledge of how the program

play14:39

works and how unusual program reactions

play14:42

and program modifications are handled

play14:44

within the program

play14:46

theory he even compares these

play14:48

interactions to teaching a skill like

play14:50

writing or learning a musical instrument

play14:53

a professional concert pianist also

play14:55

wouldn't be able to teach you how to

play14:57

play a certain piece just by writing

play14:59

down stuff or making recordings you need

play15:01

personal interaction with them to

play15:03

properly learn from them I think overall

play15:06

the theory building view really helps

play15:08

answer our initial questions source code

play15:11

itself has little value since it's

play15:13

unable to communicate the full Theory

play15:15

and this is also why it's often faster

play15:17

to write a new program from scratch than

play15:20

trying to understand and modify one that

play15:22

already exists because then you'd have

play15:25

to rebuild the entire theory of the

play15:27

program in your head and depending on

play15:28

your background it's often easier to

play15:31

just build an entirely new theory that

play15:33

fits your experience and perception of

play15:35

the world I think this is also why

play15:37

onboarding in software projects is often

play15:39

so slow and it's just crazy to me that

play15:41

we're in an industry where turnover is

play15:43

so high that people change jobs every

play15:46

few years even though so much value is

play15:49

tied up in an individual contributor I

play15:51

think companies would be well advised to

play15:53

not treat developers as replaceable cogs

play15:56

in a machine but instead realized that a

play15:58

lot of the domain knowledge they've

play15:59

built up over the years can't be easily

play16:02

replaced and has to be built up again

play16:04

from scratch I also think that our

play16:06

tooling so programming languages idees

play16:09

Version Control could do a much better

play16:11

job at helping to transfer the theory

play16:13

from one programmer to the other imagine

play16:16

a world where you could just open up any

play16:18

big open source project on GitHub

play16:20

immediately understand the code and make

play16:22

changes to it in a single day right now

play16:25

if you'd want to make changes to a big

play16:27

project like let's say the Linux current

play16:28

internal or a browser engine or

play16:30

something like that it would probably be

play16:32

a mistake to go in by just reading the

play16:34

code instead you'd probably want to read

play16:36

some kind of overview of the overall

play16:38

structure and modules or even better

play16:40

watch a video or do a live session with

play16:43

someone walking you through the code and

play16:45

explaining the parts that are relevant

play16:46

to what you're trying to accomplish

play16:48

isn't it a bit silly that the fastest

play16:50

way to understand code is not to just go

play16:53

and read it it's crazy to me that most

play16:55

developers myself included actually

play16:57

don't read other people source code on a

play16:59

regular basis imagine a writer who

play17:03

themselves doesn't read many other books

play17:05

or a musician who doesn't listen to a

play17:07

lot of music that's just crazy I think

play17:10

this is a failing of our current

play17:11

programming languages and tooling I'd

play17:13

love to see a programming environment

play17:15

that builds on the theory building view

play17:17

as a foundation and optimizes for the

play17:20

quick transfer of the theory between

play17:22

programmers I've actually been

play17:23

researching and working on such a

play17:25

language for some years now in private

play17:27

though it's still just in the idea phase

play17:29

let me know if this is interesting to

play17:30

you for a future video this is really

play17:32

the type of content I actually started

play17:34

this channel for so I'd really

play17:36

appreciate your feedback in the comments

play17:37

below I also have some more practical

play17:39

videos for using git on my channel check

play17:42

them out here have a great day and

play17:44

thanks for watching pH matics

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Programming TheorySource CodeSoftware DevelopmentCode ValueTheory BuildingDeveloper KnowledgeSoftware ProjectsOnboarding ChallengesTech DocumentationProgrammer Insight
هل تحتاج إلى تلخيص باللغة الإنجليزية؟