Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Teaching an old dog new tricks

Tags:

oop

procedural

I have a great manager who was a procedural coding wizard in his day. He is now faced with managing a team which uses object oriented programming in both .Net and Java. He struggles to understand a lot of the patterns and terminology we discuss. I am wondering what experiences SO members have had with helping others with this transition.

I am also looking for great procedural -> OOP code examples that can show him how procedural code can be rewritten to be OOP. I have provided him with the opposite, meaning I took OO code and turned it into procedural but I am looking for code examples others may have used that were found to be effective for learning.

Finally, any books that people can recommend that are written for people going through this transition would be appreciated.

I was not sure if this constitutes as a community wiki. If so I can change it.

Thanks!

like image 389
northpole Avatar asked Feb 28 '23 16:02

northpole


2 Answers

Martin Fowler's Refactoring book is all about how to take procedural code and refactor it to be more object-oriented in small, manageable steps. I found it very useful for just the sort of thing you describe. If I recall correctly, the examples are all in Java, but are easy to apply to other environments.

like image 109
Joel Mueller Avatar answered Mar 11 '23 20:03

Joel Mueller


I've never understood why people talk about OOP or procedural as if they are mutually exclusive. I mean, in OOP you have your classes etc but the class methods are usually procedural in style. They are just fancy function calls. I used C/Pascal for years and most of that stuff is still applicable in OOP languages. Any intro Java or .NET book will have enough examples to bring him up to speed on basic OOP terminology.

like image 43
PowerApp101 Avatar answered Mar 11 '23 18:03

PowerApp101