Skip to content

Instantly share code, notes, and snippets.

import React from "react";
// yea
import axios from "axios";
import {render} from "react-dom";
import {setStylesTarget} from "typestyle";
import {Provider} from "reactivated/context";
// nope
#!/bin/bash
set -e
PWD=$(pwd)
# https://stackoverflow.com/a/246128
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
PROJECT_ROOT=$(realpath "$SCRIPT_PATH/../")
import * as React from "react";
import {Link} from "react-router";
import {motion} from "framer-motion";
import {reverse} from "@client/generated";
import * as style from "@client/style";
import {Icon} from "@client/components/Icon";
import {Platform, Icon as IconLiterals} from "@client/constants";
import {Profile} from "@client/models";
Shibboleths. Add these up and if you have an opinion on five - agreeing *or* disagreeing - we’d love to hear from you. Do these elicit strong feelings? See the note at the bottom.
- You understand discriminated unions, and how to use the type system to enforce exhaustive checks and other useful patterns.
- You can describe good and bad use cases for single page applications.
- You can describe why nullable types and a type system that enforces it are advantageous over type systems like Java’s.
- You can and have extracted declarative implementations out of imperative code. You know when it’s worth it and when it’s not.

Programming Challenge

Introduction

We're building a simple tool for an international spy agency. The agency conducts planned assassinations and has done so for decades. But it needs a new system to assign assassinations ("hits").

The general user is a hitman. He can be assigned a hit and see it on his list of upcoming work. Typically, it succeeds and is closed out. But occasionally things don't work out and the target lives. In those cases, we assume the target hires

Qualifications / Requirements
- 5+ years of experience developing Web Applications.
- 5+ years of experience in Web technologies such as HTML5, CSS, JavaScript, ECMAScript 6/7.
- 4+ years of experience in JavaScript, including 2+ years of professional experience with frameworks such as React, Angular, and AngularJS.
- Knowledge of JavaScript Patterns and Best Practices.
- Experience with JavaScript Charting Libraries (e.g. D3, ReCharts) and Grids.
- Complete understanding of Responsive Design and comfortable using frameworks such as Twitter Bootstrap.
- Significant experience writing and maintaining client-side tests using frameworks such as Jasmine, Mocha, Karma, Jest, or Selenium WebDriver.
- Solid understanding of version control tools (ideally Git).
- Experience with or understanding of web servers (i.e. Apache, Nginx).
Shibboleths. Add these up and if you have an opinion on five - agreeing *or* disagreeing - we’d love to hear from you. Do these elicit strong feelings? See the note at the bottom.
- You understand discriminated unions, and how to use the type system to enforce exhaustive checks and other useful patterns.
- You can describe good and bad use cases for single page applications.
- You can describe why nullable types and a type system that enforces it are advantageous over type systems like Java’s.
- You can and have extracted declarative implementations out of imperative code. You know when it’s worth it and when it’s not.
function decorateEntrySnippet<Additions, I>(someFunctionThatReturnsAdditions: () => Additions, toDecorate: (props: I) => void) {
function inside(props: I & Additions) {
return toDecorate(props);
}
return inside;
}
function EntrySnippet(props: {entry: Entry}): void {
Your markup:
<div class="item">
<h3 class="product">Foo</h3>
<img src="bar" />
</div>
Your CSS:
.item h3.product { do something to add a product icon here }
<?php
function example_form_element_label($variables) {
$element = $variables['element'];
// This is also used in the installer, pre-database setup.
$t = get_t();
// If title and required marker are both empty, output no label.
if ((!isset($element['#title']) || $element['#title'] === '') && empty($element['#required'])) {
return '';
}