<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>scriptNode &#187; careers</title>
	<atom:link href="http://scriptnode.com/tag/careers/feed/" rel="self" type="application/rss+xml" />
	<link>http://scriptnode.com</link>
	<description>Tips and tricks for web developers.</description>
	<lastBuildDate>Tue, 01 Sep 2009 18:46:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>5 Things That Suck About Being a Frontend Engineer</title>
		<link>http://scriptnode.com/article/5-things-that-suck-about-being-a-frontend-engineer/</link>
		<comments>http://scriptnode.com/article/5-things-that-suck-about-being-a-frontend-engineer/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 00:23:18 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[just-for-fun]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=313</guid>
		<description><![CDATA[
Call it what you will. There&#8217;s been much debate about the job title for a frontend engineer, or a web developer, or whatever name you prefer. What I&#8217;m referring to, however, are the folks who code for the browser. If you spend all day waste-deep in markup, CSS and JavaScript, then you do what I [...]]]></description>
			<content:encoded><![CDATA[<p>
Call it what you will. There&#8217;s been much debate about the job title for a frontend engineer, or a web developer, or whatever name you prefer. What I&#8217;m referring to, however, are the folks who code for the browser. If you spend all day waste-deep in markup, <a href="/tag/css/">CSS</a> and <a href="/tag/javascript/">JavaScript</a>, then you do <a href="http://raptr.com/">what I do</a> and I&#8217;m talking about you.
</p>
<p>
And let&#8217;s just skip right past <a href="http://www.stopie6.com/">Internet Explorer</a> and its plethora of headaches, shall we? We all know it sucks. Here&#8217;s why <em>else</em> it sucks to be one of us:
</p>
<ol>
<li>
<h3>Everyone Thinks It&#8217;s Your Fault</h3>
<p>
So you&#8217;re <a href="/article/5-ways-qa-ruin-developers-lives/">QA</a>. You&#8217;re testing a website and something is broken. It looks to you like the frontend, because that&#8217;s what you see. What may separate good QA from excellent QA is the ability to determine where the error lies, but sometimes that&#8217;s out of QA&#8217;s scope.
</p>
<p>
Regardless of who the owner is, chances are the issue will go to you first. You must then determine if it&#8217;s even your issue, and either fix it, or pass it on. Bringing us to …
</p>
</li>
<li>
<h3>You Are Also a Project Manager</h3>
<p>
The frontend is the very <strong>last</strong> thing to get done. That&#8217;s because the design needs to be finished way in advance so that assets can be delivered, and the backend has to be complete before you have access to data to use in your implementation.
</p>
<p>
This means that you must act as <strong>Project Manager</strong> to keep everyone else on track, because otherwise you can&#8217;t ever get to work! And that&#8217;s why …
</p>
</li>
<li>
<h3>You Always Seem Late</h3>
<p>
Since you&#8217;re the last one that gets to begin implementing, chances are you&#8217;ve got less time than everyone else. And sometimes you can&#8217;t even get started until <em>after</em> your deadline! And even when you do finally get your assets and can get to it, sometimes …
</p>
</li>
<li>
<h3>You Must Know Photoshop</h3>
<p>
To be fair, I actually use <a href="http://www.gimp.org/">The Gimp</a>, which works fine. What I mean by this point is that you must learn to use a competent image manipulation program. Why? Because although you may have an excellent design person/team, chances are they&#8217;re not going to cater to you and your crazy <a href="http://delicious.com/richtaur/css">CSS hacks</a>.
</p>
<p>
You know what I mean. Sometimes you&#8217;re wanting to <a href="http://developer.yahoo.com/performance/rules.html">sprite your images</a> to get better page performance, or sometimes you need to pull off some crazy rounded corners hack to get the positioning <a href="http://developer.yahoo.com/yui/articles/gbs/">cohesive across browsers</a>. You could go back-and-forth with design all day, or you could say &#8220;screw it&#8221; and alter the image yourself. It sucks but that&#8217;s how it gets done. And that&#8217;s part of …
</p>
</li>
<li>
<h3>You Must be a Jack-of-All-Trades</h3>
<p>
In addition to competency with a decent image manipulation application, you&#8217;re going to need at least a familiarity in many other areas. It&#8217;s very rare to find a frontend engineer who doesn&#8217;t ever need to modify at least some server-side code.
</p>
<p>
For example, although I am official a frontend engineer, I probably spend 30-50% of my time in <a href="/tag/php/">PHP</a>. That&#8217;s because, before I can even render the markup I need to tweak, I&#8217;ve got to setup the data I receive from the backend.
</p>
<p>
Not to mention the various other tasks that randomly pop up in the webdev stack, such as <a href="http://www.addedbytes.com/apache/url-rewriting-for-beginners/">Apache rewrite rules</a> or cronjobs. I&#8217;m sure the same could be said for most jobs, but it seems like frontend engineers&#8217; skillsets must be broader than most.
</p>
</li>
</ul>
<div class="section">
But it&#8217;s not all bad. Especially right now in Silicon Valley, frontend engineers are quite valuable, so it&#8217;s a great time to know how to code for the browser. Either way, did I miss something? Let me know!
</div>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/5-things-that-suck-about-being-a-frontend-engineer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Software Development Meme</title>
		<link>http://scriptnode.com/article/software-development-meme/</link>
		<comments>http://scriptnode.com/article/software-development-meme/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 23:50:21 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[interviews]]></category>
		<category><![CDATA[just-for-fun]]></category>
		<category><![CDATA[questions]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=171</guid>
		<description><![CDATA[
I&#8217;ve been tagged by the insanely creative Jacob Seidelin, which means it&#8217;s my turn to fill out the Software Development Meme!

How old were you when you first started programming?
I was about 12 years old. That combined with my love of Nintendo really makes it sound like I never left the house, but I found time [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;ve been tagged by the insanely creative <a href="http://blog.nihilogic.dk/2008/09/software-development-meme.html">Jacob Seidelin</a>, which means it&#8217;s my turn to fill out the <strong>Software Development Meme</strong>!
</p>
<h3>How old were you when you first started programming?</h3>
<p>I was about 12 years old. That combined with my love of Nintendo really makes it sound like I never left the house, but I found time to play sports and get in trouble, really&#8230; &#8230;</p>
<h3>How did you get started in programming?</h3>
<p>A mysterious friend of mine (Jim MacDonald, who all but doesn&#8217;t exist online) and I used to play games all day, like <a href="http://www.rpgclassics.com/shrines/nes/dw1/">Dragon Warrior</a> and <a href="http://www.rpgclassics.com/shrines/genesis/shiningforce/">Shining Force</a>. Then one day he wondered how games were made, and found&#8230;</p>
<h3>What was your first language?</h3>
<p>QBASIC! This has gotta be the easiest language to learn, and that says a lot in an age where PHP exists. I think more developers would benefit from starting with this fantastically simple language.</p>
<h3>What was the first real program you wrote?</h3>
<p>I wrote a program I simply called <strong>Dragon</strong>, which was a direct ripoff of Jim&#8217;s game <strong>Wizard</strong> or something. It used QBASIC&#8217;s <code>DRAW</code> commands to draw shapes and <code>PLAY</code> for sound effects. It was a single-battle, turn-based game pitting you (a knight) against a dragon. It was amazingly bad but pretty fun (for 12-year-olds anyway).</p>
<h3>What languages have you used since you started programming?</h3>
<p><strong>Professionally:</strong> Only <a href="http://php.net/">PHP</a> and JavaScript</p>
<p><strong>For fun and/or school:</strong> BASIC, C, C++, Perl, Python, QBASIC, Turbo Pascal, Visual BASIC</p>
<h3>What was your first professional programming gig?</h3>
<p>Working for <a href="http://blog.davglass.com/">Dav Glass</a> at <a href="http://schoolcenter.com/">SchoolCenter</a>. I was a PHP programmer making a measly $10/hour coding content management tools for K-12 schools. I was quickly promoted to lead designer (odd, right?), then when the company realized we needed engineers more than designers, put back into the development department. About a year after <a href="http://yuiblog.com/blog/2007/03/29/yuiteam/">Dav moved to Yahoo!</a>, I followed.</p>
<h3>If you knew then what you know now, would you have started programming?</h3>
<p>Oh <strong>hell</strong> yes. I&#8217;m always trying to learn as much as I can. Learning new languages is fascinating, and learning more about what you already are familiar with to me should be a daily exercise. If I had had the knowledge I have now when I was younger, I can&#8217;t imagine what I would have built by now. Interesting to think about!</p>
<h3>If there is one thing you learned along the way that you would tell new developers, what would it be?</h3>
<p>In a normal curriculum in school, students are taught to read well before they are taught to write. I&#8217;m not sure why this isn&#8217;t the case in programming. You&#8217;ve always got these wannabe developers that try to run before they can walk, and they end up tripping. There&#8217;s no shame in beginning modestly.</p>
<p>I recommend to <strong>anyone of any</strong> programming level: read other people&#8217;s code. The Internet is the <strong>ideal</strong> place to learn.</p>
<h3>What’s the most fun you’ve ever had… programming?</h3>
<p>Everytime I learn a new language, my first task is to build a game. I&#8217;ve been doing this for over a decade, in every single language I&#8217;ve dabbled in. But I think it was the most fun in QBASIC. I built an intentionally awful game called <a href="http://seanbaby.com/readers/richter1.htm">Seanbaby&#8217;s Magic Bus Ride Trip</a> for you guessed it&#8230; <a href="http://seanbaby.com/">Seanbaby</a>. Working in <a href="http://paletteswap.com/misc/games/benzer/">Flash is really fun</a> too, but <a href="/lab/spacius/">nothing beats JavaScript</a>.</p>
<h3>Who’s next?</h3>
<p>Let&#8217;s go with <a href="http://foohack.com/">Isaac Schlueter</a>, since he&#8217;s a great writer and always has interesting things to say!</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/software-development-meme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Ways QA Ruin Developers&#8217; Lives</title>
		<link>http://scriptnode.com/article/5-ways-qa-ruin-developers-lives/</link>
		<comments>http://scriptnode.com/article/5-ways-qa-ruin-developers-lives/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 04:06:23 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[quirks]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=106</guid>
		<description><![CDATA[

A Scholastic quality assurance employee


Quality Assurance people are important and valuable, to be sure, but they can also make developers&#8217; lives much more difficult. This is particularly bad because (like many roles in an organization), their end goal is to help the developers make better software, not stress them out.


Here are some of the common [...]]]></description>
			<content:encoded><![CDATA[<div class="after caption">
<a href="http://flickr.com/photos/photomatekitt/84560351/"><img alt="QA" src="/assets/img/qa.jpg"/></a><br />
<span>A Scholastic quality assurance employee</span>
</div>
<p>
<strong>Quality Assurance</strong> people are important and valuable, to be sure, but they can also make developers&#8217; lives <strong>much more difficult</strong>. This is particularly bad because (like many roles in an organization), their end goal is to <strong>help the developers make better software</strong>, not stress them out.
</p>
<p>
Here are some of the common ways <acronym title="Quality Assurance">QA</acronym> workers ruin developer&#8217;s lives and how these behaviors can be avoided:
</p>
<ol class="cls">
<li>
<h3>Misunderstanding the technology</h3>
<p>
I&#8217;m often shocked by what somebody on the team didn&#8217;t know about. <strong>Understanding when software is working properly and when it isn&#8217;t can sometimes require a deep understanding of the technologies involved in making the software</strong>&#8230; And sometimes you just need to know enough.
</p>
<p>
My favorite example of this is a bug I got about a year ago, in which the report was something along the lines of, &#8220;Page is dumping out plain markup, no CSS.&#8221; Sounds kind of like an <acronym title="Really Simple Syndication"><a href="/feed/">RSS</a></acronym> feed right? It was. This person had never heard of <acronym title="Really Simple Syndication">RSS</acronym>.
</p>
<h4>How to avoid this</h4>
<p>
I hate to say it, but sometimes people just need to be qualified for their jobs. A unique perspective on a product is sometimes great, even <strong>sought after</strong> (for example, during usability tests). Other times, people need to do research and read up on the projects they&#8217;re working on. Most projects have awful documentation, but if they have it at all, it will probably mention in there what something like <acronym title="Really Simple Syndication">RSS</acronym> is.
</p>
<p>
On the other hand, nobody can know everything about everything. Technology moves quickly (especially when dealing with the Internet), so it&#8217;s understandable to be behind in a given area. A better way to handle this issue might be to suggest that perhaps <strong>the page could provide more information about what was misunderstood</strong> so that if others come across the same page, they&#8217;d understand too.
</p>
</li>
<li>
<h3>Assuming the software is buggy</h3>
<p>
A friend told me about a bug he received recently. A <acronym title="Quality Assurance">QA</acronym> person had tried three different features in the software that were supposed to display images. None of them worked, so <strong>three different bugs were filed</strong>. Thing is&#8230; those three areas of the software worked fine. It was the image that was broken. This person just assumed the software was buggy.
</p>
<h4>How to avoid this</h4>
<p>
When something is not behaving as expected, <strong>all reasonable checks should be made before branching out and getting others involved.</strong> Sometimes it&#8217;s as low-level as checking the Internet connection, and other times (as in the example above), it&#8217;s seeing if something works in other software. Pulling the image up in a browser or editor would have shown that the image was broken. Instead, everyone&#8217;s time was wasted.
</p>
</li>
<li>
<h3>Omitting necessary information</h3>
<p>
I very recently received this email:
</p>
<blockquote><p>Hi Matt there is Javascript errors on Devtool editor and preview pages. Do you want me to file a bug for them in one bug or are you already fixing (have fixed ) them?</p>
</blockquote>
<p>
This email was next to useless. First off, I don&#8217;t know <strong>what environment</strong> these errors were found in. Typically at work we&#8217;ve got a handful of environments, sometimes up to five or six, and almost always I don&#8217;t know when they were last updated. All <strong>I</strong> know at any given time is about <strong>my</strong> development box, which I doubt people test on.
</p>
<p>
Secondly, <strong>what browser and operating system</strong> were these errors found on? This is <strong>critical</strong> in a world where browsers behave so differently.
</p>
<p>
Lastly, <strong>what were the actual errors</strong> and (probably more importantly) <strong>how did you produce these errors?</strong> Sometimes it&#8217;s very obvious. Load up a program or hit a webpage and the same error pops up for everyone on every operating system or every browser. Sometimes. But not usually.
</p>
<p>
My all-time <strong>least</strong> favorite among the &#8220;not enough info&#8221; issues are the bugs that say something like, &#8220;looks funky&#8221; or &#8220;is broken&#8221;. I know what I think is funny. I don&#8217;t know what <strong>you</strong> think is funny. It&#8217;s ambiguous. If someone says, &#8220;it&#8217;s blue but it&#8217;s supposed to be red,&#8221; then I understand perfectly. Otherwise, there are blanks that need to be filled in, and a failure in communication has occurred.
</p>
<h4>How to avoid this</h4>
<p>
In short: <strong>I&#8217;m the developer. Need the info.</strong>
</p>
<p>
All that really has to be done is to answer each of the questions above. I&#8217;d love to know about errors if there are any, but I <strong>must</strong> have the bare essentials of information about them, and usually the more information the better. Help me help you.
</p>
</li>
<li>
<h3>Not knowing the specifications</h3>
<p>
Long ago, I lost track of how many bugs I&#8217;ve closed with a comment along the lines of, <strong>&#8220;This is by design.&#8221;</strong> Sure, sometimes nobody knows how the hell something is supposed to work, but if you&#8217;re doing it right there is documentation that answers these questions. It&#8217;s especially frustrating because the software is behaving <strong>exactly</strong> as intended and a bug is filed that (unknowingly to the creator) basically is saying, &#8220;Everything&#8217;s good, but I&#8217;m not aware of that.&#8221;
</p>
<h4>How to avoid this</h4>
<p>
Read the documentation. Know how it&#8217;s supposed to work. Don&#8217;t assume it&#8217;s broken. If all else fails, <strong>ask before filing a bug</strong>.
</p>
</li>
<li>
<h3>Over-filing bugs</h3>
<p>
I&#8217;m primarily a front-end guy, so I get a lot of design tweak bugs. Sometimes a character is missing, sometimes a border is too thick, sometimes a font is one point too large… These tiny issues often take mere seconds to fix. What takes longer is managing <strong>each</strong> of the bugs created for these issues.
</p>
<p>
A site I was working on a while back had a list that looked something like this:
</p>
<ul>
<li>Upgrade users</li>
<li>Truncate users</li>
<li>View users</li>
<li>Mass edit users</li>
<li>Import users</li>
</ul>
<p>
For each bullet point in this list, I was assigned a bug whose summary was something like, &#8220;Add a period to the end of &#8216;Upgrade users&#8217;&#8221;. That&#8217;s five bugs for five <strong>really</strong> easy fixes. What a waste of everyone&#8217;s time!
</p>
<h4>How to avoid this</h4>
<p>
Bugs happen. Tickets for these bugs need to be filed. Usually they are unrelated and separate tickets are not just good, but necessary. However, knowing when to create fifteen bugs and when to create just one is very important to know in order to be efficient. Sometimes it&#8217;s best to think about the issues at hand and consider if they&#8217;re similar enough to be filed together.
</p>
<p>
Another cause of over-filed bugs are <strong>duplicate bugs</strong>. This one&#8217;s easy, folks; just search for similar bugs before filing.
</p>
</li>
</ol>
<p>
<em><strong>Note:</strong> I certainly hope this article hasn&#8217;t offended any kind <acronym title="Quality Assurance">QA</acronym> folk. When they&#8217;re good at their job, they make my job <strong>way</strong> easier. Let&#8217;s hear it for <acronym title="Quality Assurance">QA</acronym>!</em>
</p>
<p>
(Special thanks to <a href="http://foohack.com/">Isaac Schlueter</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/5-ways-qa-ruin-developers-lives/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Interview Questions Part 1: PHP</title>
		<link>http://scriptnode.com/article/interview-questions-part-1-php/</link>
		<comments>http://scriptnode.com/article/interview-questions-part-1-php/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 09:08:04 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[questions]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=39</guid>
		<description><![CDATA[
I interview a lot of people. Sometimes for a specific task, and sometimes just because we need more engineering power. In the latter case, it&#8217;s
usually enough to be a good, experienced engineer in almost any language. But usually we&#8217;re hiring for a job heavy on one language or another, and it&#8217;s my job
to find out [...]]]></description>
			<content:encoded><![CDATA[<p>
I interview a lot of people. Sometimes for a specific task, and sometimes just because we need more engineering power. In the latter case, it&#8217;s<br />
usually enough to be a good, experienced engineer in almost any language. But usually we&#8217;re hiring for a job heavy on one language or another, and it&#8217;s my job<br />
to find out if the candidate is fluent.
</p>
<p>
This is the first part of many articles I&#8217;m going to write about common interview questions in the vague and mysterious world of web development.<br />
There are of course an almost infinite amount of questions one <strong>could</strong> be asked during an interview, but my questions are typically going to be<br />
more about syntax and semantics than the probably more revealing questions on algorithms and problem-solving.
</p>
<p>
Without further ado, here are some common questions engineers get asked to see if they understand the basic syntax of <a href="http://php.net/">PHP</a>.
</p>
<ul>
<li><a href="#q-1">What are the differences between single and double quotes?</a></li>
<li><a href="#q-2">What are the differences between <code>include()</code> and <code>require()</code>?</a></li>
<li><a href="#q-3">What does the <code>===</code> operator do?</a></li>
<li><a href="#q-4">What does <code>$$</code> signify?</a></li>
<li><a href="#q-5">What are the various ways to append to an index array?</a></li>
<li><a href="#q-6">How do you debug in PHP?</a></li>
<li><a href="#q-7">Create a class and extend it.</a></li>
</ul>
<p><a name="q-1"></a></p>
<h3><abbr title="Question">Q</abbr>: What are the differences between single and double quotes?</h3>
<p>
<strong><abbr title="Answer">A</abbr>:</strong><br />
The primary difference is that a string enclosed with double quotes is parsed. A string enclosed in single quotes is just a string literal.
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
var $foo = &#8216;bar&#8217;;</p>
<p>echo &#8216;The value of foo is: $foo&#8217;; // The value of foo is: $foo<br />
echo &#8220;The value of foo is: $foo&#8221;; // The value of foo is: bar<br />
</textarea></p>
<p><a name="q-2"></a></p>
<h3><abbr title="Question">Q</abbr>: What are the differences between <code>include()</code> and <code>require()</code>?</h3>
<p>
<strong><abbr title="Answer">A</abbr>:</strong><br />
The most prominent difference is that <code>require()</code> will throw an error if it fails to include the given file, and <code>include()</code> will not.
</p>
<p><a name="q-3"></a></p>
<h3><abbr title="Question">Q</abbr>: What does the <code>===</code> operator do?</h3>
<p>
<strong><abbr title="Answer">A</abbr>:</strong><br />
Triple equals checks for both value and type:
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
$foo = &#8216;bar&#8217;;<br />
$pos = strpos($foo, &#8216;b&#8217;);</p>
<p>if ($pos) {} // false: 0 is a falsy value<br />
if ($pos !== false) {} // true: 0 is not of the same type as false<br />
</textarea></p>
<p>
I like to ask if the engineer can think of an example (like the one above).<br />
It&#8217;s almost guaranteed that a programmer that has been developing in PHP for an extended period needed <code>===</code> before.
</p>
<p><a name="q-4"></a></p>
<h3><abbr title="Question">Q</abbr>: What does <code>$$</code> signify?</h3>
<p>
<strong><abbr title="Answer">A</abbr>:</strong><br />
Double dollar sign signifies a variable variable:
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
$color = &#8216;red&#8217;;<br />
$red = &#8216;#ff0000&#8242;;</p>
<p>echo $color; // red<br />
echo $$color; // #ff0000<br />
</textarea></p>
<p><a name="q-5"></a></p>
<h3><abbr title="Question">Q</abbr>: What are the various ways to append to an index array?</h3>
<p>
<strong><abbr title="Answer">A</abbr>:</strong><br />
[see code]
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
$my_array = array(1, 2, 3);</p>
<p>$my_array[] = 4;<br />
array_push($my_array, 5, 6);</p>
<p>$my_array[count($my_array)] = 7; // This is possible but dumb<br />
</textarea></p>
<p>
I like this question because it&#8217;s easy on the surface, and engineers will almost always get the first two. When I say there&#8217;s one more way, an engineer&#8217;s<br />
response is usually pretty revealing. Getting an answer like, &#8220;No there&#8217;s not,&#8221; shows (unearned) arrogance.<br />
Candidates that figure it out on their own show thinking on their feet.
</p>
<p><a name="q-6"></a></p>
<h3><abbr title="Question">Q</abbr>: How do you debug in PHP?</h3>
<p>
I think it&#8217;s probably most common for developers to use the quick-and-dirty <code>echo</code> statement. A better practice is to use <code>error_log</code><br />
or an external debugging library, because they won&#8217;t muck up the page and potentially cause other bugs.
</p>
<p><a name="q-7"></a></p>
<h3><abbr title="Question">Q</abbr>: Create a class and extend it.</h3>
<p>
Not really a question, but still important.<br />
I also ask about constructors and deconstructors, and make sure the candidate knows how to call the extended class&#8217;s constructor:
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
class Foo {<br />
	function __construct() {}<br />
	private function privateMethod() {}<br />
	public function publicMethod() {}<br />
}</p>
<p>class Bar extends Foo {<br />
	function __construct() {<br />
		parent::__construct();<br />
	}<br />
}<br />
</textarea></p>
<p>
I also like to ask if <code>public</code> is required (it&#8217;s not because it&#8217;s the default state), and make sure that the engineer knows about <code>protected</code><br />
as well.<br />
I like to have conversations about object-oriented programming rather than just asking syntax questions, because I&#8217;ve found it&#8217;s easier.
</p>
<p>
That&#8217;s it, really. These questions are just to see if an engineer is familiar with the surface of the language.<br />
It could be argued that PHP is simple and quick to learn, and that these questions would shine a positive light on someone who spent a few hours reading about<br />
PHP, and a negative light on experienced engineers who are fantastic but not very familiar with PHP.<br />
It&#8217;s a valid argument, but again, this is just to test PHP knowledge.
</p>
<p>
If you know any questions similar to these, I&#8217;d love to hear about them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/interview-questions-part-1-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
