PHP TDD (Test Driven Development)

Nowadays almost all back-end developers are familiar with TDD. It has much more upsides and very little downsides once the actual classes and the test are in place. If you are just experimenting with your code and do not need it for a longer term, you may not need TDD in that case. TDD is actually essential if you want to maintain your code base for a long time. So what does the Test Driven Development consist of? Well, there is the unit test that…

Continue reading »

How to Convert your javascript file to a Windows .exe or .dll

Nowadays an average web developer will need to know a broad matrix of skills in order to do his/her development job. HTML, CSS, JavaScript, AJAX, XML, some server side language, some linux/unix/redhat command skills, some apache, some database skills, standards, accessibility, SEO, etc…, the list goes on. Parts of the list are also multiplied by (or raised to the power of at least 10) number of browsers you want to support.

Continue reading »

Turning on/off warnings and errors in PHP

Write a script to determine whether the page is on a local, testing, or live server, and set $state to “local”, “testing”, or “live”. Then: Or if you are sure your script is working perfectly, you can get rid of Warning and notices by putting this line at the beginning of your php script: error_reporting(E_ERROR); Before that, during the development, I would properly debug my script so that all notice or warning disappear one by one. So we should first set it as verbose as…

Continue reading »