When you realize you know nothing

Normally I hate when bloggers - expecially tech bloggers - write about their pets or something like “I am not writing because I got flu”… but when illness refers to computers, it’s really something to talk about.

I was writing a post about online photo editors when my computer crashed.

Oh, well, who cares, I saved the post one minute ago - that’s what I said.

The problem is my computer still crashes and restarts about 20 seconds after the boot.

Every “break glass in case of fire” procedure has been tried, and the computer still crashes.

I called the guy who takes care of our servers and he asked me “did you *******?”

Feel free to replace the ****** with weird BIOS settings, hybrid startup modes, motherboard jumpers configuration, impossible-to-remember regedit paths and so on.

Damn, that sounded greek… and if you’re from Greece, imagine he was talking italian…

I had to bring my computer to his lab. My pride is under my shoes.

I realized there is no difference between me and Uncle Sophie (imagine Uncle Sophie as a fat mid aged woman using the computer only to play Window solitaire).

I can make (almost) everything I want just writing some lines of code, but when that big black box called “computer” seriously crashes, I know nothing.

How much do you know?

10 tips that will help you when you are about to learn a new language

I started programming when I was 13 in a Commodore computer, and during these 20+ years I had to learn a lot of languages… various Basic versions, Turbo Pascal, C++, Assembly, Blitz Basic, Java, Javascript, Asp, Php, MySql, Actionscript…

I want to share with you some tips that can be useful when you are about to learn a new language

1) It’s just another programming language

If it’s not your first programming language, then you’re fine: it’s just another programming language.

Most operators, types, loops and conditionals will be the same you already know, just with a different syntax.

2) Start from Hello World

Learning a new programming language by coding something quite complex can be really frustrating and you will be tempted to give up.

Don’t be afraid to start from something really simple as an Hello World or something similar

3) Get an editor with syntax highlighting

This is a must-do both for new and well known languages.

Don’t believe programmers claiming they write their code with NotePad… this sounds like visual effects in Lord of the Rings movie have been made with MS Paint.

There are so many ways to help our job, whatever it should be, it would be stupid not to make it as easy as we can.

A good editor should have row numbers, syntax highlighting, and support a wide number of languages so you will have to learn one interface to rule them all.

The one I love is PSPad.

4) Get some books

Now it’s time to get seriously into the new language. Go to Amazon and search for some books. I recommend you to get at least a beginners guide, the “your new language” Bible and an advanced book.

I highly recommend the Bible because of its friendly way of explaining and the complete coverage of the language.

5) Start translating

Now it’s time to translate your projects made in an “old” language into the new one. This process is called “porting”.

There’s nothing better than facing the same old problems in a new way.

If it’s your first language, then jump directly to next step.

6) Start rewriting

Look in the web for examples with source code, read them and rewrite them in your way. At the end, your script will probably look slightly different than the original one, but it will work the same way.

Remember every programmer has his own way to write code, so using someone else code is never the better way to learn a language. Rewrite it.

7) Submit your work

It’s time to submit your work to related portals. People will rate and comment it and you will know if what you called “ultimate address book” is really useful or just another script.

Never mind, seven steps ago you even wasn’t able to write “Hello world”…

8) Languages change. And what about you?

All major languages change during time to face new technologies. Just think about Actionscript or Php.

They evolve day by day… this means you should do the same.

But I have some advices:

8a) Don’t be a “latest release fanatic”… when Php 5 was released, some programmers I know started complaining because their servers did not installed it.

The most amazing thing is the most complex script they did was a form validation. There is no need to learn php5 if your job is validating forms. Php3 will do the same.

When a new release of the language hits the market, it takes about two years (in some cases even more) before you MUST master it.

So don’t waste precious time to be the first to explore the new version. Let others do the dirty job for you and learn from their experience.

8b) Don’t be an “old release fanatic”… if you don’t have to dive yourself into the new version, you also don’t have to stick forever to the old one.

There will be a time you knowledge will be obsolete, and a programmer with an obsolete knowledge is not a programmer.

It’s up to you to decide when it’s time to switch to the new version

9) Don’t learn everything

Your time is limited, and your brain - like it or not - is limited too.

So you should choose wisely what to learn and what not to learn.

