Thursday, November 21, 2013

Batch PerlTidy a bunch of files all at once.

I've been doing a bit of perl development lately and do some tidying of the code before I commit my change set. To help with this process I came up with some short BASH one-liners:

Tidy all the perl files you have changed in a git branch:

>> git diff --name-only origin/master | egrep "\.pl$|\.pm$|\.t$" |  while read file; do echo "Tidying: $file"; perltidy -b $file; test -e "$file.bak" && { echo "Deleting $file.bak"; unlink "$file.bak"; } done;

Tidy all the perl file in a given directory:

>> find . -iname '*.pl' -iname '*.pm' -iname '*.t' |  while read file; 
do echo "Tidying: $file"; perltidy -b $file; test -e "$file.bak" && 
{ echo "Deleting $file.bak"; unlink "$file.bak"; } done;

Wednesday, November 20, 2013

All the things a frontend developer should be able to talk about during an interview.

Some of you all know I am a manager with cPanel, Inc.  As part of that job, I have been building the front-end development team for the company for the last three years.

A big part of that responsibility is to look for high quality candidates.  I though I would put together a list of some of the skills/question that I consider critical to being a front-end developer with cPanel or really any high end developer shop.

Its surprising how many people apply for a front-end developer job without being able to demonstrate these skills.

Basic JavaScript:

How do you define a scalar variable?
How do you define an array?
How do you define a structure?
How to write a function?
What types of loops are available and how to write them?
How to break out of a loop or skip the current item?
What types of conditional are available in the language?
What Type System is available in JavaScript and how do you determine a variables type?
What are the Scope Rules for JavaScript?
What is the difference between == and ===?

Advanced JavaScript:

How do you define a name-space in JavaScript?
What is AJAX and describe in detail how it works?
What is a Closures and how do you make one?
How does JavaScript implement Prototypical Inheritance?
What is the new keyword used for?
What is Variable Hoisting?
How do you Debugging JavaScript?
Why are global variables and functions bad?
What are some important DOM events you can attach to?
How do you detect when the page is completely loaded?
How can you load images dynamically using JavaScript?

JavaScript Libraries and Tools:

What is JQuery?
What is YUI?
What is NodeJS?
What is RequireJS?
What is AngularJS?
What is Backbone?
What is Ember?
Others?

You should be able to describe some of the basic differences and uses for each of the above libraries.

CSS:

How do you write a CSS rule?
How do you center a block with CSS1?
What is float used for?
What is the difference between block and inline elements?
What are CSS Selectors? Describe some common one.
How do you specific a selector for the second span?  
    <div>
        <span>x</span>
        <span data-special="y">y</span>
        <span data-special="x">x</span>
        <span>z</span>
    </div>
What is the CSS Cascade? Describe how it works.
What is Selector Specificity?
Describe the CSS Box Model (Including how css3 effects it)
How do CSS3 Animations work?
Why !important is bad?
What are LESS and SASS? How are they related to CSS?
How do you make your CSS work for desktop browsers, tables and phones?
How do you make CSS work across different browsers? (IE, Firefox, Chrome, Safari, ...)

GIT:

What is source control for?
Basics of how to use it.
How to add files to GIT?
How to remove files from GIT?
How to resolve merge conflicts?
How to create a branch?

HTTP/HTTPS:

Be able to describe how HTTP and HTTPS work.
What does a Request/Response looks like for basic exchanges with the server? (GET vs POST)
What is a REST API?
What role does DNS play in this system?

Programming:

What are Patterns? Identify 3 and describe them in detail.
How do you make a stack our of an array?
What is a linked list and what is it used for?
How do you identify performance problems in your code?
How do you decide what to optimize in your code?
What should comments be used for in code?
How do you select variable names?
What is recursion and demonstrate an example of it?
Why would you use or not use recursion?
What is functional programming?
What is object oriented programming?
Describe the difference between a Dynamic language and Functional language?
What is polymorphism? When should you use it? When should you not?


That is quite a long list, but frontend development on the web platform is a complex and diverse skill area.  It takes lots of skills to be able to work successfully as frontend developer in any environment. This is just a sampling of the types of questions you may expect from interviews at my company, but if you can answer a good majority of these and can demonstrate this knowledge in code, I know I would like to talk with you about joining our team.
Starting up a new blog for my adventures in code and development leadership.