Like A Girl

Pushing the conversation on gender equality.

Code Like A Girl

Let’s Play 20 Questions

For about three months now, I’ve been on the hunt, the job hunt. In hopes that my blunders might allow other newbies in this space to shine, I’ve written down the questions from my interviews and provided short, sweet, nicely wrapped-up answers. Most of these topics have lengthy, deeply informed, professional responses available, but that is not my place just yet. So for now, think of this as the CliffNotes version. If one of the questions or topics sparks your interest, jump down that rabbit hole, Alice!

One: Tell me about yourself.

Loaded question alert! No, they don’t want to know about your deep obsession with corgis and your love of burritos. Tell them about your technical self. I admit that I flubbed this question once, sucking the life out of my interviewer while they lie dying on the other end of the phone listening to my ten-minute spiel about moving, and career changes, and blah blah blah. Start with the technical engineering work that you are currently engaged in, why you moved to tech, and the technology that you are geeking out over right now. There is room for your previous career experiences because they make you unique, but be sure to keep your tech-self at the forefront, and your previous background story to two to three minutes, focusing on transferable skills.

Two: What motivates you?

I know you want to say money, I haven’t had a full-time job for a few months and I live in one of the most expensive places in the United States. I understand the inclination. However, after the money factor is stripped away, what motivates you? Are you the type of person that feels compelled to do mission-driven work? Are you the type of person that nerds out on using and building innovative technologies? Are you the type of person that is motivated by high speed, high reward start-up work? Take a moment to reflect on this. Truly, what motivates you?

I thrive in environments where I am challenged and supported through a consistent feedback loop. I agonize under monotony and complacency. Mission-driven work is something that gets me out of bed in the morning and ignites my passion to surpass the status quo. I am motivated by growth, excellence, and high standards.

Now go practice your own version in the mirror. You will motivate yourself to go catch your dream job. 

Three: What are your salary expectations?

Please don’t answer this question. It’s a trap. Ladies, I’m particularly talking to you here. Let’s close that pay gap. If this question comes in the first interview, you might not want to work at that company. It potentially shows that they are more interested in getting someone in for cheap, than getting a good fit. Further, you should never give a number first, it can only hurt you. Here are three ways to deflect this question and find out the position’s salary range:

  1. I’m not ready to answer that question yet, as I do not know the full position expectations and potential perks. What salary does a person with a comparable position make at #{company_name}?
  2. I’d love to hear your range for this position first, then I would be happy to consider if it is within my range.
  3. (This is a more aggressive approach, so do your research.) I know that the market rate for this position is between $$ and $$ range. (Do your best to be sure the bottom of your “market range” is the top of their range) Is this position’s salary within the range of the market rate?

Four: What do you know about #{company_name}?

Seriously, if you didn’t research that company well enough to give an elevator pitch about them, then just walk away. You’re clearly not taking this position seriously, and you don’t actually want that job. I know this, you know this, and that recruiter for damn sure knows this. Here are the steps I suggest to take in your research.

  1. Visit the company website. Find out what their product is, who their user is, who their stakeholders are, and what their values are. Then write it down and have it available during your interview. Lead your answers knowing who and what that company cares about.
  2. Visit the company LinkedIn profile. If you have LinkedIn Premium, see what their job growth rate is, and the average tenure of their employees. This will give you an idea of quality cultural questions to ask, and if that company is currently prosperous.
  3. Visit the interviewers LinkedIn profile, Facebook profile, Twitter, Instagram, everything. Try to find a common experience that can be used to spark and grow an actual human relationship. Human beings are more likely to help you when they like you. Novel, I know.

Five: Tell me about a project you are proud of/currently working on.

An interviewer may have looked at your projects already and may ask you about a specific one. If not, then talk about the project where you employed the greatest technical prowess, creative solutions, or a tech stack that aligns with that of the company. Start by naming the project, so the interviewer can refer to it on your resume or GitHub, talk about the tech stack used, your specific contributions, challenges, how you overcame those challenges, and stretch goals. Don’t forget the stretch goals. It shows that you are not satisfied with just being “done.” You care about growth, both technically and personally.

Six: If I am on a website, and I wanted to know if they used jQuery, how could I tell?

