2018 in review

It was a great year, let’s take a look at the main high­light­s.

Ear­ly in Jan­uary, I pre­sent­ed a talk at a lo­cal mee­tup, which had a good re­cep­tion amongst the au­di­ence. The fist part of the year was a ­great pe­ri­od for learn­ing more about dis­trib­uted sys­tem­s, event sourcing, and even­t-­driv­en ar­chi­tec­tures. The peak of which was at­tend­ing the Kaf­ka sum­mit in Lon­don.

By late Au­gust/ear­ly Sep­tem­ber I fin­ished my book Clean code in Python which was a quite chal­leng­ing ex­pe­ri­ence.

It was a great plea­sure to at­tend the Python San Se­bastián con­fer­ence. I’ve heard about this con­fer­ence in a light­ning talk in Eu­roPy­thon, and I was cu­ri­ous about it. It was good to meet a group of friend­ly new peo­ple, and hav­ing the op­por­tu­ni­ty to pre­sen­t there (an en­hanced ver­sion of the talk pre­sent­ed at the meet­up in Jan­uary). Be­sides, the city is amaz­ing, so it’s cer­tain­ly some­thing to re­peat!

Be­sides some im­prove­ments in my con­fig­u­ra­tion files (vim and dot files), and to ­some of my oth­er pub­lic repos­i­to­ries, there was­n’t that much room for open ­source con­tri­bu­tion­s. On the oth­er hand, there was a good deal of learn­ing: I’ve read some fan­tas­tic books about soft­ware en­gi­neer­ing (such as Facts and ­fal­la­cies of soft­ware en­gi­neer­ing, Ob­jec­t-ori­ent­ed soft­ware con­struc­tion, and more), which un­for­tu­nate­ly I was­n’t able to cov­er in blog posts (but may­be in the fu­ture I will), and I suc­cess­ful­ly com­plet­ed the ma­chine learn­ing ­course of­fered by Cours­era, which was amaz­ing. A­gain, maybe in a fu­ture post I will be able to prop­er­ly re­view it, but for now I can just tell you that is high­ly rec­om­mend­able, if you’re look­ing for­ward to learn a ton and at the same time have fun solv­ing pro­gram­ming as­sign­ments.

All in al­l, it was a year with a lot of pos­i­tive notes. Look­ing for­ward to an a­maz­ing 2019 for ev­ery­one!

Subtleties of Python

In our pro­fes­sion, at­ten­tion to de­tail is of ut­most im­por­tance. Any good ­soft­ware en­gi­neer un­der­stands that de­tails mat­ter a lot, as they make the d­if­fer­ence be­tween a work­ing unit or a dis­as­ter [1].

This is why clean code is not just about for­mat­ting or ar­rang­ing the code. It’s nei­ther a foible. It is in­stead, pay­ing at­ten­tion ex­act­ly to those de­tails that will make a big dif­fer­ence in pro­duc­tion.

Let’s see some ex­am­ples of this in Python.

Read more…

Notes on the Kafka Summit London 2018

These are some notes and take­aways on the re­cent­ly cel­e­brat­ed Kaf­ka Sum­mit 2018 in Lon­don.

The con­fer­ence was or­ga­nized in three par­al­lel tracks for ses­sions that were ­cov­er­ing stream pro­cess­ing, pipeli­nes, and in­ter­nal­s. To get a good ex­pe­ri­ence, I at­tend­ed talks of the three type­s, but with a lit­tle pref­er­ence to­ward­s in­ter­nals and stream­s.

It was a two-­day con­fer­ence with lots of valu­able tech­ni­cal con­tent, awe­some talk­s, speak­er­s, and a lot more. Here are the high­light­s.

Read more…

Exploring Generators and Coroutines

Let’s re­vis­it the idea of gen­er­a­tors in Python, in or­der to un­der­stand how the sup­port for corou­tines was achieved in lat­est ver­sions of Python (3.6, at the time of this writ­ing).

