[Learning] The dangers of assert in Python (a.k.a know what you're doing!)

There are many ways to find bugs in Python code: the built-in debugger (pdb), a healthy amount of unit tests, a debugger in an IDE like Pycharm or Visual Studio, try/catch statements, if/else statements, assert statements, or the tried and true practice of covering every inch of your codebase in print() statements like it’s going out of style.

Assert statements can help us catch bugs quickly and are far less intrusive than copious amounts of print statements. However, unlike print statements, assert statements can be unexpectedly risky to use!

This article explores how to use asserts safely and what causes them to be unsafe. By the end of this article, you’ll know how to use assert most optimally without inadvertently opening yourself up to security issues.

[DiveIn] Deciphering Python: How to use Abstract Syntax Trees (AST) to understand code

Let’s get a little “meta” about programming.

How does the Python program (better know as the interpreter) “know” how to run your code? If you’re new to programming, it may seem like magic. In fact, it still seems like magic to me after being a professional for more than a decade.

The Python interpreter is not magic (sorry to disappoint you). It follows a predictable set of steps to translate your code into instructions that a machine can run.

Server / hosting benchmark backlog

Một số kết quả các dịch vụ hosting và in-house hosting

Benchmark script: curl -LsO bench.monster/speedtest.sh; bash speedtest.sh -asia

[Learn] Hello World - the weirdest way!

Lòng vòng trên internet và lượm được, viết chương trình in ra "Hello world!" the weirdest way!

python hello_world.py
Hello World!

[eBook] A Complete Beginner's Guide to Django

Loạt bài viết chi tiết hướng dẫn xây dựng ứng dụng web với Django framework

Google ngưng dịch vụ Cloud IOT Core sau ngày 15/08/2023

Cloud IOT Core là một trong những dịch vụ được cung cấp bởi Google trong nền tảng Google Cloud Platform (GCP), giúp việc kết nối, quản lý và điều khiền các thiết bị IOT một cách dễ dàng và khả năng scale lên hàng triệu thiết bị.

Tuy nhiên, ngày 16/08/2022 Google đã ra thông báo sẽ đóng dịch vụ sau ngày 15/08/2023!

Cơ chế phân quyền trong Odoo

Odoo là một phần mềm ERP mã nguồn mở (và phần trả phí riêng) theo mô hình all-in-one, Odoo khá phù hợp cho doanh nghiệp vừa và nhỏ

bài viết này tham khảo tài liệu: https://www.odoo.com/documentation/13.0/developer/reference/addons/security.html

Ngoài cách quản lý quyền truy cập thủ công bằng custom code, Odoo cung cấp 2 cơ chế chính để cho phép hoặc từ chối quyền truy cập đến dữ liệu.

Cả 2 cơ chế trên đều liên kết đến đối tượng user thông qua các group: một user thuộc về 1 hoặc nhiều group, theo đó cơ chế bảo mật tương ứng với từng group sẽ áp dụng với các user trong group.