Archive for the ‘Programming’ Category

Teaching programming

June 30th, 2010

I just ran across another educational tool—Scratch—for teaching programming to kids. I love the idea behind these simplified programming environments because they make getting started very easy, show you results instantly, and remove all the frustration of setting up a programming environment. If you want to introduce your kids to programming, you might start with [...]

Magento 1.4.1.0 event hooks

June 29th, 2010

This listing of Magento event hooks was generated automatically from the source code. Please let me know if you find any errors or omissions. File Line Event /cron.php 44 default /app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php 399 catalogrule_before_apply /app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php 534 catalogrule_after_apply /app/code/core/Mage/Rule/Model/Environment.php 40 rule_environment_collect /app/code/core/Mage/SalesRule/Model/Rule/Condition/Combine.php 54 salesrule_rule_condition_combine /app/code/core/Mage/SalesRule/Model/Quote/Discount.php 83 sales_quote_address_discount_item /app/code/core/Mage/SalesRule/Model/Quote/Discount.php 89 sales_quote_address_discount_item /app/code/core/Mage/SalesRule/Model/Rule.php 298 salesrule_rule_get_coupon_types /app/code/core/Mage/SalesRule/Model/Validator.php 345 salesrule_validator_process /app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php [...]

Magento 1.4.0.1 Event hooks

June 29th, 2010

This listing of Magento event hooks was generated automatically from the source code. Please let me know if you find any errors or omissions. File Line Event /cron.php 44 default /app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php 399 catalogrule_before_apply /app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php 531 catalogrule_after_apply /app/code/core/Mage/Rule/Model/Environment.php 40 rule_environment_collect /app/code/core/Mage/SalesRule/Model/Rule/Condition/Combine.php 54 salesrule_rule_condition_combine /app/code/core/Mage/SalesRule/Model/Quote/Discount.php 83 sales_quote_address_discount_item /app/code/core/Mage/SalesRule/Model/Quote/Discount.php 89 sales_quote_address_discount_item /app/code/core/Mage/SalesRule/Model/Validator.php 326 salesrule_validator_process /app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php 88 catalogindex_prepare_price_select /app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php [...]

Shell script that does something only when status changes

March 22nd, 2010

I needed a shell script that runs every 5 minutes but I only wanted it to do something when a status changes. In this case, I wanted it to log some information to the system log but I didn’t want it to fill up the log with redundant entries. Here’s the pattern I came up [...]

Android vs. web development

February 4th, 2010

When I first jumped into Android development, I went in with a mindset for developing desktop applications. That was a mistake. I think I would have been able to wrap my head around it quicker if I’d thought of it more like web application development. In particular, Activities have to account for a certain amount [...]

Learning Android

January 11th, 2010

I’m excited to be programming in Java again. I bought one of those fancy touch screen Android phones in October because I wanted to start writing applications for mobile phones (OK… I wanted a new toy). I skimmed the Android framework documentation and did the Hello World tutorial back in December. But late last week [...]

Programmer’s creed

March 21st, 2009

This is my keyboard. There are many like it, but this one is mine.

MySQL performance, character sets, and left joins

March 19th, 2009

So I thought I was losing my mind when a simple LEFT JOIN on a new table was taking forever to complete: SELECT email FROM a LEFT JOIN b ON b.email=a.email WHERE b.email is null That’s about the simplest LEFT JOIN you can write to get all rows in a that are not in b. [...]

Flickr Pandas

March 4th, 2009

flickr.pandas.getPhotos is, as Kellan points out, “quirky” but awesome. It is essentially a firehose (three firehoses, actually) of realtime Flickr data updated every 60 seconds (not every 60000 seconds as the documentation seems to indicate). That means the “ling ling” firehose, for example, exposes about 172,000 photos per day. I’m still experimenting with the data. [...]

Hacking and art

February 5th, 2009

I love how the word hacker is slowly acquiring connotations of the word artist. Creating art with computers isn’t really new (depending on your definition of art), but computers are definitely being associated with art more and more. A Wikipedia entry for Hacker Artist was created in 2006. The image above is a page from [...]