Biological Computing

Jason Kottke and a couple other people blogged Eric Bonabeau’s talk on Biological Computing using Hydra. Biological computing is an amazing concept. Seems like we programmers spend 99% of our time creating ‘palaces of abstraction’; (to steal a phrase from Josh), reducing the world to manageable bits. Biological computing lets all that loose… Build it so that you don’t have control. Add two parts of this and three of that and see what happens. Fascinating.

The Day I Turned Uncool

Finished “The Day I Turned Uncool” [official site] [amazon]by Dan Zevin last night. Dan is from Jersey, now resides in Cambridge. 192 pages of fun. Read it if you’re starting to realize you’re not 21 anymore.

On another (completely and totally unrelated) note, I started reading “Ghandi’s Truth: On The Origins Of Militant Nonviolence” [amazon] tonight, a book by Erik Erikson (a resident of Stockbridge here in MA for a time). It is described aptly in an Amazon review as “…an introduction to the challenges of poverty, religious difference, and ethnic tensions we all must accept and try to deal with as we head into the everchanging 21st century.

All this and I’m cognizant of Geoff’s post a couple days ago about Goog and off-topic posts. I really enjoy reading Goog and I think it’s a great tool (one obviously not written in a short weekend). I was not one of the people who emailed him complaining that there were too many posts not related to MX technology. With that said, I think that Goog’s primary benefit is not that I can see what things other people are doing with MX technology… Go subscribe to an email list if you want announcements, bug fixes and people talking about the nuances of the ‘this’ scope versus the variables scope or go get yourself a RSS reader and compile your own list of interesting blogs. I for one enjoy pseudo off-topic posts. Anywho…

lindex

The new DevNet Resource Kit on Macromedia.com contains a utility called lindex (supposedly short for Lucene Index), allowing developers to create full text searching applications using ColdFusion on any platform that supports Java… very cool.

I’m relatively certain it’s been discussed to death before, but why charge for this kind of stuff? The lindex component above wouldn’t be that hard to do and was probably hacked by Christian Cantrell in his spare time for fun… give it away. Macromedia isn’t in the business of selling tutorials and snippets. They sell boxed product last time I checked. Anyway…

Luhn formula

Need to validate a credit card number? Use the Luhn formula.

Based on ANSI X4.13, the LUHN formula (also known as the modulus 10 — or mod 10 — algorithm ) is used to generate and/or validate and verify the accuracy of credit-card numbers.
Most credit cards contain a check digit, which is the digit at the end of the credit card number. The first part of the credit-card number identifies the type of credit card (Visa, MasterCard, American Express, etc.), and the middle digits identify the bank and customer.

To generate the check digit, the LUHN formula is applied to the number. To validate the credit-card number, the check digit is figured into the formula. Here’s how the algorithm works for verifying credit cards; the math is quite simple:

1) Starting with the second to last digit and moving left, double the value of all the alternating digits.

2) Starting from the left, take all the unaffected digits and add them to the results of all the individual digits from step 1. If the results from any of the numbers from step 1 are double digits, make sure to add the two numbers first (i.e. 18 would yield 1+8). Basically, your equation will look like a regular addition problem that adds every single digit.

3) The total from step 2 must end in zero for the credit-card number to be valid.

The LUHN formula was created in the late 1960s by a group of mathematicians. Shortly thereafter, credit card companies adopted it. Because the algorithm is in the public domain, it can be used by anyone. The LUHN formula is also used to check Canadian Social Insurance Number (SIN) validity. In fact, the LUHN formula is widely used to generate the check digits of many different primary account numbers. Almost all institutions that create and require unique account or identification numbers use the Mod 10 algorithm.

Many banks use the Luhn formula as it is easy to find out the customers of the banks and look at their financial transactions or the loans they have taken from them. This is an efficient and fast way of keeping track of the customers without spending a ton of time, unlike the olden methods where banks would have to type down the whole ID number.

Flash Remoting and C# Assemblies error?

Using Flash Remoting and C# Assemblies? Getting an error like this?

Status (object #2)
…..code: “SERVER.PROCESSING”
…..description: “No Such Service com.yourpackage.YourClass with function yourMethod”
…..details: ” at FlashGateway.Delegates.ServiceCommander.InvokeAdapter(ActionContext flashContext)

Make sure that you don’t have the method marked as “static” in your C# class. I spent a couple hours yesterday trying to figure out why Flash Remoting couldn’t find the assemblies that were so obivously in the right spot. Obviously it was my fault for thinking too much (ie: Flash wouldn’t first get an instance of an object and then call a method on that instance, would it? doesn’t it make sense that it would be calling static methods?), but the documentation doesn’t use static methods… so slap my wrist.

Now with 50% less caffeine!