2007-09-02

PHP Certification

I used to not have any appreciation for, nor did I put any faith in the certifications you can take online. A co-worker of mine suggested I try the PHP Certification exam. I bought a book as a study guide, and as read through it, I realized that there were still a lot of items within PHP that I head never heard of before.

Everyday I am faced with dilemmas that show me I have more to learn about every aspect of what I do, however, I didn't realize some of the basic things that are native to the PHP Environment that I had never even heard of. I went in for my exam on April 17, 2006

This was by far the hardest exam I have ever done. The questions were all about these secret little places inside the world of PHP, or syntax questions that the main difference was where the space was located, or sockets and ftp connection errors. (Prior to the contract I have not, I had never used Sockets and FTP connections through PHP together, so these errors were stressful)

At the end of the exam, I had no clue how I did. Several of the questions had several answers that could have been right, and I didn't know if I had slipped, or clicked the right one. I walked out the the reception desk and asked how long before I know if i passed. She looked over at her printer, "Congratulations, you are the newest Zend Certified Engineer. I was thrilled.

Now I am looking at the new certification. The PHP 5 Certification Exam. Overall, not that stressed about it, outside of the new section they have added to this exam. What are the differences between PHP 4 & PHP 5. Do you know how long it would take to fight your way through the Change log? Holy Jesus... But I guess if it weren't hard, I would have to stick with my initial feeling about them of being people who just like to say they know more.

This exam was hard, and I honestly feel as if I am a good programmer in PHP because I was able to pass it in a single try. Now lets buckle down and go for the next one before PHP 6 comes out.

2007-08-12

New Baby

I knew that a baby would change my life, but I never imagined to this extent. I haven't thought about work in 2 weeks. So now the hard part is, how do I go back into worker bee mode. I need to start tomorrow.

Hrm... I will figure it out I guess.

2007-08-02

Forgive me - AFK

Just a note for all of my readers... Both of you.

With the ups and downs that are coming as my wife is coping with labor, and until the baby is born, I will probably remain AFK.

2007-07-26

Tech Support - MSN Messenger

An acquaintance of mine from Rotary called me to do a little tech support for them. Every time the clicked on MSN, it would tell them to contact support because they couldn't get on the Internet. I asked some standard questions and found out that their are on dial-up, their ISP is MSN, and the use the MSN Explorer software in order to check their email. (For those of you who don't know, the new MSN, is like the old AOL. They try to make you think that there is no Internet outside of their product.)

So I go over their, and after a few tests, I learned that they had a virus on their machine that attacked their virus, echemmm, MSN. So, I ran all my happy free-ware and open source utilities, got rid of the virus, and cleaned up the computer some. But the connection through MSN had been corrupted, so I created a manual connection and set it to automatically dial in, when they tried to access the Internet.

The next day, I got a call saying that the virus was back. So once again, I headed over there to see that the same virus had come back. And AVG didn't catch it because it hadn't been allow to update. So, I did some research and learned that there was a security hole in MSN.

So, I used my manual connection, loaded up firefox, and downloaded the newest version of MSN. Installed and tested. Connection was great, so I left again.

A few days later, I get a phone call again. "I cannot send an email". So, once again, I head over. The Rich Text Field for the body of the email just didn't appear. So I called MSN Support. "You have to download the new Windows Live Messenger to fix it." And then I asked the obvious question, "What the hell does Windows Live Messenger have to do with the Send email function in MSN Explorer." And he responds, "Well Sir, there are Dynamically Linked Libraries (Note that this was stated phonetically) that the Windows Live Messenger will update and fix the problem." Mentally, I strongly urged him to go f*** himself, out loud came, "If they are so closely tied together, why are they not a package?", his amazing reply was, "so people on Dial-up don't have to download both." Please, take a moment and think about that amazing statement. This made me fight every part of myself that wanted to scream out, "Here's your sign." And then I hung up, and downloaded Windows Live Messenger.

A few days later, I get a phone call, "I cannot connect to the Internet." Exasperated, I drive over there again, the manual connection was messed up with the installation of the required new messenger. So I fixed the manual connection, and checked the email problem to make sure it was fixed. It wasn't. Surprise surprise. So I called MSN Support again. "Oh, Well, you need to download the NEWEST MSN Explorer to go with your Windows Live Messenger."

...
...
...

