Commented Links for 2020-06-03

Scotty, Pyramid and Cornice, Problems with, Mercurial and Python 3, Fast Python, Async Python Request Library, Online Advertising, Google and Web.

scotty: Transports you to any directory you have visited before

I have been using Scotty for some time and I really like it.

What Scotty does is keep a list of directories you accessed recently and, after a while, you can simply use s <directory> to get straight into it. Not only that, but Scotty uses fuzzy searching to find the directory that closely matches whatever you typed.

How to write a Python web API with Pyramid and Cornice

Pyramid is the "less known" Python web framework around. But this post shows how simple is to build a (simple) API with it.

Stop Using!

Slightly clickbait title, but great content. Not only pointing out the problems when using (no, it's not the function itself that has a problem, it is the way we use that may cause problems), but going into lenghts explaining dependency injection in Python.

Mercurial's Journey to and Reflections on Python 3

Ding dong, the witch is dead, and so is Python 2.

But there is still a large base of Python 2 projects that need to be converted to Python 3, and Mercurial did this, and here's the experience of a maintained on doing it so.

I do understand that converting Python 2 to 3 is not a simple task, but there are a few misconceptions in the post. For example, "the approach of assuming the world is Unicode is flat out wrong and has significant implications for systems level applications". The word is unicode. Go read the Portuguese version of this blog to have some idea. Go read any Chinese/Japonese blog to see how it looks. Do you really think those people do not use system level applications anywhere? Also, what do you think are mostly used: User level applications or system level?

Not saying the conversion is perfect -- in a way, unicode is simply a way of dealing with the underlying bytes -- but ranting that this change made your specific way to think harder is not an excuse to not understand where the whole ecosystem was moving -- and it also doesn't mean your specific thing is not welcome, but you have to understand you're in the minority case here.

(Also, it's no surprise to me that claiming "world is unicode is wrong" is coming from someone living in an ASCII country.)

Making Python Programs Blazingly Fast

A set of tips on how to make Python applications faster. Some of those may seem weird in the first glance (make a variable in the function point to the a variable in the same class?) but the post also explains why this may improve the general performance.

Httpx: A next-generation HTTP client for Python

Requests shown to everyone how APIs should work, but it kinda got stuck in time, without async support (and a few other glitches in the project management). Now there is Httpx, which is, again, another HTTP request library, but this time with async support and, basically, the same interface.

No-judgment digital definitions: Online advertising strategies

Have you ever wondered why after you search something -- say, "gamer chair" -- suddenly you start getting a lot of promotions and ads for chairs in your social networks?

Nothing happens by simple chance, and that's the effect of all the trackers that someone puts on a page. But how they identify who is who is the real question.

This post by Mozilla may seem a little bit basic, but shows pretty damn well how those things are done.

Google Is Not God of The Web

Another clickbait title but, again, good content.

A point that caught my attention was "Google has the right to dictate 'Best Practices', although I think the topic is quite the opposite, based on its content.

Imagine that Google start giving points of "user experience" to pages that use the Material design. Pages and pages that look like Android apps. But if you use your own layout, your own colors, you lose points. What now?

This is the greatest problem on people depending on Google, and all the relationship of one of their groups working on web standards, a group working on a browser and a group to take advantage of whatever the previous two did. The less dependent on Google you become, the more you use alternative search engines (DuckDuckGo, Searx and even Bing), the more you use other email providers (ProtonMail), the more you use browsers that are not Chrome (Firefox, Safari or anything based on WebKit), the lesser the chance of the internet becoming the thing of a single company.

This post was built with the help of