Articles

Publish at September 17 2024 Updated September 17 2024

Object-oriented programming: a simplified approach to code

An accessible programming approach

A computer displaying programming

The legend of the Tower of Babel depicts the fact that humans lost the ability to speak a common language and began to use different dialects, making communication between them far more difficult. This divine vengeance never affected computer science, which also developed dozens of ways of writing programs. And yet, whatever coding language you choose, if it's error-free, most machines will be able to read it, whether it's done in Python, Java, C++ or other languages.

In fact, choices are made according to the programmer's wishes and comfort with the type of code. He will also tend to adapt a "syntax" or programming method according to what he's looking for. Among the increasingly popular methods is object-oriented programming (OOP).

Code simplification

There are different approaches to programming. Procedural programming involves breaking down a problem into sub-problems until procedures can be identified and coded to solve them. This strategy is fraught with pitfalls, since it only takes one small change to render everything else unstable. The functional approach is not very widespread; it takes its inspiration from mathematical functions. It is particularly useful for manipulating and analyzing massive amounts of data (known as megadata).

OOP is a method developed in the 1960s and 1970s that seems simpler in its operation. It has its own vocabulary, but is accessible even to novice programmers because it can be taught in pseudo-code. The principle is to create classes of elements with properties and methods (functionalities) that will be directed by constructors. Components of a class may share similar characteristics; this is known as inheritance. When a method has the same name but different implementations, this is called polymorphism.

Each object encapsulates its internal state in the code. For example, a car in object-oriented programming would have in its capsule its fuel level, whether the engine is switched on, etc. This allows it to react to manipulations of the code. This allows them to react to the user's manipulations of an application without necessarily having to program everything. Let's take the automobile analogy again in the context of a mobile gaming application. Having already encapsulated the state, if the user tries to start a car without gas, it simply won't work.

A perfect language for a world of artificial intelligence?

In fact, that's the beauty of object-oriented programming: abstraction. The idea is to simplify high-level concepts by hiding tedious details in the code, making it more readable. This was facilitated, among other things, by the frequent (though not exclusive) use of the Pascal language, created in the late 1960s by Swiss computer scientist Niklaus Wirth , who passed away in January 2024. This language was expressly designed to teach code to students new to programming. It wasn't designed for OOP as such, but more modern versions take into account inheritance and classes.

Consequently, its simplicity of approach makes it an excellent entry point for teaching code once the basics have been mastered. All the more so with the advent of artificial intelligence, object-oriented programming is emerging as an advantage in the creation of new algorithms. By adopting it, AI creators will be able to better understand how their algorithms work, offering more possibilities for modifying or improving their code.


Image: Pexels from Pixabay

References
Ahmad, Arslan. "Beginner's guide to object-oriented programming (OOP)." Design Gurus. Last updated April 23, 2023. https://www.designgurus.io/blog/object-oriented-programming-oop.

Kandamplayil, Rahil. "What's the Pascal Programming Language for?" YUHIRO Global. Last updated May 9, 2024. https://www.yuhiro-global.com/fr/a-quoi-sert-le-langage-de-programmation-pascal/.

Krajnc, Antoine. "Object-oriented programming: definition, languages, use cases." Jedha Bootcamp. last updated September 11, 2024. https://www.jedha.co/formation-python/programmation-orientee-objet.

"Object-Oriented Programming: Advanced Concepts." Formations Python En Français. Accessed September 15, 2024. https://www.docstring.fr/formations/loriente-objet-concepts-avances/.

"Niklaus Wirth, creator of the Pascal programming language and winner of the Turing Award, the equivalent of the Nobel Prize for computer science, is no more." Developpez.com. Last updated January 4, 2024. https://pascal.developpez.com/actu/352613/Niklaus-Wirth-createur-du-langage-de-programmation-Pascal-et-laureat-du-prix-Turing-l-equivalent-du-Prix-Nobel-pour-l-informatique-n-est-plus-Un-pionnier-de-l-informatique-nous-a-quitte/.

"Object-Oriented Programming (OOP)." Bob The Developer. Accessed September 15, 2024. https://www.bob-le-developpeur.com/notions/programmation-orientee-objet-poo.

"Object-Oriented Programming." MDN Web Docs. Accessed September 15, 2024. https://developer.mozilla.org/fr/docs/Learn/JavaScript/Objects/Object-oriented_programming.

"What is Object-Oriented Programming (OOP)?" IONOS Digital Guide. Last updated October 6, 2023. https://www.ionos.fr/digitalguide/sites-internet/developpement-web/oop-programmation-orientee-objet/.

Siddiqui, Moiz A. "The future of OOP in AI and machine learning." Medium. last updated May 18, 2024. https://medium.com/@moizas/the-future-of-oop-in-ai-and-machine-learning-85c655cddd4a.


See more articles by this author

Files

  • Reset

Thot Cursus RSS
Need a RSS reader ? : FeedBin, Feedly, NewsBlur


Don't want to see ads? Subscribe!

Superprof: the platform to find the best private tutors  in the United States.

 

Receive our File of the week by email

Stay informed about digital learning in all its forms. Great ideas and resources. Take advantage, it's free!