Poor man’s full text search for SuiteCRM

The poor man’s CRM, a.k.a SuiteCRM, is great (… was great for its time!); that’s another story. One of the features provided is “unified search”, as the geeks call it; some may call it global/universal search across many tables and records in the database. What it does is simply as follows: Loop over a list … Read morePoor man’s full text search for SuiteCRM

MySQL Error: Thread stack overrun

Recently, I’ve come across this error: MySQL error 1436: Thread stack overrun: 164720 bytes used of a 196608 byte stack, and 32000 bytes needed. Use ‘mysqld –thread_stack=#’ to specify a bigger stack. I am using PHP 7.0 and MySQL 5.7 on a Ubuntu 16.04 VM. Basically, I was dynamically creating more than 5 long SQL … Read moreMySQL Error: Thread stack overrun

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 moreFull-text search using PostgreSQL: simple, fast, cached

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 moreHow good are the abstraction layers?

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 moreManaging date fields properly with correct time zones in PostgreSQL

To use a framework or not to use a framework: again!

If using a PHP framework is recommended for its reusability, maintainability, popularity; why would a developer create a web application which does not have many reusable parts, which is not easy to maintain, and which takes time to learn even though you can easily find another developer who used it before?! Here are some interesting … Read moreTo use a framework or not to use a framework: again!

Postgresql and Node.js 100% Javascript Adventure – Part 2

This is the second part of PostgreSQL, Node.js and JavaScript post. We can continue by installing PL/V8:

Then we can create the extension in our database.

And run SQL command below:

Then, we can create functions using PL/V8 JavaScript language. A simple example is below:

It gets variable inputs as JSON … Read morePostgresql and Node.js 100% Javascript Adventure – Part 2

PostgreSQL and Node.js – 100% JavaScript Adventure

This is a log of every step I will take to create a 100%-JavaScript application back to front. Hardware: Windows 7 64bit Home Edition ASUS laptop with Intel P6100 CPU @2.0GHz, 4GB RAM, 320GB HDD Oracle VirtualBox 4.2.12 Ubuntu 12.04.2 – Long term support Downloaded 32bit ISO image – laptop does not support 64bit virtualisation … Read morePostgreSQL and Node.js – 100% JavaScript Adventure

Why you do not need a heavy-weight PHP framework

This post is (not) for beginners. Recommended reading: Rasmus Lerdorf: PHP Frameworks? Think Again. What is Symfony 2? (I am not a Symfony fan.) You don’t need all that by Marcel Esser “… The point I am trying to make is we’re getting a little crazy with our architectures. …” An Overview of PHP Framework … Read moreWhy you do not need a heavy-weight PHP framework