Skip to content

Instantly share code, notes, and snippets.

View philosopherdog's full-sized avatar

Steve Thompson philosopherdog

View GitHub Profile

Declaring models

class Dog: Object {

  dynamic var id = ""

  dynamic var name = ""

 dynamic var tempVariable = ""
@philosopherdog
philosopherdog / AutoRetry.swift
Created November 2, 2024 15:47 — forked from kean/AutoRetry.swift
Smart Auto Retry using RxSwift
// The MIT License (MIT)
//
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean).
import Foundation
import RxSwift
import RxCocoa
extension ObservableType {
@philosopherdog
philosopherdog / working_effectively_with_legacy_code.md
Created January 15, 2025 14:11 — forked from jonnyjava/working_effectively_with_legacy_code.md
Working effectively with legacy code summary

WORKING EFFECTIVELY WITH LEGACY CODE

To me, legacy code is simply code without tests. I’ve gotten some grief for this definition. What do tests have to do with whether code is bad? To me, the answer is straightforward, and it is a point that I elaborate throughout the book: Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.

Chapter 1 Changing Software

Four Reasons to Change Software: For simplicity’s sake, let’s look at four primary reasons to change software.