# PSEUDOCODE | |
# Please write your pseudocode here and keep it commented | |
# INPUT: string | |
# OUTPUT: message indicating valid else failed password and violations | |
# What are the steps to solve the problem? Write them out in plain english as best you can. | |
# make sure passed argument is a string | |
# test the password against validity rules | |
# return or print appropriate valid/invalid + error message | |
# NOTE: my assumption is that the invalid message should always indicate ALL violated requirements |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DOM manipulation with jQuery</title> | |
<!-- Add a link to jQuery CDN here script here --> | |
<script type="text/javascript" src="jquery_example.js"></script> | |
</head> | |
<body> |
//In this challenge you will work with the following JavaScript objects. | |
//Do not alter these objects here. | |
// These are the votes cast by each student. | |
var votes = { | |
"Alex": { president: "Bob", vicePresident: "Devin", secretary: "Gail", treasurer: "Kerry" }, | |
"Bob": { president: "Mary", vicePresident: "Hermann", secretary: "Fred", treasurer: "Ivy" }, | |
"Cindy": { president: "Cindy", vicePresident: "Hermann", secretary: "Bob", treasurer: "Bob" }, | |
"Devin": { president: "Louise", vicePresident: "John", secretary: "Bob", treasurer: "Fred" }, | |
"Ernest": { president: "Fred", vicePresident: "Hermann", secretary: "Fred", treasurer: "Ivy" }, |
/* | |
Write THREE functions: sum, mean, and median. Each accepts an array | |
and returns its respective calculation. | |
Below you will find driver code. Run the code in this file either from the command line | |
using Node.js or by pasting the code of this entire file into your | |
browser console. All tests will log 'true' in the console when | |
they pass--false, otherwise. | |
/* | |
You will work with the following two variables. The first, students, holds the names of four students. | |
The second, scores, holds groups of test scores. The relative positions of elements within the two | |
variables match (i.e., 'Joseph' is the first element in students; his scores are the first value in scores.). | |
Do not alter the students and scores code. | |
*/ |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="Caroline Artz" /> | |
<title>DBC Horizontal Menu</title> | |
<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet" type="text/css" href="style.css" > | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
# YOUR NAMES: Caroline Artz (Went solo, didn't have an opportunity for a GPS for this) | |
require_relative 'state_data' #requires (links) the content of the file state_data (here its in the same directory) | |
class VirusPredictor | |
attr_reader :population #for bonus | |
def self.state_report(data) | |
data.each do |state, state_data| | |
VirusPredictor.new(state, state_data).virus_effects |
##################################################### | |
### USEFUL TRICKS ################################### | |
##################################################### | |
# Array.reduce will inject and initial value into a block and pass in each value in turn | |
# until all values in the array has been iterated i.e | |
([1] * 10).reduce(0) { |total, current_value| total + current_value } #= 10 | |
# Inject does the same | |
([1] * 10).inject(0) { |total, current_value| total + current_value } #= 10 |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.