Jean C Estevez ☕️🌱
banner
jeantvz.bsky.social
Jean C Estevez ☕️🌱
@jeantvz.bsky.social
💻 #Python whisperer and #wizard| #JavaScript | #C++ | #Java jedi | Full-time learner & freelance code-slinger 🔥

🚀 Turning ☕ into code

learning 🌱 daily

https://github.com/Jean-EstevezT/
Great, but I feel like it's too small a script to upload there.
November 29, 2025 at 5:48 PM
I agree with you that we shouldn't add unnecessary complexity. The KISS principle is key.
However, isn't Generators and Lazy Evaluation a crucial skill precisely for knowing when and how to optimize when the 'problem' is memory or datasets that don't fit in RAM?
November 21, 2025 at 5:02 PM
🔥 Your Challenge of the Week
Create an infinite Fibonacci sequence generator (while True + yield).

Use it to find the first number with more than 1000 digits.

Are you up for the challenge? Paste your solution in the comments. 👇
#PythonLearning #Backend #DevCommunity
November 21, 2025 at 4:40 PM
✅ Always use them for large files, network streams, or endless sequences.

⚠️ CAUTION: They are for single use only.
November 21, 2025 at 4:40 PM
6️⃣ Delegation with `yield from` 🤝
One generator calling another?

Before, you had to create manual loops. With `yield from`, a main generator delegates control to a sub-generator.

It's the "grandfather" of modern `async`/`await` and vital for understanding asynchronicity
November 21, 2025 at 4:40 PM
5️⃣ Bidirectional Communication 🗣️
Generators don't just "speak" (yield output), they also "listen."

With .send(), you can inject data into the generator while it's running. This turns them into coroutines.

Useful for state machines or changing the flow's behavior in real time.
November 21, 2025 at 4:40 PM
4️⃣ Data Engineering (Pipelines) 🚀
Want to analyze 50GB logs without crashing the server? Chain generators together.

Read file ➡️ Filter errors ➡️ Transform data
Each step is a generator. Data flows one by one like water in a pipe, not like a block of cement. 💧
November 21, 2025 at 4:40 PM
3️⃣ The Server Wallet 💸
Imagine processing 100 million records.

📉 List: [x*2 for x in range(10**8)]
Result: Your RAM explodes. PC crashes.

📈 Generator: (x*2 for x in range(10**8))
Result: Occupies almost 0 bytes. Generates data only when needed.

[] = Container.

() = Recipe
November 21, 2025 at 4:40 PM
2️⃣ Under the Hood 🔧
When you call a generator, Python doesn't execute the code. It returns a "generator" object.

The code only runs when you use `next()`.
It runs until `yield` -> It gives you the data -> It pauses.

If there's no more `yield`, it calls `StopIteration`
November 21, 2025 at 4:40 PM
See the difference:
❌ Normal (Eager): Creates the entire list in memory before returning it.

✅ Generator (Lazy):
He doesn't do anything until you ask him to.
November 21, 2025 at 4:40 PM
1️⃣ The Magic Pause ⏸️
Normal functions run until they terminate (return).

A Generator can pause, deliver a value, maintain its state, and resume where it left off.

The key is the word: yield.
November 21, 2025 at 4:40 PM
I'm excited to share DataFaux, a Python tool l've been working on for generating realistic and structured test data.

Here is the link of the project
github.com/Jean-Estevez...
GitHub - Jean-EstevezT/DataFaux: is a powerful, open-source Python tool for generating realistic and structured test data. It is designed for developers, testers, and QA engineers who need to create v...
is a powerful, open-source Python tool for generating realistic and structured test data. It is designed for developers, testers, and QA engineers who need to create varied and valid datasets for t...
github.com
August 12, 2025 at 12:59 PM