Skip to content

Instantly share code, notes, and snippets.

View ngerakines's full-sized avatar
🏠
Working from home

Nick Gerakines ngerakines

🏠
Working from home
View GitHub Profile

Engineering topic: Less is more

I had a desktop wallpaper a while ago with a single quote, it read:

As a software developer, you are your own worst enemy. The sooner you realize that, the better off you'll be.

As developers, every line of code that we write increases the const of maintaining the project that the code is in. It doesn't matter how clean the code is, how well written it is, how much thought was put into it ahead of time or if it has been refactered: All code carries a debt that can only be paid in time.

The theme of this week's engineering essay: Use the least amount of code possible.

@ngerakines
ngerakines / gist:3773403
Created September 23, 2012 23:20
led dice with button
const unsigned int LED_BIT0 = 12;
const unsigned int LED_BIT1 = 11;
const unsigned int LED_BIT2 = 10;
const unsigned int SWITCH_BIT = 9;
void setup() {
pinMode(LED_BIT0, OUTPUT);
pinMode(LED_BIT1, OUTPUT);
pinMode(LED_BIT2, OUTPUT);
pinMode(SWITCH_BIT, INPUT);
package com.socklabs;
import com.lmax.disruptor.*;
import com.lmax.disruptor.dsl.Disruptor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class MultiThreaded {
package com.socklabs;
import com.lmax.disruptor.*;
import com.lmax.disruptor.dsl.Disruptor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Created with IntelliJ IDEA.
Helm of the Forgotten Conqueror:
Archimonde
Pauldrons of the Forgotten Conqueror:
Mother Shahraz
Chestguard of the Forgotten Conqueror:
Illidan Stormrage
Leggings of the Forgotten Conqueror:
-- MySQL dump 10.13 Distrib 5.1.49, for debian-linux-gnu (i486)
--
-- Host: localhost Database: gobook
-- ------------------------------------------------------
-- Server version 5.1.49-3
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
package main
import (
"fmt"
"tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
fields := make(map[string] int)
<?php
$publicKey = 'public';
$privateKey = 'private';
$date = date(DATE_RFC2822);
$path = '/api/wow/character/Medivh/Korale';
$auth = 'BNET ' . $publicKey . ':' . base64_encode(hash_hmac('sha1', "GET\n{$date}\n{$path}\n", $privateKey, true));
{
"lastModified":1308604169000,
"name":"Jeanelly",
"realm":"Medivh",
"class":8,
"race":7,
"gender":"female",
"level":85,
"achievementPoints":9175,
"thumbnail":"medivh/16/11635728-avatar.jpg",
{
"lastModified":1308348743000,
"name":"Jeanelly",
"realm":"Medivh",
"class":8,
"race":7,
"gender":"female",
"level":85,
"achievementPoints":9175,
"thumbnail":"medivh/16/11635728-avatar.jpg",