Warmed over Irony

IT Chapters No Comments »

Reading this article on Slashdot about how Distributed Computing is being used “badly”, I came across this comment:

Yet Anderson no longer runs SETI@home. ‘Instead, he donates his spare computer power to a global warming project. But he doesn’t presume to tell others what they ought to be doing with their CPU cycles.’”

Am I the only one who finds it slightly ironic that he is using his computer’s cycles to power a global warming project?  High usage CPU = more electricity used = more electricity generated = more coal burnt / gas burnt = more global warming.

;)

Ad(non)sense

IT Chapters No Comments »

On another note, I’ve appealed my adsense account suspension for the invalid clicks. Lets see what Google has to say.

Google says nooooo

Data Dump

IT Chapters No Comments »

I’m now looking for an easy way to dump all the data from SQL Server 2000.  We’re in the final testing stages of a major project and the bug reports are flowing in (OK, not flowing. ;) ).  Since the data sets are all accounting data, the anomalies that we see mostly only appear in certain scenarios and once other testing is done, this scenario doesn’t exist anymore.

Is there any way to get a user to dump the SQL INSERT statements for the database into the browser or allow a downloadable file of the database so that it can be attached to the bug report?  I can’t seem to find any good quick tools or a library to do this.

Screen Capture

IT Chapters 6 Comments »

Can anyone recommend a good screen capturing tool?  I want something that is low on memory usage and quick to use.

Any ideas?

My Google Friends

Life in London 1 Comment »

What I received in my inbox last night:

Hello Ray Booysen,

It has come to our attention that invalid clicks have been generated on
the Google ads on your site(s). We have therefore disabled your Google
AdSense account. Please understand that this step was taken in an
effort to protect the interest of the AdWords advertisers.

A publisher's site may not have invalid clicks on any ad(s), including
but not limited to clicks generated by:

- a publisher on his own web pages
- a publisher encouraging others to click on his ads
- automated clicking programs or any other deceptive software
- a publisher altering any portion of the ad code or changing the
layout, behavior, targeting, or delivery of ads for any reason

Practices such as these are in violation of the Google AdSense Terms
and Conditions and programme polices, which can be viewed at:

https://www.google.com/adsense/localized-terms?hl=en_GB
https://www.google.com/adsense/policies?hl=en_GB

Publishers disabled for invalid click activity are not allowed further
participation in AdSense and do not receive any further payment. The
earnings on your account will be properly returned to the affected
advertisers.

Sincerely,

The Google AdSense Team

SQL Server Tip - Nulls and Aggregate Methods

IT Chapters No Comments »

We’re almost finished with our in-house rewrite of our accounting system to .net. The complications with making sure all movements of money between accounts are correct and properly audited is a difficult task and one for another article. ;)

I came across a weird little bug this morning where our invoicing code that auto reconciles your bank account based on data you enter in the recon wasn’t working. Essentially what we do is ask the system for any invoices that match an amount of money coming into the bank account and then create the correct postings based on this information. However, all our non-VAT registered companies were not ever having their invoices matched.

Debugging the code I found that the invoice balance coming from the database was always NULL for non-VAT registered companies. A little further digging and the bug was unearthed. Using SUM() on the Amount and VAT columns worked as long as none of the columns were NULL. This is pretty obvious thinking about it, but it missed our testing. 1 + NULL is always NULL. ;)

If you read the SQL documentation, SUM(), AVG() and those type of functions ignore null fields. However, my SQL looked like this:

SELECT SUM(Amount) + SUM(VAT) FROM InvoiceLine.

For non-VAT registered companies, the amount fields would always have values but the VAT fields would always be NULL. Therefore the answer returned is always NULL. We solved this by using the COALESCE() method around the summing of the VAT column: SELECT COALESCE(SUM(VAT),0). COALESCE causes NULL values to be converted to the value that you pass as the second argument to the method. This then allows us to calculate the correct information.

Its a little gotcha that I bet is missed frequently in coding and needs to be carefully looked at by developers. The differences in NULL handling can be very dangerous, especially for financial systems.

Google Spreadsheet

IT Chapters No Comments »

New offering from Google: Spreadsheets.

And everyone goes wild: “Its going to challenge Office!”, shouts the breathless digg reader.

Seriously, have you even used Office 2003, or tried the beta of 2007? Its not an application anymore, the functionality just in Office allows some small businesses to run their entire operations through it. Come along Sharepoint and we have an amazing set of tools that in no way a web based application can even come close to.

Lets be serious and stop this “Google Bubble” from taking over from common sense. Its going to be in beta until England win the World Cup, there’ll never be support for it and no guarantees of uptime. Anyone ever used Google Reader, Google Blog Search? Didn’t think so.