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. What I've Learned So Far

What I've Learned So Far

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studiogame-devperformancelearning
36 Posts 16 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.
  • S SawmillTurtle

    Greetings. This is the first time I've ever posted here, so I supposed introductions are in order. The name is SawmillTurtle. Sawmill because I used to live on a street with that name, and Turtle because my friends used to say I look like Franklin the Turtle. I don't see the resemblance, but it makes for a good screen name. For the past few months, I've been writing a program in C# for my landlord that keeps track of her rental properties, accounting and maintenance issues. It's an all-in-one kind of thing. I've been using SharpDevelop because of my intense hatred for any and all things Microsoft. I actively avoid using anything they make, so that means I don't use Visual Studio. A good alternative, some say, would be MonoDevelop but Microsoft owns that, too. Up until I started on this project, I'd only tinkered with C# while playing with Unity. My IDE of choice was Game Maker because of the ease of use and the speed at which a program can be written using it. You can go ahead and laugh. It's funny. Game Maker is a good tool for learning programming concepts, but once you have it down it is really best to leave it behind you. I thought I could take everything that GM taught me and use it when I made the transition to C#. Keep laughing. It's still pretty funny. What I thought I knew going into this project and what I actually knew are two very different things. I've learned so much over the past few months. Looking back at the early sections of the code is like looking at a car with square wheels. Looking over it, I keep going, "Now why did I do that" and "What in the world was I thinking". One of my biggest mistakes-- and I just figured this one out yesterday-- was creating classes and then creating separate forms for those classes. It never occurred to me to make them one and the same. Take this, for instance: public void edit(BindingList h) { saved=false; int i=-1; HouseholdForm editHousehold; editHousehold=new HouseholdForm(members,householdName,account, rentOverride,overrideAmount, dueDate,gracePeriod,penaltyAmount,penaltyDate); foreach(HouseHold house in h) if (house.householdName==householdName) i=h.IndexOf(house); editHousehold.setHouseholdList(i); editHousehold.ShowDialog(); if(editHousehold.saveMe) { //members.Clear(); members=editHousehold.listOfMembers; householdName=editHousehold.householdName; rentOverride=editHousehold.overridedefaultRent; overrideAmount=editHousehold.oRid

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

    You should not use Double types for financial amounts. Use Integer or Decimal.

    D 1 Reply Last reply
    0
    • P PeejayAdams

      As a former UNIX developer, I have to agree with Griff - VS is wonderful, C# is a damned fine language and SQL Server is as good as, if not better than any other RDBMS out there. .NET is a steep learning curve, a lot of what seems odd or irrational at first makes perfect sense when you get deeper into the platform.

      Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

      D Offline
      D Offline
      den2k88
      wrote on last edited by
      #11

      PeejayAdams wrote:

      C# is a damned fine language

      It is, yet it has some "features" that make me want to stick with C++. Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp). I use the header as index into the cpp and I really find C# messier in that regard. Second thing I don't like is the difficulty of casting between basic data types: I may want to load a byte stream, read some header and decide to treat the content as a short int stream. Easy to do in C/C++, not that much in C# without using the unsafe block - I don't really like it as it puts a nice hole in the reason I'm using C# in the first place. Third thing, it makes the usage of the native resources harder instead of simpler - that is not a problem except that my line of work requires native resources so C# actually hinders me more often than not.

      PeejayAdams wrote:

      .NET is a steep learning curve,

      I agree, it is much much steeper than Windows API... especially considering the utter crappy quality of documentation. I don't need a list of the members of a class, I need to know what it's supposed to do, what problems does it solve and how it is meant to be used/integrated in the code: is it to be instanced? Is it to be extended? Shall I use its children instead of it? How does it differ from a similarly named class in another Microsoft namespace and how can they work together, if they can? All of this is missing from most of the framework documentation, leaving beginners with dozens of chunks of unrelated knowledge, there is no sense of unity, it is a disruption of the Force.

      GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

      P L K D 4 Replies Last reply
      0
      • S SawmillTurtle

        I can answer both questions at the same time: My preferred operating system is Linux. Ubuntu, as a matter of fact. However, she wants me to write a computer program, and it has to run on her OS of choice. Trust me, if I had a choice, this computer would be wiped and Linux would be on it. Since it belongs to her, I'm stuck with it. And if I'm writing a program that runs on Windows, what else would I use? I suppose I could use Visual Basic or Visual C++ but-- surprise! -- both Microsoft products.

        M Offline
        M Offline
        Marco Bertschi
        wrote on last edited by
        #12

        SawmillTurtle wrote:

        Visual C++

        There's still some options: - Java - C++ (Qt as framework, for example) Just saying :-D

        I only have a signature in order to let @DalekDave follow my posts.

        1 Reply Last reply
        0
        • L Lost User

          You should not use Double types for financial amounts. Use Integer or Decimal.

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #13

          Richard MacCutchan wrote:

          You should not use Double types for financial amounts

          In my experience they should not be used, period. They are comfortable for the developer but for technological, scientific and financial problems having a definite precision is actually better than a precision that varies depending on the stored value. Also, fixed point operation are several orders of magnitude faster than FP ones - not a problem in 90% of software out there but it is paramount in the remaining 10%.

          GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

          L 1 Reply Last reply
          0
          • D den2k88

            Richard MacCutchan wrote:

            You should not use Double types for financial amounts

            In my experience they should not be used, period. They are comfortable for the developer but for technological, scientific and financial problems having a definite precision is actually better than a precision that varies depending on the stored value. Also, fixed point operation are several orders of magnitude faster than FP ones - not a problem in 90% of software out there but it is paramount in the remaining 10%.

            GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

            I agree entirely. I would like to know how new developers get to think that floats are the tools to use.

            1 Reply Last reply
            0
            • D den2k88

              PeejayAdams wrote:

              C# is a damned fine language

              It is, yet it has some "features" that make me want to stick with C++. Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp). I use the header as index into the cpp and I really find C# messier in that regard. Second thing I don't like is the difficulty of casting between basic data types: I may want to load a byte stream, read some header and decide to treat the content as a short int stream. Easy to do in C/C++, not that much in C# without using the unsafe block - I don't really like it as it puts a nice hole in the reason I'm using C# in the first place. Third thing, it makes the usage of the native resources harder instead of simpler - that is not a problem except that my line of work requires native resources so C# actually hinders me more often than not.

              PeejayAdams wrote:

              .NET is a steep learning curve,

              I agree, it is much much steeper than Windows API... especially considering the utter crappy quality of documentation. I don't need a list of the members of a class, I need to know what it's supposed to do, what problems does it solve and how it is meant to be used/integrated in the code: is it to be instanced? Is it to be extended? Shall I use its children instead of it? How does it differ from a similarly named class in another Microsoft namespace and how can they work together, if they can? All of this is missing from most of the framework documentation, leaving beginners with dozens of chunks of unrelated knowledge, there is no sense of unity, it is a disruption of the Force.

              GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

              P Offline
              P Offline
              PeejayAdams
              wrote on last edited by
              #15

              I certainly agree that the documentation is about as much use as a chocolate fire-guard. You always know you're really struggling when you have to resort to the MS docs!

              Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

              D T 2 Replies Last reply
              0
              • D den2k88

                PeejayAdams wrote:

                C# is a damned fine language

                It is, yet it has some "features" that make me want to stick with C++. Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp). I use the header as index into the cpp and I really find C# messier in that regard. Second thing I don't like is the difficulty of casting between basic data types: I may want to load a byte stream, read some header and decide to treat the content as a short int stream. Easy to do in C/C++, not that much in C# without using the unsafe block - I don't really like it as it puts a nice hole in the reason I'm using C# in the first place. Third thing, it makes the usage of the native resources harder instead of simpler - that is not a problem except that my line of work requires native resources so C# actually hinders me more often than not.

                PeejayAdams wrote:

                .NET is a steep learning curve,

                I agree, it is much much steeper than Windows API... especially considering the utter crappy quality of documentation. I don't need a list of the members of a class, I need to know what it's supposed to do, what problems does it solve and how it is meant to be used/integrated in the code: is it to be instanced? Is it to be extended? Shall I use its children instead of it? How does it differ from a similarly named class in another Microsoft namespace and how can they work together, if they can? All of this is missing from most of the framework documentation, leaving beginners with dozens of chunks of unrelated knowledge, there is no sense of unity, it is a disruption of the Force.

                GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

                The documentation is reference documentation, not tutorials. For the latter you have to go elsewhere.

                D P 2 Replies Last reply
                0
                • S SawmillTurtle

                  Greetings. This is the first time I've ever posted here, so I supposed introductions are in order. The name is SawmillTurtle. Sawmill because I used to live on a street with that name, and Turtle because my friends used to say I look like Franklin the Turtle. I don't see the resemblance, but it makes for a good screen name. For the past few months, I've been writing a program in C# for my landlord that keeps track of her rental properties, accounting and maintenance issues. It's an all-in-one kind of thing. I've been using SharpDevelop because of my intense hatred for any and all things Microsoft. I actively avoid using anything they make, so that means I don't use Visual Studio. A good alternative, some say, would be MonoDevelop but Microsoft owns that, too. Up until I started on this project, I'd only tinkered with C# while playing with Unity. My IDE of choice was Game Maker because of the ease of use and the speed at which a program can be written using it. You can go ahead and laugh. It's funny. Game Maker is a good tool for learning programming concepts, but once you have it down it is really best to leave it behind you. I thought I could take everything that GM taught me and use it when I made the transition to C#. Keep laughing. It's still pretty funny. What I thought I knew going into this project and what I actually knew are two very different things. I've learned so much over the past few months. Looking back at the early sections of the code is like looking at a car with square wheels. Looking over it, I keep going, "Now why did I do that" and "What in the world was I thinking". One of my biggest mistakes-- and I just figured this one out yesterday-- was creating classes and then creating separate forms for those classes. It never occurred to me to make them one and the same. Take this, for instance: public void edit(BindingList h) { saved=false; int i=-1; HouseholdForm editHousehold; editHousehold=new HouseholdForm(members,householdName,account, rentOverride,overrideAmount, dueDate,gracePeriod,penaltyAmount,penaltyDate); foreach(HouseHold house in h) if (house.householdName==householdName) i=h.IndexOf(house); editHousehold.setHouseholdList(i); editHousehold.ShowDialog(); if(editHousehold.saveMe) { //members.Clear(); members=editHousehold.listOfMembers; householdName=editHousehold.householdName; rentOverride=editHousehold.overridedefaultRent; overrideAmount=editHousehold.oRid

                  H Offline
                  H Offline
                  HobbyProggy
                  wrote on last edited by
                  #17

                  I'd also suggest you, aside to Griffs suggestions to get a bit into design patterns. A good architecture solves most problems before they occur, like : -What does my UI do? -Could i get a layer between my UI and the data? -Data classes? -Do i have duplicate code? -> Can it be handled by one class? (Logic) -What is my complexity? (Cyclomatic complexity -> root cause of a lot of bugs) -Interfaces!? (Cohesion instead of coupling) Normally i'd suggest something like MVC or MVVM but i won't do that anymore, everyone should find the architecture thats fits to the application.

                  Rules for the FOSW ![^]

                  if(!string.IsNullOrWhiteSpace(_signature))
                  {
                  MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
                  }
                  else
                  {
                  MessageBox.Show("404-Signature not found");
                  }

                  1 Reply Last reply
                  0
                  • L Lost User

                    The documentation is reference documentation, not tutorials. For the latter you have to go elsewhere.

                    D Offline
                    D Offline
                    den2k88
                    wrote on last edited by
                    #18

                    Windows API documentation does a much better job of explaining what has to be done. Therefore it is not a problem in the concept of documentation nor a MS design choice, it is simply crappy documentation. Tutorials are dreadful, they are "how to do X: step A, step B, step C". Good, but if I need to do X' I'm screwed, because I still don't have the knowledge on how the system is supposed to work and how the pieces I am given interact between each other. With a tutorial I have a recipe that I can blindly follow and no more. I hate tutorials. Besides, it is the producer's duty to explain how to use its product - when you buy a home appliance you have a manual explaining you how to use the product, you're not requested to find a tutorial written by a third party (which can be grossly wrong with no repercussions, by the way).

                    GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

                    L 1 Reply Last reply
                    0
                    • P PeejayAdams

                      I certainly agree that the documentation is about as much use as a chocolate fire-guard. You always know you're really struggling when you have to resort to the MS docs!

                      Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

                      D Offline
                      D Offline
                      den2k88
                      wrote on last edited by
                      #19

                      And yet Win32 and CRT (older versions are increasingly better) documentation is as fine as it can be, to the point that when looking for documentation on CRT functions I very much refer to MSDN because of its overall better quality. I think .NET has not been thought out properly and pushed out into production before it was ready. That's the reason of the many conflicting classes and namespaces, half baked hierachies and it lead to a dreadful documentation: how can anyone document something that is held together by duct tape, spit and faith?

                      GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

                      1 Reply Last reply
                      0
                      • L Lost User

                        The documentation is reference documentation, not tutorials. For the latter you have to go elsewhere.

                        P Offline
                        P Offline
                        PeejayAdams
                        wrote on last edited by
                        #20

                        I appreciate that but when you come across an ambiguously named property, you really need something more useful than "X has a property called SomethingWhichCouldMeanSeveralDifferentThings" - Intellisense has already told us that.

                        Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

                        L 1 Reply Last reply
                        0
                        • P PeejayAdams

                          I certainly agree that the documentation is about as much use as a chocolate fire-guard. You always know you're really struggling when you have to resort to the MS docs!

                          Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

                          T Offline
                          T Offline
                          theoldfool
                          wrote on last edited by
                          #21

                          Not a problem here, I just ask Siri! :)

                          If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.

                          1 Reply Last reply
                          0
                          • D den2k88

                            PeejayAdams wrote:

                            C# is a damned fine language

                            It is, yet it has some "features" that make me want to stick with C++. Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp). I use the header as index into the cpp and I really find C# messier in that regard. Second thing I don't like is the difficulty of casting between basic data types: I may want to load a byte stream, read some header and decide to treat the content as a short int stream. Easy to do in C/C++, not that much in C# without using the unsafe block - I don't really like it as it puts a nice hole in the reason I'm using C# in the first place. Third thing, it makes the usage of the native resources harder instead of simpler - that is not a problem except that my line of work requires native resources so C# actually hinders me more often than not.

                            PeejayAdams wrote:

                            .NET is a steep learning curve,

                            I agree, it is much much steeper than Windows API... especially considering the utter crappy quality of documentation. I don't need a list of the members of a class, I need to know what it's supposed to do, what problems does it solve and how it is meant to be used/integrated in the code: is it to be instanced? Is it to be extended? Shall I use its children instead of it? How does it differ from a similarly named class in another Microsoft namespace and how can they work together, if they can? All of this is missing from most of the framework documentation, leaving beginners with dozens of chunks of unrelated knowledge, there is no sense of unity, it is a disruption of the Force.

                            GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

                            K Offline
                            K Offline
                            kalberts
                            wrote on last edited by
                            #22

                            den2k88 wrote:

                            Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp).

                            ... and to me, that is one of the essential improvements :-). I grew up with database normalization (and as normalization grew up - my first database course was on CODASYL bases, not relalational:-)), so it is in my genes: Don't represent the same information in two places - that is bound to one day lead to inconsistencies.

                            Quote:

                            Second thing I don't like is the difficulty of casting between basic data types: I may want to load a byte stream, read some header and decide to treat the content as a short int stream.

                            Again, to me a stricter type system is an improvement. C things like "while (1)" makes me shiver. This "implicit casting" (or rather: lack of type checking) is the source of a lot of bugs and problems.

                            1 Reply Last reply
                            0
                            • S SawmillTurtle

                              My dislike of Microsoft comes from many years of opposing their policy of "Do their thinking for them. Microsoft knows best." It's not blind hatred. It's a lifetime of being told that I'm not smart enough. Take the Firewall in Windows 10. I use my own firewall most of the time, but for the longest time (not sure if it still does it anymore), if you turned it off, Windows would remind you that if you leave it off too long "we'll turn it back on for you." Excuse me? I don't want other people doing my thinking for me. I'm capable of setting up my own firewall. I can even tie my own shoes and I can brush my own teeth, too. Know what I mean? As for casting, did I really miss something that was such a monumental foundation stone? Oh dear. Guess I'll need to do some more Googling and figure out how I could make my life easier. Thanks for the advice.

                              Z Offline
                              Z Offline
                              ZurdoDev
                              wrote on last edited by
                              #23

                              SawmillTurtle wrote:

                              Do their thinking for them. Microsoft knows best.

                              I find that interesting. They are the most open major software vendor. I've made a good career out of using their tools to make their own products much better. I feel like they give me more freedom than any other vendor. You have much fewer choices using apple than you do using Microsoft.

                              Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

                              S 1 Reply Last reply
                              0
                              • S SawmillTurtle

                                My dislike of Microsoft comes from many years of opposing their policy of "Do their thinking for them. Microsoft knows best." It's not blind hatred. It's a lifetime of being told that I'm not smart enough. Take the Firewall in Windows 10. I use my own firewall most of the time, but for the longest time (not sure if it still does it anymore), if you turned it off, Windows would remind you that if you leave it off too long "we'll turn it back on for you." Excuse me? I don't want other people doing my thinking for me. I'm capable of setting up my own firewall. I can even tie my own shoes and I can brush my own teeth, too. Know what I mean? As for casting, did I really miss something that was such a monumental foundation stone? Oh dear. Guess I'll need to do some more Googling and figure out how I could make my life easier. Thanks for the advice.

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

                                SawmillTurtle wrote:

                                Take the Firewall in Windows 10. I use my own firewall most of the time, but for the longest time (not sure if it still does it anymore), if you turned it off, Windows would remind you that if you leave it off too long "we'll turn it back on for you."

                                Then use the tools for the big boys. They're called group policies. Windows tries its best to protect users from themselves--remember, there's no worst threat to a computer's security than its users, and Windows is written for the unwashed masses. Remember what Windows was like before a default firewall was added to XP SP2. And remember what *prompted* the addition of a firewall.

                                S 1 Reply Last reply
                                0
                                • D den2k88

                                  PeejayAdams wrote:

                                  C# is a damned fine language

                                  It is, yet it has some "features" that make me want to stick with C++. Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp). I use the header as index into the cpp and I really find C# messier in that regard. Second thing I don't like is the difficulty of casting between basic data types: I may want to load a byte stream, read some header and decide to treat the content as a short int stream. Easy to do in C/C++, not that much in C# without using the unsafe block - I don't really like it as it puts a nice hole in the reason I'm using C# in the first place. Third thing, it makes the usage of the native resources harder instead of simpler - that is not a problem except that my line of work requires native resources so C# actually hinders me more often than not.

                                  PeejayAdams wrote:

                                  .NET is a steep learning curve,

                                  I agree, it is much much steeper than Windows API... especially considering the utter crappy quality of documentation. I don't need a list of the members of a class, I need to know what it's supposed to do, what problems does it solve and how it is meant to be used/integrated in the code: is it to be instanced? Is it to be extended? Shall I use its children instead of it? How does it differ from a similarly named class in another Microsoft namespace and how can they work together, if they can? All of this is missing from most of the framework documentation, leaving beginners with dozens of chunks of unrelated knowledge, there is no sense of unity, it is a disruption of the Force.

                                  GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

                                  den2k88 wrote:

                                  Mostly I dislike the impossibility of separating function definitions and declaration in different files (like header and cpp). I use the header as index into the cpp and I really find C# messier in that regard.

                                  There's a class browser that lets you view all properties and functions of a given class, without showing the actual implementation, if that's all you're really after. There's also a dropdown at the top of the screen that's very similar. IMO, if you need a separate file as an "index" into the class, as you put it, then it's high time to refactor the class into something simpler. I've done C++ for well over a decade before committing to C#, and I've never looked back. I don't miss headers at all. IMO headers just make you duplicate work that you can leave to the compiler to figure out.

                                  1 Reply Last reply
                                  0
                                  • S SawmillTurtle

                                    I can answer both questions at the same time: My preferred operating system is Linux. Ubuntu, as a matter of fact. However, she wants me to write a computer program, and it has to run on her OS of choice. Trust me, if I had a choice, this computer would be wiped and Linux would be on it. Since it belongs to her, I'm stuck with it. And if I'm writing a program that runs on Windows, what else would I use? I suppose I could use Visual Basic or Visual C++ but-- surprise! -- both Microsoft products.

                                    M Offline
                                    M Offline
                                    Marc Clifton
                                    wrote on last edited by
                                    #26

                                    SawmillTurtle wrote:

                                    And if I'm writing a program that runs on Windows, what else would I use?

                                    I'd suggest Python. You can code it on Ubuntu and use Tk or similar for the UI.

                                    Latest Article - A Concise Overview of Threads Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                    1 Reply Last reply
                                    0
                                    • S SawmillTurtle

                                      My dislike of Microsoft comes from many years of opposing their policy of "Do their thinking for them. Microsoft knows best." It's not blind hatred. It's a lifetime of being told that I'm not smart enough. Take the Firewall in Windows 10. I use my own firewall most of the time, but for the longest time (not sure if it still does it anymore), if you turned it off, Windows would remind you that if you leave it off too long "we'll turn it back on for you." Excuse me? I don't want other people doing my thinking for me. I'm capable of setting up my own firewall. I can even tie my own shoes and I can brush my own teeth, too. Know what I mean? As for casting, did I really miss something that was such a monumental foundation stone? Oh dear. Guess I'll need to do some more Googling and figure out how I could make my life easier. Thanks for the advice.

                                      M Offline
                                      M Offline
                                      Marc Clifton
                                      wrote on last edited by
                                      #27

                                      SawmillTurtle wrote:

                                      My dislike of Microsoft comes from many years of opposing their policy of "Do their thinking for them. Microsoft knows best." It's not blind hatred. It's a lifetime of being told that I'm not smart enough.

                                      It's an understandable attitude from Microsoft, because it's not "do their thinking for them" but the reality that most computer users are too non-technical (or just plain stupid) to do the thinking for themselves. Do you think I want to guide my mom through arcane command line syntax in Linux to do something simple like set up a printer, which of course leads to the inevitable rabbit hole of updating drivers, which requires updating the OS, which requires updating all the dependencies? Hell no.

                                      Latest Article - A Concise Overview of Threads Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                      D S 2 Replies Last reply
                                      0
                                      • M Marc Clifton

                                        SawmillTurtle wrote:

                                        My dislike of Microsoft comes from many years of opposing their policy of "Do their thinking for them. Microsoft knows best." It's not blind hatred. It's a lifetime of being told that I'm not smart enough.

                                        It's an understandable attitude from Microsoft, because it's not "do their thinking for them" but the reality that most computer users are too non-technical (or just plain stupid) to do the thinking for themselves. Do you think I want to guide my mom through arcane command line syntax in Linux to do something simple like set up a printer, which of course leads to the inevitable rabbit hole of updating drivers, which requires updating the OS, which requires updating all the dependencies? Hell no.

                                        Latest Article - A Concise Overview of Threads Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                        D Offline
                                        D Offline
                                        den2k88
                                        wrote on last edited by
                                        #28

                                        Marc Clifton wrote:

                                        Do you think I want to guide my mom through arcane command line syntax in Linux to do something simple like set up a printer, which of course leads to the inevitable rabbit hole of updating drivers, which requires updating the OS, which requires updating all the dependencies? Hell no.

                                        You sure have the gift of synthesis. That's my 10 years experience on Linux and why I no longer use it since 2012. Windows has its share of problems solvable only (or faster) with command line but they are rare.

                                        GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

                                        1 Reply Last reply
                                        0
                                        • D den2k88

                                          Windows API documentation does a much better job of explaining what has to be done. Therefore it is not a problem in the concept of documentation nor a MS design choice, it is simply crappy documentation. Tutorials are dreadful, they are "how to do X: step A, step B, step C". Good, but if I need to do X' I'm screwed, because I still don't have the knowledge on how the system is supposed to work and how the pieces I am given interact between each other. With a tutorial I have a recipe that I can blindly follow and no more. I hate tutorials. Besides, it is the producer's duty to explain how to use its product - when you buy a home appliance you have a manual explaining you how to use the product, you're not requested to find a tutorial written by a third party (which can be grossly wrong with no repercussions, by the way).

                                          GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

                                          And, of course, anyone and everyone is free to post their useless tutorials on the internet.

                                          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