Skip to content

Instantly share code, notes, and snippets.

View cgcardona's full-sized avatar
💭
🤖

Gabriel Cardona cgcardona

💭
🤖
View GitHub Profile
  • _.isArguments
  • _.isArray
  • _.isBoolean
  • _.isDate
  • _.isElement
  • _.isEmpty
  • _.isEqual
  • _.isError
  • _.isFinite
  • _.isFunction

Striking a balance between terseness and understandability

Intro

Often when calling a function I will attempt to boil the code down to the most terse expression possible. However I've noticed that when working w/ a team there is a balance to be struck between terseness and understandability.

So a nonsensical example might be

var MyObj = {
 postData: function(amount, headline) {
@cgcardona
cgcardona / gist:8844466
Created February 6, 2014 13:47
Stage config file.
Gitcoin::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
@cgcardona
cgcardona / gist:9198770
Last active August 29, 2015 13:56
@edwardheiatt from @pivotallabs shares 4 commong points/tips for startups at LAUNCH 2014.

Pivotal Labs

@edwardhieatt from @pivotallabs shares 4 commong points/tips for startups at Launch 2014.

  1. Work in the same location
  2. Don't get stage fright
  3. Make boring tech choices
    • It's not scient project
    • Proven tech, not cool tech
    • It's about the product
@cgcardona
cgcardona / gist:9294802
Created March 1, 2014 18:37
Just a foobar haml.
.foobar
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam feugiat odio viverra diam porta scelerisque.
Morbi id blandit neque, non molestie nibh. Integer dapibus nulla ut dolor pellentesque, vehicula adipiscing
turpis pharetra. Nunc neque purus, aliquam eget facilisis id, sodales tincidunt tortor. Mauris nec aliquet est.
Etiam faucibus risus non erat pulvinar cursus. Sed lobortis molestie felis et fringilla. Donec ac lectus quis elit
consectetur bibendum. Praesent semper purus at laoreet euismod. Aliquam eget lorem dignissim risus euismod fermentum
eu sed neque.
.foobar
Aenean sed fringilla est, ut rhoncus massa. Etiam scelerisque purus in risus adipiscing, vel pharetra magna eleifend.
// Request
// GET http://www.gitcoin.co/api/v1/users.json
// Response
{
status: "success",
data: [
{
amount_given: "0.0004646909999999999",
amount_received: "0.00004653",
// Request
// GET http://www.gitcoin.co/api/v1/users/1.json
// Response
{
status: "success",
data: {
amount_given: "0.225",
amount_received: "0.22",
created_at: "2014-02-03T22:27:56Z",
// Request
// GET http://www.gitcoin.co/api/v1/donations.json
// Response
{
status: "success",
data: [
{
amount: 0.225,
created_at: "2014-02-03T22:27:56Z",
// Request
// GET http://www.gitcoin.co/api/v1/donations/1.json
// Response
{
status: "success",
data: {
amount: 0.225,
created_at: "2014-02-03T22:27:56Z",
id: 1,
// Request
// GET http://www.gitcoin.co/api/v1/donation_comments.json
// Response
{
"status":"success",
"data": [
{
"created_at":"2014-01-30T17:26:35Z",
"id":24,