By re­view­ing the mile­stones on gen­er­a­tors, chrono­log­i­cal­ly, we can get a bet­ter idea of the evo­lu­tion that lead to asyn­chro­nous pro­gram­ming in Python.

We will re­view the main changes in Python that re­late to gen­er­a­tors and asyn­chronous pro­gram­ming, start­ing with PEP-255 (Sim­ple Gen­er­a­tors), PEP-342 (­Corou­tines via En­hanced Gen­er­a­tors), PEP-380 (Syn­tax for del­e­gat­ing to a ­Sub­-­Gen­er­a­tor), and fin­ish­ing with PEP-525 (Asyn­chronous Gen­er­a­tors).

Read more…

2017 in Review

A re­cap of the main events and posts through­out the year that is end­ing.

This year I at­tend­ed some con­fer­ences over­seas, where I pre­sent­ed talk­s. First, in June, I went to the beau­ti­ful city of Prague for Py­Con CZ 2017. At first, I ­got on­ly one talk ap­proved, Dis­cov­er­ing De­scrip­tors, which was a new ­topic I was pre­sent­ing. A few days be­fore the con­fer­ence start­ed, an­oth­er s­peak­er had to step down, so I was asked to fill in the slot, to which I agreed ­by propos­ing my talk of clean code in Python. That meant I pre­sent­ed one the ­first two days of the con­fer­ence, and then at­tend­ed the work­shop on the last ­day (Sat­ur­day).

The con­fer­ence was nice, and as al­ways, a great op­por­tu­ni­ty for net­work­ing and learn­ing.

Ju­ly was the month for Eu­roPy­thon, a con­fer­ence that is al­ways awe­some. This year, I did not have a talk sched­uled be­fore­hand, as I did last year, but ­sur­pris­ing­ly enough, on the light­ning talk ses­sions of Mon­day they an­nounced a free slot for the Tues­day, to which I vol­un­teer by sub­mit­ting my new talk, “Dis­cov­er­ing De­scrip­tors”. So, once again, an­oth­er un­ex­pect­ed (but glad), op­por­tu­ni­ty that I had to present a talk at a good con­fer­ence.

On oth­er top­ic­s, I at­tend­ed sev­er­al mee­tups of Python and Go, and be­came more in­volved in dis­trib­uted sys­tem­s.

It was al­so a good year to work more with Dock­er, and start­ed to learn more about Ku­ber­netes.

Re­gard­ing con­tri­bu­tions to open source, I re­leased new ver­sions of most of the pro­jects I have on GitHub, but there is more. I sent the first suc­cess­ful ­patch to CPython in GitHub (im­por­tant note: at the be­gin­ning of this year, the CPython project moved to GitHub). It was a sim­ple change on the doc­u­men­ta­tion, about de­scrip­tors, that got quick­ly merged, but a good head start.

An­oth­er nice con­tri­bu­tion is that, dur­ing the sprints at Eu­roPy­thon, I worked a­long the pypy team, and sent some com­mits fix­ing changes for Python 3.6. It was an amaz­ing ex­pe­ri­ence to learn more about the pro­jec­t, and about CPython it­self. Cer­tain­ly some­thing I look for­ward to con­tin­ue do­ing.

For the new year, I ex­pect more con­tri­bu­tions to open source, main­ly on the same projects (CPython and pypy), and re­lease more open source li­braries. Al­so more con­fer­ences, and as al­ways, room for the best which is usu­al­ly the un­ex­pect­ed.

Refuse the temptation to pass

This is an opin­ion I some­times re­mem­ber when see­ing some code. Don’t take it as a strong ad­vice, or a rule, but in­stead as a gen­er­al guide­line that might help y­ou to im­prove the code slight­ly.

On this post I will share a tiny and opin­ion­at­ed ar­gu­ment about why there are usu­al­ly bet­ter things to do in the code in­stead of just pass.

Read more…