Treffen vom 28. 2. 2018
- Anwesenheitsliste pflegen
Am Wiki anmelden & persönliche Seite anlegen (Kontaktinfos, Name, Interessen, Foto,…)
Mögliche Themen in FutureTalks eintragen
- Nächsten Termin festlegen
- Zeiteinteilung für den Abend festlegen
- Wer hat Kurzvorträge mitgebracht?
- Groben Zeitplan für Hauptvortrag festlegen
Trag' hier deinen Kurzvortrag und Namen ein! :)
Minimal test example:
# minimal.py import pytest def fun(): return False def test_fun(): assert fun() if __name__ == '__main__': pytest.main([__file__, '--doctest-modules'])
You execute the script directly or do $ pytest minimal.py to run the tests.
Implement from scratch:
Gilded Rose Requirements Specification
Please note that this specification as well as the exercise itself it based on the Gilded Rose Refactoring Kata by Emily Bache.
Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. After having attended workshop "Nutzen Sie die Chancen der Digitalisierung" by Wirtschaftskammer Wien we are entrusting you to implement a system that updates our inventory for us.
Here is what this system is supposed to do:
- All items have a "sell in" value which denotes the number of days we have to sell the item
- All items have a "quality" value which denotes how valuable the item is
- At the end of each day our system lowers both values for every item
To be more specific, we require the following:
- Once the sell by date has passed, quality degrades twice as fast
- The quality of an item is never negative
- "Aged Brie" actually increases in quality the older it gets
- The quality of an item is never more than 50
- "Sulfuras", being a legendary item, never has to be sold or decreases in quality
- "Backstage passes", like aged brie, increases in quality as its sell in value approaches; more precisely quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but quality drops to 0 after the concert
Just for clarification, an item can never have its quality increase above 50, however "Sulfuras" is a legendary item and as such its quality is 80 and it never alters.
Due to technical requirements (*mia hom des imma scho so g'mocht*), you are are asked to put both your module as well as test code into one single file.
Copy-paste your code to these etherpads. Each row is a team, counting starts at the screen; left and right while looking at the screen. Continue with the code from your neighbouring team.
Gilded Rose Requirements Specification II
Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. We have a system in place that updates our inventory for us. It was developed by a no-nonsense type named Leeroy, who has moved on to new adventures. Your task is to add the a few new feature to our system.
Please see above for the original specification.
We require the following:
- Due to popular demand, we now sell "Conjured" items that degrade in quality twice as fast as normal items.
- After doing some research we realized that we could as well provide expiration dates that specify each items sell by date. Update our system accordingly.
Although we believe in the odour of "Aged Brie", we think code should not smell. If, while updating our code base, you stumble upon implementation details that do not meet your high standards, please refactor.
Notes for the ambitious developer
Although it might me informative to implemente date-time functionality from scratch, the datetime library is your friend.
Diskussions- und Plauderrunde