Skip to content

Instantly share code, notes, and snippets.

View mladenoff's full-sized avatar
🤚
Hey

Isak Mladenoff mladenoff

🤚
Hey
View GitHub Profile
# frozen_string_literal: true
require "bigdecimal/util"
# Ref: https://github.com/ruby/ruby/commit/e1424c35012ccf1f3822c9046081b225aef4142e
# Ref: https://github.com/ruby/bigdecimal/issues/70
# Ruby 3.0 changed the default precision used when calling `Float#to_d` from 15 to 16.
# It causes a whole lot of issues. I'm trying to figure out what can be done about it
# but in the meantime the only solution I see is to revert it back to 2.x behavior.
if RUBY_VERSION >= "3.0"
### load extenstions ###
source "$HOME/.git-completion.bash"
source "$HOME/.git-prompt.sh"
### ENV variables ###
# look for commands in these places
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
# make vim the default text editor
export EDITOR="vim"
@wojteklu
wojteklu / clean_code.md
Last active April 30, 2025 04:37
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