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. Practice makes perfect?

Practice makes perfect?

Scheduled Pinned Locked Moved The Lounge
designquestioncsharpcomgraphics
17 Posts 8 Posters 0 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

    If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

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

    PJ ArendsP CPalliniC Mircea NeacsuM D J 6 Replies Last reply
    0
    • H honey the codewitch

      If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

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

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      Maybe as a hobbyist my opinion does not count for much as I do not live this everyday. But I feel that the language should be as simple and basic as possible. Let libraries and frameworks do the real heavy lifting. I use C++ which has pointers, references, classes, inheritance, polymorphism, and templates built in. Using that people were able to build libraries like the STL and frameworks like MFC and QT among many others. I feel if all that was built into the C++ language itself then the language becomes too overbearing and too hard to learn. But then again, maybe I am totally missing your whole point.

      Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      H 1 Reply Last reply
      0
      • PJ ArendsP PJ Arends

        Maybe as a hobbyist my opinion does not count for much as I do not live this everyday. But I feel that the language should be as simple and basic as possible. Let libraries and frameworks do the real heavy lifting. I use C++ which has pointers, references, classes, inheritance, polymorphism, and templates built in. Using that people were able to build libraries like the STL and frameworks like MFC and QT among many others. I feel if all that was built into the C++ language itself then the language becomes too overbearing and too hard to learn. But then again, maybe I am totally missing your whole point.

        Within you lies the power for good - Use it!

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

        No, you make a good point, and C++ is a great example of what happens when a language tries to solve everything. It's just that if libraries could fill the gap by themselves, I feel like they would have already? It seems to me that libraries tend to fulfill one pattern while creating another (the one you have to use to interact with a library) and based on some DSL work by a former Microsoft mucky muck whose name escapes me at the moment but whose work I've looked over in the past, it seems like having language support for some of these patterns is really the way to solve that last mile integration issue.

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

        PJ ArendsP 1 Reply Last reply
        0
        • H honey the codewitch

          No, you make a good point, and C++ is a great example of what happens when a language tries to solve everything. It's just that if libraries could fill the gap by themselves, I feel like they would have already? It seems to me that libraries tend to fulfill one pattern while creating another (the one you have to use to interact with a library) and based on some DSL work by a former Microsoft mucky muck whose name escapes me at the moment but whose work I've looked over in the past, it seems like having language support for some of these patterns is really the way to solve that last mile integration issue.

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

          PJ ArendsP Offline
          PJ ArendsP Offline
          PJ Arends
          wrote on last edited by
          #4

          Quote:

          It's just that if libraries could fill the gap by themselves, I feel like they would have already?

          Stop inventing new problems and processes. Then the current libraries will be enough. As long as there is a perceived need for something new, someone will write a library to fill that need. Take your pixel library for instance. I am sure there is already libraries out there that would do what yours does, but not the way you want it done. So you wrote another library for it. Just more people reinventing the same wheel over and over again.

          Within you lies the power for good - Use it!

          Within you lies the power for good; Use it!

          H 1 Reply Last reply
          0
          • H honey the codewitch

            If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

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

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #5

            honey the codewitch wrote:

            What I'd really like is a language that allows one to augment the grammar,

            They call it Forth. :-D

            "In testa che avete, Signor di Ceprano?" -- Rigoletto

            In testa che avete, signor di Ceprano?

            Mircea NeacsuM 1 Reply Last reply
            0
            • H honey the codewitch

              If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

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

              Mircea NeacsuM Offline
              Mircea NeacsuM Offline
              Mircea Neacsu
              wrote on last edited by
              #6

              honey the codewitch wrote:

              What I'd really like is a language that allows one to augment the grammar,

              Extensible languages, bell-bottoms and polka dots were a thing in the 60-es. They didn't age too well :) For your reading pleasure check this SPG language.

              Mircea

              H 1 Reply Last reply
              0
              • CPalliniC CPallini

                honey the codewitch wrote:

                What I'd really like is a language that allows one to augment the grammar,

                They call it Forth. :-D

                "In testa che avete, Signor di Ceprano?" -- Rigoletto

                Mircea NeacsuM Offline
                Mircea NeacsuM Offline
                Mircea Neacsu
                wrote on last edited by
                #7

                I would argue that Forth doesn't have any grammar to speak of. It's just a string of words strewn together. Would stream-of-consciousness language* be an appropriate name? :laugh: *) Name calling made with love: in another life I wrote a Forth interpreter for a PDP-11

                Mircea

                J 1 Reply Last reply
                0
                • H honey the codewitch

                  If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

                  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
                  #8

                  I say, stop bloating the languages. Do the basics well, and use libraries for everything else. If you keep doing the same thing repeatedly, libraries are well suited for that purpose - do it once, wrap it up, and re-use it. Otherwise you're just extending the language to suit your own needs, and everybody's needs are different - and that's what leads to bloat. Not only that, but you end up spending more time tinkering with the language extensions than the actual code and business logic. And not everybody can work at that level.

                  H 1 Reply Last reply
                  0
                  • D dandy72

                    I say, stop bloating the languages. Do the basics well, and use libraries for everything else. If you keep doing the same thing repeatedly, libraries are well suited for that purpose - do it once, wrap it up, and re-use it. Otherwise you're just extending the language to suit your own needs, and everybody's needs are different - and that's what leads to bloat. Not only that, but you end up spending more time tinkering with the language extensions than the actual code and business logic. And not everybody can work at that level.

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

                    Seems like C# got bloated without really doing any of this. is it really such a bad idea for example to do public component Foo { // implements IComponent, IPropertyNotify, IDisposable etc public Bar { get; set; } // generates OnBarChanged/BarChanged, etc }; and save all of that code? You can't really make that into a library. At best you're using a C# Source Generator and some sort of input document. or even public entity Contact { // implements all of the data bound stuff }; And if that's too much, what about simply the ability to extend the grammar via Source Generators so you could create or install these (as nuget packages) to extend the language as the project requires?

                    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
                    • PJ ArendsP PJ Arends

                      Quote:

                      It's just that if libraries could fill the gap by themselves, I feel like they would have already?

                      Stop inventing new problems and processes. Then the current libraries will be enough. As long as there is a perceived need for something new, someone will write a library to fill that need. Take your pixel library for instance. I am sure there is already libraries out there that would do what yours does, but not the way you want it done. So you wrote another library for it. Just more people reinventing the same wheel over and over again.

                      Within you lies the power for good - Use it!

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

                      Forgive me but I think you're missing my point. You can't write a library to do this:

                      public component Foo { // implements IPropertyNotify, IComponent, IDisposable, etc
                      public Bar { get; set; } // implements OnBarChanged, BarChanged, all the metadata attributes like Browsable etc
                      }

                      The issue there is at some point you need to insert those actual methods into your code, or inherit from something that already implements Bar which you can't do if Bar is your project specific property. As such, you're left with one other option for automating this. Source Generators, which require some kind of input spec. Metadata attributes don't quite cut it here, because they aren't descriptive enough. Being able to extend the language via Source Generators solves this. That was the last mile integration I was talking about.

                      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
                      • Mircea NeacsuM Mircea Neacsu

                        honey the codewitch wrote:

                        What I'd really like is a language that allows one to augment the grammar,

                        Extensible languages, bell-bottoms and polka dots were a thing in the 60-es. They didn't age too well :) For your reading pleasure check this SPG language.

                        Mircea

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

                        There are all kinds of ways to skin that cat though, and the 1960s you had some severe limitations in terms of compilers due to the limited RAM and speed of computers in that era.

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

                        J 1 Reply Last reply
                        0
                        • H honey the codewitch

                          If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

                          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
                          jochance
                          wrote on last edited by
                          #12

                          What you describe is exactly why I think MSFT is on point with the "targetted models" approach to AI-assist in code.

                          H 1 Reply Last reply
                          0
                          • Mircea NeacsuM Mircea Neacsu

                            I would argue that Forth doesn't have any grammar to speak of. It's just a string of words strewn together. Would stream-of-consciousness language* be an appropriate name? :laugh: *) Name calling made with love: in another life I wrote a Forth interpreter for a PDP-11

                            Mircea

                            J Offline
                            J Offline
                            jochance
                            wrote on last edited by
                            #13

                            Kerouac+ On the Road - Wikipedia[^]

                            1 Reply Last reply
                            0
                            • J jochance

                              What you describe is exactly why I think MSFT is on point with the "targetted models" approach to AI-assist in code.

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

                              Now that's interesting. It occurred to me that AI might be able to insert itself here with some benefit to the developer but I wouldn't know enough about it - having not even used CoPilot for example - to really say so this is news to me.

                              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

                                If I find myself repeating the same thing over and over it occurs to me that I need to optimize. Doubly so when working with a computer - after all, the computer is there to do work so I don't have to. There's something to be said for repetition of course. Practice helps, and there's something to be said about tried and true methods, especially in production code, but again, repetition raises the question of optimization. This is why design patterns make me low key uncomfortable. I feel like they should be baked into the language, rather than having to repeat the same boilerplate over and over again. With C# they spend all this time adding fluff to the language, when they could be baking in design patterns. Seems a missed opportunity. I'm a fan of the idea of Domain Specific Languages for this reason, even though I've never used one aside from Synthmaker/Flowstone which I'm not sure counts. What I'd really like is a language that allows one to augment the grammar, sort of like C# source generator tech except it extends the keywords and syntax of the language and then uses the new grammar to generate code.

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

                                E Offline
                                E Offline
                                englebart
                                wrote on last edited by
                                #15

                                That is what IDEs should help with. They will write all of that boiler plate for you. The new AI generators might help, too. I have not used them directly, but I have watched team mates flounder trying to have AI generate simple commands that I was able to find in the man page.

                                H 1 Reply Last reply
                                0
                                • E englebart

                                  That is what IDEs should help with. They will write all of that boiler plate for you. The new AI generators might help, too. I have not used them directly, but I have watched team mates flounder trying to have AI generate simple commands that I was able to find in the man page.

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

                                  I mean, I think it would be better if the boilerplate didn't have to exist, if possible, simply because even if generated, it still creates a maintenance point. If some of the boilerplate were baked in as language constructs, or if the language was extensible, you could eliminate that boilerplate at the last mile .i commented to some others here giving an example that a library couldn't solve in C#, but the IDE approach, while it would solve it and does, even with like Winforms tech and InitializeComponent(), now you have InitializeComponent() to maintain. Not the greatest example because it round trips from the designer but most of the time with most tools that's not the case.

                                  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

                                    There are all kinds of ways to skin that cat though, and the 1960s you had some severe limitations in terms of compilers due to the limited RAM and speed of computers in that era.

                                    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
                                    jschell
                                    wrote on last edited by
                                    #17

                                    And yet even though there are probably 100 new languages a year that actually make it into some sort of larger visibility there are none like that. Which suggests to me at least that they just do not work. In the same way that I have seen, several different times, people attempt to 'improve' C/C++ by adding clever macros that serve as nothing but attempts to do custom enhancements to the language. For example adding 'begin' and 'end' as substitutions for open/closing brackets.

                                    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