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. Am I being too perfectionist?

Am I being too perfectionist?

Scheduled Pinned Locked Moved The Lounge
data-structuresc++asp-netdockerhardware
9 Posts 5 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

    I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?

    Real programmers use butterflies

    L N K S 4 Replies Last reply
    0
    • H honey the codewitch

      I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?

      Real programmers use butterflies

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

      Leave it out. > Enumeration/iteration is a core part of any container Is it actually? It's a core part of linear containers at least. You're not enumerating dictionaries in this project and that is not entirely a coincidence: dictionaries are often not enumerated. That's a useful thing to be able to do, don't get me wrong, it's just not the primary thing they're used for.

      H 1 Reply Last reply
      0
      • H honey the codewitch

        I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?

        Real programmers use butterflies

        N Offline
        N Offline
        Nelek
        wrote on last edited by
        #3

        Without even reading your message... I would say yes. You can be too perfectionist and a bit obsessive. As Enigma said:

        Quote:

        ...Turn off the lights, take a deep breath and relax...

        M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

        1 Reply Last reply
        0
        • L Lost User

          Leave it out. > Enumeration/iteration is a core part of any container Is it actually? It's a core part of linear containers at least. You're not enumerating dictionaries in this project and that is not entirely a coincidence: dictionaries are often not enumerated. That's a useful thing to be able to do, don't get me wrong, it's just not the primary thing they're used for.

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

          You made me think, and I guess you're right. I removed the enumeration code. Thanks.

          Real programmers use butterflies

          1 Reply Last reply
          0
          • H honey the codewitch

            I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?

            Real programmers use butterflies

            K Offline
            K Offline
            k5054
            wrote on last edited by
            #5

            honey the codewitch wrote:

            I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms

            Just curious, have you considered using a public domain STL, e.g. [STLport: SGI STL Overview](http://www.stlport.org/doc/sgi\_stl.html) ? I have not used it myself, don't know how complete it is, or even if it provides any C++11 or later features. In any case, the effort of compiling for an IOT device, or its tool chain might be prohibitive. I'm just wondering if such a beast might go some distance to assisting you with your project. At least, if that route is viable for you, you'd have a consistent STL implementation across all platforms.

            Keep Calm and Carry On

            H 1 Reply Last reply
            0
            • K k5054

              honey the codewitch wrote:

              I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms

              Just curious, have you considered using a public domain STL, e.g. [STLport: SGI STL Overview](http://www.stlport.org/doc/sgi\_stl.html) ? I have not used it myself, don't know how complete it is, or even if it provides any C++11 or later features. In any case, the effort of compiling for an IOT device, or its tool chain might be prohibitive. I'm just wondering if such a beast might go some distance to assisting you with your project. At least, if that route is viable for you, you'd have a consistent STL implementation across all platforms.

              Keep Calm and Carry On

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

              I can't do it, because there's a *reason* it's not implemented properly, and or incomplete on many IoT devices. One reason is RAM in the single digit kilobytes. The other is 8-bit CPUs. That's not true of the platform I typically target, but it is true of platforms I also wish to target.

              Real programmers use butterflies

              L 1 Reply Last reply
              0
              • H honey the codewitch

                I can't do it, because there's a *reason* it's not implemented properly, and or incomplete on many IoT devices. One reason is RAM in the single digit kilobytes. The other is 8-bit CPUs. That's not true of the platform I typically target, but it is true of platforms I also wish to target.

                Real programmers use butterflies

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

                Have a look at the ETL library[^].

                1 Reply Last reply
                0
                • H honey the codewitch

                  I can't use the STL in my IoT projects because it's not really all there and/or properly implemented on a lot of platforms, particularly those covered by the Arduino framework. To that end, I've developed some basic data structures because I needed them. Just simple stuff, like a linked list and a hash table/dictionary. Everything works except for the dictionary's enumerator/iterator. For the life of me I can't track down why I'm getting fed a bad (non-null) pointer and I'm about ready to give up on it to the point where I want to rewrite the whole thing. There is another option. I can simply not have an enumerator/iterator. That would be reasonable considering I probably won't need one for the project I built this for in mind. But I can't bring myself to do it. It just seems intolerably incomplete to me. What kind of container can't be enumerated/iterated (aside from some multithreaded containers which have good reasons not to), so I'm still hammering away at it. Is this ridiculous? Enumeration/iteration is a core part of any container, and I'd feel really shady releasing this upon the world without one, but maybe that's just me. What do you think?

                  Real programmers use butterflies

                  S Offline
                  S Offline
                  Super Lloyd
                  wrote on last edited by
                  #8

                  What I like with my home pet project at home I can be as demanding, or as little, as I want. I learned when to throw the towel or not on my own term. That said this bug looks suspicious, and there might be more that is not working!

                  A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                  H 1 Reply Last reply
                  0
                  • S Super Lloyd

                    What I like with my home pet project at home I can be as demanding, or as little, as I want. I learned when to throw the towel or not on my own term. That said this bug looks suspicious, and there might be more that is not working!

                    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

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

                    Yeah it is suspicious, but it passed all my other checks, and the enumeration code kind of had to do its own thing anyway, since hashtables aren't intrinsically enumerable.

                    Real programmers use butterflies

                    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