DEV Community

Cover image for Color code
Igor Spasić for Oblac

Posted on

4 4

Color code

Standard programming languages are generic. While that is the purpose of such language, it leads to many ways of understanding and doing the same thing.

The idea is to establish specific guides that should lead to uniquely designed code, hopefully, a better one, leaving less space for a different interpretation.

Why 'color'?

We need a new term for the code categorization. Common terms, 'type' or 'kind,' are already used in a different context. And it's fun!

Let's begin.

Content

Examples

  • Calculator - using Ctx
  • ToDo App - simple app with two layers
  • Restaurants - real-world web app with Ktor & Exposed.

Primary colors

🟦 == calm, unchanged, stable
🟨 == pure, light, combined
🟥 == contagious, changes other colors
Enter fullscreen mode Exit fullscreen mode

Finally:

⚡️ Pro Tip: don't take this too serious.

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay