Tag archive for: code generation

Code generator for list of countries

There was a second need for me to display a list of countries for my users to select. While the first required insertion of names of the countries into the database, the second required the list of countries to be populated as an array of data objects via Java.

Although the text list of countries from Pedro Posada is useful in both instances, it only fulfills part of what I need. In addition to the names, I need to include additional boiler plate coding to convert the text list of countries into usable forms for the two different programming requirements.

And since the list is more than a 100 items long, it will be more efficient to get the computer to generate the list of countries with the necessary boiler plate coding.

Generate PHP codes with PHP

Throughout my programming years, I observed similar trends in code structures and I felt that being able to generate them automatically will greatly reduce development time.

Although there are many code generation software on the web, coding one for your own usage can be simpler and more convenient, especially when you had written custom functions that your generated codes will utilize.

In this post, I shall discuss my recent experience in creating a PHP code generator for my own usage.