Skip to content

Instantly share code, notes, and snippets.

View illusive-man's full-sized avatar

Serge Kanashin illusive-man

View GitHub Profile
@illusive-man
illusive-man / clean_code.md
Created May 9, 2024 12:11 — 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

@illusive-man
illusive-man / pb_threadsafe.cs
Created June 14, 2019 13:13
UI Tread non-blocking progress update (done in TAP) C# 5.0+
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
@illusive-man
illusive-man / webdev_online_resources.md
Created July 16, 2018 20:46 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@illusive-man
illusive-man / .jshint
Created July 6, 2018 18:09
.jshint sample file
{
// JSHint Sample Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope