> This article series is a guide to modern Python tooling with a focus on simplicity and minimalism
I'm not sure using pyenv + poetry + click qualifies as a minimalist setup.
I have never had to use pyenv as I figured out it was more robust to install the python versions directly from python.org and create the appropriate symlinks. Then using the venv module which has been included in python since 3.3.
The argparser module of python is not that bad once you are used to it.
I'm not saying the tools and libs mentioned in the article shouldn't be used, it's just that they're not mandatory for whoever wants to stay close to the bare minimum.
I would use pyenv locally so I can easily switch versions but dev and prod is a Docker container with one python version, then poetry install the virtual environment.
You don’t even really need to install into a venv, since you’re already in an isolated container, but going straight for a venv is kind of a reflex for most Python devs
Once you get in the habit, using pyenv/pipenv (in my case) is incredibly quick an easy. I use it for almost everything Python related I touch, except for quick scripts of the REPL.
I have built a rust based version of the 2048 game which runs in the terminal. The most interesting and fun part is the small AI that I implemented and which can be used to play automatically.
It's nothing very new, but I enjoyed crafting this small game in the most elegant and efficient way I could.
dataclass_json is also very useful for schema validation. It combines python's native dataclass objects with marshmallow's schema to provide additional functionalities simply through a @dataclass_json decorator on your dataclass.
I made the similar dataclasses_serialization library. It doesn't require a special decorator on your classes, and is extensible for custom classes, and custom serialization methods (JSON and BSON provided by default).
I do something similar with dataclasses using the `dacite` (https://github.com/konradhalas/dacite) library as a constructor for python dicts to dataclasses with runtime type-checking.
Works really well with marshmallow for additional validation.
Great initiative!
You should have a look at https://www.tmrow.com, they are building tools which allow anyone to understand the climate impact of their decisions. The "pragmatic guide" they wrote about climate change (https://www.tmrow.com/climatechange) is one of the best I've read on the topic, as it is very well documented and provide actionable insights.
This is awesome. The focus on climate pragmatism is exactly what we'd like to channel. I'll post about it on Collective.Energy - if you're involved with tmrow, get in touch!
In my experience, it depends on which sport you do and when you do it during the day.
I used to play squash during the evening around 8pm and on these days I would fall asleep very late, like around 2am. This was mostly due, I think, to my heart rate still being quite high (I could feel it), and slowing down very slowly until it reached a reasonable level at which I could get asleep. This is something that other friends playing squash in the evening reported as well.
So simple, yet incredibly fun, well done! Could you share how long it took to build it ? I've been thinking about creating a small game, for fun, and to learn stuff along the way, and I am wondering how much time it would take me.
Thanks. The goal of this project was to actually get something out there, so I deliberately set myself quite a small goal. I probably got "80%" of the way there in 2-3 weekends back in March, then I got busy with some other stuff. I didn't want to let this become another project that falls to the wayside, so I then spent another ~6 weekends polishing, refining, etc in the last 2 months. It was a great learning experience, and I would 100% recommend making a game. It's such an interesting mix of programming, animation, design, art, sound.
This law is only true for companies that poorly understand the value of perks.
I work in startup where one of the main perk is that we have free lunch. This has been the case since I joined the startup, back then there were 10 people. We are now 75. Every time I tell my friends that my lunches are paid by the company, I get the same reaction which essentially is: "Man, that's so cool!"
Well, you don't know what my salary is. What if I have free lunches, but I'm paid 20% less than the industry average ?
The lesson I've learned through this, is that from the company POV, money spent in perks is worth more than money spent in salary, i.e. employees implicitly would rather have 300$ of free lunches paid by the company every month than +300$ on their salary.
It is in the interest of the company to provide good perks, as the overall perceived employee benefits will be higher than the equivalent in 100% salary.
>i.e. employees implicitly would rather have 300$ of free lunches paid by the company every month than +300$ on their salary.
I agree that companies sometimes spend money on questionable so-called "benefits" (e.g. company-paid bowling party or motivational speakers) -- that employees would rather have as extra cash in their pocket.
That said, I think company-paid lunch is an advantageous financial deal for employees since it's not taxed as income[0][1] and employees have to eat anyway.
I also hate having to get into a 150-degree hot car in the summer or fight freezing snow in the winter just to go buy a lunch. The alternative of bringing my own brown-bag lunch also has hassles because of the extra prep & planning at home. Sure, an on-site catered lunch benefits the employer -- but it also benefits the employees. It's a win-win.
I think you misunderstood what I meant, as my overall point is indeed that having good perks is most of the time a win-win for both the company and the employees.
In Spain, for historical reasons, lunch is had later and is the biggest meal of the day, often in the middle of work day. There have been talk to end this anomaly but many (most?) companies are very reluctant. For a long time it was very usual to include meal tickets as compensation (it was about six euros in 2000, raising to 10 or so in 2010) because, since it was considered expenses instead of salary, their treatment for taxes was much better both for the company and the employees. There were a few companies that managed the tickets contacting restaurants to accept them and employers to use them.
In their infinite wisdom, the government decided to control the system a little too much, so most companies no longer use them. Even in the good times I didn't like the tickets at all. It was difficult to cash them if you couldn't use them (when we were deployed at customers' premises or sick, we organized diners to "laundry" the tickets) and they forced me to eat too much: I can't eat two courses + dessert in the usual restaurants every day without going overweight very quickly. Give me the money instead! Or a parking spot, or a ping pong table.
> employees implicitly would rather have 300$ of free lunches paid by the company every month than +300$ on their salary.
I know I would. It'd take the burden of thinking about what to have for lunch every day off me. When I was working in an office I'd either bring my own lunch (most of the time), decide to order (which usually required to join a group ordering from some place, or create and manage a pool), or to go out - again, where, what time, and with whom? Each of those options was a waste of time, energy and context.
Thanks for the reference. I'm wondering how this principle may be applied in the field of AI where user data is often an essential asset. In particular, what are the AI companies that can legitimately claim to be private by design?
This makes private-by-design alternatives like Snips (https://snips.ai/) even more legit. When everything is processed locally, the user does not have to trust anyone/anything.
This only supports a small subset of ops. It is pretty much corresponds to the first option that I mentioned - train with Tensorflow, extract the parameters and provide implemenations of ops in your native language.
I'm not sure using pyenv + poetry + click qualifies as a minimalist setup. I have never had to use pyenv as I figured out it was more robust to install the python versions directly from python.org and create the appropriate symlinks. Then using the venv module which has been included in python since 3.3. The argparser module of python is not that bad once you are used to it.
I'm not saying the tools and libs mentioned in the article shouldn't be used, it's just that they're not mandatory for whoever wants to stay close to the bare minimum.