craft of coding
TRANSCRIPT
![Page 1: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/1.jpg)
The Craft of Coding
Computer Science in Action
![Page 2: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/2.jpg)
Many IT Careers
![Page 3: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/3.jpg)
Some Involve Code
![Page 4: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/4.jpg)
Things to Discuss• Object orientation• Data Structures• Recursion• Algorithms
![Page 5: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/5.jpg)
Object Orientation• The most fundamental skill in
modern software development• Almost all “real world” languages are
object oriented.• Inheritance is an important concept,
but OOP is more than inheritance.
![Page 6: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/6.jpg)
Object Orientation• The most fundamental skill in
modern software development• Almost all “real world” languages are
object oriented.• Inheritance is an important concept,
but OOP is more than inheritance.
![Page 7: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/7.jpg)
Question
What are the 3 fundamental concepts in OOP?
Inheritance EncapsulationPolymorphism
![Page 8: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/8.jpg)
DjangoInheritance
Python code from https://github.com/django
![Page 9: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/9.jpg)
MongoDB
Encapsulation
C++ code from https://github.com/mongodb
![Page 10: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/10.jpg)
Polymorphism• The most important of the three?• See AuditHistoryViewModel.cs
![Page 11: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/11.jpg)
![Page 12: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/12.jpg)
![Page 13: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/13.jpg)
OOP: The Future
![Page 14: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/14.jpg)
Objects aren’t going anywhere
![Page 15: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/15.jpg)
Data Structures
![Page 16: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/16.jpg)
Why Data Structures > Relational?
• Performance• Scalability• Meaningful• Loose Coupling
![Page 17: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/17.jpg)
Data Structures• Queue• Stack• Hash• Arrays• Linked Lists• Trees• Graphs
![Page 18: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/18.jpg)
Queues
![Page 19: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/19.jpg)
Job Queue (Resque)
Ruby code from https://github.com/defunkt/resque
![Page 20: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/20.jpg)
Random QuestionWho invented Ruby on Rails?
David Heinemeier Hansson
![Page 21: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/21.jpg)
Kestrel Queue (Twitter)
SCALA code from https://github.com/robey/kestrel
![Page 22: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/22.jpg)
Stacks
![Page 23: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/23.jpg)
Stacks example: GDI+ Architect
DEMO
![Page 24: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/24.jpg)
The Future?
![Page 25: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/25.jpg)
Primitives in the Cloud
![Page 26: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/26.jpg)
Windows Azure Service Bus
![Page 27: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/27.jpg)
Recursion
![Page 28: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/28.jpg)
Re.cur.sion (noun):See Recursion
![Page 29: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/29.jpg)
Should we recurse?• Historically developers avoid
recursion.• Some data is recursive in nature. • Looking toward the future, recursion
has advantages
![Page 30: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/30.jpg)
QuestionWhat error is typically caused by infinite recursion?
Stack Overflow
![Page 31: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/31.jpg)
The Future?
![Page 32: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/32.jpg)
Functional Languages
![Page 33: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/33.jpg)
F# Example• DEMO
![Page 34: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/34.jpg)
Algorithms
![Page 35: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/35.jpg)
Shlemiel the Painter's Algorithm
![Page 36: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/36.jpg)
Algorithms• O notation is helpful• Key question is what are you trying
to achieve?
![Page 37: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/37.jpg)
Algorithms and Runtime Analysis
• O notation is a start• But in the real world performance is
situational• The key question is what are you
trying to achieve?
![Page 38: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/38.jpg)
Memory Efficiency
![Page 39: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/39.jpg)
The Future
![Page 40: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/40.jpg)
Utility Model (Amazon EC2)
![Page 41: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/41.jpg)
Utility Model (Windows Azure)
![Page 42: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/42.jpg)
And this other thing…
![Page 43: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/43.jpg)
![Page 44: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/44.jpg)
![Page 45: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/45.jpg)
The Free Lunch is over
![Page 46: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/46.jpg)
How Will we Cope?• Functional languages (Low side
effects)• Software transactional memory• Implicit > Explicit computing
![Page 47: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/47.jpg)
Implicit > Explicit computing
• Demo!
![Page 48: Craft of coding](https://reader035.vdocuments.us/reader035/viewer/2022062820/58aa1e031a28abff6b8b5551/html5/thumbnails/48.jpg)
Creative Commons Acknowledgments and Thanks!
• US Navy• Lostechies• Flickr user otrocalpe• Flickr user Reportergimmi• Flickr user rjrgmc28• Flickr user seanmcgrath• Flickr user Valerie Everett• Flickr user ashcroft54• Flickr user bfishadow• Flickr user Brett Jordan• c Flickr user ryptic_star
• Flickr user fenng• Flickr user flakyredhead• Flickr user FrenchKheldar• Flickr user gadl• Flickr user groovelock• Flickr user jeff_werner• Flickr user katiew• Flickr user limowreck666• Flickr user Minifig• Flickr user EugeniusD80• Openclip user liftarn