In my case, I decided to quit ASP for Actionscript. I had not enough time to learn both languages.

My preferred dynamic web language is Php, so I decided there was no need to master ASP for the sake of mastering it.

10) Nothing lasts forever

What is the best language today, will be obsolete in the future.

Actually I use less than an half of the languages I had to learn… programming languages are like women… you will meet a lot of them in your life, but you will only have two or three of them by your side at the same time… (this can be the last post in this blog if my wife reads it…)

10 tips to help you choosing the right hosting plan for your blog/arcade site

When you are about to create a blog or an arcade game site, the first thing you should consider is where your site will be hosted.

It’s something really important.

As your site popularity grows, your server will get more and more stressed, and this may affect the site itself.

An example: this blog generates about 10,000 pages/day, and every page is made by about 80kB html, 100kB images, 50kB files… that’s more than 2GB/day… not to mention all the MySql queries needed to generate every WordPress page.

The whole thing gets still more complicated if you want to set up an Arcade site: the average game ranges from 500kB to 2MB. Now imagine to serve 10,000 games/day (and that’s not an huge number…) and you’ll get an idea of what I am talking about.

It’s very important to choose the right hosting plan, and I am going to help you finding the one that can fit your needs.

Please note: These rules fit perfectly if you want to set up a blog or a small Arcade site (when I say “small” I mean 99% of the arcade sites in the world).

1) Forget Blogger.com, WordPress.com and all minor free offers

Having a domain name is the only way to look professional, and if you are going to try and monetize your blog/arcade, you must have your own domain name.

2) Hosting Vs Housing

There is no reason for having an housing plan until your hosting provider can’t handle the resources your site is asking for.

This means if you choose your hosting plan wisely, you won’t have to switch to an housing plan until you have a large amount of traffic (and revenues…)

3) Php Vs Asp

I hope this is an useless question nowadays, but there is really no reason for you to choose Asp.

Don’t listen to “programmers” saying Php is for small projects… NewGrounds is made with Php and if you aren’t developing next Expedia’s competitor you must choose Php

Moreover most of the most famous free resources (such as WordPress, Phpbb and so on) are made with Php.

So it’s time to choose…

4) Php version

Don’t trust hosting services that still offer Php 4.. it’s no longer under development nor will any security updates be released.

Php 5 was released more than four years ago… do you know how much are 4 years in internet? There is no reason why hosting services haven’t updated it until now… other than they will never update it.

So run away from Php 4 hostings. Choose a hosting plan with at least Php 5.2.2

5) Disk space usage: Don’t believe the “infinite” word you read on their offers: upload 10,000 DivX movies and you’ll understand what I mean. Choose an hosting plan with a specific amount of space, so you know that space is guaranteed. 500GB should be enough for a long, long time.

6) Monthly Bandwidth Transfer: In this case, look for “infinite” word. Again, it’s not true, and probably in case of big traffic the hosting company will slow down your site, but there is nothing worse than a “Oooops: Bandwidth exceeded for this month” when you land to a page.

Especially if that page is yours. Especially is it’s only the 15th day of the month and you aren’t able to upgrade your hosting plan in five minutes.

7) Email accounts: If you are an one man company, you will only need one email: info@yourdomain.com

I hate when I have to write to marketing@yourdomain.com rathern than support@yourdomain.com when I know the site is mantained by one person.

Let’s say five email address are enough, so you can give one email to your little sister and make her happy. Anyway, she will continue using HotMail

8) MySql Databases: Choose a plan where you can define the name of your databases. Having databases called “Blog”, “Arcade” and so on is way better than “34524″ and “gdfyrty_2″.

9) 24/24 customer support: Very important. There is an easy way to test it: open a ticket (or contact the support center by email) saying your can’t connect to your MySql database. It’s not true, but it’s just an “hello world” to see what time does it take for the support team to reply…

10) Memory management: From a cute little file called php.ini, that you won’t be able to edit, your hosting company can set an huge number of options such as memory management, maximum time to execute a script, and so on.

While only time (and traffic) will say if your hosting plan can handle enough work, you should at least be able to run the script published in Parsing MochiAds feed in a friendly way or you won’t be able to have your WordPress arcade site.

Where are you hosted? Are you happy? Do you need some more advices?