Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu
Hard-coding is for Starters, multi-Environment setup is the real deal

Hard-coding is for Starters, multi-Environment setup is the real deal

Posted on June 19, 2023June 19, 2023 by Toma Velev

We’ve all been junior coders at some point and is prutty OK to have been hard-coding stuff directly into thesource code.

While hard-coding can be appropriate for

  • small, one-time projects,
  • single developer applications
  • or quick prototypes,

It generally becomes less desirable as the complexity and scale of the project increase. Hard-coded values make it harder to modify or update the program without directly modifying the source code, which can be time-consuming and error-prone. It also limits the reusability of code and can lead to code duplication.

In contrast, using

  • environment variables, or start-up arguments
  • configuration files,
  • or external data sources

allows for greater flexibility, modularity, and maintainability. By separating data from the code, you can change values or configurations without modifying the underlying logic. This promotes

  • code testability – as some logic could be tested against a safe data set.
  • having independence of dev and prod
  • code reusability – makes it easier to adapt the program to different scenarios or environments.

That being said, programming is a continuous learning process, and there are situations where hard-coding may still be appropriate or expedient. It’s important to understand the trade-offs and choose the approach that best suits the specific requirements and constraints of each project.

Virtualization & Containerization

The way backends are started evolved from – running inside virtual machines – to running in sandboxed containers inside a host. This allows having practically identical environments in dev, test and production. Software like Docker helps learn this and if you’ve advanced – you may learn also Kubernetes. All this is a must today – for real world applications that minimize settings developer errors and developer OS – harded stuff.

  • Jenkins SCP File Upload to Remote Server
  • Essential Programming Books – Principles & Flutter
  • Social Media Platforms 🌍
  • Strategies to prevent review regressions
  • How to set Google Map Theme in a Flutter App

Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (269)
  • Graphical User Interface (14)
  • Marketing (117)
  • Software Development (286)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (15)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (84)
    • Flutter Apps (24)
    • GPT (4)
    • Java (38)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (35)
    • Utils (15)
    • Vaadin 24+ (27)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Jenkins SCP File Upload to Remote Server
  • Essential Programming Books – Principles & Flutter
  • Social Media Platforms 🌍
  • Strategies to prevent review regressions
  • How to set Google Map Theme in a Flutter App

Post Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (269)
  • Graphical User Interface (14)
  • Marketing (117)
  • Software Development (286)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (15)