10 Questions I Ask Every      Developer        (and the answers)
Interviewed 175+ candidates.   Responsible for hiring 45+.
I’ve found some amazing people.
I’ve also made mistakes. Lots of them.
Not the developersyou’re looking for.
1. Does the candidate “get” the   platform?2. How much does he/she already know   about building on WordPress?3. Does the ...
There’s not always one right answer.... But there are better and worse answers.... And there are some very wrong answers.....
Part 1: Honestly, now, do you “Wordpress”?
Question #1Tell me what a “hook” is, and talk  about the two basic hooks in WordPress, and the difference         between ...
Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.A ki...
Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them. A w...
Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.    ...
Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.    ...
Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them. Act...
Question #1  Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.Fi...
Question #2Explain what a “taxonomy” is.
Question #2           Explain what a “taxonomy” is.A way to preserve unused (dead) code.              wrong answer
Question #2                    Explain what a “taxonomy” is.The various types of content in WordPress: posts, pages,      ...
Question #2               Explain what a “taxonomy” is.A taxonomy is a way to group things together.
Question #2              Explain what a “taxonomy” is.WordPress posts have two default taxonomies:           categories an...
Question #2                  Explain what a “taxonomy” is.Bonus - a couple of lesser known default taxonomies.            ...
Question #3Let’s say you see “wp_list_filter()”  for the first time. How do you     figure out what this does?
Question #3Let’s say you see “wp_list_pluck()” for the first time. How do you figure out what this does?                    ...
Question #3Let’s say you see “wp_list_pluck()” for the first time. How do you figure out what this does?                    ...
Question #3Let’s say you see “wp_list_pluck()” for the first time. How do you figure out what this does?        It’s open so...
Part 2: So... you think you’re good at this.
Question #4  Explain what sanitizing andvalidating data means, and apply       that to WordPress.
Question #4         Explain what sanitizing and validating data means, and apply that to WordPress.Checking database integ...
Question #4     Explain what sanitizing and validating data means, and apply that to WordPress.Testing data to make sure i...
Question #4          Explain what sanitizing and validating data means, and apply that to WordPress.Untrusted data comes f...
Question #4         Explain what sanitizing and validating data means, and apply that to WordPress.WordPress includes a la...
Question #4     Explain what sanitizing and validating data means, and apply that to WordPress.   Examples of validation /...
Question #5 Say a client needs to selectively  exclude posts from their bloghome. Specifically, how would you           ach...
Question #5  Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that...
Question #5  Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that...
Question #5  Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that...
Question #5Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that?T...
Question #5  Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that...
Question #5  Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that...
Question #6Tell me about your favorite  function in WordPress.
Question #6            Tell me about your favorite function / class / API in WordPress.  media_sideload_image($file,	  $po...
Question #6           Tell me about your favorite function / class / API in WordPress.           human_time_diff(	  $from,...
Question #6  Tell me about your favorite function / class / API in WordPress.  wp_list_pluck(	  $list,	  $field	  );Pluck ...
Question #6          Tell me about your favorite function / class / API in WordPress._doing_it_wrong(	  $function,	  $mess...
Question #7 Say you needed to retrieve somedata from a remote source once a  day. Tell me about some of the    WordPress A...
Question #7 Say you needed to retrieve some data from a remote source once a day. Tell me about some of the WordPress     ...
Question #7 Say you needed to retrieve some data from a remote source once a day. Tell me about some of the WordPress     ...
Question #7  Say you needed to retrieve some data from a remote source once a day. Tell me about some of the WordPress    ...
Part 3: So you can code. But can you think?
Question #8 Tell me what you the mostinteresting trend or “thing to   watch” in our space is.
Question #8         Tell me what you the most interesting trend or “thing to watch” in our space is. Mobile first & the evo...
Question #8           Tell me what you the most interesting trend or “thing to watch” in our space is. HiDPI (“retina”). W...
Question #8         Tell me what you the most interesting trend or “thing to watch” in our space is.Meaningful social medi...
Question #8          Tell me what you the most interesting trend or “thing to watch” in our space is.Explosion of devices....
Question #8     Tell me what you the most interesting trend or “thing to watch” in our space is.Typography. Foundries are ...
Question #9  What frustrates you aboutWordPress? What’s something that  you think needs to change?
Question #9     What frustrates you about WordPress? What’s something that you think needs to change?  Taxonomy / term arc...
Question #9       What frustrates you about WordPress? What’s something that you think needs to change?There are no formal...
Question #9     What frustrates you about WordPress? What’s something that you think needs to change?User interface for ma...
Question #9  What frustrates you about WordPress? What’s something that you think needs to change? Some areas don’t handle...
Question #10Why do you want to work day in  and out with WordPress?
Question #10             Why do you want to work day in and out with WordPress?“It’s become the dominant CMS on the web. A...
Question #10              Why do you want to work day in and out with WordPress?“It’s the only platform where customers do...
Question #10            Why do you want to work day in and out with WordPress?“Because I believe in the freedoms in open s...
Question #10Why do you want to work day in and out with WordPress?  “The community.”
10 Questions I Ask Every      Developer   @jakemgold • @10up • 10up.com
Upcoming SlideShare
Loading in...5
×

