Skip to content

Instantly share code, notes, and snippets.

View szabba's full-sized avatar

Karol Marcjan szabba

  • Zielona Góra, Poland
View GitHub Profile
@szabba
szabba / clean_code.md
Created March 2, 2017 20:37 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@szabba
szabba / Main.elm
Last active December 16, 2016 11:38 — forked from helderjnpinto/filter messages
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Platform.Sub as Sub
import Html.Events exposing (..)
import Dict exposing (..)
import Debug as D exposing (..)
type Msg
@szabba
szabba / .gitignore
Last active June 2, 2016 13:15 — forked from sgillis/Component.elm
Elm message
elm-stuff/
@szabba
szabba / .gitignore
Last active June 1, 2016 09:41 — forked from maxhoffmann/Main.elm
Token HTTP Authentication in Elm
elm-stuff/
@szabba
szabba / Dropdown.elm
Created December 27, 2015 16:18 — forked from paparga/Dropdown.elm
Dropdown in Elm
module Dropdown where
import List exposing (..)
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick, onBlur)
-- MODEL
@szabba
szabba / loading_proces.cpp
Last active September 7, 2015 14:22 — forked from anonymous/sd
void load_initial_level() {
load(0);
}
void load_next_level() {
load(variables.level);
}
typedef void (*process_loading_func)();
@szabba
szabba / playground.rs
Created July 24, 2015 19:54 — forked from anonymous/playground.rs
Shared via Rust Playground
// Can I have two mut references to different parts of a structure
// simultaneously?
struct Point {
x: f64,
y: f64,
}
fn main() {
let mut p = Point{x: 3.0, y: 5.0};
@szabba
szabba / man.sh
Created May 31, 2014 11:52 — forked from lkptrzk/man.sh
#!/bin/sh
# man.sh - `man` replacement for git bash on windows
# Dependencies (outside of git bash):
# wget (http://users.ugent.be/~bpuype/wget/)
# TODO:
# use sed to remove <head> & tags, convert HTML entities
sed -E -e 's/^/ /g' -e 's/^ --- ?//g' | pandoc -o listing.pdf -
That expression is a cheap literate programming system for Markdown.
Start commentary lines with '--- ' and they will be
markdown-formatted, the rest will be code. (Uses Lua comment syntax.)
Finally the right implementation of this idea:
http://fresh.homeunix.net/~luke/misc/emacs/pbook.pdf (program)
http://fresh.homeunix.net/~luke/misc/erlang/regtest.pdf (better example)