Monday, July 16, 2012

Start working as a freelance programmer


If you want to start working as a freelancer you must know that sometimes you will not have projects to work on and sometimes you will have a lot of bids that were accepted. You should not decline any project that you could complete because if you do a good job then your employee will hire you again for other related jobs.

When you do not have any project in progress do not worry, just bid on projects and use your spare time to learn. An important thing to keep in mind is not to overwhelm yourself with work because only when you are rested you will do a good job.

You should continuously learn something new

IT world is continuously developing, so are the new technologies, principles and practices. You should always keep your knowledge up to date. For example if you use a CMS then you should know that at least once an year a new version is released. You will need to study and learn what new approaches implies the new release. Most of the freelance programmers are working with several languages and libraries. Let's say if you are a developer and you are using PHP, maybe a PHP framework, HTML/CSS is a must, maybe even a CMS and Javascripts's library jQuery then you will need to always learn the new things. 

A good way to learn new approaches to different problems is reading books. Other good learning resources are video tutorials, articles,

Personal skills

English is a must in freelancing, as a freelancer you will need to communicate with clients or other developers, in my experience English is the most spoken language. Another great skill needed is communication, Employee will hire you again if they considered you a nice person.

Prove your employee that you are reliable, do not leave him in the middle of a project just because things get hard. If you do your best then you will win a friend and future collaboration. 

Create a personal website

You should create a personal website where you should put some portfolio items, contact information, maybe a contact form and maybe if you have time write some tutorials about what you are doing(programming, writing, design). Post some links to your profiles on freelancing platforms.

Build trust between you and your employee

First you should be honest, if you can not complete the job then tell him do not abandon the job by not responding to his messages. Clients appreciate honesty!
When you are registered on freelancing websites post relevant information about yourself on your profile. Also you should upload a decent photo with yourself because clients are more comfortable if they see the person to whom they are giving a task or a project. Another thing to keep in mind is to do a good job and to not try to overcharge your clients! All this will build trust between you and your clients, this trust will get you more work. 

Freelancing platforms

Here are some freelancing websites that I tried:
A website that is not really a freelancing platform is, however you could browse the website and find out more about it, maybe you could do some work there. I have made some PHP scripts there for some bucks.

Other websites that I did not tried yet are:

If you have an advice or something to help new freelancer please post them in your comments. Thank you! 

Thursday, July 5, 2012

Including php files

Let's say that you have some functions that you want to use for a project of yours. If you copy paste the functions in all files where you need then when you want to change the way a function work you need to change it in all places. This changes are a lost of time and you will surely not modify it in all files so bugs may appear. The solution is to include php files using include and require methods that PHP provides us.

Using include

You can include a file like this:
include "functions.php"
Using this statement requires that the file functions.php must be in the same folder with the file in which you are including your functions. You can use relative or full path to the file like this:

include "usr/local/apache/htdocs/includes/functions.php"
For Unix/Linux/Mac path

For Windows the include statement might look like this:
include "c:\phpfunctions\functions.php"

The problem with include is that every time the PHP processor finds an include statement is that it will load the file in again. This takes up more memory than is necessary and is slow and inefficient. The other problem is that loading the file again will make functions to be redefined, which is not allowed, and will generate an error message.

Using include_once

If you are using include_once then the processor will check if the file is not already loaded and it will load it if it is not loaded. You can use it like this:
include_once "functions.php"

The problems with include and include_once is that if the file does not exist then the command will simply get ignored. Maybe some of those functions are needed for the website to work then you will get a lot of errors, maybe some errors like function not found. The solution is the require command.

Using require

require "functions.php"
Using require instead of include will return an error and halt the program execution if it cannot locate the requested file. This will help you if you misplaced a file or you got the file name wrong. But the story is the same, require will reload the file each time, the problems of this matter are the same as when using include command. The final and best solution is require_once command.

Using require_once

require_once "functions.php"
Like include_once this will only ever load in a single copy of the file, no matter how often that file is required. But, unlike include, it will also generate an error if it can not find the requested file.