Share
 

Hey Pythonista,

A couple of days late this week due to travel. Nevertheless here are 5 nuggets for you to ponder on, hope they are helpful for you.

Don't just consume them though, make sure you implement along the way!

1. Quote: the issue is not fear, it's how we channel it

Watching volleyball this weekend it dawned on me that as much as technique and agility matters, mindset is, at least, if not more important!

Sports is all mindset!

Who wants victory the most?

Which team will pick up from a downward spiral as the other team is hitting a scoring streak?

How do you deal with mistakes as an individual player?

Of course this is taken from competitive sports, but there is actually a lot of similarity with how we progress as professionals, including developers.

As I was reading up on youth athlete mindset resources I stumbled upon this interesting quote:

"Confidence is not a lack of fear, but a willingness to continue to take action and perform when fear is present. Champions are successful because they are skilled at redirecting fears and negative thoughts instead of letting them take control." - Dr. Roberta Kraus, Ph.D. (as mentioned in this article)

So keep this in mind when you feel fear / imposter syndrome, for example when you have to deliver a big feature or some other type of outside-your-comfort-zone situation at work.

We all face fears, that won't change, but what are you going to do about it?

Will you let it deter you from growing or are you going to use it as fuel for growth?

Can you relate to this? Hit us up in Circle and let us know.

Another golden resource that has given us a lot of value in this context is The Ultimate Jim Rohn Library, available in Audible.

2. Python itertools tip

It's worth staying on top of new Python features ...

Here is the progression of "splitting a sequence into pairs"  - as you reach the end you'll learn that the Standard Library keeps adding elegant solutions for common problems.

Here we go...

Need to split a sequence into pairs? Try slicing with a step!

Quickly pair up elements in a list using zip combined with slicing:

numbers = range(1, 11)
pairs = list(zip(numbers[::2], numbers[1::2]))
print(pairs)  # [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)]

But maybe this is not too readable?

You can also use a generator function. This method can be particularly useful if you're dealing with big data, as it doesn't require creating intermediate lists:

def chunk_pairs(iterable):
    """Yield successive non-overlapping pairs from the iterable."""
    iterator = iter(iterable)
    for first in iterator:
        try:
            second = next(iterator)
            yield (first, second)
        except StopIteration:
            return

numbers = range(1, 11)
pairs = list(chunk_pairs(numbers))
print(pairs)  # [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)]

This function works by iterating over the provided iterable two elements at a time. It's efficient for large data sets because it doesn't create additional lists or slices. The StopIteration exception is used to gracefully handle iterables with an odd number of elements.

Since 3.12 you can also do this with `itertools.batched()` - from the docs:

flattened_data = ['roses', 'red', 'violets', 'blue', 'sugar', 'sweet']
unflattened = list(batched(flattened_data, 2))
unflattened
[('roses', 'red'), ('violets', 'blue'), ('sugar', 'sweet')]

Or to group by 3 items:

for batch in batched('ABCDEFG', 3):
    print(batch)
('A', 'B', 'C')
('D', 'E', 'F')
('G',)

Short / concise, fast (I expect, as other functions in itertools generally are), and elegant.

Keep up2date with the Standard Library! 🐍 😍 📈

3. Exciting podcast updates

Join us as we journey through Django, open source, and PyCon conferences with special guest Paolo Melchiorre.

We explore Django's evolution, the impact of open source, and the vibrant atmosphere of PyCons.

Paolo shares his developer odyssey, offering personal insights and experiences from the tech world. Don't miss this insightful episode on the heart of Python development and community collaboration.


And stay tuned for an exciting episode this week with Louise Oprel, a visionary cloud advocate on a transformative mission.

Discover how Louise stays at the forefront of tech, unlocks exclusive experiences without a ticket, and leverages the power of networking and volunteering to shape the future.

Get ready for an inspiring journey filled with practical tips and extraordinary stories that will fuel your passion for innovation and connection in the tech world.

Subscribe to our YouTube channel and you'll see it appear in your notifications soon.

4. The power of keeping a wins file

We hear a lot of people struggling with confidence these days so we would be remiss not recommending this episode again:


One of the tips is to update your wins every week. This is very important to stay motivated and set a benchmark for your future self.

We wrote about it here: Do You Have a Brag Doc?

And while updating this file (you set a reminder right?), maybe you want to share a win in our community as well so we can all learn and encourage each other.

5. Where best to deploy serverless apps these days?

Normally we share an Archive piece here, but we had an interesting post in our community worth sharing.

Harold was so nice putting a FaaS comparison GitHub together and posted about it in our Circle community.

Are you using serverless? Take a look and feel free to add your experience.


---

Keep crushing it and keep us posted + ping us if you need anything, we're here to help you.

Best,
Bob & Julian


P.S.

Having a few years of experience with Python, but struggling to write more clean code?

And/or you want to build complete packages and upload them to PyPI?

And/or leave a mark in the open source world?

And/or build your own SaaS solution starting to generate some side-income (a route we took for example) or just to prove to yourself that you can do it?

You'll need:

- Strong Python + coding skills.

- Know quite some developer tooling and learn how to learn (meta skill) and iterate effectively as a developer.

- Probably unlearn some bad habits.

- And what people expect the least (well, maybe more now as we talk about it a lot haha): quite a bit of developer mindset training.

Join us in our Developer Mindset programs to seriously improve on all fronts, and come out with skills + tangible work to show for.

Check our programs out here:



Hope to see you on the inside.


Email Marketing by ActiveCampaign