![ArjanCodes](/img/default-banner.jpg)
- Видео 381
- Просмотров 17 967 624
ArjanCodes
Нидерланды
Добавлен 1 янв 2017
On this channel, I post videos about programming and software design to help you take your coding skills to the next level. I'm an entrepreneur and a university lecturer in computer science, with more than 20 years of experience in software development and design. If you're a software developer and you want to improve your development skills, and learn more about programming in general, make sure to subscribe for helpful videos.
I post a video here every Friday. If you have any suggestion for a topic you'd like me to cover, just leave a comment on any of my videos and I'll take it under consideration.
Thanks for watching!
I post a video here every Friday. If you have any suggestion for a topic you'd like me to cover, just leave a comment on any of my videos and I'll take it under consideration.
Thanks for watching!
7 Functional Programming Techniques Every Developer Should Know
In this video, I'll walk you through 7 functional programming techniques and demonstrate how they work. Although Python is not a purely functional language, functional programming can significantly improve your Python skills.
🔥 GitHub Repository: git.arjan.codes/2024/func
💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
📨 The Friday Loop by ArjanCodes Newsletter: thefridayloop.com
💻 ArjanCodes Blog: www.arjancodes.com/blog
✍🏻 Take a quiz on this topic: www.learntail.com/quiz/ezhdob
🎓 Courses:
The Software Designer Mindset: www.arjancodes.com/courses/tsdm
The Software Architect Mindset: www.arjancodes.com/courses/tsam
Next Level Python: Become a...
🔥 GitHub Repository: git.arjan.codes/2024/func
💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
📨 The Friday Loop by ArjanCodes Newsletter: thefridayloop.com
💻 ArjanCodes Blog: www.arjancodes.com/blog
✍🏻 Take a quiz on this topic: www.learntail.com/quiz/ezhdob
🎓 Courses:
The Software Designer Mindset: www.arjancodes.com/courses/tsdm
The Software Architect Mindset: www.arjancodes.com/courses/tsam
Next Level Python: Become a...
Просмотров: 21 734
Видео
5 Tips for Writing Clean Python Code
Просмотров 17 тыс.День назад
In this video, I'll share 5 key things you should do to avoid writing crappy code. These tips, drawn from my own experience, will help you write clean code. 🔥 GitHub Repository: git.arjan.codes/2024/clean_code 👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: www.arjancodes.com/diagnosis. 📨 The Friday Loop by ArjanCodes Newsl...
Why Do So Many Software Developers Have Imposter Syndrome?
Просмотров 11 тыс.14 дней назад
In this video, I’m going to talk about imposter syndrome. What it is, why so many software developers have it, including me, and how I’ve learned to deal with it. ✅ Get the FREE Software Architecture Checklist, a guide for building robust, scalable software systems: arjan.codes/checklist. 📨 The Friday Loop by ArjanCodes Newsletter: thefridayloop.com 💻 ArjanCodes Blog: www.arjancodes.com/blog ✍🏻...
Build, Deploy, and Host a Backend From A to Z
Просмотров 15 тыс.21 день назад
Check out Hostinger ➡️ hostinger.com/arjancodes ✔️ Hostinger code for 10% off: ARJANCODES In today's video, I'll show you how to build, deploy, and host a backend from start to finish. I’ll walk through the entire process, covering everything you need to know to get your application up and running. 🔥 GitHub Repository: git.arjan.codes/2024/build_deploy_host_backend/skypulse ✅ Get the FREE Softw...
Streamlit Explained: Python Tutorial for Data Scientists
Просмотров 28 тыс.Месяц назад
In this Python tutorial, I’ll dive into Streamlit, a tool that simplifies the creation of web applications for your data science projects. Additionally, I’ll discuss the differences between Streamlit and other libraries like Dash and Taipy. 🔥 GitHub Repository: git.arjan.codes/2024/streamlit ✅ Get the FREE Software Architecture Checklist, a guide for building robust, scalable software systems: ...
Git Hooks: We’re Not Using Them Enough!
Просмотров 12 тыс.Месяц назад
In this video, I’ll explore Git hooks and demonstrate how to create a custom Python script to enhance your development workflow. 💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide. 📨 The Friday Loop by ArjanCodes Newsletter: thefridayloop.com 💻 ArjanCodes Blog: www.arjancodes.com/blog ✍🏻 Take a quiz on this topic: www.learntail.com/quiz/ziclcf ...
Keychron Q5 Max Developer Review
Просмотров 9 тыс.Месяц назад
In this video, I’ll find out if the Keychron Q5 Max is the best keyboard for developers. I’ll talk about all its features, and how it differs from other keyboards. ⌨️ Check out the keyboard here: www.keychron.com/products/keychron-q5-max-qmk-via-wireless-custom-mechanical-keyboard ✅ Get the FREE Software Architecture Checklist, a guide for building robust, scalable software systems: arjan.codes...
Invariants: How Understanding Limits Enhances Your Code
Просмотров 8 тыс.Месяц назад
In this video, I'll explore invariants in software development. As developers, we're usually focused on what the code does, but it's just as crucial to understand what the code doesn't do. Understanding invariants will not only deepen your grasp of your code but also enhance your ability to write more effective tests. 🔥 GitHub Repository: git.arjan.codes/2024/tuesday_tips/invariant 👷 Join the F...
The Unit of Work Design Pattern Explained
Просмотров 21 тыс.Месяц назад
In today's video, I'll explain the Unit of Work design pattern, a crucial concept for anyone who regularly interacts with databases. This pattern plays a key role by accumulating all transactions and executing them collectively. But why is this necessary? Find out this video. 🔥 GitHub Repository: git.arjan.codes/2024/unit_of_work 👷 Join the FREE Code Diagnosis Workshop to help you review code m...
How To Do AI Prompt Templating
Просмотров 11 тыс.Месяц назад
In this video, I'll show you how to use Jinja2 for AI prompt templates. While Jinja2 is commonly used for generating HTML pages, it's also incredibly effective for tools designed to interact with Large Language Models (LLMs). 🔥 GitHub Repository: git.arjan.codes/2024/tuesday_tips/jinja2 👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis ...
AsyncIO and the Event Loop Explained
Просмотров 23 тыс.Месяц назад
Over the years, I’ve produced several videos about AsyncIO. Today, however, I’m adopting a new approach where I explain the event loop in depth. I’ll delve deeper into asynchronous programming, focusing specifically on how the event loop operates behind the scenes. 🔥 GitHub Repository: git.arjan.codes/2024/asyncio_dive 💡 Get my FREE 7-step guide to help you consistently design great software: a...
How to Avoid Dependency Hell in Programming
Просмотров 8 тыс.Месяц назад
In this video, I’ll talk about Semantic Versioning (SemVer). SemVer isn't just a practice; it's the backbone and foundation of stable and reliable software products. 👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: www.arjancodes.com/diagnosis. 💻 ArjanCodes Blog: www.arjancodes.com/blog ✍🏻 Take a quiz on this topic: www.lear...
Rust Handles Errors Way Better Than Python
Просмотров 17 тыс.2 месяца назад
In this video, I’ll show you how Rust handles errors and when to use which type of error handling, based on my own experience. 🔥 GitHub Repository: git.arjan.codes/2024/rust_error_handling 💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide. 💻 ArjanCodes Blog: www.arjancodes.com/blog ✍🏻 Take a quiz on this topic: www.learntail.com/quiz/apifir 🎓 ...
Everything You Need to Know about Debugging in VSCode
Просмотров 25 тыс.2 месяца назад
Everything You Need to Know about Debugging in VSCode
5 Tips for Building Powerful Data Dashboards in Python
Просмотров 28 тыс.2 месяца назад
5 Tips for Building Powerful Data Dashboards in Python
This Is How You Do PROPER Exception Handling With FastAPI
Просмотров 15 тыс.2 месяца назад
This Is How You Do PROPER Exception Handling With FastAPI
The Basics You Need to Know about AWS, Azure, and Google Cloud
Просмотров 20 тыс.2 месяца назад
The Basics You Need to Know about AWS, Azure, and Google Cloud
SQLAlchemy: The BEST SQL Database Library in Python
Просмотров 52 тыс.2 месяца назад
SQLAlchemy: The BEST SQL Database Library in Python
Python 3.12 Generics in a Nutshell
Просмотров 47 тыс.2 месяца назад
Python 3.12 Generics in a Nutshell
Protocols vs ABCs in Python - When to Use Which One?
Просмотров 32 тыс.2 месяца назад
Protocols vs ABCs in Python - When to Use Which One?
Top Keyboards for Software Developers on a Mac
Просмотров 11 тыс.3 месяца назад
Top Keyboards for Software Developers on a Mac
How to Test Asynchronous Code in Python
Просмотров 19 тыс.3 месяца назад
How to Test Asynchronous Code in Python
Should You Use Dependency Injection Frameworks?
Просмотров 41 тыс.3 месяца назад
Should You Use Dependency Injection Frameworks?
Why You Need Custom Exception Classes
Просмотров 18 тыс.3 месяца назад
Why You Need Custom Exception Classes
Why You Should Use Pydantic in 2024 | Tutorial
Просмотров 62 тыс.3 месяца назад
Why You Should Use Pydantic in 2024 | Tutorial
3 Tips for Working With the OpenAI API
Просмотров 10 тыс.3 месяца назад
3 Tips for Working With the OpenAI API
Combining Rust and Python: The Best of Both Worlds?
Просмотров 69 тыс.3 месяца назад
Combining Rust and Python: The Best of Both Worlds?
Dependency Injection Explained in 7 Minutes
Просмотров 50 тыс.3 месяца назад
Dependency Injection Explained in 7 Minutes
That be -- TTY relay only -- in skrrpts!
Thank you Arjan! Clear, concise, and to the point. I now know Dependency Injection!
I think Typing and abc's aren't used because the oldest code is already very old and way back then they weren't so common jet.
Very interesting! I would like to know more about the approach of using an external database like SQLite or DuckDB to store the info about the Dutch cities - for example - and how these can be later used in the code
Maybe i'm missing something but why are the commands not inheriting the defined transaction protocol class?
If I am not mistaken, you can use mypy to generate .pyi stubs. The catch: you need to conform to mypy typing requirements, which can involve a lot of work. Do you have an OSS example to implement the provider model better?
I love this idea. I would like to see you start with an example of using the library first to help provide context. But definitely want to see you dive into some complex libraries which make no sense to me.
Great suggestion!
Sound in this video is not good. There is a deep sound that sounds like someone is hitting the mic.
I think I know what the problem with the sound was, I’ll fix that for next time.
Yes, do more of these. I liked hearing your unfiltered walkthrough of a Python library. I have 10+ years of experience in Python development and now run a dev team. It's always nice to hear other experienced coders review things. Note for improvement: Your microphone picked up bumps and noises when you hit the desk or your clothes moved.
Thanks for the feedback! :)
A video about testcontainers would be very nice
Using 'reduce' to apply functions sequentially seems complicated. Instead, using a monad class seems like a better way to handle exceptions and readability. Using the '__or__' method as a 'bind' method, we can use result = Monad(10) | add_ten | mul_two | div_zero like this. I'd love to hear your thoughts. I'd like to add that it doesn't fit the content of this video because you need to define the Monad class 😁
42:30 what's the point for stub files? Is this yet another silly idea to put more C header files stuff into python?
Faker() works - but you are right, it's confusing. It would be interesting if you could rewrite a skeleton of Faker "done right", maybe with 1 or 2 providers each having a few functions.
I like the format! Studying other peoples code is really a great way to learn :)
Glad you liked it!
Python is, unfortunately , a bad choice for teaching functional programming, primarily because it is statement-based, and not expression-based .
When I saw the video title I thought it will be about impostor syndrome, as in "everyone sometimes feels like under the hood they are a faker". So glad it was not that. And great tips, thank you, this lib will come in useful on my next project.
Good one, thanks
Glad you liked it!
Like this deep dive session, regred that haven't participated it. Awesome idea🎉
This is great, Arjan!! Awesome resource for beginners and experts alike. Please make more of these, and preferrably put them under the Playlist 'Under the hood'.
Great suggestion!
That was very interesting to watch you in action and seeing whats your train of thought, I like the format!
Glad you enjoyed it, Jakub!
Great video! One thing that I'd mention is that many of us open-source library developers try to build our code to support all currently supported Python versions (I.e. those that haven't reached end-of-life). Currently, this is 3.8+, meaning we don't yet have access to the parameterized generics on builtins like list, which is why we import parameterized versions from the typing module. Once 3.8 reaches EOL, we won't need to import those anymore, and once 3.9 reaches EOL, we will be able to use the union shorthand (X | Y).
Very good points! That is definitely a good reason to stick with the older type annotation objects.
Good point. On the other hand, there can be cases when it's enough to run static analysis only using one of newer mypy+python, right? (This argument probably breaks down as the project has more dependencies, since with older Python versions come older versions of your project dependencies, which might not be 100% compatible so it might still be worth to run mypy with all supported environments as well.)
@@AloisMahdal Not really. The pre-3.9 builtins don't accept parameterization, so attempting to do so will cause runtime errors, as annotations exist at runtime. You could of course not include the type annotations at all, but then static type analysis would not be possible. Another option would be to maintain different versions (one with annotations, one without) for post-3.8 and pre-3.9 respectively, but we generally don't do that as it adds complexity, and having a version without strong typing is not ideal (strong type hinting is very useful for the end user, so we try to use type hints anywhere and everywhere). Realistically, the only option is to use the parameterized versions from the typing module if you want to support 3.8 with the parameterized builtins.
Haven't watched yet, but just based on the description - very cool idea! I always enjoy your content on this sort of thing. Looking forward to watching this one :)
In your next video ,can you do for langchain I hear people say it is complex source code ,I want to hear your views on it
Not open-source
Wow, do more of these please
38:07 You absolutely _do not_ need to duplicate type annotations for package users to get them. Instead, you only have to create an empty py.typed file in the package root, and type checkers will pick that up. .pyi files are only to be used by packages that don't want to add type hints in the code itself.
Good to know, thanks!
For more information, see PEP 561.
Ahhh sorry... I totally forgot to give the package a grade at the end! So: I'd give this a 6/10. There's a good attempt at trying to separate generating the various types of data. However, the design heavily relies on object-oriented programming, it does counterintuitive things with module imports, and the proxy class solution is messy in my opinion - that needs a redesign. What are your thoughts? Do you agree? Also: let me know in the comments if you'd like me to do another session like this or not!
An inituive comment for me to avoid coupling is to use a base class that accept some args (as locals and providers needed). Then you can use some factories and mapped functions to generate the random address, bank_account, etc. And if we want add some providers or functions to generate them, we modify the factory as well. What do you think ?
Could you give a few examples of VERY GOOD modules that you've come across, ones that you would give a grade of 10/10? That would make a great video, by the way, explaining like you did in the comment above why you like it. In a separate video you could do the opposite, "worst 5 Pyyhon libraries".
It was really interesting. I was not present during the live, so I had to look at it later. it was a little boring. I liked the way you picked a random envelope and that in one hour you detect a big problem. But as I said it was going to slow. I had a problem with staying with you.
This was great. Hearing unedited code review feels more authentic and clicks more for me than hearing the same from a polished, edited video.
Glad you enjoyed it!
Please stop using type hints if it starts accounting for half the video's runtime.
use meaningfull names... continues to use "pi" ad a name.
No offense, but compose seems the kind of thing, sr devs would write to distance themselves from pleb devs. Respectfully, pleb dev.
Maybe I'll never understand why all of this is ever needed.
I'm curious about the test cases for payment.py. Shouldn't we test if the payment processor charge method was called when testing for paying the order? Since "test_pay_order" would pass even if we remove line 17 "payment_processor.charge(card, amount=order.total)" in payment.py. Similarly, shouldn't we test if the order status wasn't changed if ValueError was raised?
reduce does beta reduction i believe
I would argue at 20:09 the function parameter could be Iterable, and have the output be still be an iterator. This way anything that can be iterated over, lists or iterators (or anything implementing __iter__) can be passed and it don't need to cast my inputs with iter(...). I try and make my functions inclusive with Iterable inputs and Iterator outputs, unless there is a specific reason that doesn't work.
Great suggestion, that is a definite improvement over the type annotation I used.
💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
Thanks 👌
I just shifted from Django to FastAPI, and the unavailability of an ORM was a shock, and then I came across SQLAlchemy, which came as another shock!
What do you think about SQLModel? Its from the FastAPI creators and combines pydantic and SQLAlchemy, as i noticed you don't need to create extra classes for sql and pydantic
in the bubble sort, the inner loop starts from the outer loop starts which means that there are a subset of elements in the beginning that are not sorted.
Hey 👋 I host a project on my own server (under my couch) with Proxmox, running docker behind Opensense and Crowsec firewall, 1GB speed. I use Cloudflare for the DNS and IP proxy. It's possible, but you have to deal with attackers and hackers. So I Splitt up my Homelan into multiple VLan to exclude privat stuff from the container.
Thank you Arjan for the videos you upload, they're very helpful and have a great quality, both in teaching and technical quality, I have learned a lot from you.
Glad to hear that Jonito!
thanks for this video man. i'm learning rust while writing pet project and result really bothered me until i found this video.
Glad it helped!
I find elimination of state to be mostly an obstacle in concurrent programming because atomic operations make threads inherently agnostic of what's going on and whether they should do a/b/c depending on updated conditions, and it also makes it difficult for them to broadcast their own state as it will require an intermediate who would ultimately end up doing exactly what that thread could be doing autonomously (and with less context). It's not impossible to safely allot partitions of a shared workload or state object by using range/slice-types for instance while retaining communicability.
I'm not conviced by the tuple notation when adding a union of type bounds to a generic. Why a different syntax when you already have unions? It feels like types in Python are still an afterthought. I am also surprised by the comments which are against typing altogether. I hope the most important community packages support types
A union in a type boundary works differently from what the tuple does. Let’s say you have a generic List class. If you set the type boundary to “int | float”, then you can only create lists that contain elements that are either ints or floats. If you set the type boundary to “(int, float)”, you can only create lists containing ints, or list containing floats.
Oh that's nice then!
How do i deal with real world implememtation in which i need a way to deal with the dependencies (external libs) that just my plugin will need to run ? Also, plugins will not be in the same path as of my application, specially when I install it as a onefile (using pyinstalller)..so how to deal with the imports? Please could you make a tutorial with a more "real example"?
Dude! This is crazy i wish i could share u our git repo, i watch all ur vids but havent seen this one! Decimal being slow and incorrect is halarious, we in our use case had to use fractional cents because of LLM cost per 1000 tokens was like 0.00025, we um settled on closest like 50 (rounded) was good enough, but i might make a PR to raise it to the token, just by going from 1e6, to 1e8 I guess it makes sense my code emulates urs as i watch a bit, still eerie tho
I hate trendy paradigms. I find that’s writing better code is just simply about building an intuition for what is right to do. There is no silver bullet.