The Craft of Coding Computer Science in Action. Many IT Careers.

48
The Craft of Coding Computer Science in Action

Transcript of The Craft of Coding Computer Science in Action. Many IT Careers.

Page 1: The Craft of Coding Computer Science in Action. Many IT Careers.

The Craft of Coding

Computer Science in Action

Page 2: The Craft of Coding Computer Science in Action. Many IT Careers.

Many IT Careers

Page 3: The Craft of Coding Computer Science in Action. Many IT Careers.

Some Involve Code

Page 4: The Craft of Coding Computer Science in Action. Many IT Careers.

Things to Discuss

• Object orientation• Data Structures• Recursion• Algorithms

Page 5: The Craft of Coding Computer Science in Action. Many IT Careers.

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 Computer Science in Action. Many IT Careers.

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 Computer Science in Action. Many IT Careers.

Question

What are the 3 fundamental concepts in OOP?

Inheritance EncapsulationPolymorphism

Page 8: The Craft of Coding Computer Science in Action. Many IT Careers.

DjangoInheritance

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

Page 9: The Craft of Coding Computer Science in Action. Many IT Careers.

MongoDB

Encapsulation

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

Page 10: The Craft of Coding Computer Science in Action. Many IT Careers.

Polymorphism

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

Page 11: The Craft of Coding Computer Science in Action. Many IT Careers.
Page 12: The Craft of Coding Computer Science in Action. Many IT Careers.
Page 13: The Craft of Coding Computer Science in Action. Many IT Careers.

OOP: The Future

Page 14: The Craft of Coding Computer Science in Action. Many IT Careers.

Objects aren’t going anywhere

Page 15: The Craft of Coding Computer Science in Action. Many IT Careers.

Data Structures

Page 16: The Craft of Coding Computer Science in Action. Many IT Careers.

Why Data Structures > Relational?

• Performance• Scalability• Meaningful• Loose Coupling

Page 17: The Craft of Coding Computer Science in Action. Many IT Careers.

Data Structures

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

Page 18: The Craft of Coding Computer Science in Action. Many IT Careers.

Queues

Page 19: The Craft of Coding Computer Science in Action. Many IT Careers.

Job Queue (Resque)

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

Page 20: The Craft of Coding Computer Science in Action. Many IT Careers.

Random Question

Who invented Ruby on Rails?

David Heinemeier Hansson

Page 21: The Craft of Coding Computer Science in Action. Many IT Careers.

Kestrel Queue (Twitter)

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

Page 22: The Craft of Coding Computer Science in Action. Many IT Careers.

Stacks

Page 23: The Craft of Coding Computer Science in Action. Many IT Careers.

Stacks example: GDI+ Architect

DEMO

Page 24: The Craft of Coding Computer Science in Action. Many IT Careers.

The Future?

Page 25: The Craft of Coding Computer Science in Action. Many IT Careers.

Primitives in the Cloud

Page 26: The Craft of Coding Computer Science in Action. Many IT Careers.

Windows Azure Service Bus

Page 27: The Craft of Coding Computer Science in Action. Many IT Careers.

Recursion

Page 28: The Craft of Coding Computer Science in Action. Many IT Careers.

Re.cur.sion (noun):See Recursion

Page 29: The Craft of Coding Computer Science in Action. Many IT Careers.

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 Computer Science in Action. Many IT Careers.

Question

What error is typically caused by infinite recursion?

Stack Overflow

Page 31: The Craft of Coding Computer Science in Action. Many IT Careers.

The Future?

Page 32: The Craft of Coding Computer Science in Action. Many IT Careers.

Functional Languages

Page 33: The Craft of Coding Computer Science in Action. Many IT Careers.

F# Example

• DEMO

Page 34: The Craft of Coding Computer Science in Action. Many IT Careers.

Algorithms

Page 35: The Craft of Coding Computer Science in Action. Many IT Careers.

Shlemiel the Painter's Algorithm

Page 36: The Craft of Coding Computer Science in Action. Many IT Careers.

Algorithms

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

to achieve?

Page 37: The Craft of Coding Computer Science in Action. Many IT Careers.

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 Computer Science in Action. Many IT Careers.

Memory Efficiency

Page 39: The Craft of Coding Computer Science in Action. Many IT Careers.

The Future

Page 40: The Craft of Coding Computer Science in Action. Many IT Careers.

Utility Model (Amazon EC2)

Page 41: The Craft of Coding Computer Science in Action. Many IT Careers.

Utility Model (Windows Azure)

Page 42: The Craft of Coding Computer Science in Action. Many IT Careers.

And this other thing…

Page 43: The Craft of Coding Computer Science in Action. Many IT Careers.
Page 44: The Craft of Coding Computer Science in Action. Many IT Careers.
Page 45: The Craft of Coding Computer Science in Action. Many IT Careers.

The Free Lunch is over

Page 46: The Craft of Coding Computer Science in Action. Many IT Careers.

How Will we Cope?

• Functional languages (Low side effects)

• Software transactional memory• Implicit > Explicit computing

Page 47: The Craft of Coding Computer Science in Action. Many IT Careers.

Implicit > Explicit computing

• Demo!

Page 48: The Craft of Coding Computer Science in Action. Many IT Careers.

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