Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. It's so hard to write example applications

It's so hard to write example applications

Scheduled Pinned Locked Moved The Lounge
designquestioncssasp-netcom
28 Posts 15 Posters 2 Views 1 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.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    P J A D D 10 Replies Last reply
    0
    • H honey the codewitch

      I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      I am reminded of the early 90s when at least half of the apps available for Windows (3) were screen savers.

      1 Reply Last reply
      0
      • H honey the codewitch

        I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        J Offline
        J Offline
        jmaida
        wrote on last edited by
        #3

        Had similar experience, so ended up using mostly real-world cases (names changed to protect the innocent), but they were not optimal. Hard I agree.:java:

        "A little time, a little trouble, your better day" Badfinger

        1 Reply Last reply
        0
        • H honey the codewitch

          I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

          A Offline
          A Offline
          Amarnath S
          wrote on last edited by
          #4

          honey the codewitch wrote:

          coming up with a simple application

          Maybe you should ask your husband for this. Unless he was also involved in the development activity. The more distant he is from the code development, the simpler will be the applications suggested by him.

          1 Reply Last reply
          0
          • H honey the codewitch

            I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

            D Offline
            D Offline
            David ONeil
            wrote on last edited by
            #5

            What features would you like to show in the example application?

            Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

            H 1 Reply Last reply
            0
            • H honey the codewitch

              I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

              D Offline
              D Offline
              dandy72
              wrote on last edited by
              #6

              Keep in mind that most API documentation never presents anything anywhere close to a working "application"; they're just snippets that illustrate how to provide input parameters and look at the output (*if* they bother). And no error-checking. I'm not saying this is what you should strive for...I'm saying your samples shouldn't necessarily include much code that doesn't deal with invoking your APIs, and leave it at that.

              H 1 Reply Last reply
              0
              • D David ONeil

                What features would you like to show in the example application?

                Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #7

                Basically I just want to run the entire API through it's paces. Showing each control, maybe how to build a custom control, handling multiple screens, etc.

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                1 Reply Last reply
                0
                • D dandy72

                  Keep in mind that most API documentation never presents anything anywhere close to a working "application"; they're just snippets that illustrate how to provide input parameters and look at the output (*if* they bother). And no error-checking. I'm not saying this is what you should strive for...I'm saying your samples shouldn't necessarily include much code that doesn't deal with invoking your APIs, and leave it at that.

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #8

                  Yeah. That's actually the challenging part, and why I feel directionless about it. Coding for its own sake, kind of. Going through some motions without a clear set of application requirements, other than the code must be simple and demonstrate the featureset. Like, I put a push_button on the screen, but clicking it does what? It's all kinds of little niggling details like that. It's death by a thousand cuts.

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  F M D 3 Replies Last reply
                  0
                  • H honey the codewitch

                    Yeah. That's actually the challenging part, and why I feel directionless about it. Coding for its own sake, kind of. Going through some motions without a clear set of application requirements, other than the code must be simple and demonstrate the featureset. Like, I put a push_button on the screen, but clicking it does what? It's all kinds of little niggling details like that. It's death by a thousand cuts.

                    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                    F Offline
                    F Offline
                    Forogar
                    wrote on last edited by
                    #9

                    Push the button and it disappears. Then two more buttons appear...

                    - I would love to change the world, but they won’t give me the source code.

                    M 1 Reply Last reply
                    0
                    • H honey the codewitch

                      Yeah. That's actually the challenging part, and why I feel directionless about it. Coding for its own sake, kind of. Going through some motions without a clear set of application requirements, other than the code must be simple and demonstrate the featureset. Like, I put a push_button on the screen, but clicking it does what? It's all kinds of little niggling details like that. It's death by a thousand cuts.

                      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                      M Offline
                      M Offline
                      MarkTJohnson
                      wrote on last edited by
                      #10

                      Do you have tests? You could use those as a base for the API snippet kind of thing. Or I have no idea what I'm talking about.

                      I’ve given up trying to be calm. However, I am open to feeling slightly less agitated. I’m begging you for the benefit of everyone, don’t be STUPID.

                      H 1 Reply Last reply
                      0
                      • H honey the codewitch

                        I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

                        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                        G Offline
                        G Offline
                        Gary Wheeler
                        wrote on last edited by
                        #11

                        honey the codewitch wrote:

                        I'm writing some examples for using my UIX library

                        1. Provide reference documentation for the library. 2. Identify common tasks or objectives of your library's users. What are they using it for? 3. Write correct, fairly minimal sequences of library calls required to perform each of those tasks. Work hard at keeping frills and options out the examples, except as "You can also do this:" sections at the end of each one. I don't think the examples in the documentation need to be complete applications, since that can make it be easy for your user to get lost in the forest. To guarantee that they work correctly, you'll need to make a fairly complete application around them to ensure your sequences work as expected, but that application doesn't need to be in the example documentation (you can certainly include it in the distribution for the library). Oh, and by the way: include lots and lots of screen captures of what they should see, preferably from live examples.

                        Software Zen: delete this;

                        1 Reply Last reply
                        0
                        • H honey the codewitch

                          Yeah. That's actually the challenging part, and why I feel directionless about it. Coding for its own sake, kind of. Going through some motions without a clear set of application requirements, other than the code must be simple and demonstrate the featureset. Like, I put a push_button on the screen, but clicking it does what? It's all kinds of little niggling details like that. It's death by a thousand cuts.

                          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                          D Offline
                          D Offline
                          David ONeil
                          wrote on last edited by
                          #12

                          honey the codewitch wrote:

                          Like, I put a push_button on the screen, but clicking it does what?

                          It takes you to the next control example screen. If you have a text input, it won't take you to the next screen unless the user enters whatever text you select. Each screen's completion just takes you to the next control. That's it.

                          Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                          H 1 Reply Last reply
                          0
                          • D David ONeil

                            honey the codewitch wrote:

                            Like, I put a push_button on the screen, but clicking it does what?

                            It takes you to the next control example screen. If you have a text input, it won't take you to the next screen unless the user enters whatever text you select. Each screen's completion just takes you to the next control. That's it.

                            Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                            H Offline
                            H Offline
                            honey the codewitch
                            wrote on last edited by
                            #13

                            David O'Neil wrote:

                            If you have a text input

                            The device I'm targeting for the example has no keyboard, no USB input, and a 320x240 touchscreen. I admit I chuckled at the thought. :-D I finally figured it out. It just took a lot longer than the code would suggest.

                            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                            D D 2 Replies Last reply
                            0
                            • M MarkTJohnson

                              Do you have tests? You could use those as a base for the API snippet kind of thing. Or I have no idea what I'm talking about.

                              I’ve given up trying to be calm. However, I am open to feeling slightly less agitated. I’m begging you for the benefit of everyone, don’t be STUPID.

                              H Offline
                              H Offline
                              honey the codewitch
                              wrote on last edited by
                              #14

                              I don't yet. I should do TDD, I know, but my GFX lib is nearly impossible to unit test due to the surface area, and so when I built UIX on top of it, I just ad hoc tested it the way I did GFX. I *do* have *some* unit tests for GFX now, but not a lot of code coverage. On the bright side they're ran before the lib is published. For UIX I don't even have CI/CD going yet. That's next, then I'll write some unit tests using the PIO and Unity test framework.

                              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                              1 Reply Last reply
                              0
                              • H honey the codewitch

                                David O'Neil wrote:

                                If you have a text input

                                The device I'm targeting for the example has no keyboard, no USB input, and a 320x240 touchscreen. I admit I chuckled at the thought. :-D I finally figured it out. It just took a lot longer than the code would suggest.

                                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                D Offline
                                D Offline
                                David ONeil
                                wrote on last edited by
                                #15

                                So make an onscreen keyboard that would obviously make use of scrollers? That code should be helpful to users trying to learn your system.

                                Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                                H 1 Reply Last reply
                                0
                                • D David ONeil

                                  So make an onscreen keyboard that would obviously make use of scrollers? That code should be helpful to users trying to learn your system.

                                  Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                                  H Offline
                                  H Offline
                                  honey the codewitch
                                  wrote on last edited by
                                  #16

                                  320x240 isn't really realistic for that. Devices this small typically don't have text input. They usually receive information like that via a cloud or bluetooth connection.

                                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                  1 Reply Last reply
                                  0
                                  • H honey the codewitch

                                    I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

                                    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #17

                                    I created "devices in software" (slaves) for my process control sofware before getting the actual devices; polling them for "real time data" to chart, etc.

                                    "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                                    1 Reply Last reply
                                    0
                                    • H honey the codewitch

                                      I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

                                      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                      N Offline
                                      N Offline
                                      Niels Holst
                                      wrote on last edited by
                                      #18

                                      When trying to illustrate by example my super-duper library, I found that in addition to this being surprisingly difficult, also that (1) parts of my interface were illogical and (2) a huge chunk of functionality was missing. So, I had to go back to the workbench and code. Six months later I found it a lot easier to write the examples and instructions. It seems that test-first gives your code one kind of perfection, while explain-at-last will take your code to yet another level. Thus the two cycles, test-code and explain-code, seems to complement each other.

                                      H 1 Reply Last reply
                                      0
                                      • H honey the codewitch

                                        I'm writing some examples for using my UIX library. It's unexpectedly challenging. I've created real world apps using it in less time than this. The difficult bit is making it not feel too contrived while at the same time making the code simple enough to understand. It's not writing simple code that's difficult, it's coming up with a simple application, that's nevertheless complicated enough to illustrate core concepts. It's so much easier when I have a direct purpose to my application, rather than dealing in the meta and writing it for its own sake. It makes me feel rudderless. Like, what is it even supposed to do other than exist? :confused:

                                        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                        R Offline
                                        R Offline
                                        rob tillaart
                                        wrote on last edited by
                                        #19

                                        For a graphic UI as broad as UIX library I would not try to cover all. Even for simpler libraries I do not cover all functionality. The goal of examples is imho to give enough information so people can get started. So for the UIX I would think of the following mini applications - metrics converter (buttons, select boxes, text boxes, ...) the underlying math is simple so wont distract. - a color wheel selection (needs some graphics putpixel/getpixel) and maybe add an RGB LED to it. - an icon editor, or font editor (more complex) - a weather station - with functions that generate random data (can be a wrapper around BME280 et al) - pong game - fractal visualizer, e.g. tree's - Mandelbrod set - signal visualizer (poor mans oscilloscope) - jpeg viewer Then not all examples need to be available from start, take your time and add on request or when time permits. my 2 cents

                                        H 1 Reply Last reply
                                        0
                                        • R rob tillaart

                                          For a graphic UI as broad as UIX library I would not try to cover all. Even for simpler libraries I do not cover all functionality. The goal of examples is imho to give enough information so people can get started. So for the UIX I would think of the following mini applications - metrics converter (buttons, select boxes, text boxes, ...) the underlying math is simple so wont distract. - a color wheel selection (needs some graphics putpixel/getpixel) and maybe add an RGB LED to it. - an icon editor, or font editor (more complex) - a weather station - with functions that generate random data (can be a wrapper around BME280 et al) - pong game - fractal visualizer, e.g. tree's - Mandelbrod set - signal visualizer (poor mans oscilloscope) - jpeg viewer Then not all examples need to be available from start, take your time and add on request or when time permits. my 2 cents

                                          H Offline
                                          H Offline
                                          honey the codewitch
                                          wrote on last edited by
                                          #20

                                          Won't be any text editors or font editors on these, as they usually have 320x240 or smaller screens, no keyboards, and kilobytes of RAM. :) That said, I will consider your suggestions in light of that. Thank you.

                                          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                          D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups