SSH Key Forwarding & Sudo

Lately I’ve been really liking using SSH Key Forwarding to let a server I’m SSH’d into authorize against my key. Most of the time it is so I can pull private git repositories on a server. The problem is when I use sudo I lose my current environment variables. Thanks to ServerFault, I found a great work-around where sudo can forward the SSH_AUTH_SOCK environment variable. You can do this by using visudo to add the following line:

Defaults    env_keep+=SSH_AUTH_SOCK
Posted in Programming

Tech Interviews & Softball Questions

While it seems every few months the topic of the interview process goes around the community, and I think the general consensus is most of the time it is ineffective. At DDM, there has been a lot of thought put into our interview process, and so over the next few weeks I hope to share some ideas we’ve had.

The Status-Quo: Grill the Candidate

Traditionally, when you think of interview questions, you think of hard questions to “weed out the weak” and then you’ll find the best. However, I think this only leads to finding people who interview really well, which isn’t their job as a developer. I know many excellent developers who are poor at interviewing but are great at their profession.

The goal isn’t to have a trial by fire to find the very best. The goal is to accurately understand the current strengths and future potential of a candidate. As an interviewer, it is in my best interest to help the candidate be less nervous instead of making them more nervous. I want to get a feel for the real person.

The simple fact is nerves only obscure your understanding of the candidate’s knowledge, skills, abilities, and personality.

One of the best ways I’ve found to help a candidate get less nervous is using what I call “softball questions.”

Softball Questions

A softball question is something that a candidate should be able to easily answer. Some examples of some PHP softball questions would be:

  • “What is the open tag for PHP?”
  • “What is the difference between single quotes and double quotes in PHP?”
  • “What is the difference between including and requiring a file in PHP?”
  • “Name a web server that can be used with PHP?”

Anyone who has ever used PHP and feels confident in getting paid to do so should be able to answer these questions.

“But if they are so easy? Why would you want to ask them? They are so easy and obvious.”

The answer is simple: I want them to warm up and feel “Hey, I’m getting these right. I can do this.” I want them to feel more relaxed and disarm their nervousness as best as possible. I want their mind to be in mode of retrieving programming knowledge and thinking about programming. So easier questions like this that are second-nature to answer help get them in this mode. It’s like a baseball player going in and warming up on some slower pitched balls before taking on a fastball or curve ball.

Softball questions also serve another purpose: they are a great & quick “bull crap” assessment. You will have people who get them wrong and struggle with them. You’ll quickly realize “seven years of PHP experience” to them was seven years of installing other people’s plugins on WordPress. If a baseball player can’t hit a single slow-pitch ball, then that is an indicator they’ve never really swung a bat before.

I don’t spent more than three to five minutes on these softball questions. If the candidate is good, they should be able to easily answer them, hopefully they are feeling a little less nervous. I can feel safe in moving to more of a “discussion” because I know they aren’t completely pulling BSing me.

If they struggle with them, I can know “Hey, they aren’t for this position” and change the interview into a teaching opportunity. In no way should I make them feel dumb or less adequate. We’re all learning, and I’ve had candidates reach out to me months later thanking me for showing them good resources and ways to improve.

Following Up the Softball Questions

After you spend a few minutes on your softball questions, start introducing more in-depth or difficult questions:

  • “Explain to me what autoloading is in PHP? Why is it useful?”
  • “What is the SPL in PHP?”
  • “What are some “magic methods” for PHP’s classes?”

Ultimately the goal is to work the interview into more of a conversation about technology, reviewing code examples, writing code on the board, etc. Hopefully the softball questions can help them warm up so they do better.

Advice on Softball Questions

There are a few thing that will help make your softball questions effective & help your interviewing process.

  • Write them down beforehand – It can actually be hard to come up with these on the fly, so writing them down before hand can save you precious time in your interview.
  • Careful asking too easy questions to senior candidates – If you have a candidate which you already know is skilled (you know their previous company, you’ve seen their code, etc), you can adjust the difficulty of your softball questions so they are still easy for the candidate to answer, but don’t give the wrong impressions. Candidates will be evaluating your company as much as you’re evaluating them, so if they think “Wow, these guys are amateurs” then that is not in your favor.
  • Short to ask, short to answer – You want to try and cover several questions in a short period of time, so questions that don’t require a lot of setup or explanation are better
  • 5 Minutes max – Don’t spend a lot of your time on these questions, your time with your candidate is valuable since you’ll need to make a decision after this interview.

Conclusion

Softball questions are a great way to warm up your candidate to help them stop focusing on the fact they are interviewing. You don’t want to pass on an excellent developer because they were nervous and had it cloud their interview. A bad developer who isn’t nervous still can’t BS through good interview practices. So it is in your best interest to help your candidates be relaxed and natural as possible.

