MySQL. How to insert a row or update if exists in MySQL.

Posted by Stanislav Furman on February 25, 2013

Being a web developer, I personally like short solutions, and when I code, I try to write as less code as possible. At the same time the code has to be readable for other developers without using comments.

If you want to combine create/update function into one, MySQL offers you a very useful statement : INSERT ... ON DUPLICATE KEY UPDATE.

Continue reading

Most common design patterns in OOP. Introduction.

Posted by Stanislav Furman on September 9, 2012

Every good programmer might dreams to create a nice, big and famous project (software, web site, etc.). At least you need to dream to improve your skills, motivate yourself and move forward. However, if you want to create something really big, scalable and flexible you have to use some common existing practices and solutions that all strong developers use in daily basis. One of those common existing solutions is use of design patterns. If you are a beginner and want to get an idea what are design patterns and how to use them, this post is for you and I hope it will he helpful.

Continue reading

How to interview a programmer. Thoughts about hiring process.

Posted by Stanislav Furman on August 26, 2012
You might also would like to read a related article How to recognize a good programmer.

Just a few thoughts...

I cannot remember how many various job interviews I have passed in my professional career. Maybe fifteen, or twenty, or maybe more. Some of them were successful, some of them not. However, very rarely I have met a really good recruitment process. Whether in Eastern Europe or in Canada – I noticed that everywhere.

Sometimes it was just a waste of my time when, for example, the potential employer declared something like: "Actually, we are looking for a specialist with a slightly different skills set" or "Unfortunately, we are limited with our budget and cannot offer you the salary that you are seeking. How about a salary 20% less than you are making now?". Seriously?!! Guys, you were aware about my salary expectations before you asked me to come for the in-person interview!

Keep in mind that for every such interview candidate should make some time to prepare, leave early from the current job (or come in later), and maybe even take a day off. Also, potential employers are spending their time too! So, why should they both waste time if a short phone call may help to figure out whether it makes sense to meet or not?!

Continue reading

A little bit of humour

Posted by Stanislav Furman on July 21, 2012

Just a little bit of humour from programmer's life. :-)

If you have a problem and you have to solve it using regular expressions, then you have two problems! :-)

PHP application performance tuning

Posted by Stanislav Furman on March 15, 2012

Hello Coders!

In this article I will list a few advises on how to optimize your PHP web application performance. All these tips below I learned myself or from co-workers, blog articles and books. Keep in mind though that usually there is no need to go nuts when it comes to performance optimization. So, please don't open your IDE right away and don't try to use all tips together. Simply get an idea and note something that could be useful in your specific case.

Continue reading

CSS rounded corners

Posted by Stanislav Furman on February 26, 2012

Basic approach and main idea

Very often, web designers use CSS rounded corners to make websites nicer. This blog uses rounded corners too. You could use different methods to create rounded corners on your web site, but from my point of view the simplest one of these methods is the method that uses CSS3.

Unfortunately, this method won't work in IE (what a surprise!), but, fortunately, there is a hack exists that can fix this problem.

For most of web browsers the following code will work:


<style>
#container {
  width: 200px;
  height: 200px;
  background-color: #cccccc;	
}
.rounded {
  -moz-border-radius: 10px; /* Works in Firefox */
  -webkit-border-radius: 10px; /* Works in Safari, Chrome */
  border-radius: 10px; /* It's CSS3 */
}
</style>

<div id="container" class="rounded"></div>
Continue reading

How to secure your php application

Posted by Stanislav Furman on February 21, 2012

Working on web projects you should consider most common dangers such as XSS ("Cross Site Scripting"), SQL Injection, Session Hijacking, Spoofed Form Submissions, etc. This little guide will help you to understand basics of web security and it will help you to protect your web applications against possible attacks.

Remember that security must be balanced with expense. Don't use paranoidal security approaches if it is not really needed.

Please note that this post covers only basic security approach which is quite enough for most of web sites but not enough for large, e-commerce projects. However, listed measures are fundamental for all types of web applications.

Continue reading

How much should a web site cost?

Posted by Stanislav Furman on February 19, 2012

This is a very frequently asked question: "How much should a web site cost?". It's not that easy to answer this question because of a lot of a number of nuances related to website creation.

By chance, I found a very good post where professionals try to determine a formula to calculate the cost for web site creation.

There is also a nice calculator where in a few clicks you can calculate approximate total cost.

Enjoy - http://www.webpagefx.com/How-much-should-web-site-cost.html.


Visual Representation of SQL Joins on a graphical diagram

Posted by Stanislav Furman on February 18, 2012

For some programmers (especially for begginers) it might be a bit difficult to understand how do SQL joins work in real life. In fact, sometimes even experienced software developers are not able to explain what is the difference between JOINLEFT JOIN and RIGHT JOIN.

Luckily, I found, perhaps, one of the best visual representations of SQL joins I have ever seen which will definately help to understand the mechanism of SQL joins.

Visual Representation of SQL Joins, graphic diagram

 

See more graphical diagrams and explanations here


Another 12 SEO tips that everyone should know

Posted by Stanislav Furman on February 17, 2012
Learn another 12 SEO good practices to succeed in website optimization. Useful tips and recommendations.