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.
  • J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #4

    alt text

    Even the most complex program, starts with the first line of code


    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
    0
    • J.HilkJ J.Hilk

      alt text

      Even the most complex program, starts with the first line of code

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

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

      jsulmJ J.HilkJ 2 Replies Last reply
      2
      • 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 :)

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #6

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

        A complex program starts with design and specifications. :)

        In which universe? :-)

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        mrjjM 1 Reply Last reply
        2
        • jsulmJ jsulm

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

          A complex program starts with design and specifications. :)

          In which universe? :-)

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

          @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 1 Reply Last reply
          1
          • 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 Online
                JonBJ Online
                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 Online
                    JonBJ Online
                    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 Online
                                  JonBJ Online
                                  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 Offline
                                      Chris KawaC Offline
                                      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

                                          • Login

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