Skip to Content

develCuy's blog

by Fernando Paredes García


develcuy.com Finally running on PostgreSQL

3 years ago I have announced my disagree on how Sun was crossing the red line and my decision to move out of MySQL, so now is time to announce that develcuy.com is successfully migrated to PostgreSQL 9.1!

If you are wondering how I have achieved it, let me share that is not an easy job in Drupal 6, you should have good experience on MySQL, PostgreSQL and Drupal database schema. Fortunately, In Drupal 7, migration between database engines seems to be so easy thanks to DBTNG.


Understanding Drupal's cache while improving your source code performance (Good Practices)

There are several ways to improve Drupal performance, and to be more honest, there are several ways to improve your infrastructure supporting Drupal (e.g. Web Server, MySQL Server, PHP opt-code cache, Varnish/Boost HTML cache, Application cache (Memcached/APC), Pagespeed (output compression/optimization), etc). You can also add gigs of RAM to your server, more processors and perhaps deploy your Drupal site on a cluster of 10+ dedicated servers. In the end, if your source code does not perform well, you will be just wasting CPU, Memory and Bandwidth and that equal money.


Hiding a conflicting module on-fly in Drupal 6.x

Sometimes we need to hide a module to avoid certain known conflicts on a site. The Following is a specific use case for doing as such:

Note: Use jQuery UI 1.8 in an specific admin page

  • Module jquery_ui is installed and provides version jQuery UI 1.7
  • jQuery UI 1.8 is needed in admin page: "admin/build/custompage"

Issue

Once "jquery_ui" module is installed, the "context" module plugin "reaction block" will load "jquery_ui" on every page load.

Solution alternatives

  1. Patch module "jquery_ui" to load desired version when needed

The birth of Ophal project

I were very frustrated with PHP in my very beginnings doing web development (8 years to date). But 2 years ago discovered my favorite programming language: Lua, and then decided to start the Nutria project. For more than a year I have tried several ways to "port" my web knowledge to Lua, and finally two months ago decided to do use my new Lua skills for real world web development.

And the result is: "Ophal... a highly scalable web platform, easy to maintain and extend. It is not married with a particular technology, just the essence will be kept on any major change needed to achieve its mission". Let me remark that Ophal has many influences, but the highest comes from Drupal, more will be elaborated about it in the future. Also, I'm giving a lot of credit to Lua, but LuaJIT is the actual compiler used behind scenes.


RIP IE6 in 2 steps

In answer to the article "To Reduce IE6 Pain, Don't Leave It Until the End", let me show you a way to let IE6 rest in peace:

First Step: Create the file "ripie6.html"

Put it in the same folder as your ".htaccess" file. Be inspired to write a nice warning message, by example:

RIP IE6
Sorry, this site only works with Internet Explorer 7 or later. Mozilla Firefox is also a good one!

NOTE: I have written an example of "ripie6.html" file for you.


Playing with LuaJIT FFI

Lua was for long time one of the fastest programming languages, and perhaps sounds new to you but it is older than PHP. LuaJIT has emerged as an improved implementation that can make V8 look like a turtle.


Cache, NoSQL and old SQL

Nowadays our web development life with FLOSS is getting more complex. Do you remember the nginx vs. lighttpd vs. apache? Now it is about cassandra vs. mongodb vs. couchdb, and memcached vs. redis vs. etc.....


A free and open source mobile life

One of my best friends sold me an Android HTC T-mobile G2. Him told me that an smartphone can change the lifestyle, that was right for me too!

After 2 months of playing with it, and being tired of using closed source software in an open source operating system (a.k.a Android), started to look for free (as in bear and as in speech) alternatives. Be warned that you will void your device warranty and should backup all your personal data: phone contacts, messages, etc, so you can recover it, after all, freedom needs some job ;)


Howto install Titanium Appcelerator in Ubuntu 10.04

UPDATE 2011-07-19: Following instructions also work with Ubuntu 11.04 Natty Narwhal.

Programming for mobile in Linux was a pain in the neck 6 years ago and it is still a pain in 2011. The following articles may help you in your journey:

  1. http://dalibornasevic.com/posts/14-how-to-install-titanium-and-android-s...
  2. http://developer.appcelerator.com/question/118186/kitchen-sink-not-worki...
  3. http://developer.appcelerator.com/question/35751/error-failed-installing...

If you survive let me know :)


Moving Drupal's file system path

Recently I were archiving a Drupal site and needed to move the "files" folder to another path. Then some critical issues raised:

  • Image paths were using an nonexistent path
  • All file links were missing the domain name

The following modules were affected:

  • Imagecache: when displaying cached images
  • User: when displaying the default avatar
  • Faq: was not displaying the header image
  • Node: image paths were explicit (it is usual)

Then had to update following tables and system variables:

  • Variables: user_picture_default, faq_description, theme_fusion_starter_lite_settings


Syndicate content