5 Ways First Principles Thinking Helps You Code Better
Skills:
LLM Foundations80%Prompt Craft70%Agent Foundations60%Tool Use & Function Calling60%ML Maths Basics50%
Key Takeaways
The video discusses how first principles thinking can improve coding skills, covering topics such as problem-solving, software development, and design patterns, with tools like pipeline or workflow systems and large language models.
Full Transcript
today I want to talk about how first principle thinking is going to help you become a way better software developer what does that mean a first principle is a proposition assumption that you can't deduce from any other proposition or assumption that's from Wikipedia and it may sound a bit complicated but basically it means think like a scientist now you may think what does that have to do with software design and development actually quite a lot as I was thinking about this I realized that a lot of the things that learned over the past few years actually come down to more first principle thinking and applying that to the way that I design and develop software so today I'm going to cover five ways in which first principle thinking has helped me become a better software developer and once you're aware of these things they'll also help you improve your own skills the first one is that you should identify and Define what fundamental truths are so if you identify the most basic truths or elements in a problem that's actually really important when you're developing a piece of software this can include analyzing the needs of your users having a good understanding of what your software is supposed to do having an understanding of what the domain looks like basically before you spend any time trying to actually solve a problem you need to spend time understanding the problem but it's not just the problem itself that you need to understand it's also understanding the benefits limitations of the tools that you're using what are the strength and weaknesses of programming languages the cloud infrastructure that you're intending to use any of the supporting tools when you Zone in on these fundamentals you going to get a better understanding of what the problem looks like that is trying to solve and by understanding better you'll reduce the chance of making mistakes later now when I say understanding I don't mean that you should design your software to The Last Detail I'm not promoting that we all go back to the word full model it just means that you optimize for problem Clarity so you'll have less surprises when you start solving things and what's interesting is that that also relates to your own limitations as developer as well if you're asked to develop a feature you may be tempted to try that new library that you heard everybody talking about because you want to learn how to use the library but realize when you do that that you're actually changing priorities you introduce an unknown you don't know how that library is going to perform because you never used it so what is your priority do you want to learn about the library and accept that the project may be delayed because it's going to take you more time or there are unforeseen consequences of uset library or do you want to focus on adding the feature on time and making your customers very happy and there may be an overlap because that Library might actually solve a problem that you're looking to solve but be aware that you are prioritizing you want to deliver the feature or you want to improve your skills you need to pick one if it's improving your skills that's fine but make sure you're transparent about it and that it may lead to un seen problems or delays it actually took me quite a while before I really understood that improving my skills and delivering feature would do different things it may seem like completely obvious but it's really easy when you're in the thick of things to just forget about that distinction and diving into some sort of rabbit hole and never getting out of it again a second thing you should do is break down problems to their core so next to understanding problems it's also really important to dissect problems and understand what the core components and challenges are and this can actually lead to better solution because then you can address the root of that problem for example let's say you get a task of creating a system that analyzes stock portfolios and then prepares reports automatically so instead of just diving in and start coding and coming up with ad hog Solutions you can also first take some time and break down the problem to the core and then you might realize that in essence this application is a data Pipeline and that means you can use a pipeline or workflow system and build your whole application around that with which leads to a much more flexible solution now if you didn't break up the problem before you wouldn't have come up with that solution another way of thinking about this is how you incorporate design ideas into your coding practices I sometimes hear other developers ask what design pattern should I apply here in my opinion that's actually the wrong question to ask it's not about applying design patterns it's about understanding what a problem actually is and once you spend the time to understand the core of a problem then deciding on the design pattern that should solve it is actually trivial because design patterns are intricately linked with classes of problems so instead of asking what kind of design pattern you should use ask yourself what kind of problem is this in the core what kind of thing are we dealing with and then take it from there the third thing is to reassemble elements innovatively so once you understand basic elements of a problem you can can reassemble them in innovative ways and that's going to create new solution and often this is where big breakthroughs and really new things happen it may sound cliche but the iPhone is a really good example because it combines separate things into an Innovative new single device when you think about software design don't feel obliged to follow design patterns to the letter but adapt them to what you actually need and combine them in different ways and same goes with functions you can also combine them in various ways you can pass a function as a parameter to another function you can put functions in a list or a dictionary you can use closures you can have a function that returns another function there's tons and tons of possibilities another new area where you can think about these kind of things is large language models how can you incorporate them into the software that you're developing what kind of features are suitable to use an llm for and how does that integrate with the rest of your code and what does it mean in terms of the function alities of what it will deliver the fourth thing you should do is validate your assumptions regularly as you're developing that piece of software always question and validate your assumption throughout the process it's going to keep your solution relevant it's going to avoid unnecessary complexities in the past it happened to me quite often that I ended up diving into some sort of rabbit hole to get a feature working exactly the way that I wanted to but when I thought about what was actually needed in most cases I could have saved myself bunch of time by just letting go of some things for example I remember a project where I was spending way too much time trying to fix some esoteric typing issue with generics I mean type annotations are great and awesome it's really nice if you can get them just right but in some cases it doesn't have to be perfect sounds weird me saying that but it doesn't have to be because especially if it's code that just you are going to use internally it doesn't matter too much and it's way better to spend your time on something that's going to make a bigger difference another another way of thinking about validating assumptions is by writing software test write unit test using for example by test to make sure that the code you wrote actually behaves as expected so don't assume that write a test to check it to make sure and by writing this test you're setting up yourself to validate those assumptions regularly and even better automatically the fifth thing you should do that's actually one of the most important things is to focus on Simplicity and functionality it's really important to maintain a level of Simplicity in your solutions to make sure that they're functional user friendly and not overly complex if you keep your code simple it's often easier to test and also easier to maintain so I always start with a simple solution and only introduce complexity if it actually solves a problem functions for example are typically a bit simpler to deal with in classes and inheritance so I tend to start with functions nowadays and only use classes if that actually leads to a simpler solution and same holds for other more advanced features of python for example I don't really use decorators or context managers or meta classes a lot because in my opinion they're often not needed and I prefer to keep things really simple and that also makes it much easier for me to test my code I will only use something like a decorator if I'm really convinced that hey this actually makes the code a lot simpler and a lot easier to deal with otherwise I just keep my codes using the basic set of features because honestly it's just a lot easier to manage and here's a bonus tip just make sure you learn continuously if you develop for yourself a culture of continuous learning and being curious that's actually vital to applying first principle thinking when you read books read articles watch videos it's going to help you get a better clearer perspective on the problems that you're trying to solve and it also goes for being updated with technological advancement and new programming languages for example now that python 3.12 has introduced way better generic types you can use them to write code with better type annotations assuming that you're not diving into some sort of rabbit hole like I did a couple of weeks ago another thing you can do to make sure you continuously learn is to make sure you're part of a community to help you my Discord Community is a great example of culture that encourages sharing knowledge and helping out each other if you'd like to join for free just go to discord. codes link is also in description below so this has not been my typical tutorial video where I show you a bunch of code but it's more a thinking video so I'd like to hear from you do these things trigger something do you recognize instances where you didn't do some of these things where you didn't apply first principle thinking and it led you to wrong decisions what were the consequences of that do you agree at all with this first principle thinking view on software development and design let me know in the comments by the way a good example of me applying first principle thinking is in my recent refactoring video where I show a five-step process that you can use to make dealing with Legacy code way easier you can watch that right here thanks for watching and see you soon
Original Description
👷 Review code better and faster with my 3-Factor Framework: https://arjan.codes/diagnosis.
In this video, I'll cover 5 ways first principles thinking has helped me become a better software developer. These fundamental principles are game-changers, and by the end of this video, you’ll know exactly how to apply them to improve your coding skills.
🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/
🔖 Chapters:
0:00 Intro
0:50 Identify and Define the Fundamental Truths
3:18 Break Down Problems to Their Core
4:51 Reassemble Elements Innovatively
6:01 Validate Assumptions Regularly
7:21 Focus on Simplicity and Functionality
8:34 BONUS: Make Sure You Learn Continuously
9:32 Outro
#arjancodes #softwaredesign #python
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from ArjanCodes · ArjanCodes · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Full stack WEB DEVELOPMENT in 2021 - the ULTIMATE tech stack for FAST web app development
ArjanCodes
FROM PRODUCT IDEA TO SOFTWARE - turn your idea into reality in a few steps
ArjanCodes
Cohesion and Coupling: Write BETTER PYTHON CODE Part 1
ArjanCodes
Build a GLASSMORPHISM React Component - Typescript & Material-UI
ArjanCodes
Observer Pattern Tutorial: I NEVER Knew Events Were THIS Powerful 🚀
ArjanCodes
100% CODE COVERAGE - Think You're Done? Think AGAIN.☝
ArjanCodes
Two UNDERRATED Design Patterns 💡 Write BETTER PYTHON CODE Part 6
ArjanCodes
1000 Subscribers! 🚀 WHY I Started this Channel and WHAT'S NEXT
ArjanCodes
Channel Trailer ArjanCodes - March 2021
ArjanCodes
Exception Handling Tips in Python ⚠ Write Better Python Code Part 7
ArjanCodes
Monadic Error Handling in Python ⚠ Write Better Python Code Part 7B
ArjanCodes
GW BASIC Games I Wrote When I Was a Kid 🎮 Running 30 Year Old Code
ArjanCodes
Why You Should Think About SOFTWARE ARCHITECTURE in Python 💡
ArjanCodes
Uncle Bob’s SOLID Principles Made Easy 🍀 - In Python!
ArjanCodes
QUESTIONABLE Object Creation Patterns in Python 🤔
ArjanCodes
If You’re Not Using Python DATA CLASSES Yet, You Should 🚀
ArjanCodes
CODE ROAST: Yahtzee - New Python Code Refactoring Series!
ArjanCodes
7 UX Design Tips for Developers
ArjanCodes
Going All-in on Software Design in Python + an ANNOUNCEMENT 🎙
ArjanCodes
🎙 Interview with Sybren Stüvel, Developer @ Blender 3D
ArjanCodes
Do We Still Need Dataclasses? // PYDANTIC Tutorial
ArjanCodes
7 Python Mistakes That Instantly Expose Junior Developers
ArjanCodes
Answering Your Most Frequently Asked Python Questions // Q&A 07-2021
ArjanCodes
GitHub Copilot 🤖 The Future of Software Development?
ArjanCodes
More Python Code Smells: Avoid These 7 Smelly Snags
ArjanCodes
Test-Driven Development In Python // The Power of Red-Green-Refactor
ArjanCodes
5 Tips To Keep Technical Debt Under Control
ArjanCodes
Refactoring A Tower Defense Game In Python // CODE ROAST
ArjanCodes
The Factory Design Pattern is Obsolete in Python
ArjanCodes
Why the Plugin Architecture Gives You CRAZY Flexibility
ArjanCodes
Refactoring A Data Science Project Part 1 - Abstraction and Composition
ArjanCodes
Refactoring A Data Science Project Part 2 - The Information Expert
ArjanCodes
Refactoring A Data Science Project Part 3 - Configuration Cleanup
ArjanCodes
Purge These 7 Code Smells From Your Python Code
ArjanCodes
Running A Software Development YouTube Channel
ArjanCodes
Refactoring A PDF And Web Scraper Part 1 // CODE ROAST
ArjanCodes
Refactoring A PDF And Web Scraper Part 2 // CODE ROAST
ArjanCodes
How To Easily Do Asynchronous Programming With Asyncio In Python
ArjanCodes
The Software Designer Mindset
ArjanCodes
NEVER Worry About Data Science Projects Configs Again
ArjanCodes
Powerful VSCode Tips And Tricks For Python Development And Design
ArjanCodes
8 Python Coding Tips - From The Google Python Style Guide
ArjanCodes
What Is Encapsulation And Information Hiding?
ArjanCodes
8 Tips For Becoming A Senior Developer
ArjanCodes
Building A Custom Context Manager In Python: A Closer Look
ArjanCodes
GraphQL vs REST: What's The Difference And When To Use Which?
ArjanCodes
You Can Do Really Cool Things With Functions In Python
ArjanCodes
Announcing The Black VS Code Theme (Launching April 1st)
ArjanCodes
7 DevOps Best Practices For Launching A SaaS Platform
ArjanCodes
Refactoring a Rock Paper Scissors Lizard Spock Game // Code Roast Part 1
ArjanCodes
Refactoring a Rock Paper Scissors Lizard Spock Game // Part 2
ArjanCodes
Things Are Going To Change Around Here
ArjanCodes
Dependency Injection Explained In One Minute // Python Tips
ArjanCodes
How To Setup A MacBook Pro M1 For Software Development
ArjanCodes
A Simple & Effective Way To Improve Python Class Performance
ArjanCodes
How To Write Unit Tests For Existing Python Code // Part 1 of 2
ArjanCodes
How To Write Unit Tests For Existing Python Code // Part 2 of 2
ArjanCodes
Make Sure You Choose The Right Data Structure // Python Tips
ArjanCodes
5 Tips For Object-Oriented Programming Done Well - In Python
ArjanCodes
Next-Level Concurrent Programming In Python With Asyncio
ArjanCodes
More on: LLM Foundations
View skill →Related Reads
📰
📰
📰
📰
The AI Tool I Built for Myself Ended Up Becoming the Product Clients Asked About the Most
Medium · Programming
Can AI Help Plan Your Next Holiday?
Medium · AI
Beyond ChatGPT: How I Curated a Toolkit to Build an AI-Powered Workflow (And Why I Built a Tool to…
Medium · AI
Beyond ChatGPT: How I Curated a Toolkit to Build an AI-Powered Workflow (And Why I Built a Tool to…
Medium · Startup
Chapters (8)
Intro
0:50
Identify and Define the Fundamental Truths
3:18
Break Down Problems to Their Core
4:51
Reassemble Elements Innovatively
6:01
Validate Assumptions Regularly
7:21
Focus on Simplicity and Functionality
8:34
BONUS: Make Sure You Learn Continuously
9:32
Outro
🎓
Tutor Explanation
DeepCamp AI