My keynote from PyCon SG 2015.
Andrew Godwin@andrewgodwinPERILSOFTHESOFTWAREENGINEERING
View Slide
Andrew GodwinHi, I'mDjango Core DeveloperSenior Engineer atFar too many hobbies
"Perils"
Computer Science≠Software Engineering
EngineeringMechanicalCivilSoftwareChemicalMaterials
Mechanical Engineeringhttps://www.flickr.com/photos/mariaeklind/
Nondeterministic
Cost of Entry
Civil Engineering
Timescales
Cost of Failure
AerospaceSoftware Engineering
Failure: When, not if
Margaret Hamilton, 1969
Apollo 11 LM, "Eagle"
Web/AppSoftware Engineering
Quick to build and test
Minimal equipment costs
Well-paid
Explicit is better than Implicit
Code Indirection
class MyView(View):def get(self, request):return self.render(request, "template.html")
class MyView(FormView, AuditMixin, OtherMixin):def get(self, request):return self.render(request, "template.html")class AuditMixin(BaseAuditor, AdditionalStuff):...class OtherMixin(MyObject, SomethingElse):...
Async Uncertainty
def async_handler():with open("my_file.txt", "r") as fh:write_socket(1, fh.read())redis.incr("key1", 2)
Schemas
{"id": 342,"name": "David","weight": 74,}{"id": 342,"name": "Ellie","weight": "85kg",}{"id": 342,"nom": "Frankie","weight": 77,}{"id": 342,"name": "Frankie","weight": -67,}
Clever code is badMaintainable code is good
xs = [number for inner in nestedif len(inner) > 2 for number in inner]
for inner in nested:if len(inner) > 2:for number in inner:xs.append(number)
Explore and Discard
There is no perfect solution
Throwing everything awayrarely works
Backwards compatabilityis your friend
Nobody is a genius;we're all mediocre
Argue over code,not over ideas
10 years?100 years?1000 years?
Who will access it?
What format will it be?
Is it even important?
Over thousands of years, themachine memories have beenfilled with programs that can help““A Deepness In The SkyVernor Vinge
Engineering is collaborative
Build well.
Thanks.Andrew Godwin@andrewgodwin