Archive

Archive for the ‘programming’ Category

Top 25 Most Dangerous Programming Errors

February 17th, 2010

I’m lacking time to update, so I’ll just pretend to have an active blog by posting an interesting link: Top 25 Most Dangerous Programming Errors.

Matti Security, programming

#tweetcoding: Coding Magic In 140 Chars

March 7th, 2009

This is definitely something worth checking out, #tweetcoding. Here’s the short description.

The idea was simple: See what people could code in 140 characters of AS3 [Action Script 3] (the number of characters in a single tweet). The results were unexpected: Hundreds of participants and entries, some of which are simply amazing.

And dear Lord, the results ARE amazing. I often couldn’t believe the magic that could be contained in a mere 140 characters worth of code. Granted, the scripts written don’t quite comply to the “basic rules” of coding, but that’s not the point. :-)

There aren’t many scripting/programming languages for which this could catch on, but Action Script’s ability to output these kind of visualizations makes this a perfect testcase.

Matti programming , , ,

Code Quality & Code Requirements

November 13th, 2008

I’m a programmer by heart. If I don’t do it by day, I’ll do it by night.

This is what I do, and it’s probably what I do best too. I write code. I scribble down thousands of lines, to overcome a certain problem situation. Hardly anyone knows what it means to do so, unless they are fellow programmers. To everyone that doesn’t understand what it means to program, a “good application” will be one that does the job. Simple as that.

To those that understand the mechanics, and the reasoning behind programming, that is entirely different. For them, it’s not just the matter of an application doing what it’s supposed to be doing, but also a matter of “how” it’s done. How “effective” is it? Is it fast? Will it work cross-system? Will it keep working in five years? Was it written with maintainability in mind? Was it written in a  clean manner, or with sloppy code? Read more…

Matti programming , ,

MySQL: #1054 – Unknown column ‘table.columnname’ in ‘on clause’ Even Though Column Name Exists

October 30th, 2008

You might run in to the following problem with a MySQL 5 installation.

SELECT * 
FROM table1, table2
INNER JOIN table3 ON table1.columnname = table3.columnname;

> #1054 – Unknown column ‘table1.columnname’ in ‘on clause’
While that would have been a valid query for previous MySQL versions, there is now a requirement to add round brackets around the tables you want to select through a “FROM”-clause.

Change the query to the following, and it will work again.

SELECT * 
FROM (table1, table2)
INNER JOIN table3 ON table1.columnname = table3.columnname;

You will most likely see this behaviour when upgrading from a MySQL4 to a MySQL5 environment, and it’s a b*tch to track this one down. The following bug reports were also made on MySQL, which might prove useful to you should the above not work.

  • Bug #1689: Unknown column in ‘field list’ for a field that does exist
  • Bug #13551: #1054 – Unknown column ‘xxxx’ in ‘on clause’
  • Bug #13597: Column in ON condition not resolved if references a table in nested right join

Matti programming , , ,

Little Coding Habits

September 24th, 2008

Every programmer has his method of doing things, his own set of rules he follows. Here are a few small things I do, syntax-wise. I’m curious to see what you do, and how often you change other people’s code so it reflects your own syntax. Read more…

Matti programming , ,