Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. The Art of programming
Forum Updated to NodeBB v4.3 + New Features

The Art of programming

Scheduled Pinned Locked Moved Unsolved The Lounge
29 Posts 10 Posters 6.1k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM mrjj

    @J-Hilk
    Actually, when you are not a beginner anymore
    A complex program starts with design and specifications. :)
    Or at least it often should :)

    J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #8

    @mrjj
    😨 fine šŸ™„

    But let's be honest, everything starts with int as in int main()


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    SGaistS 1 Reply Last reply
    2
    • J.HilkJ J.Hilk

      @mrjj
      😨 fine šŸ™„

      But let's be honest, everything starts with int as in int main()

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #9

      @J-Hilk said in How to enter Images in a listWidget inside tabWidget:

      @mrjj
      😨 fine šŸ™„

      But let's be honest, everything starts with int as in int main()

      Unless you use Python :-P

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J.HilkJ 1 Reply Last reply
      6
      • mrjjM mrjj

        @jsulm
        haha :)
        well in same universe
        where all write module test and documentation
        at the same time as the main code.
        Sort of like a Land of Narnia for adults ;)

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #10

        @mrjj
        "design", "specification", "testing", "documentation". Are these from a computer science course? Next you'll be saying we should use "comments". I don't think they are intended for Real Programmers....

        mrjjM 1 Reply Last reply
        0
        • JonBJ JonB

          @mrjj
          "design", "specification", "testing", "documentation". Are these from a computer science course? Next you'll be saying we should use "comments". I don't think they are intended for Real Programmers....

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #11

          @JonB

          Heh :)
          Im not really sure they do include it as they seem to only tell about main.cpp and
          nothing else exists :)

          If you must use comments, make sure it simply repeats what the code said

          // make new object
          Object *obj = new Object;

          and not that intent of it

          // prepare account object for insertion to database

          Else its far too easy to the maintenance crew.

          Also do not alter the comments if you change the code. :)

          JonBJ 1 Reply Last reply
          4
          • mrjjM mrjj

            @JonB

            Heh :)
            Im not really sure they do include it as they seem to only tell about main.cpp and
            nothing else exists :)

            If you must use comments, make sure it simply repeats what the code said

            // make new object
            Object *obj = new Object;

            and not that intent of it

            // prepare account object for insertion to database

            Else its far too easy to the maintenance crew.

            Also do not alter the comments if you change the code. :)

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #12

            @mrjj said in How to enter Images in a listWidget inside tabWidget:

            If you must use comments, make sure it simply repeats what the code said

            Absolutely spot-on with this! And not just comments, it drives me mad that often that actual end-user documentation/Help for the FooBar button says "Does a FooBar". Gee, I would never have guessed without that! But what does that actually do? Will it reformat my disk?

            mrjjM 1 Reply Last reply
            3
            • JonBJ JonB

              @mrjj said in How to enter Images in a listWidget inside tabWidget:

              If you must use comments, make sure it simply repeats what the code said

              Absolutely spot-on with this! And not just comments, it drives me mad that often that actual end-user documentation/Help for the FooBar button says "Does a FooBar". Gee, I would never have guessed without that! But what does that actually do? Will it reformat my disk?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #13

              @JonB
              ahah exactly. :)

              Like sitting with a very expensive raid controller and
              have the field that says
              Idle time for GX44 interrupt core.
              and the docs says

              "Allows you to change the value"

              No shit sherlock..

              ps. maybe we should fork the thread :)

              1 Reply Last reply
              1
              • SGaistS SGaist

                @J-Hilk said in How to enter Images in a listWidget inside tabWidget:

                @mrjj
                😨 fine šŸ™„

                But let's be honest, everything starts with int as in int main()

                Unless you use Python :-P

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #14

                @SGaist I bet ya, the python interpreter starts with int main( šŸ˜Ž

                @mrjj

                ps. maybe we should fork the thread :)

                probably a good idea, we derailed quite a lot


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                mrjjM 1 Reply Last reply
                2
                • J.HilkJ J.Hilk

                  @SGaist I bet ya, the python interpreter starts with int main( šŸ˜Ž

                  @mrjj

                  ps. maybe we should fork the thread :)

                  probably a good idea, we derailed quite a lot

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #15

                  @J-Hilk
                  No as derailed as my first attempt to move it :)))

                  J.HilkJ 1 Reply Last reply
                  1
                  • mrjjM mrjj

                    @J-Hilk
                    No as derailed as my first attempt to move it :)))

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #16

                    @mrjj I noticed!

                    It even went 10 years to the past 🤣


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    1
                    • fcarneyF Offline
                      fcarneyF Offline
                      fcarney
                      wrote on last edited by
                      #17

                      This is how my designs usually go:

                      • Customer: We want to do "this"
                      • Me: What do you want "this" to look like?
                      • Customer: I don't know
                      • Me: <creates interface and basic functionality>
                      • Me: How about "this"?
                      • Customer: Well we don't want "that"! Here is what we want...
                      • Me: <thinking>Why didn't they say that before?

                      So for anything I build that sequence events is usually how every project starts. Rarely do I get specs at all. Even from my management who programs. They usually say "this" with no real details.

                      C++ is a perfectly valid school of magic.

                      aha_1980A JonBJ 2 Replies Last reply
                      4
                      • fcarneyF fcarney

                        This is how my designs usually go:

                        • Customer: We want to do "this"
                        • Me: What do you want "this" to look like?
                        • Customer: I don't know
                        • Me: <creates interface and basic functionality>
                        • Me: How about "this"?
                        • Customer: Well we don't want "that"! Here is what we want...
                        • Me: <thinking>Why didn't they say that before?

                        So for anything I build that sequence events is usually how every project starts. Rarely do I get specs at all. Even from my management who programs. They usually say "this" with no real details.

                        aha_1980A Offline
                        aha_1980A Offline
                        aha_1980
                        Lifetime Qt Champion
                        wrote on last edited by
                        #18

                        Hi @fcarney,

                        Me: <creates interface and basic functionality>

                        Don't you have a bot for that? ;)

                        Regards

                        Qt has to stay free or it will die.

                        1 Reply Last reply
                        2
                        • fcarneyF fcarney

                          This is how my designs usually go:

                          • Customer: We want to do "this"
                          • Me: What do you want "this" to look like?
                          • Customer: I don't know
                          • Me: <creates interface and basic functionality>
                          • Me: How about "this"?
                          • Customer: Well we don't want "that"! Here is what we want...
                          • Me: <thinking>Why didn't they say that before?

                          So for anything I build that sequence events is usually how every project starts. Rarely do I get specs at all. Even from my management who programs. They usually say "this" with no real details.

                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by
                          #19

                          @fcarney
                          So true! At least I know I am not alone....

                          One step worse: your example implies when they see it they say "we didn't want it done (looking) that way, we wanted it done this way". But I often get: "we don't want that at all, we want it to do something totally different from what we said we wanted it to do". :(

                          1 Reply Last reply
                          4
                          • fcarneyF Offline
                            fcarneyF Offline
                            fcarney
                            wrote on last edited by
                            #20

                            That happens sometimes too.

                            C++ is a perfectly valid school of magic.

                            1 Reply Last reply
                            1
                            • Chris KawaC Online
                              Chris KawaC Online
                              Chris Kawa
                              Lifetime Qt Champion
                              wrote on last edited by
                              #21

                              Don't worry guys. We can do anything. Absolutely anything. We are the experts.

                              1 Reply Last reply
                              4
                              • fcarneyF Offline
                                fcarneyF Offline
                                fcarney
                                wrote on last edited by
                                #22

                                @Chris-Kawa said in The Art of programming:

                                We can do anything.

                                I have been in meetings like that. That is why I prefer technical meetings with only technical people.

                                C++ is a perfectly valid school of magic.

                                1 Reply Last reply
                                1
                                • Kent-DorfmanK Offline
                                  Kent-DorfmanK Offline
                                  Kent-Dorfman
                                  wrote on last edited by
                                  #23

                                  Even though everyone is entitled to my opinion, I should probably stay out of this conversation.

                                  mrjjM 1 Reply Last reply
                                  0
                                  • Kent-DorfmanK Kent-Dorfman

                                    Even though everyone is entitled to my opinion, I should probably stay out of this conversation.

                                    mrjjM Offline
                                    mrjjM Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #24

                                    @Kent-Dorfman
                                    we are just having fun so please feel free to share :)

                                    1 Reply Last reply
                                    1
                                    • aha_1980A Offline
                                      aha_1980A Offline
                                      aha_1980
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #25

                                      "We just need to get this feature in now. Fast. We'll care about the architecture and the cleanup later. Promised."

                                      That's how it goes for every feature.

                                      Qt has to stay free or it will die.

                                      1 Reply Last reply
                                      4
                                      • Kent-DorfmanK Offline
                                        Kent-DorfmanK Offline
                                        Kent-Dorfman
                                        wrote on last edited by
                                        #26

                                        Unfortunately the "art of programming" is being replaced with the "assembly line mentality" of programming. Can you say agile?

                                        fcarneyF 1 Reply Last reply
                                        0
                                        • Kent-DorfmanK Kent-Dorfman

                                          Unfortunately the "art of programming" is being replaced with the "assembly line mentality" of programming. Can you say agile?

                                          fcarneyF Offline
                                          fcarneyF Offline
                                          fcarney
                                          wrote on last edited by
                                          #27

                                          @Kent-Dorfman I think I see what you mean. I was asked to add some features to some code. The architecture was very basic and inflexible. I rewrote the code and now it is some of the fastest in that industry. The customer was not sure what to think at first, then they realized their code was much more maintainable and higher performing. They were very satisfied with the code in the end. They wanted a cheap fix, they got a better design.

                                          C++ is a perfectly valid school of magic.

                                          mzimmersM 1 Reply Last reply
                                          1

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved