List of free pomodoro apps to improve your productivity as a web developer

Looking for a pomodoro app, to help keep you on task and productive?

Below is a list of different options for different OS’s

Windows

Mac

Android

Web based / online

iOS

Chrome apps:

  • Pomodo’more is a lightweight app you can add to your Chrome Browser.

You can read more about Pomodoro here: Why breaking time and tasks in to small blocks will increase your productivity as a web developer

Do you have enough time for a custom e-commerce website to be developed?

Time, money and patience is required for custom software development.

Custom software development can really hurt, so do your research before committing to it.

Developing a customer e-commerce website can be very time consuming. Do you really need to try and “re-invent the wheel”?

The development process can also be annoying and irritating. More so if you don’t understand the technical aspect. Even seemingly small visual changes can seem to take way more time than you think they should.

You might start thinking…

“Am I being ripped off by my website developer?”

If you haven’t yet embarked down this process, pause and consider your options:

  1. Pay to develop custom software to exactly meet your needs. Which could be a long frustrating expensive journey or
  2. Use an existing e-commerce service like Shopify. Where in a few hours you could have a professional looking site live and ready to take orders.

I’m a software developer. Through years of experience of being paid to develop custom software. I recommend you avoid all the potential pains associated with option 1. Take option 2, start accepting orders today!

Save yourself the pain, take the easy way of using software. That you can then customize (within certain boundaries) for yourself!

If you liked this post about developing a custom e-commerce website, be sure to subscribe below for my next post

When do you need to use back ticks with MySQL?

Back ticks are often misunderstood.

I am trying to learn the best way to write queries.

