Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modern Programming: Object Oriented Programming and Best Practices

You're reading from   Modern Programming: Object Oriented Programming and Best Practices Deconstruct object-oriented programming and use it with other programming paradigms to build applications

Arrow left icon
Product type Paperback
Published in Jun 2019
Publisher Packt
ISBN-13 9781838986186
Length 266 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
 Lee Lee
Author Profile Icon Lee
Lee
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

About the Book 1. Part One – OOP The Easy Way FREE CHAPTER
2. Antithesis 3. Thesis 4. Synthesis 5. Part Two – APPropriate Behavior
6. Tools That Support Software Development 7. Coding Practices 8. Testing 9. Architecture 10. Documentation 11. Requirements Engineering 12. Learning 13. Critical Analysis 14. Business 15. Teamwork 16. Ethics 17. Philosophy

Part One – OOP The Easy Way

What is object-oriented programming? My guess is that object-oriented programming will be in the 1980’s what structured programming was in the 1970’s. Everyone will be in favor of it. Every manufacturer will promote his products as supporting it. Every manager will pay lip service to it. Every programmer will practice it (differently). And no one will know just what it is.

Tim Rentsch, Object oriented programminghttps://dl.acm.org/citation.cfm?id=947961

Object-Oriented Programming (OOP) has its beginnings in the simulation-focused features of the Simula programming language but was famously developed and evangelized by the Smalltalk team at Xerox’s Palo Alto Research Center. They designed a computing system intended to be personal, with a programming environment accessible to children who could learn about the world and about the computer simultaneously by modeling real-world problems on their computer.

I recently researched the propagation and extension of OOP from PARC to the wider software engineering community, which formed the background to my dissertation We Need to (Small)Talk: object-oriented programming with graphical code browsershttps://www.academia.edu/34882629/We_need_to_Small_talk_object-oriented_programming_with_graphical_code_browsers. What I found confused me: how had this simple design language for children to construct computer programs become so complicated and troublesome that professional software engineers struggled to understand it before declaring it a failure and reaching for other paradigms?

A textbook on my shelf, “A Touch of Class,” by Bertrand Meyer, claims to be “a revolutionary introductory programming textbook that makes learning programming fun and rewarding.” At 876 pages, it makes it a good workout, too: not for the schoolchild, but for the “entering-computer-science student” at degree level.

Digging further showed that the field of object thinking, object technology, OOP, or whatever you would like to call it had been subject to two forces:

  • Additive complexity. Consultants, academics, and architects keen to make their mark on the world had extended basic underlying ideas to provide their own, unique, marketable contributions. While potentially valuable in isolation, the aggregation of these additions (and they were, as we shall see, deliberately aggregated in some cases) yields a rat’s nest of complexity.
  • Structured on-ramps. To make OOP appear easier and more accessible, people developed “object-oriented” extensions to existing programming tools and processes. While this made it easy to access the observable features of OOP, it made it ironically more difficult to access the mental shift needed to take full advantage of what is fundamentally a thought process and problem-solving technique. By fitting the object model into existing systems, technologists doomed it to stay within existing mindsets.

About the Example Code

In this part of the book, I have consciously chosen to use “mainstream,” popular programming languages wherever possible. I have not stuck to any one language, but have used things that most experienced programmers should be able to understand at a glance: Ruby, Python, and JavaScript will be common. Where I’ve used other languages, I’ve done so to express a particular historical context (Smalltalk, Erlang, and Eiffel will be prevalent here) or to show ideas from certain communities (Haskell or Lisp).

One of the points of this part of the book is that as a cognitive tool, OOP is not specific to any programming language, and indeed many of the languages that are billed as object-oriented languages make what (or at least large parts of what) harder. Picking any one language for the sample code would then mean only presenting a subset of OOP.

You have been reading a chapter from
Modern Programming: Object Oriented Programming and Best Practices
Published in: Jun 2019
Publisher: Packt
ISBN-13: 9781838986186
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime