Gergő Pintér, PhD
gergo.pinter@uni-corvinus.hu
based on Making sense of MVP (Minimum Viable Product) by Henrik Kniberg
as a [type of user]
, I want to
[action/function]
in order to
[benefit/value]
Title (one line describing the story)
Narrative:
As a [role]
I want [feature]
So that [benefit]
Acceptance Criteria:
(presented as Scenarios)
Scenario 1: Title
Given [context]
And [some more context]...
When [event]
Then [outcome]
And [another outcome]...
Scenario 2: ...
more from Jeff Patton: 5 story mapping mistakes
most software developer do not use UML (in a formal way), but hand drawn sketches which often include UML elements [3]
overview first, zoom and filter, then details on demand
– Ben Shneiderman
this chapter is based on c4model.com
other possible users:
administrator, course planner
read about the design patterns in details, for example at refactoring.guru
OO pattern | FP pattern |
---|---|
factory pattern | function |
strategy pattern | function |
decorator pattern | function |
visitor pattern | function |
… | … |
Peter Norvig demonstrated that 16 out of the 23 patterns are simplified or eliminated by language features in Lisp or Dylan (1998) [6]
more about it from Scott Wlaschin [7]
SOLID is a mnemonic acronym for five design principles intended to make object-oriented designs more understandable, flexible, and maintainable [8]
based on [9], [10]
source Wikipedia [11]
ASP.NET, Django (Python), Ruby on Rails, Laravel (PHP)
Windows Forms, Java Swing
WPF, AngularJS
https://developers.facebook.com/v21.0/me?fields=id,name
based on What is an implementation plan? 6 steps to create one [12]
a risk is a possibility that something bad can happen
based on riskstorming.com | CC BY 4.0
based on riskstorming.com | CC BY 4.0
Risk | Impact (1-3) |
Likelihood (0-10) |
Risk (I * L) |
Mitigation |
---|---|---|---|---|
Rust Language Changes | 2 | 7 | 14 | Target a specific Rustc version |
Missing GCC 13 upstream window | 1 | 6 | 6 | Merge in GCC 14 and be proactive about reviews |
at the end of a sprint planning, every task in the sprint backlog should have an assignee
source: [13]
“Story points reward team members for solving problems based on difficulty, not time spent. This keeps team members focused on shipping value, not spending time [14].”
based on: [16]
source: [16]
shows user flow, ~ user story map flow
not just style guides, also best practices
just as in the case of natural languages, you ought to use a language properly
doSomething()
and doSomething2()
intNumberOfDays = 0
User
, Activity
user = User()
aggregate_activity
activity_aggregation
avoid
however, comments can be used if they help to understand the code
a code smell is a surface indication that usually corresponds to a deeper problem
– Martin Flower [18]
software rot is the degradation, deterioration, or loss of the use or performance of software over time [19]
requirement smell: signs in the requirements that are not necessarily wrong but could be problematic [20]
source: [21], [17]
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 [23]
source: Code Review Guidelines for Humans [23]
the turtle and rabbit figures by Delapouite under CC BY 3.0 via game-icons.net
a unit test is another piece of code, that tests the given unit
parts of a unit test
there is no open standard for categories
these are from the book xUnit test patterns: Refactoring test code – by Gerard Meszaros [26]
As the tests get more specific, the code gets more generic.
– Robert C. Martin, The Cycles of TDD [27]
code/fizzbuzz.py
code/test_fizzbuzz.py
test coverage: 70%
test coverage: 90%
test coverage: 100%
four control flow branch, all of them needs to be tested
it is hard to objectively measure the quality of code
def calculate_progress(
finished: int,
total: int,
as_percentage: bool,
) -> float:
progress = finished / total
if as_percentage:
return progress * 100
else:
return progress
this function need some value checking
test coverage only measures that every control flow branch is tested
the point of testing is testing for the edge cases
add feature | fix a bug | refactor | optimize | |
---|---|---|---|---|
structure | changes | changes | changes | |
new funcionality | changes | |||
functionality | changes | |||
resource usage | changes |
Michael Feathers, Working Effectively with Legacy Code: part 1 pp 6 [28]
black box
white box
repetitve tasks of
scripting: writing relatively short and simple code to automatize an otherwise manual process
linting
code formatting
Continuous Integration is a software development practice where each member of a team merges their changes into a codebase together with their colleagues changes at least daily.
– Martin Fowler [29]
A/B testing is more of a testing approach than a deployment technique, but it works similarly to canary deployment. It involves reviewing two versions of updates in small set of users to identify which version perform better. [31]
further reading: 11 DevOps Principles and Practices to Master: Pro Advice - by Fernando Doglio
should not replace human reviewing
just decrease the work by automatizing trivial tasks
additional labels for pre-release and build metadata are available as
extensions to the major.minor.patch
format | from semver.org
format examples:
“CalVer is a versioning convention based on your project’s release calendar, instead of arbitrary numbers.” | calver.org
source: The Cost of Interruption for Software Developers – by Steven To [33]
unplanned
planned
source: The Cost of Interruption for Software Developers – by Steven To [33]
Sometimes it can be somewhat formal.↩︎