Skip to content

Instantly share code, notes, and snippets.

@tnn4
tnn4 / .NET-web-framework-notes.md
Last active August 22, 2022 00:13
.NET web frameworks

.NET web frameworks

ASP.NET (Active Server Pages )

Blazor

Blazor:

  • UI web framework based on .NET
  • .NET based web framework for building UI components(Razor components)
  • compiles to Web-Assembly (wasm)
@tnn4
tnn4 / design-principle-loose-coupling.md
Created August 24, 2022 14:55
Design Principle: loose coupling / principle of least knowledge / law of demeter / information hiding / incrementally grow systems

Design principle: loose coupling

corollary of principle of least privilege

example

object a b c
a calls b and should know nothing about b's internal structure
if c is inside b, a should know nothing about c

the mistake is: you could write a to call c(inside b) which would introduce coupling and harder debugging

@tnn4
tnn4 / rust-Self-vs-self.md
Last active August 26, 2022 19:35
rust Self vs self
@tnn4
tnn4 / anonymous-functions.md
Last active March 16, 2023 17:11
When should you use anonymous functions?
@tnn4
tnn4 / json-notes.md
Last active September 2, 2022 05:56
JSON notes

code --> [ serialize ] --> JSON --> [ deserialize ] --> code

ws = whitespace

{
  "property": "value"
}
@tnn4
tnn4 / naming-conventions.md
Created September 4, 2022 14:37
naming conventions

camelCase

PascalCase

kebab-case

snake_case

@tnn4
tnn4 / turing-tarpit.md
Created September 7, 2022 20:55
turing tarpit

A Turing tarpit (or Turing tar-pit) is any programming language or computer interface that allows for flexibility in function but is difficult to learn and use because it offers little or no support for common tasks.

Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy. - Alan Perlis, Epigrams on Programming, 1982

https://en.wikipedia.org/wiki/Turing_tarpit

@tnn4
tnn4 / cpu-speed.md
Last active October 11, 2023 19:03
computer operation speeds cpu fps

CPU Speeds

typical cpu clock rate = 2.4 GHz = 2.4 * 10^9 Hz = 2.4E9 Hz

2.4E9 CPU clock cycles/ 1 sec = 2.4E9 clock cycles / 1E9 ns

Typical operation timings src

Memory Access

@tnn4
tnn4 / typescript-notes.md
Created September 14, 2022 23:32
typescript notes

TypeScript setup

typscript is a classed superset of javascript and has

  • classes
  • modules
  • interfaces

typescript.ts -> tsc -> javascript.js -> browser

tsc is the typescript compiler and is a node package installed with npm (node package manager)

@tnn4
tnn4 / bob-nystrom-roguelike.md
Last active September 22, 2022 20:52
Bob Nystrom's roguelike tips

Bob Nystrom - Is There More to Game Architecture than ECS?

ECS for Roguelikes?

I actually don't use ECS, not a good fit for any roguelike thats relatively simple, i.e. if not graphically rich, physically rich, turn-based or tile-based ECS isn't doing much good for you

SUMMARY:

  1. Components