The Zen of Python
- Details
Long time Pythoneer Tim Peters succinctly channels the BDFL's guiding principles for Python's design into 20 aphorisms, only 19 of which have been written down.
Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!
Object Calisthenics
- Details
Object Calisthenics are programming exercises, formalized as a set of 9 rules invented by Jeff Bay in his book The ThoughtWorks Anthology. The word Object is related to Object-Oriented Programming. The word Calisthenics is derived from greek, and means exercises under the context of gymnastics. By trying to follow these rules as much as possible, you will naturally change how you write code. It doesn’t mean you have to follow all these rules, all the time. Find your balance with these rules, use some of them only if you feel comfortable with them.
Only One Level Of Indentation Per Method Don’t Use The ELSE Keyword Wrap All Primitives And Strings First Class Collections One Dot Per Line Don’t Abbreviate Keep All Entities Small No Classes With More Than Two Instance Variables No Getters/ Setters/ Properties
Ref:
Using Composer in Joomla and Other Content Management Systems
- Details
In the context of the Joomlashack conference, I presented the topic of Composer usage on Joomla and in general for any Content Management Systems.
Composer is the leading application-level package manager for PHP. It has been designed for situations where the development team has full control of the environment. In multi-user systems, where independent developers create packages, the Composer usage is not recommended due to the possible conflicts. In this session, we reviewed several techniques to use Composer on Joomla and an innovative new development tool to simplify PHP prefixed code implementation at the application level.
A close encounter with PHP Xdebug 3 on Lando, Docker and VSCode
- Details
After my last encounter with PHP Xdebug 2.9, I read the news in Laravel News about the release of Xdebug 3, the great new features ... and breaking changes. Almost at the same, Lando users started to report that the new builds of the docker container were coming with the new Xdebug 3. So, it's time to update my recipes for Lando - Docker containers, battle-tested for Lamp, Joomla, WordPress, PrestaShop, Laravel, etc. In the same movement, I've confirmed the required changes to make it work for Visual Studio Code and felixfbecker/vscode-php-debug.
The required php.ini configuration:
Page 2 of 12
Aníbal Sánchez
Versatile Software Engineer | Full-Stack Developer (PHP, Laravel, Java, Spring, Vue.js/Vite) | Data Science Enthusiast | Open Source Contributor | Tech Entrepreneur
- PHP-Prefixer / Product Manager
- PHP-Prefixer is an automated online service powered by a complex rule-based system that applies prefixes to Composer dependencies.
- Extly Tech / Team Leader
- Empower your project with our web solutions. Today, working on Laravel, Amazon AWS, and Ionic. A Joomla Volunteer.
- linkedin.com/in/anibalsanchez
- github.com/anibalsanchez
- @anibal_sanchez
- facebook/anibal.sanchez
- stackexchange/anibal