"I can't deallocate memory from a C process if you kill it from the OS, we should do this in Java since it has a garbage collector".
dstopia
@dstopia
Best posts made by dstopia
-
💩 Shit I just heard in my office
-
RE: 💩 Shit I just heard in my office
I just had an argument with the same guy. We told him he had to build a dynamic call to a stored procedure and he would retrieve the SP's name from the database, since it was related to the ID of the task the program has to execute.
He came to me and showed me a switch() statement where he hardcoded the sample stored procedures that we gave him, and proceeded to argue with me because he didn't understand what I meant by "dynamic". Kept insisting I "show him in code" what I meant, and the idea that I had to show him how to concatenate a string in C sounded so fucking ludicrous in my mind that I spent extra time trying to explain the concept of what we're trying to achieve here.
He finally understood, but I thought I was going to have an aneurysm, jesus christ. This is a guy who supposedly has about 15 years of experience in programming, far more than I have.
-
RE: Code review malediction
Jesus.
Are you staying with Samsung? You sound like a competent programmer from your other posts on this debacle, and I wouldn't want to touch Tizen with a 100 foot pole after all you've said about it.
-
The Abyss
I think the fact that it ends on a break, it's not even correctly indented and has superfluous newlines is the perfect punchline for this piece of fucking shit.
-
RE: Just... I don't know anymore man.
One of the best tidbits of this application: It parses an XML file for input. Now, I can barely call this parsing: It iterates over every single XML element, and stores the tag on a string array, and the value of the element in another string array. The way to "find" a particular value is to search the tag array, fetch the index, and get the value from the value array using that same number.
I have no fucking clue who the hell thought this was a good idea. Holy shit.
-
Just... I don't know anymore man.
This is Java code.
Presented without further comment.
-
RE: Bugzzzzz
There's a point to what Blakey says and I mostly agree with it, but at some point, users need to realize that just because you can take a screwdriver and gouge your own eye out with it doesn't mean that the screwdriver has a design flaw, or that the screwdriver specification is wrong.
Otherwise we should just all surround ourselves in packing bubble wrap and be done with it.
-
RE: Visual Studio Code
True story: I broke a productive app once while doing that. It stopped ALL the truck deliveries on their tracks for an hour or two.
I didn't get fired but I learned an incredible important lesson: NEVER EVER UNZIP/UNTAR STUFF WITHOUT MAKING A SEPARATE DIRECTORY FIRST
-
RE: Oh, you wanted to get off the train? Tough shit, GPS is out.
I'm dealing with the opposite: A codebase where every single statement, no matter how innocuous or self-explanatory, is commented.
This is a small sample:
for ( int idx = 0; idx < theEnum.length; idx++ ) { // -----> Do we have a match? if ( theEnum[ idx ].getIndex() == index ) { // -----> Assign and bail out of the loop. theView = theEnum[ idx ].getView(); break; } } // -----> Not a valid view? (A bit redundant, but you never know...) if ( theView == null ) return; // -----> Declare the argument type in order to find the constructor of the view. Class[] args = new Class[] { CustomMainFrame.class }; // -----> Initialize the parameter for the constructor. CustomMainFrame param = this; // -----> Create an array of arguments for the constructor. Object[] argObj = new Object[] { param }; // -----> The panel to be instantiated. CustomAbstractView thePanel = null; // -----> Empty constructor. Constructor defaultConstruct = null;
And it all uses that fucking dumb // ----> format for comments.
If the function or class is doing weird stuff I'm very appreciative of a bunch of text explaining what it does at the top, with particular comments in touchy areas. But every single line? Come on.
-
RE: 💩 Shit I just heard in my office
Oh believe me, he wasn't talking about that. He literally thought malloc() memory doesn't get deallocated by Unix. He didn't even know what SIGTERM and SIGKILL are.
Latest posts made by dstopia
-
RE: Look before you paste.
I've always typed stuff. Even when looking up code snippets for stuff I don't know how to do, unless I'm super constrained by time I type it down instead of copy-pasting. It really helps committing it to memory, and it's how I learned how to program as well.
I never thought much of it other than the fact that I liked typing stuff when I was learning to code, but years later, when I came across the "Learn the Hard Way" series of books by Zed Shaw, his request to never copy-paste anything in order to help you understand what you're doing made a lot of sense and explained my behavior as a kid.
-
RE: The Abyss
@dstopia Do you happen to work in a SwampShack?
It's actually consulting for one of the biggest telecommunications companies in the country. And equally as stupid when it comes to internal IT, it seems.
-
RE: The Abyss
@UndergroundCode said in The Abyss:
And all of the data was stored in global fixed-size arrays with other global variables for the size, as if there wasn't a perfectly good dynamic List<> class already.
Oh YEAH! That totally happens here as well. It's mindblowing.
-
RE: The Abyss
@RaceProUK said in The Abyss:
Get out while you still can!
I'm getting out in July, moving to a different country. At least what I actually work on is only tangentially related, and I rarely have to touch this piece of shit. But until then I have to stick it out! At least I got my holiday weeks coming up, still.
-
RE: The Abyss
The point was the 2.5k lines of code inside the if, yeah. This piece of shit was programmed by people who never knew anything about Java and had been coding in (shitty) C for like 30 years or something.
The entire thing has no packages. Every class attribute and method is static. Variables are global for no good reason, variables get declared like old K&R C used to work, and this thing opens transactions with no rhyme or reason. I fixed an issue today where it was opening a connection to a service being opened while a connection was already opened, for absolutely no reason at all, if only that whoever slapped that piece of code in there had no idea there was a connection available at that point. Also this connection was being opened and closed at a detail-level processing inside a for loop. It was easy to miss because the code is a jumbled mess. To add insult to injury, this connection was opened in an openConnection() private method that was used EXACTLY ONCE, in that function, and the reason I had to fix it was because it was manually throwing an exception between opening and closing the connection. No try clause or anything. Golly gee.
This whole thing needs to be burned to the ground. I think cargo culture pushed this piece of shit so far no one ever wanted to take a minimal step back to look at it and see what they were actually working on. They just did patches upon patches for years on end.
I hate software.
-
The Abyss
I think the fact that it ends on a break, it's not even correctly indented and has superfluous newlines is the perfect punchline for this piece of fucking shit.
-
RE: Stupid patent lawsuits
@anotherusername said in Stupid patent lawsuits:
@Rhywden said in Stupid patent lawsuits:
it's not useful as a deterrent
I wonder if that could be partly because all of the appeals take so long that in some cases more death row inmates have died of old age than from being executed.
Immediate and expedient capital punishment used to be the norm in almost all societies, even for what we would nowadays consider minor misdemeanors. I'm fairly sure that still did not deter people from committing all sorts of crimes throughout the entire history of humanity.
-
RE: Just... I don't know anymore man.
One of the best tidbits of this application: It parses an XML file for input. Now, I can barely call this parsing: It iterates over every single XML element, and stores the tag on a string array, and the value of the element in another string array. The way to "find" a particular value is to search the tag array, fetch the index, and get the value from the value array using that same number.
I have no fucking clue who the hell thought this was a good idea. Holy shit.
-
RE: Just... I don't know anymore man.
piss-poor C programmer
That's my guess for who coded this piece of shit, too.
Oh, and this is only a small part of a "Java" application that has about 5 different files, all over 1k LOC. This one in particular has over 8k, no packages declared, no concept of classes, total disregard for any kind of exception handling, a fucking mess. Inside each if you see there there are about 200 or 300 lines of code.
It's infuriating. At least there's a project to replace it being negotiated with the client. This is what happens when non-tech companies leave their incompetent IT staff to their own devises for years and years.
-
Just... I don't know anymore man.
This is Java code.
Presented without further comment.