10 questions for every developer

2,995

Published on

5 Comments
3 Likes
Statistics
Notes
No Downloads
Views
Total Views
2,995
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
37
Comments
5
Likes
3
Embeds 0
No embeds

No notes for slide

10 questions for every developer

  1. 1. 10 Questions I Ask Every Developer (and the answers)
  2. 2. Interviewed 175+ candidates. Responsible for hiring 45+.
  3. 3. I’ve found some amazing people.
  4. 4. I’ve also made mistakes. Lots of them.
  5. 5. Not the developersyou’re looking for.
  6. 6. 1. Does the candidate “get” the platform?2. How much does he/she already know about building on WordPress?3. Does the candidate think critically about his/her work?
  7. 7. There’s not always one right answer.... But there are better and worse answers.... And there are some very wrong answers.... Saying “I’m not familiar with that” isbetter than making something up.
  8. 8. Part 1: Honestly, now, do you “Wordpress”?
  9. 9. Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.
  10. 10. Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.A killer feature that gets customers addicted. wrong answer
  11. 11. Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them. A way to extend WordPress. Thetwo types are plug-ins and themes. wrong answer
  12. 12. Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them. A hook is a technique used to alter or augment the behavior of software.
  13. 13. Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them. WordPress has “action” hooks and “filter” hooks.
  14. 14. Question #1Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them. Action are hooks that WordPress launches at specific intervals during execution. add_action  (  hook_name,  your_function_name,  [priority],  [accepted_args]  );
  15. 15. Question #1 Tell me what a “hook” is, and talk about the two basic hooks in WordPress, and the difference between them.Filters are functions that WordPress passes data through, at certain points in execution, just before taking some action with the data. add_filter  (  hook_name,  your_filter,  [priority],  [accepted_args]  );
  16. 16. Question #2Explain what a “taxonomy” is.
  17. 17. Question #2 Explain what a “taxonomy” is.A way to preserve unused (dead) code. wrong answer
  18. 18. Question #2 Explain what a “taxonomy” is.The various types of content in WordPress: posts, pages, media, menus, etc. wrong answer
  19. 19. Question #2 Explain what a “taxonomy” is.A taxonomy is a way to group things together.
  20. 20. Question #2 Explain what a “taxonomy” is.WordPress posts have two default taxonomies: categories and tags.
  21. 21. Question #2 Explain what a “taxonomy” is.Bonus - a couple of lesser known default taxonomies. Link Category Navigation Menu
  22. 22. Question #3Let’s say you see “wp_list_filter()” for the first time. How do you figure out what this does?
  23. 23. Question #3Let’s say you see “wp_list_pluck()” for the first time. How do you figure out what this does? not wrong... but not great
  24. 24. Question #3Let’s say you see “wp_list_pluck()” for the first time. How do you figure out what this does? not wrong... but not great
  25. 25. Question #3Let’s say you see “wp_list_pluck()” for the first time. How do you figure out what this does? It’s open source. I look at the source.
  26. 26. Part 2: So... you think you’re good at this.
  27. 27. Question #4 Explain what sanitizing andvalidating data means, and apply that to WordPress.
  28. 28. Question #4 Explain what sanitizing and validating data means, and apply that to WordPress.Checking database integrity and ensuring nothing has been corrupted. wrong answer
  29. 29. Question #4 Explain what sanitizing and validating data means, and apply that to WordPress.Testing data to make sure it’s what you expected. good layman explanation... tell me more
  30. 30. Question #4 Explain what sanitizing and validating data means, and apply that to WordPress.Untrusted data comes from many sources (users, third party sites, your own database!, ...) and all of it needs to be validated both on input and output.
  31. 31. Question #4 Explain what sanitizing and validating data means, and apply that to WordPress.WordPress includes a large number of helper functions and methods to ensure that output and input data is safe. HTML Fragments, e.g. wp_kses() Text nodes, e.g. esc_html() Attribute
  32. 32. Question #4 Explain what sanitizing and validating data means, and apply that to WordPress. Examples of validation / sanitizing helpers:HTML: wp_kses( $string, $allowed_html, $allowed_protocols ) Text nodes & attributes: esc_html( $text ) URLs: esc_url( $url, (array) $protocols ) Database: wpdb->insert( $table, (array) $data ) Filesystem: validate_file( $filename, (array) $allowed_files )
  33. 33. Question #5 Say a client needs to selectively exclude posts from their bloghome. Specifically, how would you achieve that?
  34. 34. Question #5 Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that?User approach: I would add a new category called “Exclude From Home” for the authors. not bad... but not great
  35. 35. Question #5 Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that?User approach: I would add a new custom meta box with an “Exclude from home page” checkbox. good enough answer
  36. 36. Question #5 Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that? User approach (bonus points): I would hook intopost_submitbox_misc_actions to add a checkbox to the “publish” box with an “Exclude from home” option.
  37. 37. Question #5Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that?Technical approach: Inside the loop, I would write an “if”statement checking my criteria around the post output. very wrong answer
  38. 38. Question #5 Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that?Technical approach: I would do a new post query at the top of my home.php template, excluding posts based on my criteria. wrong answer
  39. 39. Question #5 Say a client needs to selectively exclude posts from their blog home. Specifically, how would you achieve that? Technical approach: I would use pre_get_posts to hookinto the post query, check if the query is for the blog home,and alter the query to exclude posts based on my approach before it executes. function  exclude_category(  $query  )  {        if  (  $query-­‐>is_home()  &&  $query-­‐>is_main_query()  )  {                $query-­‐>set(  cat,  -­‐1,-­‐1347  );        } } add_action(  pre_get_posts,  exclude_category  );
  40. 40. Question #6Tell me about your favorite function in WordPress.
  41. 41. Question #6 Tell me about your favorite function / class / API in WordPress. media_sideload_image($file,  $post_id,  $desc);Download an image from the specified URL and attach it to a post.
  42. 42. Question #6 Tell me about your favorite function / class / API in WordPress. human_time_diff(  $from,  $to  ); Determines the difference between two timestamps.The difference is returned in a human readable format such as "1 hour", "5 mins", "2 days".
  43. 43. Question #6 Tell me about your favorite function / class / API in WordPress. wp_list_pluck(  $list,  $field  );Pluck a certain field out of each object in a list
  44. 44. Question #6 Tell me about your favorite function / class / API in WordPress._doing_it_wrong(  $function,  $message,  $version  ) Trigger a user error if WP_DEBUG is true. (technically internal only)
  45. 45. Question #7 Say you needed to retrieve somedata from a remote source once a day. Tell me about some of the WordPress APIs you’d use.
  46. 46. Question #7 Say you needed to retrieve some data from a remote source once a day. Tell me about some of the WordPress APIs you’d use.I would use wp_schedule_event() (the WP-Cron APIs) to schedule the daily update. add_action(my_hourly_event,  do_this_hourly); function  my_activation()  {   if  (  !wp_next_scheduled(  my_hourly_event  )  )  {     wp_schedule_event(  time(),  hourly,  my_hourly_event);   } } add_action(wp,  my_activation); function  do_this_hourly()  {   //  do  something  every  hour }
  47. 47. Question #7 Say you needed to retrieve some data from a remote source once a day. Tell me about some of the WordPress APIs you’d use.I would use wp_remote_post() (part of the WP HTTP API) to remotely fetch the data. $response  =  wp_remote_post(  $url,  array(   method  =>  POST,   timeout  =>  45,   redirection  =>  5,   httpversion  =>  1.0,   blocking  =>  true,   headers  =>  array(),   body  =>  array(  username  =>  bob,  password  =>  1234xyz  ),   cookies  =>  array()        ) );
  48. 48. Question #7 Say you needed to retrieve some data from a remote source once a day. Tell me about some of the WordPress APIs you’d use. Extra credit: I would use the set_transient() (theTransients API) to cache the remote data after processing it. set_transient(  processed_remote_data,  $processed_data,  60*60*24  );
  49. 49. Part 3: So you can code. But can you think?
  50. 50. Question #8 Tell me what you the mostinteresting trend or “thing to watch” in our space is.
  51. 51. Question #8 Tell me what you the most interesting trend or “thing to watch” in our space is. Mobile first & the evolution of responsive design. The idea of“progressive enhancement”, and what designing for mobile first really means. Image and advertising challenges in responsive technologies.
  52. 52. Question #8 Tell me what you the most interesting trend or “thing to watch” in our space is. HiDPI (“retina”). We still need to solve technical hurdles (e.g.image uploads in WordPress), and at some point this is goingto be a major requirements. It seems like Responsive Design circa 2009.
  53. 53. Question #8 Tell me what you the most interesting trend or “thing to watch” in our space is.Meaningful social media integration. Really innovative social media integration with content, especially within in e- commerce, is still a relatively new frontier.
  54. 54. Question #8 Tell me what you the most interesting trend or “thing to watch” in our space is.Explosion of devices. There are new challenges we haven’t fully wrapped our heads around as we have so many different screen sizes and types emerges, each with - potentially - their own browser quirks.
  55. 55. Question #8 Tell me what you the most interesting trend or “thing to watch” in our space is.Typography. Foundries are maturing, @font-face has essentially been universally adopted.
  56. 56. Question #9 What frustrates you aboutWordPress? What’s something that you think needs to change?
  57. 57. Question #9 What frustrates you about WordPress? What’s something that you think needs to change? Taxonomy / term architecture could be improved.No term meta data, strange artifacts due to way tags and categories of the same name are linked.
  58. 58. Question #9 What frustrates you about WordPress? What’s something that you think needs to change?There are no formal methods to create direct relationships between two content objects (post objects).
  59. 59. Question #9 What frustrates you about WordPress? What’s something that you think needs to change?User interface for managing widgets and menus* can be clumsy. Awkward drag and scroll.
  60. 60. Question #9 What frustrates you about WordPress? What’s something that you think needs to change? Some areas don’t handle conflicts in plug-in well -for example registering two custom menu items in the same spot.
  61. 61. Question #10Why do you want to work day in and out with WordPress?
  62. 62. Question #10 Why do you want to work day in and out with WordPress?“It’s become the dominant CMS on the web. And growing.”
  63. 63. Question #10 Why do you want to work day in and out with WordPress?“It’s the only platform where customers don’t call me back in every month asking for a retraining.”
  64. 64. Question #10 Why do you want to work day in and out with WordPress?“Because I believe in the freedoms in open source, and WordPress is an awesome open source platform.”
  65. 65. Question #10Why do you want to work day in and out with WordPress? “The community.”
  66. 66. 10 Questions I Ask Every Developer @jakemgold • @10up • 10up.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×