Easy. Open the dev tools, toggle to console, and type in $(‘body’). If the response is an html body, that site is JQuery enabled. If you get an error, it is not.

Seven: If I wanted to optimize my website so that the site doesn’t need to reload an image from the Rails server every time I refresh, is that possible?

In hindsight, this was a generously leading question. He was referring to caching. For example, Rails will automagically set you up with fragment caching. This will dynamically cache components so that they are served by the web-server rather than being served by your full Rails stack. The beauty of using fragment caching is that you can cache different components based on your needs, thus the claim to dynamic caching. Further, if you decide to change the view file, those previously cached components will expire automatically, and your new components can replace them. If you’d like to learn more about caching in Rails, check out the Rails guide, and beware of updates and changes in Rails 5,

Eight: Talk to me about the new data-* attribute in HTML5.

In HTML5 there is this super cool new global data- tag that allows you to add custom data that is secret from the client view. It gives the engineer the ability to use associations, or store extra data on that element that has no need for visual representation. A few things to keep in mind, again, this data is not accessible to the client side, so if you want this information available to assistive technology, it won’t be. Let’s build an accessible web y’all. Additionally, you may be surprised to find out that data- is not supported on Internet Explorer version 10 and below. Finally, the data you add will be unavailable to crawlers, or random bootcamp students trying to scrap your website. Whomp, whomp. Otherwise, it is highly useful and easy to implement. Check out this MDN article for more info,

Nine: What is a div tag used for?

Div is short for divider, and that’s exactly what it’s used for. It’s used as a wrapper to divide and group content, other tags, components, and page sections. It can be used to group elements together and set them all to a CSS class for styling. One thing employers look for is the understanding that everything should not be a div tag. Learn the proper HTML tag to use. Your entire document should not be div tags and break tags. Cringe.

Ten: You claim to have created a responsive design website, how did you do that?

::tear:: I’ve been waiting to flex on this question for so long. Let me flex some knowledge on you Mr. Interviewer guy. Look at how flex-able this website is. Are you enjoying my flex-box puns? No. Ok.

I used flex-box, and I’m a little obsessed with it. It allows you to create CSS boxes on your page of any size based on screen percentage. You can create other little boxes inside that container box with elements and content, again size them based on the percentage of screen size, and align them any way you want. Do you struggle to get perfectly centered titles, images, buttons? No more! Also, there is a zombie game to help you learn it, so you know it’s gotta be good.

Eleven: What’s the difference between a css class and an id?

A class will be used multiple times for selecting different elements you want to have styled the same way, whereas an id is something you want to style a specific way, for only one element. An id holds more ‘value’ than a class, so the CSS styling you use will override that of a class if that element has both a class and an id. As it was explained to me, imagine an element tag is worth 1 point, a class is worth 10 points, and an id is worth 100 points. Based on that point system, you can figure out which styling will be applied to that element. Finally, there is a not-so-standard and what seems to me to be a bit hacky, !important override command that you can add to your CSS styling that will force that styling to be the most valuable. Imagine, !important, is worth 1000 points. Its use is not recommended. It’s mostly a throwback from an era long long ago, in a galaxy far far away before there was a standard for classes and ids.

Twelve: What is a javascript closure?

