The Craft of Coding

48
The Craft of Coding Computer Science in Action

description

The Craft of Coding. Computer Science in Action. Many IT Careers. Some Involve Code. Things to Discuss. Object orientation Data Structures Recursion Algorithms. Object Orientation. The most fundamental skill in modern software development - PowerPoint PPT Presentation

Transcript of The Craft of Coding

Page 1: The Craft of Coding

The Craft of Coding

Computer Science in Action

Page 2: The Craft of Coding

Many IT Careers

Page 3: The Craft of Coding

Some Involve Code

Page 4: The Craft of Coding

Things to Discuss• Object orientation• Data Structures• Recursion• Algorithms

Page 5: The Craft of Coding

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: The Craft of Coding

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: The Craft of Coding

Question

What are the 3 fundamental concepts in OOP?

Inheritance EncapsulationPolymorphism

Page 8: The Craft of Coding

DjangoInheritance

Python code from https://github.com/django

Page 9: The Craft of Coding

MongoDB

Encapsulation

C++ code from https://github.com/mongodb

Page 10: The Craft of Coding

Polymorphism• The most important of the three?• See AuditHistoryViewModel.cs

Page 11: The Craft of Coding
Page 12: The Craft of Coding
Page 13: The Craft of Coding

OOP: The Future

Page 14: The Craft of Coding

Objects aren’t going anywhere

Page 15: The Craft of Coding

Data Structures

Page 16: The Craft of Coding

Why Data Structures > Relational?

• Performance• Scalability• Meaningful• Loose Coupling

Page 17: The Craft of Coding

Data Structures• Queue• Stack• Hash• Arrays• Linked Lists• Trees• Graphs

Page 18: The Craft of Coding

Queues

Page 19: The Craft of Coding

Job Queue (Resque)

Ruby code from https://github.com/defunkt/resque

Page 20: The Craft of Coding

Random QuestionWho invented Ruby on Rails?

David Heinemeier Hansson

Page 21: The Craft of Coding

Kestrel Queue (Twitter)

SCALA code from https://github.com/robey/kestrel

Page 22: The Craft of Coding

Stacks

Page 23: The Craft of Coding

Stacks example: GDI+ Architect

DEMO

Page 24: The Craft of Coding

The Future?

Page 25: The Craft of Coding

Primitives in the Cloud

Page 26: The Craft of Coding

Windows Azure Service Bus

Page 27: The Craft of Coding

Recursion

Page 28: The Craft of Coding

Re.cur.sion (noun):See Recursion

Page 29: The Craft of Coding

Should we recurse?• Historically developers avoid

recursion.• Some data is recursive in nature. • Looking toward the future, recursion

has advantages

Page 30: The Craft of Coding

QuestionWhat error is typically caused by infinite recursion?

Stack Overflow

Page 31: The Craft of Coding

The Future?

Page 32: The Craft of Coding

Functional Languages

Page 33: The Craft of Coding

F# Example• DEMO

Page 34: The Craft of Coding

Algorithms

Page 35: The Craft of Coding

Shlemiel the Painter's Algorithm

Page 36: The Craft of Coding

Algorithms• O notation is helpful• Key question is what are you trying

to achieve?

Page 37: The Craft of Coding

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: The Craft of Coding

Memory Efficiency

Page 39: The Craft of Coding

The Future

Page 40: The Craft of Coding

Utility Model (Amazon EC2)

Page 41: The Craft of Coding

Utility Model (Windows Azure)

Page 42: The Craft of Coding

And this other thing…

Page 43: The Craft of Coding
Page 44: The Craft of Coding
Page 45: The Craft of Coding

The Free Lunch is over

Page 46: The Craft of Coding

How Will we Cope?• Functional languages (Low side

effects)• Software transactional memory• Implicit > Explicit computing

Page 47: The Craft of Coding

Implicit > Explicit computing

• Demo!

Page 48: The Craft of Coding

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