bbelderbos Profile Banner
Bob Belderbos Profile
Bob Belderbos

@bbelderbos

Followers
10K
Following
14K
Media
1K
Statuses
16K

Software developer passionate about building useful tools and helping people grow their #Python and #programming skills through @Pybites

Spain
Joined August 2010
Don't wanna be here? Send us removal request.
@bbelderbos
Bob Belderbos
1 month
Python Scope - What Is NameError and UnboundLocalError? - How #Python Finds Names
1
1
2
@bbelderbos
Bob Belderbos
1 month
🚀 Takeaway: • FIFO (first in → first out) = 'queue' = use a collections.deque() for fast popleft() • LIFO (last in → first out) = 'stack' = a list works fine since append() / pop() on the right are fast
0
0
1
@MagnesiacoreMan
MagnesiacoreGuy
26 days
Magnesiacore. Indoor Pool Drywall and Ceilings is a True Marine Wallboard. When it comes to indoor pools, natatoriums, or other enclosed spaces with high humidity and the moist chemical exposure it entails, you need a construction board that can withstand these elements.
1
2
24
@bbelderbos
Bob Belderbos
1 month
- from "Classic Computer Science Problems in Python"
1
0
1
@bbelderbos
Bob Belderbos
1 month
Using the right data structure matters💡 > "Popping from the left on a deque is an O(1) operation, whereas it is an O(n) operation on a list. In the case of the list, after popping from the left, every subsequent element must be moved one to the left, making it inefficient"
1
1
5
@bbelderbos
Bob Belderbos
1 month
Also cool: windowed from more-itertools!
0
0
0
@bbelderbos
Bob Belderbos
1 month
Itertools, the gift that keeps giving! 😍 Since #Python 🐍 3.12 you don't have to write your chunking helper anymore, just use `batched` - see docs:
2
4
30
@bbelderbos
Bob Belderbos
2 months
Here it's just one constant, if you have multiple related ones, use enums
1
0
0
@Tradeify
Tradeify
25 days
Achieve your trading dreams today! With Tradeify, you can access up to $150K in funding, allowing you to trade futures without the risk of using your own money. Get 30% OFF all accounts With code: OCT
2
11
41
@bbelderbos
Bob Belderbos
2 months
Coding tip: avoid magic numbers, use constants instead. You not only de-duplicate your code (make it more DRY), your code will also be more readable:
2
1
10
@bbelderbos
Bob Belderbos
2 months
Exciting new @pybites podcast episode with Christina Lang to talk about her journey as developer + practical mindset tips ->
0
1
3
@bbelderbos
Bob Belderbos
2 months
Transform Your Developer Mindset in Our PDM Program https://t.co/qzrelTjkrj via @YouTube
0
1
2
@pybites
Pybites
2 months
Did you know that pathlib has a nice abstraction to read / write files? I mean, it uses a `with` statement under the hood of course, but you only have to call a method 🐍 😍 📈 #python #tips
0
1
8
@charliermarsh
Charlie Marsh
3 months
I went on Pybites last week to talk about ty, our Python type checker and language server https://t.co/Cmo2Mev6nc
7
12
127
@pybites
Pybites
2 months
Caching is so easy in #Python, just use this decorator. 😍 Also notice how big of a difference it can make in performance! 📈 Bonus: how to use timeit 🐍
1
2
4
@subprime_times
The Subprime Times
14 days
BREAKING: Elvis has officially won the Daytona 500 AI is becoming more real every day...
15
29
281
@pybites
Pybites
3 months
Need to swap two variables in #Python? No problem! Just one line of code using tuple unpacking 🐍 😍 📈
0
2
2
@pybites
Pybites
3 months
New social buttons added - please share when you finish Bites on our platform, we'd love to see your progress! 🐍 😍 📈
0
1
1
@pybites
Pybites
3 months
Sentiment analysis in 2 lines of code: #python #tips
0
1
4
@pybites
Pybites
3 months
Did you know that by adding `__enter__` and `__exit__` to a class, you can turn it into a context manager? 🐍 💡 Here’s an example where a transaction automatically rolls back if the balance goes negative—ensuring safer operations. 🚀 🔹 Entering the context saves the current
2
1
8