Skip to content

Instantly share code, notes, and snippets.

View madeso's full-sized avatar

Gustav Jansson madeso

View GitHub Profile
@madeso
madeso / clean_code.md
Last active April 29, 2023 12:43 — 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

@madeso
madeso / book.md
Created December 20, 2022 09:33
I asked chat gpt to write a tom clancy novel

Title: "Exposing the Truth: A Sarah Thompson Investigation"

First chapter:

As she sat in her office at The Washington Post, scrolling through her emails and sipping her coffee, Sarah Thompson knew that something wasn't right. She had been working on a story for weeks, digging deep into the inner workings of the government and uncovering a pattern of corruption and deceit that shocked even her seasoned reporter's senses. But as she prepared to go public with her findings, she could feel the weight of danger bearing down on her.

Sarah was no stranger to controversy. As an investigative journalist for The Washington Post, she had made a name for herself by exposing the truth and holding the powerful accountable. But this story was different. It went to the very heart of the government, implicating some of the most influential figures in Washington, including Senator John Smith. And as she prepared to break the news, she could feel the forces of power and secrecy mobilizing against her.

She was just about to

@madeso
madeso / open_scene_graph.h
Created December 11, 2020 09:52
Cursed header that crashes visual studio
_T(R"(
OpenSceneGraph is used for rendering and interacting with 3d.
OpenSceneGraph Public License, Version 0.0
==========================================
Copyright (C) 2002 Robert Osfield.
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
@madeso
madeso / github-contributors-issue.md
Created July 2, 2020 13:09
Github contributors issue
@madeso
madeso / covid19.cc
Created March 25, 2020 09:35
covid19 genome viz with euphoria
// based on https://play.golang.org/p/jXYqxHDG2GK
#include <string_view>
#include "core/image.h"
#include "core/palette.h"
#include "core/palette_lospec.h"
#include "core/io.h"
using namespace euphoria::core;

Keybase proof

I hereby claim:

  • I am madeso on github.
  • I am madeso (https://keybase.io/madeso) on keybase.
  • I have a public key whose fingerprint is 4138 2D68 688A 3FDB E966 FE9B F96C 4A4B E786 8364

To claim this, I am signing this object: