|
So at my work we use an internal software, called cataloguer. It takes in a single file or folder and a metadata file, that contains a whole bunch of information about the file or folder. Then writes this information to an Oracle server. Simple right? Well the guy who developed it, left around a year ago. The whole software is only about... 250k lines of C code. The code has 0 comments, and all the variable names have no vowels. And are generally abbreviated, if there is something already with the same abbrevated name. Then he adds a number next to it. So lets say: buffer becomes! bffr then instead of using lets say a DIFFERENT loving NAME, he uses, bffr001 further away. Now okay, so we just need to make a small change... right? So we shouldnt have to mess with the code. Theres alot of wonderful hex address attached to variables, and a little bit of ASM code here and there. Why are we doing (void ***)rspu.sttmnt = {0, 0, 0, 0, 0, 1, ........ } What the I dont know what that does. Period. Okay whatever. Huh, looks like thats supposed to be the SQL statement you want to execute, i'm confused. The statement, is an array of, unsigned ints...? Well thats retarded, we should just see how this connects to the SQL server, i guess and write some sort of workaround. Then we all realized. What SLCT_OFFST = "0x0fb8d2b" does. We realized why we need to install the specific build of the oracle client(7i)... The system, basically reads the username and password from a plain textfile, starts the oracle client GUI software. Does a shitton, of random memory hacks, and injects the SQL statement we want into the client interface and then it shoves it on the SQL server. I don't know who this man was, but he is a horrible horrible jerk. We're upgrading to Oracle 11, in two weeks, and the whole work environment rests on this software. This is why the software does extremely werid poo poo, when i try to run it using oracle 11 and just doesn't work. We can't push back the deadline, and i know its our fault. But gently caress.
|
# ¿ Sep 15, 2008 22:44 |
|
|
# ¿ Apr 26, 2024 19:25 |
|
On friday i was asked to update a small internal app, all it needed was a few little changes, maybe a weeks of work. A coop student wrote this, about 5 years ago in Java. What the gently caress...? A small snippet of a function: code:
The name of that function is a 0 Comments. FML.
|
# ¿ Feb 22, 2009 19:30 |
|
I think the old coop student (who will become a wind-chime soon) didn't use a decompiler. I looked a bit into java Decompilers, but from my understanding is that in java it will return the original functions names, etc. It also keeps comments Also this code, has sprinkles of names that, are slightly more descriptive. There is just random blobs of BS code like this(its almost all BS code). I don't quite understand how this works, the vast majority of the code though. To me, this shouldnt work, gently caress i dont even know why it works. I dug around and looked at b. Theres two b's First: code:
code:
I don't understand.... Would this function even change anything? Aside from manipulating the global RET value(even though it can never be false here.)..... The comments are the most descriptive ever. I love my job.
|
# ¿ Feb 23, 2009 02:04 |
|
McGlockenshire posted:But... if it's being created as a double, why is he immediately casting it to an int? And since when have primitive non-decimal numbers been anything but ints? This assumes that the coder thought of this. This code makes my head hurt. Thats what i am wondering, its full of litttle things that have enough little things (random comments, including one about subtle anal sex ) to make me think it wasnt decompiled. I think it was done as a gently caress you kind of thing. Anyways im working on this today so i'll see if i can find function c
|
# ¿ Feb 23, 2009 13:08 |
|
Yeah so i found the other b function, it was buried. I showed my boss some stuff, and basically told him its FUBAR. I don't think its been run through a code obfuscator, since half of the code can make sense, otherwise its the most ambitious/random obfuscator, i have ever heard of or seen. The update (which is to add a little bit more functionality to it) has been put on hold . But i love this, so i will keep digging when i have time Function B: (this is pretty much all unmodified, i changed the employee name written in the code though) code:
I like the nice little, rant though. It made me warm and fuzzy. *EDIT* Fixed it so it doesnt destroy the page. *EDIT2* Sigh, is there a better way to do this? I cant stop it from destroying this page. UberJumper fucked around with this message at 03:00 on Feb 24, 2009 |
# ¿ Feb 24, 2009 00:52 |
|
TRex EaterofCars posted:You could put it in a pastebin, but I think it's worth it to see this poo poo in all its glory. Nope, not a scientist. It was written by a third year Software Engineering coop student from Waterloo University.(:??? (I don't want to go into alot of detail, since i am too a coop student, and dont want to break rules(I dont know if there are even any)) The application is an internal Government Application its basically a massive spanning application that is used, to fetch some random sets of information/other stuff. Thankfully this poo poo, is only confined within a little application that only deals with a very specific type of data. It's used maybe twice a month. But unfortunately since the system is basically it interacts with other parts of the system using temporary files, and some other ridiculous things. But realistically needs to die a slow/painful death. Its terrible and probably in total is a million lines of code. This is one small part made up of around 40 odd java classes(the gently caress does it use them for) and is to try and figure it out. Maybe the kid never really programmed before, but gently caress come on. I think i should start pushing to have an actual source repistory, with code inspections etc. Because this is ridiculous.
|
# ¿ Feb 24, 2009 01:39 |
|
So i actually looked at the wrapper objects, i can see what they are for. But its just useless. I browsed and found all the wrapper java classes, WTFGFD. WrapperFIXED_A.java WrapperFIXED_A.class WrapperFIXED_B.java WrapperFIXED_B.class WrapperFIXED_C.java WrapperFIXED_C.class WrapperFIXED_D.java WrapperFIXED_D.class WrapperFIXED_E.java WrapperFIXED_E.class WrapperFIXED_G.java WrapperFIXED_G.class WrapperFIXED_H.java WrapperFIXED_H.class WrapperFIXED_I.java WrapperFIXED_I.class WrapperFIXED_J.java WrapperFIXED_J.class What happend to WrapperFIXED_F? All the classes are identical just with a slightly difference class name. I found this comment in A Tho. Its GOLD: code:
Please someone tell me what the gently caress he is rambling about?
|
# ¿ Feb 24, 2009 03:58 |
|
One more before i go to bed. This is what WrapperFIXED_A.java is made of: (NOTE: I cut out alot of the boring stuff, because its redundant, boring and useless code, some of the other functions were given to him, he just gave them retarded all caps names) All my comments start with >> and are bolded. code:
For the retarded little minirant of his, my theory is: for this: for(int i = 0; i <= 100; i++){ (WrapperClass_ + i) (mywrapper_ + i) = new (wrapperclass_ + i); } I think that more explains it, im not sure. Looks like he wants to dynamically create 100 variables, of a 100 different classes. I.e. WrapperClass_1 mywrapper_1 = new WrapperClass_1(); WrapperClass_2 mywrapper_2 = new WrapperClass_2(); ... etc. Why. *EDIT* Boo bold doesnt work in code tags. UberJumper fucked around with this message at 05:25 on Feb 24, 2009 |
# ¿ Feb 24, 2009 05:20 |
|
So i saw this today from ERDAS's software SDK...code:
I was curious because they prototype their functions like: <type> <function name> __((<parameter list>))
|
# ¿ Jul 8, 2009 23:45 |
|
code:
Now whats the biggest WTF here?
|
# ¿ Jan 14, 2010 06:44 |
|
code:
|
# ¿ Jan 26, 2010 05:30 |
|
Janin posted:What does this even do? The lambda parameters aren't used anywhere, so the imports are pointless. Oops! I actually copied the broken one, here is the correct one that was checked in: code:
It works.. i kinda like it but... UberJumper fucked around with this message at 06:26 on Jan 26, 2010 |
# ¿ Jan 26, 2010 06:06 |
|
Ugh more horrors: Honestly this is written by someone who worked in the industry for awhile. i am a coop student, so i don't have any say. But gently caress. Note. The code i posted above is not this person, and the following morning he actually was like "what the gently caress did i do?". And corrected it. I See Too Much poo poo Like this: code:
code:
code:
|
# ¿ Jan 28, 2010 07:27 |
|
Ohgod code:
|
# ¿ Feb 21, 2010 00:07 |
|
ZorbaTHut posted:Slightly late on this point, but the complete inability to disable specific warnings, or turn specific warnings into errors (i.e. with more fidelity than a global -Werror), has led to me writing a small chunk of shell script that wraps GCC, grabs the output, runs a bunch of sed scripts on it to turn some warnings into errors and eliminate other warnings entirely, and returns an appropriate error code. I am not much of a *nix guy, but is there any decent alternative to gcc?
|
# ¿ Mar 14, 2010 03:14 |
|
Munkeymon posted:Seems like this should go here: I never quite understood why most rails developers acted like complete and utter douchebags. I went to a technology conference last year, aside from Microsoft / IBM / Sun, it was a big ruby on rails circle jerk. Ruby on Rails will be the death of .Net and Java! Python/C++ will die too why would anybody use that! Now everybody drink your koolaid. Sadily i think everybody drank the ruby koolaid. As a result i got to have dinner and chat with some lonely microsoft / sun guys. Ironically i checked up on those companies promoting ruby and majority of them have yet to release anything.
|
# ¿ Apr 29, 2010 18:37 |
|
|
# ¿ Apr 26, 2024 19:25 |
|
code:
I looked around more and every single function this guy wrote follows this form: code:
I think a bottle of scotch in the morning is needed. Ugh.
|
# ¿ Jun 12, 2010 08:57 |