You might not be sure how to use those funny little `ticks

`back ticks`, `backticks`

I have used single quotes, double quotes and back ticks without any real thought.

What is the standard for this?

Back ticks should be used for table and column identifiers, but are only needed when the identifier is MySQL reserved keyword.
Also if the identifier contains white space or other special characters.

When possible it’s recommended not to use keywords and special characters as table and column identifiers to avoid having to use back ticks.

If you use PHPMyAdmin to generate some queries you will see that all the column and table identifiers are escaped with back ticks by default.

For example a SELECT query would look like this:

SELECT `id`, `created_by_user_id`, `modified_by_user_id` FROM `products` WHERE 1

As none of these column and table identifiers contain any special characters and don’t match any of the MySQL reserved keywords, the same query will run just fine without the back ticks:

SELECT id, created_by_user_id, modified_by_user_id FROM products WHERE 1

Replace the back ticks with single quotes (or double quotes) and you will get an error as now each identifier wrapped in single quotes is treated as a string:

--DON'T DO THIS, AS IT WILL RAISE THE ERROR BELOW:
SELECT 'id', 'created_by_user_id', 'modified_by_user_id' FROM 'products' WHERE 1
--#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''products'

If you liked this tip, be sure to subscribe below and be the first to get my next tip…

How to integrate a WordPress.com blog RSS feed into a PHP page

What comes first your wordpress blog or your website?

You might have started with a free wordpress blog. Then later created a separate website or vice versa. Well whichever way round it is. You might have ended up with two disconnected websites. Now you want to reuse your wordpress.com blog content in your website.

One easy way to do this and integrate your blog content in your website is using its RSS feed. Which is available on your wordpress blog. Just add this query string “?feed=rss” to your blog’s url and you will get an RSS feed from your blog.

Try it now in your web browser, by clicking on this link:

http://element121.com/?feed=rss

Now that you can access the RSS feed, you can parse the RSS data into your page

Last RSS is a PHP RSS parser. Available to download as a single file here: http://lastrss.oslab.net/

So you can now parse the RSS feed. With a few lines of PHP code as demonstrated below. This is based on one of Last RSS’s examples.

If you found this post useful, please subscribe below. If you have any questions, don’t hesitate to leave a comment…

Why breaking time and tasks in to small blocks will increase your productivity as a web developer

I’m a chronic procrastinator – how do I break it? I could be changing the world, but instead I’m putting in the bare minimum and no matter what trick or method I try I can’t seem to beat it.

Sound familiar?  You know what needs to be done, but put it off…

I always have a fear of finishing something and it’s a bit of a problem for me.  I can’t ever finish anything, because then what??

And if it’s not work to do, there’s always something else you could check… check your email, check the news, check the weather, check your social media updates. Or you could make a tea / coffee, grab a snack or see what’s going on outside….

Endless distractions and procrastination to avoid actually doing the work.  Before you know it half the day has gone and then the whole day and it’s time to stop working.

How do you bring your focus back?

A timer by your desk is a great way to approach this at work, personally I find 15-20 mins of work and 5 mins of procrastinating is a good balance.

If you haven’t heard of it before this is called the Pomodoro Technique!

  1. Pick a task to do
  2. Set a timer to work on the task (25 mins)
  3. When the time is up, stop and take a break doing something else for a set period of time (3-5 mins)
  4. Repeat the above until your task(s) are complete!
  5. After four iterations of the above, take a longer break, you’ve actually earned it!

Much like breaking a complex programming problem up into smaller chunks to fix, breaking time up into defined short periods (Pomodoros) helps you concentrate and stop procrastinating for at least 25 minutes to actually get some work done.

Depending on your work place an actual physical timer on your desk may be a good solution.  Otherwise there are a choice of websites, apps and chrome extensions to time your Pomodoros for you.

Like the above? and interested in receiving more web development focused productivity tips, please subscribe below for a weekly email of any new posts, so you don’t miss out on them.

 

When to use USING in a JOIN rather than JOINing ON?

What is the difference between ON and USING() when JOINing two or more tables together in a SQL query?

For example you have the following two tables, Users and Products, when a Product is created, the Users id that created it is stored.

Products table:
id Primary Key
created_by_user_id Foreign Key to Users table
product_name
Users table:
id Primary Key
first_name
last_name

If you want to find out who created the product, you can do that easily with a simple SQL query like this:

SELECT p.*, u.*
FROM products p
INNER JOIN users u ON p.created_by_user_id = u.id

If however the user id field was named the same in both tables like this:

Products table:
id Primary Key
user_id Foreign Key to Users table
product_name
Users table:
user_id Primary Key
first_name
last_name

You can then use USING to JOIN the tables together and return the same data with this SQL:

SELECT p.*, u.*
FROM products p
INNER JOIN users u USING(user_id)

Each time you JOIN a table you will need to use an additional USING clause even if the second and third tables contain the exactly same column name.

Make sure that when you are JOINing tables together using the ON or the USING clause that the data type of the matching columns is the same data type.

Interested in more SQL tips? Please leave a comment below or pop your email in the box below and you’ll be sure to receive them!

Help for avoiding undefined index notices

If you are just starting out with PHP, you may come across this message:

Notice: Undefined index: username in C:\wamp\www\mysite\index.php on line 99

Even if you’ve been coding for years you can still get this message!

You may be confused as to what an “Undefined index” is? Often seen when trying to access global server variables such as $_POST and $_GET when passing data from another page or posting it back to the same page.

So what is it? It really is an index of an array that hasn’t been defined yet.  You are trying to access data in a variable that doesn’t exist!

Depending on the PHP error reporting level you configure, you can even hide these notices, but that’s not recommended, better to deal with them and write good code.

You can normally fix your “Undefined index” errors with the isset function to check whether a variable is set, like this:

// Check if the username is set or not...
If (isset($_POST['username']))
{
$username = $_POST['username'];
}
else
{
$username = "";
}

However a very useful function which can save you many lines of code like the above and undefined index notices, can be found in the comments (all credit to the author) on the same page of the PHP manual.

function isset_or(&$check, $alternate = NULL)
{
return (isset($check)) ? $check : $alternate;
}

//Example usage which will give the same result as the if / else statement above
$username = isset_or($_POST['username'], "");

It’s a very useful function if you are using plain PHP and need to determine the value of variables. It will also make your code cleaner and easier to read than repeated if / else statements like the above.

How do you deal with stress as a web developer?

Life can be stressful enough, work as a web developer has it’s own unique stresses from dealing with users who don’t know what they are doing, managers who don’t know what they are managing and technology that never stands still.

At times and some days at multiple times in the day the stress can feel too much.  Sometimes you feel like you need to release the built up angst, anger and frustrations.  Venting and releasing the stress in a controlled manner is important for you and everyone around you.

There are times when you can spend hours trying to fix a bug, that can turn out to be a single character (often invisible) that’s out of place causing a bug and stress.

There are lots of options for dealing with stress, but one that is free and should be available to almost anyone, is just getting up and going for a walk.  Preferably in natural surroundings, if you are in a city, try and walk around a nearby park.

Take a break, when you are stuck go for a walk.  Disconnect from your problem, when you come back after your 10-20 minute walk, you will have a fresh perspective.  I do this all the time and it is crucial to my productivity.

It’s amazing how bugs can be solved, by just leaving the code alone, getting outside for a walk for 10-20 minutes and then when you come back, you have the fix and the stress is gone!  Often I find the fix will come to me halfway on the walk, or when I’m on my way back to the office.  When you are desperately trying to fix an urgent problem, it’s amazing how time can fly by, so stop, get up and take a break with a walk and let the solution come to you, while the stress dissipates…

How to protect your PHP source code as a freelancing web developer

How to protect your PHP source code?  You might be worried about giving away your secret sauce  or having it reverse engineered.

Another good reason for wanting to protect your code is delivering the code to a clients server / hosting before final payment has been made for the development of the code.

I have experienced this first hand! I was very surprised to find a delivery of code for sign off was encrypted, I hadn’t seen that before.  Sure enough when we asked the development company they said they would remove the encryption once the final payment had been made (there already had been a number of part payments through the project).

So definitely a useful tool for small shops and freelancers, make it a part of your contract that the source code will be decrypted when fully paid for.

We also had another client who wanted to distribute PHP code on USB thumb sticks.  Not recommended, but it is possible to run a web server like that, using a SQLite database.  Given the accessibility of a USB thumb stick rather than a Linux server, we encrypted the PHP code to protect it.

Here’s a couple of PHP encoders that we’ve used:

So encode, obfuscate and protect your code, if you feel the need, especially if you aren’t 100% confident of a client paying you.

Have you experienced a similar situation before, please share below in the comments.  If you would like more useful tips like this, please subscribe to be updated on new ones.

Why you should keep a routine when working remotely as a freelancer

Transitioning to freelancing and working at home or at a remote location from your client can run riot over your life…

I find myself working late, and then when I get in bed my brain is still active and I cannot sleep, so I end up going to bed at 1 or 2 in the morning, which has an impact on the next day…

Being home, can feel like, well being at home! Where you normally relax, spend time with family, eat and sleep. Working at home might be something new for you.

For me it can be tough getting into a working mindset in the morning and getting out of it in the evening.

Of course you don’t have to just work at home.  There’s always libraries, cafes, co-working spaces or you could even rent an office, just like other businesses do.

Whenever I am feeling the cabin fever of working from home, I hit the library.

There can be lots of distractions, so make sure you have a regular routine for yourself, to keep your productivity up and that way you know when you are at “work”.  Turn that daily routine into a habit so that it becomes second nature.

If you’ve transitioned from a regular office job to freelance position, try keeping the same 9-5 hours you had before.

What works for me these days is I go to bed early and start early, when the clock hits 5pm I’m done for the day.

Stick to your routine, plan your days out and remember to stop working and don’t let your work overrun its routine and affect family life and your sleep. Routine sounds routine, a little boring perhaps, but that’s how you get things done, sticking to the routine, doing the work, taking a break and doing more work day in and day out.