Smart A. S. blog

Alexei Shuga, the web developer

Archive for the ‘Uncategorized’ Category

MediaTemple vs Linode

without comments

I’ve been using both services for private data and testing environments for a while now. This is going to be quick and short resume.

While plans I’ve used – “512 mb” from Linode ($19.95 p/m) and “ve Server 512Mb” from Mediatemple ($30 p/m) – have comparably equivalent hardware features (there is only one difference – you may get “burstable” RAM from Mediatemple, but that’s not the “real” feature and this is probably the problem despite the fact that it seems to be a real value added offer), there are tons of issues with MediaTemple.

Here are the issues that make Linode a real killer:

a) Pay for what you use (e.g. you create a virtual machine for $19.99 and cancelled a week later, you will get 3/4 of what you’ve paid back! MT will eat your money). This is actually what I believe is one of the best features for active developers. For example, usually I create proof-of-concepts or other stuff related to the client needs and sometimes it has to take one week only (e.g., it’s to be closed or moved to clients account). This is not about the money, but about the freedom of actions. I can easily deploy 10 VPSes farm and stress-test one of the solutions for a couple of days and it’s going to take approx $13 at Linode while

b) Stability. Linode’s XEN works stable, while MT Virtuozzo did not work well for me

c) Support. I’ve seen questions answered by Linode stuff within 5 minutes! Beat that!

d) Community. Libraries/tutorials, Forum, IRC and lots of other helpful stuff.

e) You can pick your own datacenter. While MT offers Virginia datacenter, Linode at the moment offers you choose from 5: four datacenters in 4 US states and 1 in the UK. You can easily test/simulate geotargeted load balancing and other features.

So, today I cancelled my Mediatemple service and “resized” my Linode maching to 1.5Gb plan.

ps. No holy wars or any offense meant. MT is a good VPS hosting provider, it’s just the features offered by Linode are really cool for me as a developer and probably for other developers.

Written by Alexei Shulga

September 5th, 2011 at 3:30 pm

Posted in Uncategorized

Tagged with , ,

On passing Zend PHP 5.3 exam

with 6 comments

I passed the Zend PHP 5.3 exam (code: 200-530) on Nov 9th, 2010 and would like to share some thoughts and feedback.

First of all, the exam is quite complex, yet it’s pretty much easy to pass if you’re writing PHP code using latest additions like namespaces, late static binding or lambda functions. Even if you do not use these techniques in your code, but you’re aware of them and saw PHP syntax for those features (including restrictions like “namespace” keyword proper placement), it would not be a problem for a candidate to pass Zend PHP 5.3 exam.

I did not get myself prepared for the exam as I was too busy working and spending time with my family, but I saw that a couple of people suggested to read Zend PHP 5.3 Study Guide (included with your voucher purchase). Yet I’d definitely not recommend using this guide as it contains lots of errors and inconsistencies and even wrong answers for sample exam questions.

Here is a short abstract that should illustrate that the guide could mislead potential exam candidate

FILESYSTEM
basename(): RETURNS FILENAME COMPONENT OF A PATH
chmod(): CHANGES THE FILE MODE
copy(): COPIES A FILE
delete(): DELETES A FILE

No offense to Zend, but they should not release the document until it’s verified and contains only minor issues (at this time they offer Beta 1.3 version of the document). On the contrary – use manual. And I mean it. There is no better book on PHP to get prepared for the exam other than it’s manual. That’s the only advise I can give if someone interested.

Next, the questions.

PHP 5.3 exam questions are a bit easier than those I saw for PHP5, but the answers are much “better” (read trickier) now. The questions I answered covered lots of PHP topics sometimes, a single question encapsulates several PHP topics and it would be hard to choose the right answer without knowing all of them.

I answered all questions in 40 minutes, marked around 20 for review later and spent some time looking for traps and pitfalls in those 20. And I found that I choose two wrong answers in marked for review questions. So I spent exactly one hour on the test (the same for previous PHP5 exam) which means that allowed 1.5 hours for 70 questions are more than enough.

A bit of not good news. I encountered three questions that were really, totally and devastatingly stupid. As I can not share the real questions, I’ll share the concept and approach. How about this: what is the best approach towards coding?

Possible answers (pick only one):

  1. Thin model, fat controller
  2. Fat controller, thin model

Anyway, I really encourage interested parties in taking the exam.

Below you’ll find the topics covered by the questions I answered and the approximate number of questions related to the topics to get the idea of what is being asked:

XML (SimpleXML, DOM, XPath, etc) – 11

AJAX (incl. JSON) – 4

HTML and Forms (POST data, security, escaping, etc) – 15

Headers, sessions, cookies, etc – 8

New PHP 5.3 features – 7

Strings and regex – 15

OOP and design patterns – 7

Arrays – 30,

DB (PDO, storing/displaying data) – 6

Email – 3

etc.

Also, I got about 11 “type-in” questions and there were about 6 question on the order of function parameters.

Eventually, you’ll have this nice graphic page on your web-site/resume:

Zend certified php 5.3 engineer logo

Written by Alexei Shulga

November 12th, 2010 at 6:35 pm

Posted in Uncategorized

Hey, Apache! Do you mod-rewrite?

without comments

The quickest way to check if apache’s module mod_rewrite is running is by running this command

sudo apache2ctl -M 2>&1| grep -i rewrite

Now, if you want to enable mod_rewrite, run the following command:

sudo a2enmod rewrite

And finally, restart apache server:

sudo apache2ctl restart

ps. Do not forget to set up correct value for the AllowOverride apache directive to enable correct .htaccess behaviour for your code.

Written by Alexei Shulga

August 15th, 2009 at 6:28 pm

You're encouraged to check out my developer resume.