Posted in Technology

Vagrant Alias to Make Life Easy: vurp

I’ve been using Vagrant on a daily basis for over a year now, and there is one common issue I run into: Sometimes VirtualBox’s network will hang and I need to force shutdown & re-up the instance. If you use NFS on Mac, this will also require some administrator privileges half the way through the process.

So what did I do? I made an alias for my terminal. In my ~/.bash_profile file I added this line:

alias vurp="sudo -v ; vagrant halt -f ; vagrant up"

What that does is it first prompts me to refresh my sudo password at the very beginning, then force halts the vagrant instance, then ups it again.

It’d be nice if I didn’t have to do this, but hey, it only happens once and awhile.

Posted in General

Restarting VirtualBox on Mavericks

Occasionally when rebooting my machine, VirtualBox would fail to start up correctly. They changed the command to restart it once moving to OS X Mavericks, so I’m just recording here the new command:

sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

I made a command in my local ~/bin/ directly called ~/bin/virtualbox_restart so I could easily restart if needed.

Posted in Programming

Why You Should Attend a Tech Conference

Ever since 2006 I had always wanted to go to a technology conference. I’d see titles of talks for ZendCon and think “Wow, that would be cool to learn about!” In 2009, I finally went to the Utah Open Source Conference (now called OpenWest), and I was blown away with all the stuff to learn. Then, in 2011, I shelled out my own money and flew to Chicago for PHP Tek, and it cost me around $3,000 after conference ticket, flights, hotel, & other expenses while at Chicago.

It was absolutely awesome, and I walked away extremely grateful that I went. I thought I’d list out some of my biggest take-a-ways:

One: Learning From the Talks

This is what most people think about when they attend a conference (especially for the first time), and it is one really good reason. If you attend the many different talks available, you’ll walk away with a lot of new knowledge. I remember typing down notes of all the new things to checkout after the conference. By the time I got back to work, I had some new ideas on how to solve some problems we were having. I picked up some more best practices, and I felt I had really had grown as a developer as I put to practice the things I learned.

So most people who never have attended a conference think the benefits stop there, but honestly it is only one of many.

Two: Discovery of New Technologies

You can’t know about some new technology until you first hear about it. You first need to discover that it exists, and at a conference this is absolutely one of the best ways to do this. For me personally, when I attend a talk I’ll learn more about the primary subject, but I’ll also walk away with 2 or 3 little things I didn’t know about. “What was that presenter using to have all those cool git command helpers in his CLI? Bash-it? Cool!” “So we’re going to look at performance increases using a tool called xhprof? Wow, I didn’t know that existed!” “I’ve been using XYZ library to interact with Redis, but this new library looks much better!”

Its not only in the talks, it is in the hallways talking with other attendees and speakers. It is at the socials that are planned in the evenings after talks. Its over dinner with a group of people you just met and are shooting the breeze about technology.

Without fail, every time I speak at or attend a conference, I walk away with some more tools for my “programming tool belt.”

Three: Rubbing Shoulders with Giants

Typically at a conference (especially smaller ones) you have a chance to talk with the people who are speaking & giving talks. I remember meeting several people at PHP|Tek 2011 who I’d read dozens of their blog posts, used their open source libraries, and really respected them.

But what stuck out to me was this: they’re just normal people. Yeah, they are smart and typically have done some pretty cool stuff. But they are just nice, normal people like me. I remember going to IHOP with several speakers and “community giants” and getting to know them outside of just technology, and it was a lot of fun. So if I wanted to work on a pull request for one of their libraries, I could feel a little more confident knowing that I’d met them before, and could remove a little bit of the “star strucked-ness” that I originally felt.

Once you realize that these people are just normal Joes, it makes doing what they do a lot more approachable. It makes you think “Hey, why couldn’t I try and do more of what they do?” Next time I write some code, I’ll open source the libraries to see if they are helpful to others. When I have a bug or problem, I’ll blog about my solutions. The reality of the matter is there is nothing stopping any of us from going out and trying to accomplish something and make our industry better. I remember walking away with a strong impression of “Hey, I can really go out and do what I set my mind to do.”

Four: Making Connections with Others

By far, the best and most important aspect of a conference is meeting new people and making connections. I have my great job at DDM because at PHP|Tek 2011 I met a handful of their developers. Through that connection, a year later they had a position open up that was a great fit and had me interview. I can guarantee I wouldn’t have applied for the job because I doubt I would have heard of the open position. The professional connections are near invaluable that you can make at a conference.

