-
Notifications
You must be signed in to change notification settings - Fork 5
Classes of Objects
The objects can be classified by the roles/behavior they exhibit:
-
Application Wired Objects - Long term wired objects
- These are objects that once created will stay and provide a "structure" of your app. A lot of times are singletones but not always.
- Examples: services, repositories, catalogs, spring beans
-
Transfer Objects
- Input
- Output
- These are objects that exist to send information to a method and get the information back, but they are also short lived.
-
Data Structures - they are the data structures and attached algorithms to them:
List,Queue,Tree,RedBlackTree,Table, etc. -
Data Structures Companion Objects / Structural Objects - they companion objects of the Data Structures and Algorithms them (think
Map.Entry,Option.Some,Option.None,Try.Success,Try.Failure,Monad,Mono,Flux). They get intermixed with domain objects - Domain Objects - objects that reflect the domain relation ships
-
State Objects are Domain Objects that contain state fields like:
state,description,isValid,reasonbesides the normal fields.- They are needed to replace a mix of Domain Objects with Structure Objects
- Sometimes modeled as DataStructures of domain objects but better to be modeled similar with NullObjects
- Technical classification - useful for compiling
- parameters
- fields
- result
- A function(method, component) should not receive and return Structural Objects. That is because the wiring is done at the beginning and that also forces the dependencies to be explicit.
- Always use constructor injection.
- The need for setter/field injection show that there are circular dependencies.
- A special form of circular dependency that is acceptable is one where one component is depending but can also create a second component:
new FirstComponent(){this.second = new SecondComponent(this);} - Circular dependencies require a special lifecycle management: minimally in a form of creation and then registration and more often via a dependency injection framework.
- Use Companion Objects instead of static methods. Create a field
instanceon a class that self instantiate it. Then refer the "static" methods via this instance field. This keeps the advantage of having normal classes: methods that can implement interfaces but also simple singleton. - Never discard information. You can always later reduce it. If you have Security concerns delay them. Is not good to reduce information deep down. The system will not be debug/developer friendly. Like in premature optimization is the root of all evil, premature discarding of information is also evil.
- see also https://github.com/raisercostin/software-wiki/wiki/Domain-and-Test-Driven-Design
- Is best to have only Domain Objects without mixing them with Structures and Structures Companions? Instead of returning
Option<Foo>isn't better to create aFooStatethat is included inFoo?
-
Add preconditions and postconditions
-
Fail fast. Think about where to move the exception/error condition to be called much sooner. In the end you will find the exact place that have the bug.
-
Do not purposely re-design before hacking the fix because the design might change anyway as a result of the new constraints added in test. Also this is the reason whitebox testing is fragile. So first add new constraints in the test, fix the test, redesign. Sometimes you are forced to redesign before because the technical debt blocks you in understanding or in easily changing current code. Read "Refactoring.Working with legacy code" in order to understand the code transformation process.
-
Two types of code: code as a scaffolding vs final building. Scaffolding is fast and can be used to create regression tests. In the end you don't need to use and you can remove the code that helped you creating them.
-
Forking/cloning tests for specific conditions are easy and almost cost free but they are not DRY and come up with the later price of reading and maintaining them. Is better to try to encode the scenarios in as few tests as possible. If you want to test the specificities and corner cases of a specific unit do unit tests.
- Refactoring triggers also data migration strategies: lenient input, fixing on the fly, @JsonAlias and @JsonSetter are usefull.
- Searchable items
- Home
- Advices
- Development Algorithm
- Who's who
- Software Books
- Career, salary, salariu, brut, net, Levels
-
Tools
- Health
- Physical Tools
- Environment Tools
- File Tools
- Source Tools
- Information Tools
- Collaboration Tools
- Infrastructure Tools
- Language Tools
-
Concepts as Tools spec maturity
- Classes of Objects, Development Algorithm/mantra/practices
- Streaming Tools
- Process Tools psychology, analytical paralysis
- Special
- fiddler kotlin,javascript,scala
- translator scala->kotlin, java->kotlin
- Guides
- Asking for Help
- Aspects
- Security
- Server & Networking load balancing,
-
Principles & Guidelines
- PLS - Principle of Least Surprise (aka no puzzlers)
- SRP - Single Responsibility Principle
- KISS - Keep It Simple
- YAGNI - You aint gona need it
- DRY - Dont Repeat Yourself
- Fail Fast
- OCP - Open Closed
- POE - Premature Optimization is Evil
- LSP - Liskov Substitution Principle
- DIP - Dependency Inversion Principle / Inversion of Control
- Hollywood Principle - Don't call us We call you
- Tell Don't Ask
- Event sourcing
- NIHS - Not invented here syndrome
- Patterns - idioms, best practices, code smells
-
Intro to Problems - common problems: cache, logging, config, representing date, time, money
- Intro to Libraries - reactive, reactor, commons, collections, apache, guava, logging, config, time, test, junit, vavr, immutable, lombok, mapping, mapstruct, time, joda, cache, Guava, Caffeine, and cache2k
- Intro to DateTime
- Intro to Logging
- Intro to Concurrency - thread, parallelism
- Intro to I18N - internationalization, encoding, unicode, big indian, little indian, ascii, utf, utf8, utf16, formatting, parsing, transliteration, charset, localization, time, timezone, zone id, zone offset, GMT
- Intro to Numbers - rounding, ceil, floor, base, integer, decimal, precision, mantis, exponent, significant, statistics
- Java Idioms
- Concepts
- Code Changes refactor, format, eol, bugfix, newfeature
- Convention Over Configuration
- Continuous Integration
- Continuous Delivery
- Code License
- Fluent Interface
- Semantic Versioning
- Take It Offline
- Flow
- Languages
- Hardening
- Smells
-
Intros
- Intro to Paradigms Object Oriented, Functional, Procedural, Asynchronous
- Intro to Logic
- Intro to Product UX, UI, business, technical, backend, frontend
- Intro to Roles
- Intro to Decision Levels : business, financials, domain, product, architecture, high level design, low level design, coding, debugging, quality, roles, stakeholders
- Intro to Steps
- Intro to Software Architecture
- Intro to Software Design
- Intro to UML state machine diagram, class diagram, sequence diagram
- Intro to Graphical Design
- Intro to Performance bigO, algorithm complexity
- Intro to Agile
- Intro to Scripting
- Intro to Shell execution, environment, registry, powershell, cmd, cmder, linux, bash, ash, csh, zsh, ksh
- Intro to Wiki
-
Intro to Building
- Intro to DevMachine
- Intro to Git
- Intro to Maven
- Intro to Docker
- Intro to Hosting Deploy, nameserver, hostname, registrar, ssl, ddns, dns, naked domain, wildcard domain, email, smtp, pop3, imap, DKIM, SPF, spam
-
Intro to Landscapes Language Environments, Web Landscape
- Intro to JVM Landscape
-
Intro to Javascript Landscape
- Intro to Javascript
- Intro to Typescript binding, implicit, explicit, default (global), callsite, lambda, callback, function, promise, async await
- Intro to Node javascript, npm, yarn
- Intro to DotNet Landscape C# csharp
- Intro to Golang
- Intro to Ruby
- Intro to Python
- Coding Style
- Phases
-
Intro to Quality - QA, Quality Assurance, code quality, bugs, bug levels, metabugs
- Intro to Tests
-
Test Driven Development TDD, mantra
- Domain-and-Test-Driven-Design Advanced topics
- Intro to Coding defensive, offensive, preconditions, postconditions
- Intro to Debugging
- Intro to Profiling, Intro to Performance
- Intro to Code Review
-
Intro to Quality - QA, Quality Assurance, code quality, bugs, bug levels, metabugs
- Intro to Functional
- Intro to Computers memory, cpu, hardware, neuman, computer science, devices
- Intro to OFM
- Intro to Databases Intro to Database Migration ORM, ObjectRelationalMapping, Hibernate, JPA, ebeanorm
- Advanced in Databases - optimistic lock, pessimistic lock
- Intro to WebDevelopment - tcp, http
- Data Structures & money
- Intro to Virtualization
- Admin section
- Intro to Types value, record, case class, alias
- Intro to Layers - frontend,ui,ux
- Intro to Culture - teams, psychology, principles, behaviour
- Intro to 41 - aboriginal linux, google whitepapers
- Intro to Security - ssl, handshake, tsl, https, basic auth, tokens, refresh, jwt tokens, access, refresh
- Intro to Crypto
- Advanced
- Advanced Java
- Circuit Breaker, retry, bulkhead, RateLimit, resilience
- Immutable, purity, pure functions, functional style
- Identification Surrogate vs Natural Keys, database, rest, microservice
- Infrastructure devops, docker, containers, kubernetes, k8s, private cloud, continous deployment
- Resources
- Project Templates
- Ships
- Ship10 - 2021-Aug
- Ship 1 - 2017-May
- Ship 2 - 2017-June
- Ship 3 - 2017-July
-
Ship 4 - 2017-September
- Team 4
- Team 4 Reloaded
- Backlog 4
- Sprint 4.1 old
- Sprint 4.1 Home old
- Sprint 4.2 old
- Sprint 4.2 Home old
- Sprint 4.3 old
- Sprint 4.3 Home old
- Sprint 4.4 old
- Sprint 4.4 Home old
- Sprint 4.5 old
- Sprint 4.5 Home old
- Sprint 4.6 old
- Sprint 4.6 Home old
- Sprint 4.7 old
- Sprint 4.7 Home old
- Sprint 4.8 old
- Sprint 4.8 Home old
-
Non software
- Physical Tools - home tooling