• Looking for OOP ideas

    From Luc@luc@sep.invalid to comp.lang.tcl on Wed Sep 25 16:59:56 2024
    From Newsgroup: comp.lang.tcl

    Here I am again. I still haven't learned OOP and have been feeling
    like trying again. What I ask of you this time is ideas for practicing.
    It's hard for me to come up with them because I am not sufficiently
    familiar with OOP. I would like you to suggest some kind of project
    I can tackle to practice as much OOP as possible. It doesn't have to be anything really useful or practical. The goal is not to make any kind
    of application, but rather just practice OOP. I would like something
    that requires a lot of repetition, something that forces me to toy
    with typical OOP mechanisms over and over. I think I will prefer
    using Snit, but I am not really sure.

    Thank you for any ideas.
    --
    Luc


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Ralf Fassel@ralfixx@gmx.de to comp.lang.tcl on Thu Sep 26 11:24:30 2024
    From Newsgroup: comp.lang.tcl

    * Luc <luc@sep.invalid>
    | Here I am again. I still haven't learned OOP and have been feeling
    | like trying again. What I ask of you this time is ideas for practicing.
    | It's hard for me to come up with them because I am not sufficiently
    | familiar with OOP. I would like you to suggest some kind of project
    | I can tackle to practice as much OOP as possible. It doesn't have to be
    | anything really useful or practical. The goal is not to make any kind
    | of application, but rather just practice OOP.

    https://www.amazon.de/Object-Oriented-Programming-Dummies-Clement-Shammas/dp/1568843321

    ?

    I haven't read that myself, but I consider the "for Dummies" series
    being helpful most of the times.

    | I would like something that requires a lot of repetition, something
    | that forces me to toy with typical OOP mechanisms over and over. I
    | think I will prefer using Snit, but I am not really sure.

    Using snit will add more of the "nothing-to-do-with-oop" hurdles, so I
    would recommend to only go there later when you are familiar with the
    basic concepts of OOP.

    R'
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Luc@luc@sep.invalid to comp.lang.tcl on Thu Sep 26 10:17:16 2024
    From Newsgroup: comp.lang.tcl

    On Thu, 26 Sep 2024 11:24:30 +0200, Ralf Fassel wrote:

    https://www.amazon.de/Object-Oriented-Programming-Dummies-Clement-Shammas/dp/1568843321
    I haven't read that myself, but I consider the "for Dummies" series
    being helpful most of the times.

    Using snit will add more of the "nothing-to-do-with-oop" hurdles, so I
    would recommend to only go there later when you are familiar with the
    basic concepts of OOP.


    I already know the most basic concepts of OOP. I would rather focus on
    Tcl implementations only now.

    I just want some ideas to practice. Someone who is used to OOP should be
    able to suggest something interesting.
    --
    Luc


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From et99@et99@rocketship1.me to comp.lang.tcl on Thu Sep 26 11:43:34 2024
    From Newsgroup: comp.lang.tcl

    On 9/26/2024 6:17 AM, Luc wrote:
    On Thu, 26 Sep 2024 11:24:30 +0200, Ralf Fassel wrote:

    https://www.amazon.de/Object-Oriented-Programming-Dummies-Clement-Shammas/dp/1568843321
    I haven't read that myself, but I consider the "for Dummies" series
    being helpful most of the times.

    Using snit will add more of the "nothing-to-do-with-oop" hurdles, so I
    would recommend to only go there later when you are familiar with the
    basic concepts of OOP.


    I already know the most basic concepts of OOP. I would rather focus on
    Tcl implementations only now.

    I just want some ideas to practice. Someone who is used to OOP should be
    able to suggest something interesting.


    I believe the best way to learn a new tool, such as a new programming language, is to think of something real rather than just write throwaway code using the new tool.

    In your case, I would suggest that you create an object for the search you asked about in your earlier posting.

    You might even have your object work with both in memory and a sqlite representation that you mentioned, where the latter might persist across program runs. You could use the object to hide the actual representation and have methods for lookup, load, add, etc. The constructor might be where you could choose the implementation type and provide any extra details, such as a file name.

    As to snit, it was great when it was one of the only OO tools in TCL. Although the current tclOO says that its design is intended to be a platform for building OO systems, I think the future will see tclOO as simply tcl's OO system all by itself. Having to learn multiple OO systems would be a burden on any future programmers, IMHO.

    e

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Luc@luc@sep.invalid to comp.lang.tcl on Thu Sep 26 23:32:21 2024
    From Newsgroup: comp.lang.tcl

    On Thu, 26 Sep 2024 11:43:34 -0700, et99 wrote:

    I believe the best way to learn a new tool, such as a new programming >language, is to think of something real rather than just write throwaway
    code using the new tool.

    I see your point, but as a former teacher and a chronically self-taught individual, I beg to disagree. I am an expert on my own learning since
    I've been using this one brain for decades and have learned a lot with it.
    I know what it needs. It needs strong focus on mechanisms.

    (That's one of the reasons why I dislike cramming a lot of non-dynamic
    data during the learning of a mechanism, and that's not just me, it's
    a common choice in teaching methodology.)

    In other words, I need something I can toy with idly from time to time
    until the whole concept becomes second nature.


    In your case, I would suggest that you create an object for the search you >asked about in your earlier posting.

    Not what I expected, but a good idea. Makes me have another idea that
    might work.


    As to snit, it was great when it was one of the only OO tools in TCL. >Although the current tclOO says that its design is intended to be a
    platform for building OO systems, I think the future will see tclOO as
    simply tcl's OO system all by itself. Having to learn multiple OO systems >would be a burden on any future programmers, IMHO.

    An interesting point of view and I had never seen anybody express that
    opinion before. Again, I am glad I asked. I am glad this point of view
    came up.

    Thank you.
    --
    Luc


    --- Synchronet 3.20a-Linux NewsLink 1.114