Even better than the professional level, you will also make friends on a personal level. Between conferences and user groups, I’ve met so many great people and have made many friends. When I go to another conference, I know that I’ll run into some friends from before, as well as know I’ll make some more.

Pick a Conference & Make a Plan to Go

The great thing now, especially with the PHP conference, is there are so many regional and local conferences to attend that are a lot less expensive than some of the bigger ones. So find a regional conference that is an affordable price, make plans, and go! I know with PHP|Tek, every year I said “Hey, I want to go, I guess I’ll wait another year…” It wasn’t until I sat down and said “Okay, I’m going, so what do I need to budget so I can go next year.”

I know many people follow me are in Utah, and we’re in luck that this year we’re having the first SkiPHP conference. In full disclosure, I’m one of the organizers, so excuse the shameless plug. Early bird registration ends Oct 15th (TOMORROW!), and its only $129. If you live in Utah, $129 is a lot less then the $3,000 I paid to travel to my first PHP Conference. So if you want to get your “feet wet” so to speak, its a great one to try out.

Hopefully in the near future we’ll have the chance to run into each other at a conference!

Tagged with: ,
Posted in General, Technology

Vagrant, VirtualBox, & Guest Additions

If you use Vagrant & VirtualBox often, its important to to keep your Guest Additions up-to-date. Occasionally you’ll run into weird network or shared folers bugs, and it is important to rule out the guest additions as the problem. The most simple way it to use the vagrant plugin vagrant-vbguest. If you’re on Vagrant 1.1 or higher, you can simple use the follow command:

vagrant plugin install vagrant-vbguest
Posted in General

Ubuntu 12.04, PHP 5.4, Apache2, and ppa:ondrej/php5

Okay, wow, what a doozy. I guess this is a lesson in why you want to be careful of the PPAs you use on your Ubuntu servers.

Summary

The very popular ppa:ondrej/php5, a Personal Package Archive for Ubuntu 12.04, upgraded from PHP 5.4 to PHP 5.5. This would require a newer version of Apache (v 2.4). If you upgraded Apache from 2.2 to 2.4, you would likely run into apache configuration issues.

If you want to continue to run PHP 5.4 instead of PHP 5.5, you can use the new PPA: ppa:ondrej/php5-oldstable

Problem

Of course it took me awhile to track down this issue because multiple things had changed on me, but yesterday my Vagrant project stopped working. When I would do a vagrant destroy and then a vagrant up I would get an error trying to install libapache2-mod-php5:


The following packages have unmet dependencies:
 libapache2-mod-php5 : Depends: apache2-api-20120211 but it is not installable
                       PreDepends: apache2 (>= 2.4)

So I checked out the PPA's page: https://launchpad.net/~ondrej/+archive/php5

I noticed it had a newer description. It took me awhile to realize it mentioned an older, more stable version. I scrolled down to see what version of php5 it had:


5.5.1+dfsg-1~precise+1

It had been updated on 2013-07-30, yesterday. So now my vagrant projects that used this PPA to install PHP 5.4 was installing PHP 5.5, it would cause libapache2-mod-php5 to break, which would cause all of my other packages and services to fail due to this dependency.

Solution

PHP 5.4

If you want to stay on PHP 5.4, you need to use the PPA ppa:ondrej/php5-oldstable.

PHP 5.5

You'll need to add the ppa:ondrej/apache2 as well to install Apache 2.4. Be warned, you might have stuff that chokes on Apache 2.4, so just be aware of that.

Final Thoughts

If you Google for "Ubuntu 12.04 PHP 5.4", you will get dozens of results saying to use ppa:ondrej/php5. However, now because you need a newer version of Apache, you'll likely get a lot of people with failed installs. This is going to be even worse if people do an aptitude upgrade and don't pay attention.

So if you know people who use Ubuntu 12.04 LTS and PHP 5.4, make sure they realize about the PPA update.

Tagged with: , , , , ,
Posted in Technology

The Power of “You Are Awesome”

I received a very nice email today from Elizabeth Naramore, someone who I’ve met through the PHP community. In it she made a simple statement:

“You are awesome.”

Now, I don’t know how much I deserved this email. The other people on the recipient list I’m guessing have had to go through many more trials than I have, but I’m very appreciative never the less. It got me thinking about the power this statement can have, and how this type of positive & sincere compliment can have a profound affect on people.

A Personal Story

This is likely going to be an overshare, but I thought I’d relate a personal experience. Growing up, with family & personal stuff going on, when I entered Jr. High I pretty much had no self-confidence. I remember calling in “sick” when I was suppose to get a music award for a song I had wrote. The thought of standing in front of the entire student body, receiving an award for something I thought nerdy, terrified me.

