This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "app.html" %} | |
{% block content %} | |
<a href="{% url action="new" %}"> | |
New | |
</a> | |
<table> | |
{% for pet in pets %} | |
<tr> | |
<td>{{ pet.name }}</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"/", [{controller, "pets"}, {action, "index"}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "app.html" %} | |
{% block content %} | |
<form action="{% url action="create" %}" | |
method="post"> | |
<input name="name" placeholder="Name" /> | |
<select name="species"> | |
<option value="dog">Dog</option> | |
<option value="cat">Cat</option> | |
<option value="wolf">Wolf</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create('POST', []) –> | |
Name = Request:param("name"), | |
Species = Request:param("species"), | |
Pet = pet:new(id, Name, Species), | |
Pet:save(), | |
{redirect, "/"}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Everything has an appointed season, | |
and there is a time for every matter under the heaven. | |
— Ecclesiastes, chapter 3, verses 1 to 8 | |
The problem of analogies In software development, the dreadful consequences of sacrificing quality are widely misunderstood by non technical managers. They underestimate how detrimental it is to continued productivity and morale, and ultimately, to the overall strategy of the company. | |
Given non technical managers have no actual first-hand experience building software, to explain them these consequences we have to rely only on analogies. And here is where our problems start. | |
Analogies for sure are wonderful tools. Joseph Priestley famously praised them as the root of all scientific endeavor: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$base-font-size: 16px; | |
$base-line-height: 1.5; | |
// this value may vary for each font | |
// unitless value relative to 1em | |
$cap-height: 0.68; | |
@mixin baseline($font-size, $scale: 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// html | |
<section> | |
<div class="toggled">HERE I AM</div> | |
<button class="toggler">Toggle!</button> | |
</section> | |
// coffescript | |
$('.toggler').on 'click', -> | |
$('.toggled').toggle() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Toggler = React.createClass | |
getInitialState: -> | |
visible: true | |
toggle: -> | |
@setState(visible: [email protected]) | |
render: -> | |
<section> | |
{ @state.visible && <div>HERE I AM</div> } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Counter = React.createClass | |
getInitialState: -> | |
count: 0 | |
increment: -> | |
@setState(count: @state.count + 1) | |
render: -> | |
<div> | |
{ @state.count } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'), | |
browserify = require('browserify'), | |
source = require('vinyl-source-stream'), | |
runSequence = require('run-sequence'), | |
react = require('gulp-react'), | |
cjsx = require('gulp-cjsx'); | |
gulp.task('app', function() { |