Hi,
My apologies for being so delayed from regular posting. It's been a painful few weeks in coding for me, and time passes by extremely fast.
Now, if you're at all familiar with creating a website, you know it can be super fun to make one. If you're an expert, what you're going to read in this post will look stupid. If you're not an expert, you'll think website-making is a terrible world best left for professionals.
The thing is, to further expand my adventurous life as an entrepreneur, me and my business partner decided we could make an online shop for stuff we could sell cheap from China to Finland and elsewhere in Europe possibly. Not consumer goods, but stuff businesses need. Not like industrial components, but practical things. I won't give futher details, though, as it is still not ready and giving away details of my business to our millions of readers would probably end up in an idea-theft. Anyway, to get such a business going, we need a website.
I'm the only one of us who actually knows anything about making a website. So I got that winning ticket. I have a good understanding of HTML code and a bit experience in CSS. That's it. And I write everything in Notepad. I'm that old-school (or unskilled).
So, with those skills of mine, I had a task of creating a fully operational website that can provide a kind of online shopping function (not a real webstore, but with plenty of online forms to fill).
The first week went really well. I was creating the main graphic layout and the CSS to support it - albeit the visual image has changed about 3 times since, everytime to the better. I managed to put in a basic ordering system and some contents.
Second week I was working 14-15 hours a day (sleeping 5-6 hours) to get stuff into the website, and finally started having those rookie mistakes that make pros cry.
It's easy to put text into a website, but it's not easy to make them look super-cool and have them behave as you want them. Especially when you're using a frameless CSS layout. It's a magical thing what one misplaced comma or a missing '>' can do. With one small typo your whole website might ceace to exist the way you knew it. It might take a life of its own. The worst is if you don't exactly remember what you changed in the code just before - or if it takes you a long time to notice you've made a mistake (the changes are, you might have to go through everything to find that missing comma).
I had that. I missed one > after closing a bold text command. Took me two hours to find where I went wrong.
Also took me around two hours to find out why some pictures didn't open in Internet Explorer while opening perfectly normally in Mozilla. I thought it's my code and I went through it over and over again. No mistakes there - simple code - why isn't the damned thing working?! Oh, turned out some of the pictures were saved in CMYK-colours which, it turns out, IE doesn't open but Mozilla does. I converted the pictures to RGB and the thing worked like a charm again.
For the online forms, I also added a CAPCHA-security field so that visitors have to type in those funky characters to designate themselves as humans and not as spambots. For this I had to venture a completely new world of coding: PHP and Java - both which I had no experience from before. After working zealously to get CAPCHA working, my form stopped working. It worked almost, but it had one flaw: the emails that I received from the process.php protocol didn't have any of the '+' signs in the contact information (as in, someone would put in country code for a phone number). Turns out PHP code considers '+' as a space-character. Took me god knows how many hours to figure out how to fix that.
Today, I've had my favourite code-glitch of them all! Didn't take me as long to find the problem since it's in my familiar CSS code, but it's quite amusing.
At a location of the CSS code file, I have: #download a.download{ font: 14px "Arial, Helvetica, sans-serif; color: #fff; }. This means that in Div type="download" if there is a link class="download" it'll have font size 14px in Arial and black colour. I used to have a html file that used that Div Type but I didn't need it in the end so I've deleted the html file a long while ago. However, I forgot to take out this line from the CSS file, but then, usually it shouldn't be a problem. The important thing is, it's a kind of leftover in the code that nothing uses.
Or so I thought.
Internet Explorer uses it. Internet Explorer needs this particular piece of code to make the website work. Mozilla doesn't, nor does any other browser. IE, for some reason, can't make my right side window and footer work if there is no code that would tell IE that in Div type="download" if there is a link class="download" it'll have font size 14px in Arial and black colour. I can change the font size and nothing happens, I can change the colour of the font and nothing happens. But if I take out the code all hell breaks loose! So, I'll leave the code there.
I'm quite sure this kind of leftover code is what will eventually make real Artificial Intelligence - or a kind of a real intelligence for machines. By wilfully creating AI ourselves, humans can only aspire for intelligence similar to our own intelligence. However, true intelligence has freedom and it cannot be dictated. Hence, only from true randomness and chaos can it be born!
I know a missing comma doesn't sound very intelligent. But look at it this way: I wanted it to work - I made in a way it should work and it looked smart enough - however, through a small mistake, I lost control of the beast and it took a life of its own!
Geeks are the lion tamers of today.
Subscribe to:
Post Comments (Atom)
Pekka, you yourself explain very well why professional web designers don't use notepad. You had a missing > and you spent 2 hours tracking it down. Any editing tool would have highlighted the code for you and you wouldn't have missed it in the first place.
ReplyDeleteThey recommend Notepad as learning tool because it forces you to learn HTML and CSS fundamentals. Nobody recommends you actually build a commercial site with it.
Please try something with at least basic HTML aids. For your own sanity. Here's a free one:
http://www.fookes.com/ftp/free/NoteTab_Setup.exe