The Forgotten Pull Requests (PR) of a New Breed of Sherpas in the Himalayas

Pull Requests (PR) are a huge topic on Github and here is a whole “BOOK” about it on github: https://help.github.com/categories/collaborating-with-issues-and-pull-requests/ Here is a short summary from me. 1. a developer is forced to create a fork (separate copy) of a public repository (called upstream repo) on github because the repo does not belong to the … Read more

How NOT to write (OOP PHP) code

My comment on one of the files of SuiteCRM: https://github.com/salesagility/SuiteCRM/issues/3561 which was closed and kindly “put” aside (IGNORED basically!): https://trello.com/b/Ht7LbMqw/suitecrm-suggestion-box So… Expected Behaviour It has to extend/implement only SugarBean and some relevant functions. Many functions must be implemented by separate classes esp. email management functions related to POP3 and IMAP so that we can maintain … Read more

How NOT to write (PHP) code

My comment on one of the files of SuiteCRM: https://github.com/salesagility/SuiteCRM/issues/3687 So… * todo: encapsulate logically related code into separate classes — e.g. use (API) controller class(es) — contact management API — folder management API (create, rename, delete, etc.) — email management API (read, compose drafts, send, relate to other entities etc.) — signature management API … Read more

Drupal 8 – Amazing progress!?

Drupal 8 (cash-cow of digital agencies)… after so many years, they cannot event get the basics right: no dedicated public HTTP folder, entire codebase is exposed relies on (Apache) .htaccess, serious issue for security and performancewhat about Nginx? writable code folders for sites, modules, themes, etc. – not dev-friendly at all what’s the place of … Read more

The cost of a million objects – revisited for PHP7

PHP 7 is out there finally and I am sure the adoption rate will be very slow especially because of legacy code. Here is a repetition of my simple tests I’ve done before (PHP Memory Usage: The cost of a million objects) and comparison of those results between PHP 5.6.18 and PHP 7.0.3. path-to-php5/php.exe test-path/memory_test_v4_objects_with_myclass_simple.php … Read more

Full-text search using PostgreSQL: simple, fast, cached

Let’s find out what can we achieve; using what we already have, without adding other layers, servers or applications: PostgreSQL. It will help us keep the architecture simple, please be patient 🙂 We need to prepare records for full-text search using 1-to-1 relationship for relevant records in other tables with search term vector from one … Read more

PHP Memory Usage: The cost of a million objects

Even though memory is getting cheaper, our applications are becoming more complicated and we need to write our code more carefully. I’d like to share some surprising tests I’ve written recently. The sample code files are also on github: https://github.com/muratyaman/php-tips. The tests are very simple: let’s create an array of million items to process: version … Read more

How good are the abstraction layers?

Choosing the features based on the lowest common denominator of X number of database systems is not the right approach in implementing an ORM! https://github.com/laravel/framework/pull/8400 This forces us to question the value of database abstraction layers and other abstraction layers in general. If one database system does not support a feature, the abstraction layer developer … Read more

Managing date fields properly with correct time zones in PostgreSQL

In apps for users all around the world (even in apps for local users where DST applies) correct time zones should be set, after database connection is established, based on the user’s time zone setting (rather than hard-coded setting in app). Then, data read/write ops should be automatically handled by the database. For example, in … Read more