7

I just copied the exact same code from another program into mine, actually left out a loop because I didn't need it. Also took some other stuff out, nothing much, just some var = othervar that I didn't need.

The other program, from where I copied the code, works fine, is fast, I see no issue, has been in production for a while now and no complaints. Mine, WITH THE SAME CODE, doesn't move. I don't understand how this is possible.

Comments
  • 2
    Sounds like you broke the original code?
  • 0
    @hackedranger I literally just did CTRL+C CTRL+V, and the things I deleted where useless.

    I spent a day debugging the original code (no comments) and mine to see if it made a difference or if I could delete it
  • 2
    Maybe the loop was needed?
  • 5
    @cantthinkofone Even if they were useless, it may have served an unknown purpose.
  • 0
    @mojo2012 not really. This was the structure

    loop.
    // more loops here
    // some things I deleted that I didn't need
    endloop.

    loop.
    // this is the loop I deleted, it was just a select to get some texts into a internal table, the arrays of sap/abap
    endloop.
  • 0
    @hackedranger cells colors and unit conversions?

    I mean, the last one could mess with the math, that is a problem I still have to fix, but for now is fine
  • 4
    @cantthinkofone You never know. I mean, one time I deleted a variable that was only declared, but never used and it broke the whole program. Sometimes you see a balcony with no windows or doors to access it. Sometimes that same balcony is holding the whole building up.
  • 0
    @hackedranger the problem is what I deleted is a form that my program doesn't have access to, and that form calls a lot of other forms, functions and variables I also don't have access to.

    If I copy everything I need to do this one thing, I'll just end up with the same program as the one I'm copying from
  • 1
    Is it JS?
  • 0
    @FahadAlt ahaha no, it's SAP ABAP πŸ˜‚
  • 1
    @cantthinkofone πŸƒπŸ»‍β™‚οΈπŸƒπŸ»‍β™‚οΈπŸƒπŸ»‍♂️
  • 3
    @cantthinkofone oh god i once came in contact with a odata interface written in ABAP .... i felt like i traveled back 20 years in time ....
    And it buggy, full of hardcoded stuff that made it break/deliver false responses OOTB ....
    Ah i should probably tell u guys the story sometime ... warning: contains explicite content πŸ˜†
  • 0
    @FahadAlt that's how I feel everyday, like I want to run
  • 0
    @mojo2012 dude, you have no idea. There's a reason why people with 15+ years of experience make on average $123,582/yr.

    Please tell us the story πŸ˜‚
  • 2
    @cantthinkofone well I have only ~10y (hybris since 2014) but salary‘s quite good yeah 😊

    Ok I‘m gonna post a rant soon😜
  • 0
    @mojo2012 please let me know when you do, I want to know what my future is going to look like πŸ˜‚
  • 1
    First step to debug: copy the program EXACTLY. Check whether it works on your system, just to rule out environment or dependency problems.
  • 2
    @cantthinkofone i have the post ready but i cant post it bc i have to wait 2 hours ... arg
  • 2
  • 1
    @Fast-Nop I'm pretty sure the enviroment is the same, also the original program works perfectly on my machine
  • 1
    @cantthinkofone then I guess a binary search will work best. With deleting half of the "superfluous" code, checking whether it still works, and always cutting the relevant code portion in half. That should narrow down the scope quickly.
Add Comment