Dipl.-Ing. Martin Weitzel, 64380 Roßdorf bei Darmstadt

ccc2025w13

Nach dem Kurs bin ich auch direkt erreichbar unter: mw@tbfe.de

 

https://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

Folienübersicht Übung: https://docs.google.com/presentation/d/1KDNT1yUHu0kxlRIIA8erUreAY7_cu-jCmf0PjS5ezZg/edit?usp=sharing

C++ FAQ "Proper Inheritance: https://isocpp.org/wiki/faq/proper-inheritance

https://prod.liveshare.vsengsaas.visualstudio.com/join?6A462FD0B55E86DDA429FD58D6A01382308A

Clean Code Übungensfolien: https://docs.google.com/presentation/d/1KDNT1yUHu0kxlRIIA8erUreAY7_cu-jCmf0PjS5ezZg/edit?usp=sharing

Github Projekt:

https://github.com/tbfe-de/C-CleanCode

https://prod.liveshare.vsengsaas.visualstudio.com/join?6A462FD0B55E86DDA429FD58D6A01382308A

-------------------------------------------------------------

# Practical Examples

 

This series of examples demonstrate a number Clean Coding Aspects

as are applicable to the programming language (with a short

excursion to C++. The latter mainly serve to underline the

difficulties to adapt a number of clean coding techniques

introduced by more modern "Object Oriented Programming" (OOP)

Style to C and may well be skipped if you are not interested in

this comparison.

 

Except for this the series is meant to be worked in order from the

first to the last. Oftentimes "challenges" suggested in the prior

version have their "solution" in the subsequent one.

 

## Compile and Run

 

Compilation is from a terminal window controlled by a `Makefile`

 

**NOTE:** You need not understand the details of that file just to

compile and run.

 

* `make` -- compiles **and runs** unit tests for the current step.

* `make run-demo-app` compiles (and runs) a small demo application

  for the current step.

 

**NOTE:**

There are variations to the above explained in a small in a

graphic documenting the initial file structure.

 

 

## More Detailed TODO-s

 

The detailed TODD-files in the individual sub-directory suggest a

common series of activities,

* starting with a review to

* understand the current file structure and how it extends the

  previous step

* identify possible shortcomings which may be

  * "unclean" code intentionally left there to be improved;

  * "complicated" code you do not (yet) fully understand.

 

Be sure to take notes about these issues so that you can

propose improvements and/or ask informed questions in a later

discussion.

 

Many detailed TODO-s and with a series of suggested improvements.

Depending on the time you want to spend with the particular step

you have several choices.

 

* Try yourself some "hands-on" work on the code.

  * It is recommended to first copy all files of that step to a

    new directory.

  * Eg. if you are `v2` create a directory `my_v2,` copy all files

    from `v2` over to it, then make that newly created directory

    your current directory.

  * On the command line this would mean to issue these commands:

    (while your current working directory is v2:

```

make realclean

mkdir ../my_v2

cp * ../v2

cd ../my_v2