• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Ever get excited about a piece of code?

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: Drakkon
Well I came to that point today. I got this stupid script that my partner developed and it was taking 15 minutes just to process and i was getting fed up. So I decided I had to be able to find something better. So I play around with it for a few hours, doing what i can, saving write routines and db access routines in one area, processing all sorted out nicely, sit back and say okay this might work. Run the script...15 SECONDS later its done processing. I was like wtf this cant be right, run it again, 12 second this time. Look at the output, input, everything is working EXACTLY as it had before only faster. Just had to kick back and say "WOW" after that one 😛

I had something similar like that a couple times. The first one that comes to mind was when I was working at a mortgage company and was trying to load and cross-reference a bunch of flat-file data so that I could load it into a SQL Server 7 database. It was a beast of a program; I'd make adjustments to the code, then have to let it run overnight and check on it in the morning to see if it worked correctly. I ended up caching a lot of the primary key data in memory instead of having to look it up from the files each time, and I was able to cut it down to about 15 minutes instead of 10-12 hours. Needless to say, I was quite pleased with myself. 🙂

I also must admit to getting a little bit of a charge when I write a sizeable chunk of code, and it all compiles perfectly the first time I try. That just tells me I've been doing this for a while. Heh.
 
Originally posted by: KLin
Originally posted by: DT4K
One of the first projects I did at my job was to rewrite an Access 97 app. It was originally written to use keystrokes to automatically enter data in the corporate SAP system. When we got permission to use an automation component provided by SAP, I had to completely rewrite the app.

To upload one day's worth of data, it originally took 45 minutes and my new version took about 1 minute. Everyone in the shipping department loved me.
There was nothing special about my code, it was the difference in the way we connected that allowed it to be so much faster. But I still got credit and it was really nice to see such a big improvement.😀

As IHateMyJob said,
"Been downhill ever since"

did you push the data from an access table to a table in SAP?

We aren't allowed to directly touch any SAP tables. We had to do everything through the SAP gui. It was basically taking the records in the access db and using it to do the inventory receival transactions in SAP. The only difference my rewrite made was that we went from sending keystrokes to the SAP gui window, to using a component that allows you to assign values to all the SAP fields and execute the transaction without having to send keystrokes. Basically, it's like OLE automation. It was a big improvement in execution time, but was still a funky way to do it because you still had to duplicate the process of entering field values, going to the next screen, entering field values again, sending a code, etc.

Since then, we've managed to get the corporate SAP guys to provide us with web services that use BAPI's to execute transactions. So now, all our SAP transactions are done simply by executing their web service.
 
My biggest wow came after I finished the code for a macro virus for Wordperfect. This was around 1990-1992. It was designed to be harmless, but could, with 1 minute of changes, cause a whole heckuva lot of damage. Fortunately, everyone saw it for the humor it bestowed upon us one fine April 1 morning. I wonder if that coworker still walks away from his computer while logged in 🙂
 
Originally posted by: SagaLore
Originally posted by: amish
the only code that i have ever been excited about is: up, up, down, down, left, right, left, right, b, a, start.

My wife enjoys that one too.

lol that made me laugh.

I can't say I got excited about a piece of code. BUT I can say I was pretty dam fvcking happy that the code works! 😀 :beer:

Koing
 
Back
Top