I made it!

I made it! I’ve hit my earnings goal for Corban Works!

Back in March 2009, I decided I’d start tracking my online earnings, and set a goal for where I wanted to be. My gross earnings at the time were about $160 per week with all my sites running off of a shared hosting account. I set my goal to be 40 hours of minimum wage per week (gross). At the time, this made my goal $262 per week, but in July I increased the goal to $290 to match the increase in federal minimum wage. To make sure I didn’t meet my goal thanks to a fluke, I decided that I had to earn this amount 4 weeks in a row.

It’s now 11 months later, and I’ve come a long way. I’ve built several more sites, paid for a major re-design of my largest site, and dropped non-performers. I’ve ditched the shared hosting account for a dedicated server at The Planet (and even had to upgrade to a bigger dedicated server due to increased traffic), and have earned an average of $358 per week over the past 4 weeks. This is $68 per week more than my goal!

My next goal was going to be to net 40 hours of minimum wage (i.e., $290 per week after expenses, such as domain registrations and hosting), but I accidentally hit this goal at the same time as the original goal. Because of this, I’ve decided my new goal is to reach the 50% mark of the $40,000 per year I need to earn in order to quite my day job. This works out to $398.50 per week, averaged over the previous 8 weeks. Not a huge increase, but a nice round percentage that I think I can hit in the near future.

Read More

PIC Code Site

When my wife leaves town, I like to spend my time working on websites. With her out of town checking out Rice University, I put some time into a project I’ve been meaning to do for a few months.

A while back I found this site, a very old school ghetto PIC/CIC search site. Having had a lot of success with the ABA Number Lookup and the Fake Name Generator — both data-driven sites — I decided to make my own PIC site.

I used jQuery and a few plugins, and came up with this. I couldn’t find a good domain for it, so I re-used an old one I’ve had forever. My wife is going to make a logo for me, and once that is done I’ll start driving traffic to it.

Anyways, suggestions are welcome. I know it isn’t perfect, but not bad for being thrown up in less than 24 hours and definitely quite an improvement over that other site. Check it out at AllredTech.com.

Read More

Unemployment negotiations

On Tuesday night, my wife and I discussed my unemployment. Don’t worry, I’m still happily employed. The problem is: I don’t want to be!

My goal for a long time has been to make enough money from my own business to be able to quite my day job and work from home full time. My wife is very supportive of this (really, she is!) but she is also rightfully concerned about our family’s financial well-being. So we sat down, talked it through, and came to an agreement.

I can quite my job (or at least, significantly reduce my hours) and work from home once the following conditions are met:

  1. Becca must be employed (being a grad student counts) and earning an income.
  2. Becca must be able to obtain health care for the two of us through her employer.
  3. My business must be earning an average of $770 per week (gross) for 8 consecutive weeks (roughly $40,000 per year) — or in other words, at least $6,160 over an 8-week period.
  4. To keep things simple, the $770 per week includes any money that Becca’s websites earn.

I have a ways to go. $770 per week is a lot of money, but I’ve made some really good progress over the past year in increasing my earnings, so I’m confident that I can get there in the next 3 to 5 years.

Read More

PHP: mysql or mysqli?

As you may know, I’ve been spending a lot of time trying to make the Fake Name Generator as fast as possible. I’ve started using a CDN, I’ve made minor code tweaks (like doing ++$i instead of $i++), added APC caching, and a bunch of other stuff, but still feel that the core of the FNG is a bit slow.

Currently the code uses PHP’s mysql extension. I’ve read in several places that mysqli is better, faster, more attractive, gets more girls, etc, but have been unable to find any remotely recent benchmarks to prove it. I don’t care if the OO approach is cleaner looking, I just want it to be faster.

So I put together a bit of a benchmark (very unscientific) to see if it is faster or not for my very specific needs: I want to generate 50,000 names as fast as possible. Each name requires 4 SQL queries, so I end up making 200,000 queries (yikes!).

For my first attempt, I simply replaced all of my procedural mysql stuff with the OO mysqli equivalent. In other words, I connected to the database, ran each query, then got the result out of the result set. This had absolutely no improvement over my current method of getting data; sometimes mysql was a second or two faster, sometimes mysqli was a second or two faster.

For my second attempt, I used the mysqli::multi_query method to combine the 4 SQL queries per name down to a single trip to the database per name, dropping my total number of trips to the database from 200,000 to 50,000. This yielded a drastic 66% speed improvement. There are several methods in my name generation class that generate multiple queries, so using this technique will make the name generator significantly faster.

Conclusion: As a drop-in replacement for the standard mysql extension, mysqli does not appear to be any faster, even for lots of queries. However, the mysqli::multi_query method makes it possible to shave large percentages of time off of your script’s execution time.

Update (2-4-2010): I just ran an order for 10,000,000 names (with addresses, occupations, etc). This process used to take about 25 hours to run on my server. With the new code it ran in only 15 hours. That is a 40% speed improvement for about 45 minutes of effort! So my conclusion is yes, mysqli can be much faster in certain situations.

Read More