Skip to content

Instantly share code, notes, and snippets.

View sprour's full-sized avatar

Sergei Prohhorov sprour

  • Sergei Prohhorov
View GitHub Profile
@sprour
sprour / osom.md
Created January 19, 2021 19:48 — forked from sizovs/osom.md
OSOM.md
// 1. refactor the code so it's at the same level of abstraction (SLAP).
int from = 8000;
int to = 9000;
IntStream
.rangeClosed(from, to)
.mapToObj(Port::new)
.filter(Port::isFree)
.findFirst();
class Port {