Project Development Guide

fivos.doganis@gmail.com









KISS

💋

K eep

I t

S imple

S tupid



!= Easy

"Simplify, Simplify, Simplify"

Steve Jobs

YAGNI

🔮

Y ou

A in't

G onna

N eed

I t

Code for now,
not for the future.
Refactor often.

DRY

🐾

D on't

R epeat

Y ourself


!= WET :

Write Everything Twice

No Copy Paste!


Copy Paste == Code Debt

Copy Paste == Refactoring Opportunity

Copy Paste


Stop!

Think

Refactor Now!

Flow Theory

The art of staying in the zone

by Mihály Csíkszentmihályi

📈

Stuck?

Fight procrastination

🥋

TODO ;)

Fighting procrastination

  • OK to fail
    • "Die and retry" ➡️ Code and refactor
  • Decompose into micro actions
    • Github issues + tags ("easy", "good first issue", etc.)
  • Start just for 5 minutes
    • identify easy issue
    • fix it to get the ball rolling
  • Adjust skills and difficulty to stay in the zone

Iterative Design

MVP: Minimum Viable Product

➿

saturation:120%

Design Thinking

A Non-Linear Process

💡

UX Basics

What makes a good User Experience?

🤩

Use objective criteria

SUBJECTIVE OBJECTIVE
INTUITIVE EFFICIENT: FAST, ERROR PROOF
NATURAL SIMPLE
REALISTIC PRECISE

Affordance

Form ➡️ function

  • button 🎹
  • door knob 🚪
  • hammer 🔨

Discoverability

  • user guesses right
Castlevania ❤️ item : BAD affordance!

Juice

More than eye-candy

The laws of UX

Fitts's law

Find measurable KPIs*

Examples

  • How long does the user take to reach the target?
  • How many mistakes are made before succeeding at a task?
  • How accurate is the result vs a reference?
KPI : Key Performance Indicator

Architecture Basics

🧱

Design Patterns

  • Builder, Observer, State can be interesting
  • ⚠️ avoid Singletons!
  • adapt the pattern to your code, don't use as-is!

Game Programming Patterns 👈

AntiPatterns

ECS

Entity Component System

Articles

Final tips

To keep your mind and code sane

📝

Self documenting code

  • document the "why?"
    • at high-level
    • if needed
  • avoid documentation altogether
    • write tests, examples, tutorials instead
    • write code as documentation

👇

Code as documentation

  • BAD ❌
const float a = 9.81; //gravitational force
float b = 5; //time in seconds
float c = (1/2)*a*(b^2) //multiply the time and gravity together to get displacement.
  • GOOD ✅
float computeDisplacement(float timeInSeconds) {
   const float gravitationalForce = 9.81;
   float displacement = (1 / 2) * gravitationalForce * (timeInSeconds ^ 2);
   return displacement;
}

Naming Conventions

  • "What is this object? What does it do?"
  • Object, variable ➡️ noun
    • user, accountNumber, customerEmail
  • Function, method ➡️ verb
    • user.login(), shutDown()
  • Boolean ➡️ adjective
    • allowed, disabled
    • user.active() ❌
    • user.isActive() ✅

Naming tips

  • convey intention
    var d // elapsed time in days ❌ vs var elapsedTimeInDays ✅
  • name arguments too!
    void copyChars(char a1[], char a2[]) ❌
    void copyChars(char source[], char destination[]) ✅
  • pronunciation (avoid abbreviations)
    genymdms ❌ vs generationTimestamp ✅
  • no magic numbers (keep your code searchable and maintainable)
    s / 5 ❌ vs task / WORK_DAYS_PER_WEEK ✅
  • use camelCase

Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.

Martin Fowler

The End!

👋

![bg](https://i.etsystatic.com/25673303/r/il/4d5185/3469913452/il_1588xN.3469913452_rxwz.jpg)

![bg fit contrast:120% hue-rotate:220deg](https://blog.crisp.se/wp-content/uploads/2016/01/Making-sense-of-MVP-.jpg)

![bg right](https://public-images.interaction-design.org/tags/td-fitts-law-animation-click.mp4)

![bg](https://images.unsplash.com/photo-1594047752131-1ec0a6dfa4fc) ![bg](https://images.unsplash.com/photo-1520391508-2acb23f8f7bd) ![bg](https://images.unsplash.com/photo-1580687104139-9d51ce55e346) ![bg](https://images.unsplash.com/photo-1554296048-b59c9fca4857) ![bg](https://images.unsplash.com/photo-1500239038240-9b3b8bac73c3) ![bg](https://images.unsplash.com/photo-1518640467707-6811f4a6ab73) ![bg](https://images.unsplash.com/photo-1542382156909-9ae37b3f56fd) ![bg](https://images.unsplash.com/photo-1521235471678-c093499ca824) ![bg](https://images.unsplash.com/photo-1643388019606-9173b24bcafb) ![bg](https://images.unsplash.com/photo-1488554378835-f7acf46e6c98) ![bg](https://images.unsplash.com/photo-1512551980832-13df02babc9e) ![bg](https://images.unsplash.com/photo-1500886834366-f7311927c60d) ![bg](https://images.unsplash.com/photo-1500462918059-b1a0cb512f1d)

<style scoped> { section img { height: 100px; clip-path: inset(20px 50px 10px 0 round 50px); } </style> <style scoped> p:nth-child(1) img {object-position:0px -40px} </style> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make everything as simple as possible, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but not simpler *Albert Einstein* -- # K&nbsp;&nbsp;eep # I&nbsp;&nbsp;&nbsp;&nbsp;t # S&nbsp;&nbsp;&nbsp;imple # S&nbsp;&nbsp;&nbsp;tupid ![bg height:770px contrast:110%](https://media.planview.com/clarizen/wp-content/upload/2017/05/KISS-Principle.jpg)