Codestories Newsletter #111: What Color Is the Number 2?

Photo of Maciej Nachtygal

Maciej Nachtygal

May 19, 2022 • 10 min read
Python_vs_Scala

Codestories Newsletter is a regular dose of news, insights, and inspiration for technology enthusiasts, delivered every two weeks. You can subscribe here.

Have you ever wondered what color is the number 2?

It was a question that I asked my leader recently at a meet and greet event when he said that he likes to be asked weird questions. I guess I like to ask questions! When you’re asking a question, you can’t be wrong, and you can’t prove you’re right until someone questions you. Good conversations often begin with a question, even if it’s an unusual one!

What is your source of knowledge?

Developers are like lone wolves — we don’t walk the same paths. Of course, in the beginning, we do similar work, such as with variables, loops, and functions, but we’re quickly setting our own goals and following journeys through libraries, frameworks, architectures, and cloud providers. This particular mismatch in our experiences can be challenging because colleagues with similar seniority will talk about stuff we may never have heard of. But don’t be discouraged, as there will be some things you know better than your colleagues.

We all take different roads. It’s important to have your own wolf pack where you exchange ideas and knowledge among fellow developers. A few months ago, my project team introduced nonobligatory meetings for developers (there are nine of us right now) called “Let’s talk about…”. The format is based on a public forum. Anyone can talk about anything, but mostly we chat about tools we want to incorporate, design patterns, discuss recent issues, the project's future, or just hang out and ask questions. In a remote environment, where the number of meetings can be overwhelming, this feels like a breeze. I noticed that it was beneficial in a few ways: we got more time to interact with each other, making us feel more connected. We can learn within a safe space and better connect to project knowledge thanks to the casual environment. I know that this sounds like we're just a bunch of geeks, but we are excited about the project that we’re in. And we are geeks, actually!

Wait, who are you?

My name is Maciej. I’m a Python developer and it’s my first time hosting Codestories (that sounded like the intro of the SNL monologue.) You have to know that I’m a real Python and programming nerd, so this issue will be very focused on Python. And if you’re not into that, it’s okay. I’ve pulled in other resources as well.

One month ago, I was celebrating my first birthday at Netguru, so I’d like to use this opportunity and thank all of the amazing people I met along the way here. Thank you all!

And number 2 is yellow, obviously!

Maciej Nachtygal,
Python Developer

⭐ Highlights

  • Python and JavaScript just got married
  • Atlassian had a huge outage
  • Handling Python exceptions like a PRO
  • Get better at mocking
  • Discover a water purification method powered by gravity

🔥 News

Meet PyScript (MarkTechPost)

We all knew that this was going to happen. We just didn’t know when. Anaconda just released PyScript. The idea is to allow embedding or writing Python code within the HTML file and execute it on the client-side. It already works with a couple of data science libraries, like NumPy and pandas. What’s the reason for all that? My sense is that virtual lens aren’t that easy to manage and Anaconda already has made a lot of effort to make working with Python as easy as possible.

Google Cloud launched AlloyDB (Techcrunch)

Pythonistas do love to work with Postgres. It’s the first DB we hear about when we learn about Django and decide to get our feet a little wet with something more real than SQLite. Postgres is also open source and fast and has a lot of powerful extensions and etc. No wonder it has over 15% market share. Now, GCP has announced its fully managed service AlloyDB, which is designed to be compatible with Postgres. I would speculate that GCP was pushed a little bit by AWS's recent announcement of Aurora Serverless V2. It’s definitely a good move by GCP that leads to tearing out some of the Azure and AWS market share.

✅ Must-reads

The Dunning-Kruger effect for programmers (Udenna Nebeolisa)

Almost all of us heard the following: “I’m not good enough.” “There is nothing for me to learn.” “Once I learn that I would have to learn no more.” These are all lies when you look at the big picture. We all are on a journey to become better at what we do. It’s beneficial to assess where you currently are, understand that it’s not going to be like that forever and what is coming next. I hope that each of us will reach the plateau of sustainability.

