Off Topic
    • Categories
    • Tags
    • Users
    • Groups
    • Amazon
    • OT Fundraiser
    • Register
    • Login

    The OFFICIAL programming thread

    Tech
    22
    1.4k
    10.4k
    Loading More Posts
    • 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.
    • Gators1G
      Gators1 @A Former User
      last edited by

      @hog said in The OFFICIAL programming thread:

      Mildly interesting article but the title is possibly the worst click bait I’ve ever seen.

      Here’s a worser one…

      fd019616-bbf2-47f6-b0fc-66011cce711c-image.png

      alt text

      TazzT 1 Reply Last reply Reply Quote 0
      • TazzT
        Tazz @Gators1
        last edited by

        @gators1 probably let out a six minute long fart

        GTFO

        1 Reply Last reply Reply Quote 0
        • GustafG
          Gustaf @rote7
          last edited by

          @rote7 said in The OFFICIAL programming thread:

          @Gators1

          Stored procedures are one possible solution. But, and this is a big but, they are DB dependent and I am looking for a way to achieve this with as little as possible DB specific SQL dialect.

          As for the client generated SQL, that’s the current solution as a part of a homegrown ORM. I am just curious if it can be done purely in the DB as a way to replace a bunch of DB specific logic during the SQL generation in that ORM.

          @Gustaf

          linux_babe-wet-shirt.jpg

          /* insert snappy comment here */

          This is the kind of amazing posting that has won this website so many awards!

          "Let's give it a week! Still a disaster? Let's give it another week…" -Tazz

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by A Former User

            Programming with pictures

            Back in the late 90’s I demonstrated a graphical workflow tool I was using to a colleague and he dubbed it “programming with pictures”. Later, similar tools started appearing in most 3D applications like Blender and Godot. Except there they call them “node editors”.

            Anyway, just now I wanted to temporarily backdrop something I’m working on in Blender with a tiled floor and I thought, oh that would be a good case for using shader nodes. So I started building it and got this far before I had a problem:

            db3039a7-7eff-4807-9022-6beeb018713a-image.png

            The problem was that I needed a logical XOR operation on the output of the Column and Row. ie, if either the column or the row is odd (edit: but only one of them), then use the alternate color. But, surprisingly to me, I found out that Blender doesn’t have a node for boolean logic. I could have written some python code to do it but that seemed like cheating so I thought about for a bit before I realized I could add the row and column remainder and then do another modulo operation on it:

            0213de42-569b-4bcb-b0fb-e903459a6762-image.png

            Fucking Bingo! My math skills are so rudimentary that I felt like Plato after I reasoned out that solution.

            1 Reply Last reply Reply Quote 4
            • Gators1G
              Gators1
              last edited by

              Flow graphs are pretty common in the data world as well. Our data movement tool, informatica, uses them at a couple levels to define the mapping of one column to another column and the process of when to run mappings in sequence. It is funny though how such tools often complicate something you could do easily in code. We ended up using a ton of SQL overrides in the ETL because we couldn’t be arsed to spell it out with all the boxes and lines, or in some cases you couldn’t even do it the way we wanted it.

              I have something similar to your OR problem quite often actually. Our report creation tool, which is basically a SQL GUI can’t easily do the order of operations in the equivalent of the WHERE clause. So I get tripped up when I want to do something like WHERE (A=1 AND B=0) OR (A=0 AND B=1). It has AND and OR but to create the parentheses I have to create new filter objects with the AND conditions, which is a different GUI, and then use those objects in the report definition. It’s not a huge inconvenience as you can create them pretty quickly, but it does tend to clutter up the application when you have to create a bunch of these and you have duplicates over time.

              alt text

              KilemallK tiggerT 2 Replies Last reply Reply Quote 0
              • KilemallK
                Kilemall Careful, railroad agent @Gators1
                last edited by Kilemall

                @gators1 said in The OFFICIAL programming thread:

                Flow graphs are pretty common in the data world as well. Our data movement tool, informatica, uses them at a couple levels to define the mapping of one column to another column and the process of when to run mappings in sequence. It is funny though how such tools often complicate something you could do easily in code. We ended up using a ton of SQL overrides in the ETL because we couldn’t be arsed to spell it out with all the boxes and lines, or in some cases you couldn’t even do it the way we wanted it.

                I have something similar to your OR problem quite often actually. Our report creation tool, which is basically a SQL GUI can’t easily do the order of operations in the equivalent of the WHERE clause. So I get tripped up when I want to do something like WHERE (A=1 AND B=0) OR (A=0 AND B=1). It has AND and OR but to create the parentheses I have to create new filter objects with the AND conditions, which is a different GUI, and then use those objects in the report definition. It’s not a huge inconvenience as you can create them pretty quickly, but it does tend to clutter up the application when you have to create a bunch of these and you have duplicates over time.

                The ugly part is under the covers you are probably adding 1000s of junky operations/instructions per decision/branch cycle where if they had the options you need in, your stuff would run faster.

                In that case they are looking to save devbucks and making you pay for their profit margin by buying more computer.

                https://i.imgur.com/hX2CMMZ.jpg

                Never go full Lithu-
                Twain

                No editing is gonna save you now-
                Wingmann

                http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                Gators1G 1 Reply Last reply Reply Quote 0
                • Gators1G
                  Gators1 @Kilemall
                  last edited by

                  @kilemall said in The OFFICIAL programming thread:

                  @gators1 said in The OFFICIAL programming thread:

                  Flow graphs are pretty common in the data world as well. Our data movement tool, informatica, uses them at a couple levels to define the mapping of one column to another column and the process of when to run mappings in sequence. It is funny though how such tools often complicate something you could do easily in code. We ended up using a ton of SQL overrides in the ETL because we couldn’t be arsed to spell it out with all the boxes and lines, or in some cases you couldn’t even do it the way we wanted it.

                  I have something similar to your OR problem quite often actually. Our report creation tool, which is basically a SQL GUI can’t easily do the order of operations in the equivalent of the WHERE clause. So I get tripped up when I want to do something like WHERE (A=1 AND B=0) OR (A=0 AND B=1). It has AND and OR but to create the parentheses I have to create new filter objects with the AND conditions, which is a different GUI, and then use those objects in the report definition. It’s not a huge inconvenience as you can create them pretty quickly, but it does tend to clutter up the application when you have to create a bunch of these and you have duplicates over time.

                  The ugly part is under the covers you are probably adding 1000s of junky operations/instructions per decision/branch cycle where if they had the options you need in, your stuff would run faster.

                  In that case they are looking to save devbucks and making you pay for their profit margin by buying more computer.

                  In some cases yeah, but in ours I don’t think so. Data movement is all about efficiency so our software actually has some optimizations over straight SQL that speed it up for common operations. Some super genius data engineer probably could get it to run faster with straight code and some caching functions or whatever, but that adds a shitload of development/ops overhead. Also devbucks are generally more important than having to buy hardware in the long run. If you had a hand code an ETL in SQL vs. using a pretty drag and drop interface, the development investment and operating costs would be a huge difference.

                  alt text

                  1 Reply Last reply Reply Quote 0
                  • tiggerT
                    tigger @Gators1
                    last edited by

                    @gators1 said in The OFFICIAL programming thread:

                    Flow graphs are pretty common in the data world as well. Our data movement tool, informatica, uses them at a couple levels to define the mapping of one column to another column and the process of when to run mappings in sequence. It is funny though how such tools often complicate something you could do easily in code. We ended up using a ton of SQL overrides in the ETL because we couldn’t be arsed to spell it out with all the boxes and lines, or in some cases you couldn’t even do it the way we wanted it.

                    I have something similar to your OR problem quite often actually. Our report creation tool, which is basically a SQL GUI can’t easily do the order of operations in the equivalent of the WHERE clause. So I get tripped up when I want to do something like WHERE (A=1 AND B=0) OR (A=0 AND B=1). It has AND and OR but to create the parentheses I have to create new filter objects with the AND conditions, which is a different GUI, and then use those objects in the report definition. It’s not a huge inconvenience as you can create them pretty quickly, but it does tend to clutter up the application when you have to create a bunch of these and you have duplicates over time.

                    … And it can’t just do where A!=B?

                    Gators1G 1 Reply Last reply Reply Quote 0
                    • Gators1G
                      Gators1 @tigger
                      last edited by

                      @tigger said in The OFFICIAL programming thread:

                      @gators1 said in The OFFICIAL programming thread:

                      Flow graphs are pretty common in the data world as well. Our data movement tool, informatica, uses them at a couple levels to define the mapping of one column to another column and the process of when to run mappings in sequence. It is funny though how such tools often complicate something you could do easily in code. We ended up using a ton of SQL overrides in the ETL because we couldn’t be arsed to spell it out with all the boxes and lines, or in some cases you couldn’t even do it the way we wanted it.

                      I have something similar to your OR problem quite often actually. Our report creation tool, which is basically a SQL GUI can’t easily do the order of operations in the equivalent of the WHERE clause. So I get tripped up when I want to do something like WHERE (A=1 AND B=0) OR (A=0 AND B=1). It has AND and OR but to create the parentheses I have to create new filter objects with the AND conditions, which is a different GUI, and then use those objects in the report definition. It’s not a huge inconvenience as you can create them pretty quickly, but it does tend to clutter up the application when you have to create a bunch of these and you have duplicates over time.

                      … And it can’t just do where A!=B?

                      No because A could be 2 and B could be 3. The point is that in general you have to do the operations in parentheses in a different way than the rest of the where clause in the GUI. So it makes it harder to do complex where clauses than with just coding.

                      alt text

                      1 Reply Last reply Reply Quote 0
                      • Gators1G
                        Gators1
                        last edited by

                        This is the nerdiest thread on the front page, so I will drop this here.

                        How Motherboards Work - Turbo Nerd Edition

                        alt text

                        TazzT KilemallK 2 Replies Last reply Reply Quote 0
                        • TazzT
                          Tazz @Gators1
                          last edited by

                          @gators1 Cool video. It’s amazing how clean and uncluttered todays mobo’s look compared to the first one I bought back around 1991 when I first assembled a PC.

                          GTFO

                          1 Reply Last reply Reply Quote 0
                          • KilemallK
                            Kilemall Careful, railroad agent @Gators1
                            last edited by

                            @gators1 said in The OFFICIAL programming thread:

                            This is the nerdiest thread on the front page, so I will drop this here.

                            How Motherboards Work - Turbo Nerd Edition

                            I reject your nerdshaming!

                            https://i.imgur.com/hX2CMMZ.jpg

                            Never go full Lithu-
                            Twain

                            No editing is gonna save you now-
                            Wingmann

                            http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                            http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                            Gators1G Lob12L 2 Replies Last reply Reply Quote 0
                            • Gators1G
                              Gators1 @Kilemall
                              last edited by

                              @kilemall said in The OFFICIAL programming thread:

                              @gators1 said in The OFFICIAL programming thread:

                              This is the nerdiest thread on the front page, so I will drop this here.

                              How Motherboards Work - Turbo Nerd Edition

                              I reject your nerdshaming!

                              I am not shaming…it’s good info!

                              alt text

                              1 Reply Last reply Reply Quote 0
                              • Lob12L
                                Lob12 @Kilemall
                                last edited by

                                @kilemall said in The OFFICIAL programming thread:

                                @gators1 said in The OFFICIAL programming thread:

                                This is the nerdiest thread on the front page, so I will drop this here.

                                How Motherboards Work - Turbo Nerd Edition

                                I reject your nerdshaming!

                                shuddup nerd

                                [IMG] https://image.ibb.co/nhhF0Q/new_sig_lob12.jpg [/IMG]

                                1 Reply Last reply Reply Quote 1
                                • ?
                                  A Former User
                                  last edited by A Former User

                                  When I got into programming they didn’t tell me there’d be nightmares

                                  - YouTube
                                  Gators1G ? 2 Replies Last reply Reply Quote 4
                                  • WingmannW
                                    Wingmann Gold
                                    last edited by

                                    Subscribed!

                                    -= Ez dut galduko itxaropena =-

                                    1 Reply Last reply Reply Quote 1
                                    • Gators1G
                                      Gators1 @A Former User
                                      last edited by

                                      @hog said in The OFFICIAL programming thread:

                                      When I got into programming they didn’t tell me there’d be nightmares

                                      - YouTube

                                      Can I get in on early alpha? How much for one of the streachy green guys?

                                      alt text

                                      ? 1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User @Gators1
                                        last edited by

                                        @gators1 said in The OFFICIAL programming thread:

                                        Can I get in on early alpha? How much for one of the streachy green guys?

                                        That’s an NFT. Only 10 billion will be minted so I can’t let them go cheap.

                                        1 Reply Last reply Reply Quote 5
                                        • ?
                                          A Former User @A Former User
                                          last edited by

                                          @hog said in The OFFICIAL programming thread:

                                          When I got into programming they didn’t tell me there’d be nightmares

                                          - YouTube

                                          I can’t believe I’ve spent a week on this and without a satisfactory result. I mean, I’ve got it to a point where it’s way better than the above but it’s still not usable. To get to the point I’m at now, I’ve had to by trial and error and process of elimination:

                                          • Discover a bug in the engine (already reported on Github) and code around it
                                          • Discover that the documentation is not only wrong but actually misleading and caused half the problems in the original vid

                                          The whole ragdoll physics feature in Godot is woefully undercooked which explains the dearth of internet resourses around it - ie no one is using it.

                                          Anyway, as frustrating as it’s been. I’ve learned a bunch of stuff and the only thing I’ve lost is personal time. Hardest part is that I’m left without a solution that doesn’t require a major and costly change in approach.

                                          This type of problem, although not common, terrifies me when it happens on a paid gig. It’s so fucking hard to explain to project managers and stakeholders what the hold up is and you feel like an incompetent idiot.

                                          1 Reply Last reply Reply Quote 4
                                          • ?
                                            A Former User
                                            last edited by

                                            Well this will do. I’m not Rockstar Games and I’m not making an AAA title. There’s still some occasional mesh tearing issues but I’ll wait until I have the actual higher-poly game assets before I try and fine-tune it further.

                                            - YouTube
                                            tiggerT JamJ 2 Replies Last reply Reply Quote 2
                                            • First post
                                              Last post