Skip to content


A Bit On Open Source And Some Baz Background

This has always been a touchy subject, especially in larger computer firms. But first, let me tell you how I got into Open Source. I started coding in Turbo Pascal 7.0, in about 1996 when I was in Grammar School. I took Turbo Pascal more as an introduction to Programming, instead of a product to do something constructive in.

After Pascal, I was looking into something visual. Hence, I fell into Visual Basic 5.0. Yeah, I know, I’m sorry.

Legal Issues

Now this was my first step towards the open source community. I must admit, that I downloaded a pirated copy and ran with it for a while. Now, that was all well and good when I was sitting home playing around with stuff. But when it came to actually, to producing something for a market, you can’t (or should I say, shouldn’t) do that with pirated software.

After that, I got into web development. For this, there was a plethora of free tools available, for use. So I did that for a while. When I got back to college, I got into C++ (using Visual Studio, but still essentially free). That was a step in the right direction. However, as the semesters went on, we got more into using the .NET library. However, for my web development I never got into ASP.

The First Real Plunge into Open Source - Enter PHP

Bit by bit, web development gave way to web programming. This is where PHP came in. I got more familiar with PHP when I started working on different projects for clients. I chose PHP for a few main reasons:

  1. Free Documentation: I could learn almost everything I needed through online documentation.
  2. Cost: My first problem was hosting. ASP hosts used to be almost twice as expensive as their Linux counterparts.

The Open Source Misconception

One of the problems that people have with Open Source is that they think that it’s unsupported. People seem to think that open source software is written by a bunch of kids in basements or something. This is not the case, by any means.  For example, a lot of the Linux distributions are totally free and totally supported.  Wake up people; free doesn’t mean unsupported. The whole “You get what you pay for” isn’t always true.

If you're new here, you may want to subscribe to my Full RSS feed. Thanks for visiting!

Posted in CakePHP, Linux, PHP.

Tagged with , , , , .


Password Requirements - Small Rant

I’m not sure how many of you guys share my views about passwords. Or maybe I just don’t feel comfortable with other people telling me what to do. Yeah, I think that’s it. If I decide that my password is going to be qwerty, password, letmein, or even 123; I think that’s my business. Don’t get me wrong, I totally understand the reason behind this. Some sites are trying to protect the users against themselves.

Reasonable Requirements

Now some of these requirements I can understand. Some of them are actually reasonable. I can deal with a minimum length; although these days they seem to be getting longer than eight (8) characters.

I just don’t think that I need this type of protection. Although I don’t use the same password for every website (any more, lol). Currently, I use an algorithm to generate a password for a new site. It’s a combination of a common stem or base and appending the service name that I’m logging into (eg. Yahoo, Gmail, etc.)

My Problem With Requirements

Currently, my stem only consists of lowercase letters and numbers. I know it’s not the most secure base, but it’s long enough and it serves the purpose. What I can’t stand is a site that needs me to enter a special character or an upper case character.

Posted in General.


CakePHP Contact Form - Quick and Dirty

I must say, this was a major hurdle for me when I first started out with CakePHP. If you’re working with some data from a database, then it’s all Model-View-Controller magic. Your forms are automatic: $form->input() is pretty much all you need. Why is this? That’s because all the information about the fields (names, sizes, types, etc.) come straight from the database.

You’re Out On Your Own

The problem right now is that, you’re all on your own. You need to describe your data on your own. So, on with it:

Here’s your model code:

class Contact extends AppModel {
	var $name = 'Contact';
	var $useTable = false;  // Not using the database, of course.

	// All the fancy validation you could ever want.
	var $validate = array(
	    'name' => array(
	        'rule' => '/.+/',
			'allowEmpty' => false,
	        'required' => true,
	    ),
		'subject' => array(
	        'rule' => array('minLength', 5),
			'message' => 'Subject must be 5 characters long'
	    ),
		'email' => array(
	        'rule' => 'email',
			'message' => 'Please enter a valid email address'
	    ),
	);

	// This is where the magic happens
	function schema() {
		return array (
			'name' => array('type' => 'string', 'length' => 60),
			'email' => array('type' => 'string', 'length' => 60),
			'message' => array('type' => 'text', 'length' => 2000),
			'subject' => array('type' => 'string', 'length' => 100),
		);
	}
}

What The User Sees

I think the model’s the hardest part. The view is ridiculous:

Posted in CakePHP.

Tagged with , , .


HSBC Direct Doesn’t Support Firefox 3.0 - Another Reason To Dump IE 6.0

