Skip to content

Instantly share code, notes, and snippets.

View 01-Jacky's full-sized avatar

Jacky Lee 01-Jacky

View GitHub Profile
https://www.youtube.com/watch?v=cEBkvm0-rg0
""
site:url
-site:url
-exclude_keyword
before:2020
after:2020
2020..2022
site:*.python.org
@01-Jacky
01-Jacky / clean_code.md
Created September 17, 2020 21:24 — 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

test
/*
* part3_clock.c
*
* Created: 4/29/2018 11:54:42 PM
* Author : Jacky Lee & Sherin
*/
// Download avr and lcd libary here: http://www.ics.uci.edu/~givargis/courses/cs145/projects/2/
#include <stdio.h>
#include <stdlib.h>
{
"routeID": "1",
"popularity": 50,
"distance": 1000,
"elevation_gain": 200,
"max_elevation": 300,
"difficulty": 6,
"type": "MultiPoint",
"coordinates": [
[
@01-Jacky
01-Jacky / json
Last active March 14, 2018 19:24
Mock records for route table
[
{
"routeId": 1,
"popularity": 50,
"distance": 1000,
"elevation_gain": 200,
"max_elevation": 300,
"difficulty": 6,
"type": "MultiPoint",
"coordinates": [
map = dict()
map['key1'] = [(0,200),(1,100),(2,500),(3,100)]
map['key2'] = [(4,200),(5,100),(6,500)]
map['key3'] = [(0,800),(2,500),(3,100)]
total = 0
for key in map:
for obj in map[key]:
if obj[0] == 0: