Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109265

Re: Recommendation for Object-Oriented systems to study

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Newsgroups comp.lang.python
Subject Re: Recommendation for Object-Oriented systems to study
Date 2016-05-30 14:14 -0400
Organization IISS Elusive Unicorn
Message-ID <mailman.41.1464632091.1839.python-list@python.org> (permalink)
References <53b21136-68ce-485c-8ccb-d6d28dace9c5@googlegroups.com> <5tuokbhac6lbs602p4g64tpjepm1lro7vq@4ax.com>

Show all headers | View raw


On Sun, 29 May 2016 07:42:04 -0700 (PDT), Ankush Thakur
<ankush.thakur53@gmail.com> declaimed the following:

>Hello,
>
>I'm a self-taught programmer who has managed to claw his way out of Python basics and even covered the intermediate parts. But I feel I have a ton of theory in my head and would like to see some smallish applications in action. More specifically, I'm looking for Object Oriented designs that will help me cement my knowledge and expose me to best practices that books never cover. I have half a mind to start reading up the Django or Pandas source code, but I don't want to overwhelm myself. 
>

	It is no clear if you want something for OOAD (object oriented Analysis
and Design) or for OOP (object oriented Programming) -- though the latter
works better with a foundation of the first.

	OOAD tends to be language independent (well, these days the texts
probably focus on UML as the notation -- but UML is not implementation).
With some difficulty, one can use a non-OO language to implement an OO
design (the first C++ systems were fancy macro pre-processors that
generated C source code; if one understands the type of constructs that
produces, one can hand code the same).

	In a very simplistic form OOAD comes down to reading a text description
of a task/system identifying nouns, verbs, and adjectives. The nouns are
what might become OO Classes, the verbs identify possible methods, and
adjectives may be attributes. 

	25 years ago, the common assignment in the OOAD/OOP (the second half
being an intro to C++) classes my company gave was to design a simple
calculator. The designs from most of the students tended to be "keyboard"
containing a matrix of "keys" sending "function codes" to a centralized
"processor" which  then sent results to update the "display"... My design
was "keyboard" with matrix of "keys" implementing functions by
pulling/pushing "values" on a "stack", with the "stack" updating the
"display" with the value on top of stack. If you haven't guessed -- my
design is based on RPN calculators, and even entering digits was
implemented by a digit key operation popping the top of stack, shifting
left one digit, appending the new digit (the fixed value of the key), and
pushing the result back onto the stack.

	Granted, you wouldn't make a hardware design where each key had a logic
chip... But it made for a very clean design to add operations... Subclass
the OperationKey class, override method that performs the operation. Add
instance of new subclass to the"keyboard". The other students would have
had to change both their keyboard matrix for a new operation, and modify
the processor class to dispatch to a handler for a new function code.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-05-29 07:42 -0700
  RE: Recommendation for Object-Oriented systems to study "Joseph Lee" <joseph.lee22590@gmail.com> - 2016-05-29 09:00 -0700
    Re: Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-05-30 08:56 -0700
  Re: Recommendation for Object-Oriented systems to study Michele Simionato <michele.simionato@gmail.com> - 2016-05-29 10:49 -0700
    Re: Recommendation for Object-Oriented systems to study Terry Reedy <tjreedy@udel.edu> - 2016-05-29 14:29 -0400
      Re: Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-05-30 08:57 -0700
        Re: Recommendation for Object-Oriented systems to study Terry Reedy <tjreedy@udel.edu> - 2016-05-30 15:01 -0400
          Re: Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-05-31 10:52 -0700
            Re: Recommendation for Object-Oriented systems to study Terry Reedy <tjreedy@udel.edu> - 2016-06-01 05:22 -0400
              Re: Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-06-03 10:28 -0700
    Re: Recommendation for Object-Oriented systems to study Alan Evangelista <alanoe@linux.vnet.ibm.com> - 2016-05-29 15:12 -0300
      Re: Recommendation for Object-Oriented systems to study Marko Rauhamaa <marko@pacujo.net> - 2016-05-29 22:42 +0300
      Re: Recommendation for Object-Oriented systems to study Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-30 11:34 +1200
        Re: Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-05-30 08:59 -0700
      Re: Recommendation for Object-Oriented systems to study Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-01 22:44 -0700
        Re: Recommendation for Object-Oriented systems to study Alan Evangelista <alanoe@linux.vnet.ibm.com> - 2016-06-02 09:15 -0300
          Re: Recommendation for Object-Oriented systems to study Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 18:13 -0700
          Re: Recommendation for Object-Oriented systems to study Bob Martin <bob.martin@excite.com> - 2016-06-03 07:14 +0100
            Re: Recommendation for Object-Oriented systems to study Phuong Phan <p.h.phan2006@gmail.com> - 2016-06-03 18:07 +0900
              Re: Recommendation for Object-Oriented systems to study Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 09:17 -0700
  Re: Recommendation for Object-Oriented systems to study Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-30 14:14 -0400
  Re: Recommendation for Object-Oriented systems to study Sayth Renshaw <flebber.crue@gmail.com> - 2016-06-03 07:24 -0700
    Re: Recommendation for Object-Oriented systems to study Ankush Thakur <ankush.thakur53@gmail.com> - 2016-06-03 10:24 -0700

csiph-web