Skip to content

Instantly share code, notes, and snippets.

View joaomilho's full-sized avatar
🐫

Yo Lulkin joaomilho

🐫
  • Personio.de
  • Berlin, Germany
View GitHub Profile
{% extends "app.html" %}
{% block content %}
<a href="{% url action="new" %}">
New
</a>
<table>
{% for pet in pets %}
<tr>
<td>{{ pet.name }}</td>
{"/", [{controller, "pets"}, {action, "index"}]}.
{% 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>
create('POST', []) –>
Name = Request:param("name"),
Species = Request:param("species"),
Pet = pet:new(id, Name, Species),
Pet:save(),
{redirect, "/"}.
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:
$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) {
// html
<section>
<div class="toggled">HERE I AM</div>
<button class="toggler">Toggle!</button>
</section>
// coffescript
$('.toggler').on 'click', ->
$('.toggled').toggle()
Toggler = React.createClass
getInitialState: ->
visible: true
toggle: ->
@setState(visible: [email protected])
render: ->
<section>
{ @state.visible && <div>HERE I AM</div> }
Counter = React.createClass
getInitialState: ->
count: 0
increment: ->
@setState(count: @state.count + 1)
render: ->
<div>
{ @state.count }
@joaomilho
joaomilho / gulpfile
Created February 5, 2015 09:27
Basic react + cjsx converter
'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() {