A closure in javascript “is the combination of a function and the lexical environment within which that function was declared (” Ok, but what does that actually mean? It means that your function has access to the variables outside of itself, aka the environment in which it exists. The beauty of this is that you do not have to pass variables directly into your function, like in Ruby. Your function has access to its environment variables. Further, you can reassign a variable as many times as you like and the function will have access to the true value of that variable, not just the value declared prior to the function call.

Thirteen: What is scope in javascript?

Scope is the environment area (aka the lexical environment) in which a function has access. You know those things that horses wear on their face sometimes that only lets them see forward? Scope is kind of like that. The scope of what that horse can see is limited, the scope of what that function has access to is limited. This is particularly important to remember when you have nested functions. The inner function’s scope includes access to variables declared in the outer functions, but not vice-versa. One way to remember this is if you think of an inner function as a child function, and the outer function as a parent function. A child is passed DNA information (variables) from its parents, grandparents, great-grandparents, etc., but a parent is not passed DNA from its child. It’s a one-way scope flow.

Fourteen: What is an API?

API stands for Application Programming Interface. Really, an API is just two servers sending messages back and forth. Many big companies provide 3rd party API’s as a service to developers. Think Google, Facebook, and Yelp. Developers may send GET or POST requests to this API’s endpoints and either receive a JSON response with specific needed data or send a POST request with some data to the API server on behalf of a client. Of course, there are more complex functionalities for API’s but that is the core of it. I write a call to you, the API end, and you respond with data or go do some action on my behalf based on what I sent you. If you are reading this post as a new developer and you’ve not yet used an API, I highly suggest you play around with the giphy API. They have novice friendly docs with the added benefit of potentially looking at corgi gifs.

Fifteen: What are HTTP headers?

HTTP headers are a way to send and receive additional information from the client to the server. These headers include a key-value pair that is sent directly after the request or the response line. Common uses are for Basic Auth and content-type. This is for sending additional information that does not belong in the body.

Sixteen: What is DNS?

DNS stands for Domain Name System. At is most basic level, it translates domain names, like (shameless plug), into an IP address. Think of DNS as a giant phone book, the domain name is like your given name, and the IP address is your street address.

Seventeen: How do your optimize a database?

This is kind of an open-ended question, so I think the answer could go many directions based on if the database already exists or if you are creating it from scratch. For the sake of this post, I’m going to assume I’m building it from scratch. First and foremost, in relational databases like MySQL, PostgreSQL, or SQLite3, you need to start with a clear and efficient schema with tables and column names that succinctly describe that data. My first step is to either hand draw or digitally draw out my schema, and the associations I plan to make, keeping in mind the need for future flexibility as your program grows and changes. Next, if we are referring to optimizing calls to the database, it is important to understand how database queries work. A query will potentially run through your entire database looking for data that matches your query request, as such, if you can use indexing, you should. This will greatly reduce query time and optimize the speed of your program.

Eighteen: What’s the regex for a phone number?

I kind of hate this question because personally, I wouldn’t use regex to create a phone number field. I would create a field that allows 10 ||11 integers (if you want to include country code), strip them of any spaces, then reformat them based on my own needs. Need the option for an extension number? Just create a new field that has the option of being nil and then build out the logic to handle different number sizes. I think forcing a user to follow my regex demands is ill-advised.

If I absolutely had to regex something, I would spend 30 minutes testing regex patterns or find the solution on StackOverflow. Very few people can actually just pump out functioning regex parameters, and those that can have been doing it for a while. So if you get this question, look it up or talk about a different solution that will work equally well or better. Then be ready to back up your opinion.

Nineteen: In your browser dev-tools, looking at the network waterfall, what does the redline indicate?

First, the waterfall tool shows a list of the current webpage’s processed HTML methods like Get and Post requests, usually mostly Get requests. The red line displays the point in time that the last HTML method request was made. In essence, how long did it take, in seconds, for the page to complete all of its requests and load the view? The waterfall is an excellent visualization tool to analyze what is slowing your website down and help you optimize load speed and user experience.

Twenty: How do you center an image within an email?

In Rails, if you are using ActionMailers, this is easy-peasy-lemon-squeezy. Just CSS your image using any tool you like. Personally, I would use flex-box because it’s going to be responsive to any device your user opens their email on. Additionally, remember that an email is just an HTML doc. It uses HTML and CSS in the same way your view does, so don’t overthink it!

In the end, the most important thing is that you are humble, grateful, confident, and prepared. It will get you a long way in the interview process.

Try to talk about what you know, try to know at least a little bit about each item on the job description, email or ask the interviewer what the interview will entail, and take at least one to three hours to prep based on their response. Finally, if you have not the slightest clue as to the answer to a question, be honest and ask the interviewer questions about the answer. Maybe it makes you appear slightly less knowledgeable, but it absolutely shows that you are open to learning, you are curious, and you are able to admit when you don’t know something. There is nothing more dangerous to the success of a team than ignorance masked as understanding.

A final note: We are all a community here, so if you feel my understanding of one of those answers is incorrect, or you think that I have misrepresented an answer in some way, please comment. Additionally, if you want to expand or elaborate on one of the answers, please comment! We grow through mentorship, knowledge sharing, and compassion. If this post helps even one person grow, I’ll be happy.