The Scoop: Inside the longest Atlassian outage of all time (The Pragmatic Engineer)

About a month ago Attlassian had a huge outage that impacted over 400 customers. Luckily, Netguru wasn’t one of them. Here is a detailed description of what actually happened. There are also a few lessons that we all can learn from: use soft deletes on databases, make sure to implement a dry run (preview) in your scripts and communicate often with your clients about what is the current system status.

🌱 Sustainable Tech

Polish scientists create world’s first no-energy, no-pressure water purification and desalination solution (The First News)
“Gravity” is the title of one of the greatest songs written by John Mayer. It’s also the name of the force that attracts two physical bodies. Now it can also purify water. Well, not on its own, but gravity is the key element of the water purification method created by Polish scientists. Nanoseen addresses the issue of world freshwater shortages.

💡 Developer’s corner

Mastering Bitcoin (Github)

Bitcoin is getting bigger and bigger every day. Have you ever wondered what it’s made of, how it works, and the technical details? Now, you get a chance to learn about it through this open-sourced book dedicated to developers. Web 3.0 is just around the corner, so knowing what it’s all about is good.

Handling exceptions in Python like a PRO (Gui Commits)

It’s easy to raise an exception in Python, but what should we do with it? How should it be handled? These are not always simple questions to answer. Here is an awesome guide with advice on how to properly build exception trees, what to log and when, and how to do that efficiently and increase code readability.

F-strings and python logging (klichx.dev)

When creating a log message, we sometimes want to include some local variable - like user id or status of something. Since the introduction of the f-string for many of us, f"{}" has become the default way of presenting data within a string. But is it always okay to use it? You don't have to worry about it anymore because Netguru’s Python Tech Lead has got you covered. This article will help you understand how log messages work under the hood. And if you want to learn more about f-strings, here is a link: fstring.help.

⚙ Tips & tricks

How to easily do asynchronous programming with Asyncio in Python (YouTube)

Python is slow, but there is a relatively simple way to make Python much faster. Asyncio was introduced in Python 3.4 (back in March 2014) and provides an interface to make your code work asynchronously, which results in better performance. In the video, the author introduces basic concepts of Asyncio and shows how you can make your sync calls async. By the way: if you don’t know Arjan's channel yet, you should check it out! He eats design patterns and good practices for breakfast!

Fast Django REST Framework (Django Ninja)

Django is a mature and popular web framework in the Python world. Over the years it has gained features and weight. There’s also FastAPI — the new kid on the block, very light, fast, and powerful. For me, FastAPI is missing the nice ORM like we have in Django. What if I tell you that someone has figured out how to combine the best of both worlds? (best is subjective here) Now, you can combine the lightness of FastAPI with Django ORM and Django Admin. Django Ninja runs over 500 production apps and is an interesting choice, package, and idea.

Understanding the Python mock library (Real Python)

When testing an application, you often need to mock an external service. Over time, requirements are changing, and more services need to be integrated. Then you somehow end up with unmanageable mocks or in a place developers call “mocking hell.” Part of the problem is that we make mistakes mocking too much or the wrong things. Another problem is that we don’t know the library we’re using well because we mostly learn it on-the-fly. It’s always a good idea to click the pause button and recap on the things we think we know. Take this opportunity to challenge yourself and make sure you’re using mock library features in the right way.

--

This is the issue 111 of Codestories Newsletter – a bi-weekly dose of latest Tech insights. You can learn more and subscribe here.

If you have any comments or feedback, feel free to contact the Codestories Team: [email protected].

Photo of Maciej Nachtygal

More posts by this author

Maciej Nachtygal

Codestories Newsletter  Check what has recently been hot in European Tech.   Subscribe now

We're Netguru!


At Netguru we specialize in designing, building, shipping and scaling beautiful, usable products with blazing-fast efficiency
Let's talk business!

Trusted by:

  • Vector-5
  • Babbel logo
  • Merc logo
  • Ikea logo
  • Volkswagen logo
  • UBS_Home