Archive for the 'Programming' Category

The Dangers of Assumptions in Software Development

Posted by Johan Cyprich on 24 Apr 2008 | Tagged as: Programming

I recently created an ASP.NET application for receiving online orders for a printing company. The web form would collect information about the company placing the order, instructions for how the job will be printed and completed (binding, etc.), delivery information, due time, and the type of file(s) that will be uploaded.

Uploads with a Progress Bar
The [...]

Tips from a Billionaire for New Programmers

Posted by Johan Cyprich on 12 Apr 2008 | Tagged as: Programming

Interviewer:

Is studying computer science the best way to prepare to be a programmer?

Bill Gates:
No, the best way to prepare is to write programs, and to study great        programs that other people have written. In my case, I went to the garbage cans at the Computer Science Center and I fishedout listings of their operating system.

Using Deprecated Code in PHP 5

Posted by Johan Cyprich on 30 Jan 2008 | Tagged as: Programming

If you don’t have the time or inclination to update your PHP4 code to PHP5, you can get the deprecated functions to work properly (especially the authentication code) by creating an .htaccess file and dropping it in the folder where your apps reside.
The .htaccess file should contain the following code:

php_flag register_globals on
php_flag register_long_arrays on

What this [...]

Counting Rows in textarea

Posted by Johan Cyprich on 29 Jan 2008 | Tagged as: Programming

I wrote a snippet which counts the number of rows of text in an HTML textarea object. Its very useful if you need to display data outside of the textarea box.

I’ve got an example of a form and the PHP function it calls.
Filename: t.php

Filename: t_handler.php

Preventing File Locking in E-mail Attachment

Posted by Johan Cyprich on 28 Jan 2008 | Tagged as: Programming

I’m trying to attach a file to an e-mail that I’m sending using the SmtpClient class (from System.Net.Mail) using C# for ASP.NET. Everything works correctly, but the problem is that the file that was uploaded gets locked in the folder by Windows and I can’t delete it afterwards.

This is the code I used to attach [...]

« Newer Entries - Older Entries »