Before I start bashing Internet Explorer 6.0, I’d like to share a story with you. I’ve had a high yields savings account at HSBC Direct for some time now. Now I think I know why I haven’t experienced many user issues with their website before. I also use ING Direct Savings Account and Electric Orange Account for some of my banking, you know all eyes in one basket and that stuff. Now, maybe it’s their features or their interface, but I use ING Direct, daily. HSBC is more of a backup savings account. I send money there and don’t really worry about it, so I’ve never used it enough to find a problem.

The Problem

But the other day, I decided to open a second account with HSBC and I got the following error:

A Technical Error Has Occurred

I was only trying to transfer money from one account to another, I didn’t get it. So I figured there must be some problem with the website right? So I wait it out for a few days to let them fix their problem. But alas, the next time I checked, same problem. So finally, I decided to write their Tech Support and I got the following back in a lovely email:

Posted in General.

Tagged with , , , , .


Wordpress 2.5+ Upload Image Error - Finally Fixed!

I know I’ve mentioned it before, but I’ve had some problems with Wordpress 2.5 and their new image upload. Now I know there have been many, many, many, (well let’s just say a lot) of posts and articles about how to fix this problem. But, none of them seemed to work for me. Most of them just go into the basics: setting folders with the right permissions, etc.

My Set Up

I won’t go into detail, but I think being on Dreamhost has something to do with it, because trying all this on my local PC with XAMPP Lite on Windows XP.

Here’s What I Tried

In addition to trying all of the above on my existing blogs, I’ve tried the fresh install approach. I installed a fresh copy of Wordpress and then bit by bit, I copied in database tables. All seemed to go fine, for a while, then (for some reason) I would just get that error again. It didn’t matter what the browswer was either. When I attempt to insert an image the screen would blank out.

Posted in General.

Tagged with , , .


Blog Theme Designers Given Up on IE 6?

Lately, I’ve decided to switch themes on a few of my blogs. So I started looking around for some themes that are nice and simple enough. I found about five (5) candidates and that were nice, simple and not too loud. To my surprise none of these themes worked in Internet Explorer 6.0. It seems that, lately, blog theme designers are saying a big old “screw you IE 6.0″ and I don’t blame them.

Now, I’m having mixed emotions about this. On one hand, I’m happy that people are finally putting the nail in IE 6.0’s coffin. However, I’m slightly pissed that I can’t use these themes. I, more than anyone, should know the reasons why we should abaondon IE 6.0 and move on to better, more productive web development and enjoyment. But, the purist in me still doesn’t want to leave the poor saps who are trapped behind the veil (whether is by software contraints or ignorance) of Internet Explorer 6.0 behind.

Browser statistics show that IE 6 still maintains between 26% and 37% of the web browser market. Right now, that’s just too many people to ignore.

Posted in General.

Tagged with , .


IE Hack: CSS Centering - Another Reason I Hate Internet Explorer

So here’s another common Internet Explorer CSS hack that’s pretty popular and not too ugly.

Here’s The Problem

ie-css-min-height-hack
This is how normal people horizontally center block elements using CSS: You slap on a width (I mean, that should be obvious enough right?). Then you set the left and right margins to auto, and Voilà, centered!

body #box {
	margin: 0 auto;
	width: 780px;
}

Well except in Internet Explorer and some older browsers.

Fixing The Problem

This one is a bit nicer than the CSS min-height hack. You need to use the text-align property to center for the element above, because Internet Explorer sucks and doesn’t understand the auto margin. Now too fix this, you need to reset the text-align to left.

body {
	text-align: center;
}

body #box {
	margin: 0 auto;
	padding: 56px 0 20px;
	width: 780px;
	text-align: left;
}

That’s it folks!

Posted in CSS.

Tagged with , , .


Make Your Web Site Not Suck In Internet Explorer - IE CSS Min-Height Hack

Now it’s not surprise to anyone out there that I hate Internet Explorer. No I mean I really hate it! One of the reasons that I hate it so much is that it’s buggy. Call it whatever you want, maybe it’s too forgiving on bad HTML or CSS, but whatever their intentions are (forgiving sloppy code or just too lazy to interpret code right) it causes tons of problems.

The Min-Height Problem

I know a lot of you have had this problem in the past. It’s gotten so bad for me that, at one point, I’ve just stopped using them. Bottom line, Internet Explorer pretends it doesn’t see the min-height property. It uses the regular height property as a min-height. Confused? Let me make it a bit simpler:

Firefox

The height property is a fixed size. It doesn’t shrink and it doesn’t expand with content.

The min-height property is exactly what it says: it gives the element a minimum height, but it still expands with the content of the element. It’s perfect for if you have an element that will just look totally ugly if you it’s empty.

Internet Explorer

The height property is interpreted as a minimum height, funny enough. Doesn’t that suck?

Posted in CSS.

Tagged with , , , .