Archive | April, 2007

The disease of perfectionism in software development

Perfectionism is a very good quality and can bring you far in life, can make you successful and appreciative by your boss, customers and colleagues alike.

But “over perfectionism” could make your life miserable. Just imagine that you could not leave your house without having your house all cleaned up. By the time you are finished with cleaning, the dust would have settled in again. If you have kids, then just ask your wife (or any mother in this regard) how frustrating house cleaning is!

As the above can be applied to life it can be applied to software development. Most of the software developers I know suffer from the disease of perfectionism in software development (myself included).

You don’t think you suffer this disease? Well then ask yourself when will your application be ready to ship or when will you let your customers take the first look at your project? Are you ready to ship your application, with the knowledge that some things are not done to your full satisfaction?

What can we do about this disease? Frankly said, “Just ship the damn thing (application)”. As always in software development, feature “A” or feature “B” will always make your application better and nicer and “can’t be without it”, but all what your customers (and your marketing team) want is to start working and using (and cashing in) your application.

I will bet with you, if you start living with compromises in your application, you will have a much less “stressful development life”, a happier boss and marketing team and a higher quality life.

This is by no means to say, that we should ship applications with bugs or with lesser quality, but I am sure that “the next big feature” which “definitely has to be in this release” can wait until next release.

So, finish up your code, test it and when ready “Ship the damn thing”!

Comments { 45 }

Great visualization of what Web 2.0 is and how it came along

There has been a lot of essays and talks about Web 2.0 and what it is all about. But images, moving images, are always better and easier to understand then a long essay. Thus I came upon this very good footage on YouTube. Enjoy.

Comments { 17 }

A way to drop many tables with Oracle

There are some things in Oracle that seam to be odd when you come from another SQL database.

One of these “odd” commands is that there is no automatic incrementation within the SQL syntax. For doing this you will need to create “Sequences”, which after all are more powerful then an automatic incrementation, but that is another topic. And the other “odd” thing, is that you are not able to drop many tables within a single SQL syntax.

But with some PL/SQL knowledge we will overcome this and store the code as a stored procedure.

PL/SQL gives us some ways to retrieve the status, table names, column names and much more from every table and schema. As an example; We can retrieve the column names of a table with:

SELECT COLUMN_NAME
FROM ALL_CONS_COLUMNS
WHERE TABLE_NAME = UPPER(‘&Table_Name.’)

This would give us all the columns of the table you specify here. There is a nice TechNote by Oracle from 2004 about this. Just remember that Oracle is Case Sensitive and all references to columns and tables MUST be in uppercases!

With this know how armed we are able to retrieve a couple of tables with a simple SQL tag. So, let’s say we have a couple of tables that have the same prefix we could use something like (assuming that your table prefix is “demo_”:

SELECT object_name
FROM user_objects
WHERE object_type=’TABLE’
AND object_name LIKE ‘DEMO_%’

With this we will get a list of all the tables that start with “demo_” which we then can use for any purpose. Of course with only a select statement we are not (yet) able to do anything to the database like Insert, delete or update. The best for this is to put together a small Stored Procedure together with some conditions.

Since this post is all about to drop many tables in one go we can use the following procedure:

create or replace PROCEDURE delete_many_tables
(tablename IN VARCHAR2)
IS
cur integer;
begin
cur:= dbms_sql.OPEN_CURSOR();
for t in (select object_name from user_objects where object_type=’TABLE’ and object_name like tablename) loop
execute immediate
‘drop table ‘ ||t.object_name|| ‘ cascade constraints’;
end loop;
dbms_sql.close_cursor(cur);
end delete_many_tables;

Copy and paste this into your favorite SQL command tool (mine is the free SQLDeveloper from Oracle) and store the procedure.

Since this is a stored procedure we are able to pass in the prefix or the actual table names dynamically. Meaning that you call this stored procedure with the following syntax:

call delete_many_tables(‘DEMO_%’);

This would call the procedure, pass the value and drop all the tables with the given value. Feel free to modify this code or work upon it. I would appreciate any feedback or suggestions on this as well.

As a side note: If you want to call this within a ColdFusion page your code would look like this:

<CFSTOREDPROC PROCEDURE=”yourschemaname.delete_many_tables” DATASOURCE=”yourdatasource”>
<CFPROCPARAM VALUE=”DEMO_%” CFSQLTYPE=”cf_sql_varchar” type=”in”>
</CFSTOREDPROC>

Comments { 5 }

ColdFusion Administration and Java error

While working within the Windows Server 2003 Parallels image we also wanted to update our ColdFusion 7.0.2 with the latest Cumulative Hotfix 2 for 7.0.2. Actually nothing difficult, right?

Well, there were two things that we learned:

1. Remove older Hotfixes first
I know, it is written in every Technote when there is a new Hotfix available, but you know what they say about reading manuals….. Anyhow, one should really remove any Hotfixes before applying a new one. So go into your “update” folder and remove them first. ColdFusion stores the Hotfixes within C:\CFusionMX7\lib\updates (Windows) or /Applications/ColdFusion/lib/updates (MacOS X) or similar paths on Linux.

2. Enable RDS or else there are Java errors
The ColdFusion Administration allows for easy browsing to the needed hotfix jar file with their File-Browser, that is, if you enable RDS. If you forgot, or simply did not enable RDS (as it is recommended on a Live Server) then you will get an error like:

Fortunately, Adobe has a Technote as well for you showing how to enable/disable RDS quickly. Once done, you can apply the update successfully.

Thought I post this here, since we have had a hard time figuring these things out.

Comments { 1 }