I quickly hung up on him. The cross of the frustration and injustice of this whole thing wasn't bad enough, but I had to explain this to my clients. Luckily, they believed that it wasn't my fault. So I wanted, for the 7 mb file to download. Started to install, and learned that the 7 mb file was simply the installer, it had to download the real programs yet. The typical installation was 93 mb. NINTY-THREE. So I selected "minimal". That was geared for people on dial up. With a teency weency 29 mb. This still took an hour. But, I finally installed this, tested everything and got them back up and running. I used to do tech support, I feel their pain, but by god.

2007-07-24

Leap2Linux

I am a big fan of Linux. Honestly, it wasn't until I learned Linux that I understood DOS. Learning where the logic came from... you know. Well, here is the dilemma.

After researching for hours, I finally decided on the Kubuntu installation, downloaded the ISO burnt it to a CD, and got it ready to install. Then I realized that if I install this to my Windows box, although it should partition the drive, install there and not interfere with Windows at all, I am concerned about my files. All of my business files exist on this computer. So, I have to do all the work to prepare for a disk format, just in case. Then comes the issue of... where does all that time come from...

Darn need for change...

2007-07-19

Bascis of XHTML (How to)

As a developer, I find the best way for me to learn, is to see a completed snippet of code, and tear it apart. So, I am going to go through and explain to you want these basics tags are, show you the XHTML code and finally, an example of what that page will look like.

In order to put effort forward to learn something new, it is important to know why. Why am I doing this? You are familiar with your HTML and its newest 4.1 standard. Standard HTML is built on a language called SGML, and I am not going to fill you in further on that, because from here on out, SGML == BAD. Feel free to go the extra mile and review some basic code in the SGML standard and compare it back to this. Although HTML 4.1 is accepted in all GUI browser, it is not standard. When it is not standard, you get things that are different. And your goal with your website is to have everything appear as close as possible across browsers.

Three basic steps that will get you working with XHTML.
  1. Make sure all XHTML tags and attributes are written in lowercase.
  2. Make sure all XHTML tags are closed. (This can be done two different ways. If you are putting text or content between tags, then use <p>Here is my content before my close.</p>. Otherwise, a tag can self-terminate, <br />. Using <br></br> is valid but why create more typing for yourself?)
  3. Making sure all XHTML tags are nested properly. That means that they close in the opposite sequence they opened in. A properly nested set of tags are: <p><strong>Here is my content</strong></p>; whereas the improper way to nest tags: <p><strong>Here is my content</p></strong>;
Another little perk to using XHTML, is that W3C (World-Wide Web Consortium) has a validator that you can use on a live site, and if your code is valid, they give you a happy little tag to put on your site, proving you did it right... Wooo Hooo these are Web Developer Gold Stars Baby!

http://validator.w3.org/

While I am on a linking frenzy, here are two link:

To get a listing of Web Safe Colors:
http://www.w3schools.com/html/html_colors.asp
Or, if you want to test them out, side by side:
http://www.visibone.com/colorlab/big.html

All characters have a web safe version. This helps when you want to show a character without letting it be translated. For instance, I want to show you the "<p>" tag. This document will be translated by your browser, so I need to use "&lt;p>"
http://www.w3schools.com/tags/ref_ascii.asp

Now to break down the tags:
Block Level Elements: (A.K.A. Tags that have a space above and below them) div h1 h2 p ul ol li

Inline Elements: (Stays within context of content) a img em strong br

To see the XHTML translated through a browser: http://marccabrera.com/samples/xhtmlHowTo1.html

Actual Code:


<body>

<div id="container">


<div id="header">

<h1>MarcCabrera.com</h1>

<h2>I Speak Geek Fluently</h2>

</div>

<div id="menu">

<ul>

<li>

<a href="http://marccabrera.com" title="MarcCabrera.com">

MarcCabrera.com

</a>


</li>


<li>

<a href="http://virtualcreations.biz" title="Virtual Creations LLC">

Virtual Creations LLC

</a>


</li>


<li>

<a href="http://geekbynight.com" title="Geek by Night Software LLC">

Geek by Night Software LLC

</a>


</li>


</ul>

</div>

<div id="content">

<p>


<img src="http://marccabrera.com/images/MarcCabrera.jpg" alt="A slick picture of myself." /><br />

<strong>Books I like:</strong>


</p>

<ol>


<li>Harry Potter <em>All of them</em></li>

<li>Eragon And NOT the Eragon from LOTR</li>

