In this section, you’ll find discussions of software development techniques, sample code, and other resources for fellow developers.
As part of another open-source project which I recently (as of Aug, 2010) have been developing, I put together a nice Data Access Object generator for PHP. The project is called “phpdaogen”. This DAO generator is BSD-licensed, and includes a PHP PreparedStatement implementation which does not use mysqli (which is unstable and tends to crash). … Continue reading "Data Access Objects Generator for PHP"
Recently (August, 2010), I’ve been developing a Personal Finance Manager package for managing our household budget, checkbook, credit cards, etc. This has actually evolved into a nice little package. It uses JQuery, DataTables, AJAX, Data Access Objects, PHP and MySQL. It runs under the Apache web server, which is nice because you can run it … Continue reading "Personal Finance Management Software"
I’ve been interested in artificial intelligence and machine learning for quite some time. Some time back, I had experimented with using a Neural Network to attempt to predict whether a stock would go up or down. I had some limited success, but I’m not sure how accurately you can predict something which, without sufficient causal … Continue reading "Tic-Tac-Toe: An Experiment in Machine Learning"
Today’s article deals with bar codes. Specifically, it deals with generating and decoding UPC-A and Code 3 of 9 bar codes in Java. A Java library and sample code are provided to demonstrate the functionality. How it Works This bar code engine is implemented as a Java library, along with a few demo applications which show the library in action. … Continue reading "Java Bar Code Decoder and Generator"
Several years back, I was working on an imaging project in Java which was going to require some Optical Character Recognition (OCR) functionality. After an exhaustive search, I could find nothing to fit the bill. My requirements were: Must be written in Java Must be freely redistributable, with or without source code Must not be proprietary Must … Continue reading "Java OCR"
Author’s note: This post was originally published Sun, 07/31/2011 – 18:14. Since then, I have abandoned Symfony development (both versions 1.4 and 2.x) in favor of developing my own, AJAX-oriented framework which uses YAML files to define database schema and CRUD pages. I call it JAX Framework. You can read about it here: http://www.jaxframework.org and … Continue reading "Getting Started with Symfony 1.4"
Recently I had a need to write a socket server in C. In the past I’ve done lots of these in Java, and some in C. Being a huge fan and avid user of memcached, and knowing that memcached uses libevent at its core, I decided to go the libevent route this time. So I looked … Continue reading "Multi-Threaded Libevent Server Example"
Pythagorean Theorem states that the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides. It is used to calculate the length of the opposite side (hypotenuse) of a right (90-degree) triangle. It is also used in many other situations, for example, … Continue reading "Using Pythagorean Theorem to Calculate the RMS of a Time Series Data Set"
Here I discuss a nifty little algorithm which I developed to choose an item from a list of possible items, when only the relative weights of the items are known. The number of items need not be known, so this algorithm is suitable for choosing among a list of items while iterating over those items, … Continue reading "Weighted Distribution Rotation Among An Arbitrary List of Items"
If you’re here, you know what Amazon Elastic Beanstalk is, and you’ve probably deployed at least one application to it. The issue this article addresses, is the uncontrolled accumulation of old application versions on Amazon Elastic Beanstalk. Eventually, you will run out of space and will no longer be able to deploy the current version. … Continue reading "Delete Old Application Versions from an Elastic Beanstalk Application"