Skip to content

Instantly share code, notes, and snippets.

View joaomilho's full-sized avatar
🐫

Yo Lulkin joaomilho

🐫
  • Choco.com
  • Berlin, Germany
View GitHub Profile
Toggler = React.createClass
getInitialState: ->
visible: true
toggle: ->
@setState(visible: !@state.visible)
render: ->
<section>
{ @state.visible && <div>HERE I AM</div> }
// html
<section>
<div class="toggled">HERE I AM</div>
<button class="toggler">Toggle!</button>
</section>
// coffescript
$('.toggler').on 'click', ->
$('.toggled').toggle()
$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) {
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:
create('POST', []) –>
Name = Request:param("name"),
Species = Request:param("species"),
Pet = pet:new(id, Name, Species),
Pet:save(),
{redirect, "/"}.
{% 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>
{"/", [{controller, "pets"}, {action, "index"}]}.
{% extends "app.html" %}
{% block content %}
<a href="{% url action="new" %}">
New
</a>
<table>
{% for pet in pets %}
<tr>
<td>{{ pet.name }}</td>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Petster</title>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
–module(petster_pet_controller, [Request]).
–compile(export_all).
index('GET', []) –>
Pets = boss_db:find(pet, []),
{ok, [{pets, Pets}]}.