This book is as described and more. It focuses on a variety of aspects regarding front-end web development at the enterprise level. This includes team hierarchy, individual roles, tools, documentation, frameworks and methodologies so it goes beyond coding but it’s equally technical in nature. This is definitely not a beginner’s book because of the technical details so it’s possible to be overwhelmed with the amount of content. Any intermediate to advance front-end web developer will find this book useful and without doubt improve their skills even it’s just minor details. These include:
-why camel case is preferred
-why you shouldn’t use specific hacks but rather alternatives
-which tools make coding more efficient
Continue reading →
Pro CSS for High Traffic Websites Review
Lack of AB Split Testing scripts for websites
There are several big name services for split testing website and they are all services which you have to pay a monthly fee. Would you want a script you could install on your websites that can give you metrics just for 2 pages?
I’m building this code right now and it will be aimed for non-wordpress websites with no monthly fees. You will get to see simple results showing which page gets more return visitors, clicks, and stay time. If you can think of any features you want then contact me and I will try to implement. them.
MyISAM or InnoDB MySQL engine?
If you’re curious about the difference of MySQL engines, here they are.
Comparing and contrasting what MyISAM is and InnoDB. First ISAM is the acronym for Indexed Sequential Access Method, generally it is fast, compressable, and allows full text searching. Second InnoDB is transaction safe and includes automatic foreign key checking so it’s a bit slower.
The important part is that don’t spend too much time deciding which one to choose, because you can change table type later with the ALTER TABLE statement. Instead you should focus on optimizing tables for performance such as using fixed with fields versus variable width (varchar). Now for the technical details.
MyISAM
MyISAM tables are optimized for flexibility and compression. They can hold upto 256TB of data but are not transactional-safe, meaning if the power goes out in a middle of a write, the data is gone. This is especially important for financial data. The schema is flexible so it is good for beginners learning about databases. Foreign key relationships do not have to be setup for the database to function, however this can cause poor performance and unreliable data. The simplicity allows lower use of hardware resources and another benefit is the table search ability for full-text.
Continue reading →
Make your website cross-browser compatible
Forget about CSS hacks as they should only be temporary solutions and will eventually break upon browser updates. You want robust CSS with minimal amount of HTTP calls for the best performance. So here’s the code using conditional comments adding a class to the <body> element:
<!--[if LTE 7 ]><html class="ie7"><![endif]-->
<!--[if IE 8 ]><html class="ie8"><![endif]-->
<!--[if IE 9 ]><html class="ie9"><![endif]-->
<!--[if gt IE 9 ]><!--><html><!--<![endif]-->
The first line gives the body a class of “ie7″ if the browser is Internet Explorer 7 or less, followed by lines detecting versions 8, 9, and greater than 9. Now you can change the styles with CSS code as such:
#header { background-color: yellow; //default rule }
.ie7 #header { background-color: orange //rule for IE7 }
.ie8 #header { background-color: red //rule for IE8 }
.ie9 #header { background-color: blue //rule for IE9 }
I didn’t discover this method so the credit goes to Paul Irish.
Limiting the number of stylesheets you are will improve the performance for a high-traffic website. So keep your media queries for alternative resolutions in the same file.
@media screen and (max-width: 320px) {
.iphones { width: 320px }
}
Using a media query inside a link tag will actually load the css file and the images in it, <em>even if the display is set to none,</em> except for Firefox and Opera.
<link href="iphone.css" rel="stylesheet" media="screen and (max-width: 320px)" />
For browser vendor specific CSS you can speed up your coding time with the web app PREFIXR. It reads CSS3 styles and automatically applies your rule to work for the main other browsers.
- -mos- for Mozilla
- -webkit- for Apple browser Safari
- -ms- for Microsoft
- -o- for Opera
57 Ways To Take Control Of Your Time And Your Life
This is a book review of Jim Meisenheimer’s book 57 Ways to Take Control of Your Time and Your Life. What a long title, but the book remains succinct in length.
I like how the author redefines time management in this book. He puts it in a different perspective. You can not manage time, but you can manage yourself to be more efficient with the use of time.
I really didn’t expect much but a list of tactics used to improve your productivity however this book does more than that. It goes beyond tactics and includes some strategy, guidelines, and scenarios. A typical book includes a lengthy introduction, history, inspirations, anecdotes, and even fluff that’s off tangent. This book does not – it is succinct with almost every page being noteworthy. It is actually better than a few longer productivity books I could not get into such as “Getting Things Done” by David Allen.
Even though this book focuses around sales talk it is useful for speeding up your day-to-day accomplishments. You’ll find tips on better planning, delegation, productive traveling, directives, talking with prospects, and semantics.
Overlay scrolling issues on iPhone iPad
Fixed position prevents iOS devices from scrolling the overlay div.
If you haven’t experienced this, then you will find out whenever you have to code a website with overlaying divs in either a fixed-size or fixed position. At first you will try the 2-finger swipe on your device and notice no change in scrolling. Then you might try to re-size the screen with the pinch gesture and scroll again. So this has been a known issue in Safari caused by Apple not wanting duplicate scroll bars to complicate the simplified user-interface. I don’t remember the credit reference for this, but will post it when I find it.
First consider using HTML5 and the meta tags for mobile.
<meta name="viewport" content="width=device-width, initial-scale=0.5, user-scalable=1, minimum-scale=0.5, maximum-scale=1.0"> <meta name="apple-mobile-web-app-capable" content="yes">
How to update a MySQL field in a table matrix
This is a tutorial on updating a unqiue mysql field in a matrix grid of elements by using PHP and jQuery.
In this tutorial, we are presuming you are familiar with PHP and MySQL.
This is the example we will use. The scenario is giving users access to special features on movies created by producers. This will be useful in the near future when producers have control of film distribution.
We start with the database design creating four tables.
- producers
- users
- Features
- feature_access
Step 1. Import schema
Copy paste the code or import the TEST.SQL file into phpMyAdmin (download file link at the bottom of tutorial).
The USERS and PRODUCERS tables are simplified to id and names. The FEATURES table has a foreign key to link the producer who made the feature. The FEATURE_ACCESS table contains 3 foreign keys, linking the 3 other tables. The additional field we are calling “access” is a BOOLEAN allowing NULL.
If you are wondering why were are allowing NULL values besides 0 and 1, it’s because we want the FEATURE_ACCESS records to exist regardless if they are active or not. More on this later.

















