Gergő Pintér, PhD
gergo.pinter@uni-corvinus.hu
a code smell is a surface indication that usually corresponds to a deeper problem
– Martin Flower [1]
software rot is the degradation, deterioration, or loss of the use or performance of software over time [2]
requirement smell: signs in the requirements that are not necessarily wrong but could be problematic [3]
source: [4], [5]
it is hard to objectively measure the quality of code
defined as:
activity diagram
control flow
def query_progress(user_id:int) -> float:
# establish connection
con= sqlite3.connect("data.db")
# build query
progress_query = f"""
SELECT
lesson / 50.0 AS progress
FROM activity
WHERE
user_id = {user_id} AND
result = 'success'
ORDER BY
lesson DESC
LIMIT 1
;
"""
# execute query
res =con.execute(progress_query)
progress=res.fetchone()[0]
return progress
every work product can and should be reviewed
type | formality | led by | effort | documentation |
---|---|---|---|---|
informal | not formal | noone | minimal | undocumented |
walkthrough | not formal1 | authors | very low | normal, fault-finding |
technical | less formal | trained moderator, not the author | moderate | more detailed |
inspection | most formal | trained moderator | high | thorough; based on standards, checklists |
source: Code Review Guidelines for Humans [7]
source: Code Review Guidelines for Humans [7]
Sometimes it can be somewhat formal.↩︎