<li>Eat, Pray, Love</li>


</ol>


</div>

<div id="footer">

&#169; HTML Safe Copyright Symbol. All Rights Reserved 2007 MarcCabrera.com<br />

<p>

<a href="http://validator.w3.org/check?uri=referer">

<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" />

</a>

</p>

</div>

</div>

</body>

2007-07-12

Basics of being a web developer

To become a good web developer, you need to understand multiple languages as well as how and where they integrate with one-another. The languages I use mostly, are:
  1. HTML
  2. CSS
  3. JavaScript/JScript
  4. PHP/ASP
  5. SQL
If you are new, I know this seems overwhelming; but have faith, each has its own specific purpose, and we can break them down nicely.

Before we talk about the languages themselves, we need to make sure it is clear where and how they run. This will help you in understanding their abilities, limitations, and make it possible to debug.

There are two computers you need to concern yourself with when you are building a website. The server, a computer where your websites files will be stored and made accessible to the Internet, and there is the users computer, this is the computer your user will use to access your website through their browser.

HTML (HyperText Markup Language) - is the language that will tell the Internet browser will interpret to build the structure of your website. To put it easier, HTML will tell your website what to shape itself into. HTML can only run on the users computer. So your limitations are put in place by the users machine. After HTML loads, you have no access to it from the server. It is at that point on the users computer and it cannot be changed.

CSS (Cascading Style Sheets) - I don't really consider this a language. It is more like a long list of adjectives. It works exclusively on the users computer with the HTML. It allows you to pretty up your website in a way that follows web standards, and eventually, makes your life easier. After CSS loads, you have no access to it from the server. It is at that point on the users computer and it cannot be changed. To describe this: with HTML, you can "Draw" a box on your web page with text in it. If you tell CSS to work with this box, you can make the box red, and have white text inside of it as well as a blue border all the way around it. When I say it can make your life easier... Imagine that you have drawn this box on 10 pages. What if you get the website done, and you realize that the white text looks horrific on the red background. If you just used HTML, you would have to fix it on every page. If you used the CSS to color the box, you could change it in one place, and it would fix it on all 10 pages.

JavaScript/JScript - These languages can be used on the server or on the users computer. I advise you only use it as a language on the users computer. It will make things easier to differentiate when you are coding in multiple languages. And frankly, both ASP, and PHP are better to work with on the server. The reason I label two languages here is that there are two standards for "JavaScript", the standard JavaScript, and Microsoft's slightly modified version called JScript. This is a slight difference in the coding that will make you cry from time to time, don't be ashamed, feel good that you are trying. JavaScript is a unique language that allows you to modify content of your web page after it has been loaded. JavaScript is a unique language in the sense that it is the only language that allows you to manipulate the web pages content AFTER it has loaded to the users computer. So, if you wanted to change an image when you mouse over it. You could use basic JavaScript to do this. JavaScript is also the root of structures like AJAX or DHTML.

PHP (PHP Hypertext Protocol)/ASP (Active Server Pages) - These are both "server-side" languages. That means that these languages run on the server, can interact with databases, and files on the server, and they will build HTML to output to the users computer. When using a "server-side" language to make a "dynamic" website, you are using these languages to work on the server to ask a database for information that it will then send to the users Internet browser. These languages BUILD HTML, they do not work on the users computer. These languages are more powerful, and you have more control over the environment in which they run.

SQL (Structured Query Language) - This is a base language that all databases use at some level or version. It is basically a language developed for you to interact with your database. Your database can store as much or as little information as you would like it to, from user information for logins, or actual content of your web page.

So, user your PHP to build a webpage, that asks that database using SQL, to send an HTML page to the users computer. Once it is on the users computer, the CSS will make it appear the way you want it to, and the JavaScript will allow you to make and animations or changes to the page.

This covers all of the languages, and if you can get good with these on a basic level, you can be a web developer. The only thing you have to worry about is debugging. This is the process of going through your code, and finding out where the errors are.

When you get to debugging, the best thing I have ever been given to get my in the right mindset is: "The computer will do what you tell it to, not what you want it to."

With that, it is reminding you that the computer cannot think for itself, it will follow your website from top to bottom well read every line, unless you tell it not to read a line. So, never assume it is a computer glitch, assume you messed up. It really makes your job easier.

You can look forward to, or dread if you would like, posts talking about each of these languages and debugging to come.