Through Jr. High and High school, my confidence didn’t much improve. I would find certain things I’d feel confident in: Swimming, Lifeguarding, Music. But by default I always felt awkward and unsure of myself. Many people during my life (parents, teachers, relatives, etc.) would tell that I was awesome, but I didn’t feel like I was awesome. I guess it was taking a long time to sink in, and I didn’t always believe them. It didn’t help that the typical Jr. High and High School experience has a way of wearing down your confidence instead of building it up.

When I turned 19, I moved to Torreon, Mexico to serve as an LDS Missionary for 2 years. It was an amazing yet terrifying experience. I remember frantically trying to learn the language, and felt so self-conscious when I tried to speak Spanish. Looking back now, I can see how certain critiques and comments would sink so much deeper in me than should have. I couldn’t even joke around with my fellow missionaries without wondering if they were just putting up with me. I’d second guess myself over everything. I just lacked a trust and confidence in myself.

However, during the second year of my mission, something changed. I was assigned to work in the “Mission Office”, which basically was the operations hub for the 200 missionaries across three states in Mexico. Our Mission President, President Alexander, had me work on keeping track of all the records & reports for our mission. He was like a boss & a mentor for the missionaries. Whenever I would meet with him, he never failed to say something along the lines of “You are awesome.”

While I started keeping records, I realized I could organize the data in excel for all sorts of awesome reports. We could visualize how things were going so much better. President Alexander would never hesitate to give very sincere compliments. It started to sink in. Here I was doing something I love, helping people, and my boss was telling me I was doing an awesome job. My confidence not just in my skills with a computer, but a confidence in myself, started to grow. Before my default setting was not confident, but now it was shifting to default of confident. I started to really believe in myself.

When I returned home from my mission, I took this new found confidence and started school and work. I had the fortune to have bosses, co-workers, etc. who were honest but sincere in their compliments. “Great job on this.” “I really appreciate how quickly you turned this around.” It wasn’t like I was this amazing employee. They would always let me know in a helpful way when I had messed up, and how to do better in the future.

But these words of “You are Awesome” really had a profound effect on my life. It was building my confidence in me on the inside. It gave me confidence to go out and teach myself programming. To go out and work for a start up. To try and start giving presentations at user groups and conferences.

I cannot, nor do I want to try and imagine what my life would have been like without those people who help build up my confidence. I know I wouldn’t be nearly as happy in my life as I am now.

Your Turn

So what do we do know?

It is our job, to honestly and sincerely, let people know how awesome they are. As human beings, we need to hear these things. We are social beings who grow and flourish from positive communication like this.

So tell the people who are in your life, whether it is work, family, friends, etc. how awesome they are. Help them know why they are awesome so they can have confidence in their awesomeness.

So to wrap it up, and to practice what I preach: Elizabeth Naramore, you deserve to know how awesome you are. :) Though we’ve only met once before at a conference, it was easy to see how you’re awesome. You have a real talent for connecting with people and honestly caring about their happiness. You want people to feel included in a community, and you would want nothing better than for us to be once giant happy tech community. I think you’re doing a pretty darn good job at helping us get there.

Thanks.

Tagged with: , ,
Posted in General

Lunch & Responsive Web Workshop

At Deseret Digital Media (DDM), we were looking to bring in a Responsive Web Design expert to do some training with our team. However, if we were going to go to the expense of flying in someone to do a workshop with our team, we figured other people would benefit from it at as well.

So DDM is hosting a Responsive Web Workshop & Lunch on Monday, July 29, 2013 from 12:00 PM to 5:00 PM. We have invited Ben Callahan to run the workshop. He is the President of Sparkbox and the founder of the Build Responsively Workshop.

The cost is $25 for lunch & the workshop, which is pretty inexpensive since a tutorial day at a large conference can cost about $300. The $25 is just to cover the cost of lunch and the venue. We’re hoping to have a lot of success with this workshop so we can experiment with more and large events to host.

So come join us & register for Lunch & Responsive Web Workshop on July 29th, 2013. I have no idea how long tickets will be available, so I’d grab one soon if you were interested.

Thanks!

Registration Link: http://ddmrwd.eventbrite.com/

Posted in General

Favorite IT Crowd Episode: The Internet

I posted this back in 2009, but that video on YouTube is no longer working. So I figure I’d repost it since it is such a funny episode. The IT Crowd was one of my favorite TV shows. It’s about two guys from IT Support, and their manager who doesn’t know anything about IT.

Then, later in the show, here are the results of their little prank:

Enjoy.

Tagged with: , ,
Posted in Technology