Basically, this.
Posts made by LegacyCrono
-
RE: Finally nada
@Mason Wheeler said:
From a JavaScript file in our codebase:
Line 690:
try {
lines 985-987:
} finally { // nada }
(Yes, it's the same try block.)
A 295 lines long try block? What the heck, what exactly is being done there?
-
Talking to the code
I just found this on the code I'm trying to fix... Not really a big WTF but anyway.
# Go DEBUG almight, show us what's is going on! if ($debug) { print "\n\t - Environment:Device selected: $environmentsAndDevices\n"; }
(local $envName, local $hostame) = split(':',$environmentsAndDevices);
Chompz!
chomp($envName);
chomp($hostame);Clean! to assure it will be empty (concatenated variable)
$arrGrpName = "";
$arrUserName = "";(snip...)
-
RE: If would be greater than For, if I knew what If or Greater Than were for
@Julia said:
@LegacyCrono said:
Please enlighten me, because I honestly see no problem with that code.
Besides, of course, the fact that it's VB
It only processes the first row then bombs out of the loop? Looks like the original author is using For/Next/Exit to do a bounds check on IndexBeingViewed.
Ah, oops. I didn't noticed the EXIT FOR there.
-
RE: If would be greater than For, if I knew what If or Greater Than were for
Please enlighten me, because I honestly see no problem with that code.
Besides, of course, the fact that it's VB
-
RE: Diablo 3 launch
@lettucemode said:
In case you don't know about Diablo 3, its prequels basically invented the action-RPG genre.
Hahaha, under which stone have you been living? Sorry to burst your bubble, but hundreds of action-RPG games were released before Diablo (released in 1996). Just some examples: Crystalis (1990), Legend of Zelda (1987), Ys (1988), and friggin Atari 2600's Adventure (1979).
Besides, Diablo is actually what we call a Rogue-like, which is a genre that spanned from the concept of a 80's computer game called Rogue.
-
RE: Super constructor failure antipattern?
Gosh, every time I see a piece of Objective-C code, I feel like gouging my eyes out of my face.
Anyway... Apparently there IS a reason for that. Although I still don't see the reasoning behind it returning null. Or rather, calling the constructor of null. But hey, I'm not a Obj-C programmer...
-
RE: Connect the dots
@Peraninth said:
tldr: The SQL Server Management Studio query designer is only usefull for people who should not be writing queries.
Hah! Would be great for my coworkers then.
-
RE: JUnit test
Looks like he doesn't really trust his templates huh.
Oh I see the WTF, it's obviously missing the assertion below
TheClass<Boolean> tcb = new TheClass<Boolean>(); tcb.setData(FILE_NOT_FOUND); Object gotb = tcb.getData(); assertEquals(Boolean.class, gotb.getClass());
-
The Repetitive Database Access
I've started noticing a pattern on the rather large PHP/Perl (yeah) application I'm supporting now.
There's a class called DBAccess that is used to connect to the database (which is PostgreSQL) and perform queries. The class is something pretty simple and doesn't do much. Now, one would think that one instance of DBAccess would be enough for all our needs. That connecting once to the database is the best approach. But not the original developer of this... thing. (who, btw, is also my boss)
$getData1 = new DBAccess(DBSERVER1); $getData1->setSQL($sqlQuery1); $getData1->Open(); $getData1->disconnect(); // Do something with $getData1 $getData2 = new DBAccess(DBSERVER1); $getData2->setSQL($sqlQuery2); $getData2->Open(); $getData2->disconnect(); // Do something with $getData2 $getData3 = new DBAccess(DBSERVER1); $getData3->setSQL($sqlQuery3); $getData3->Open(); $getData3->disconnect(); // Do something with $getData3 $getData4 = new DBAccess(DBSERVER1); $getData4->setSQL($sqlQuery4); $getData4->Open(); $getData4->disconnect(); // Do something with $getData4 // ... snip ... $getData12 = new DBAccess(DBSERVER1); $getData12->setSQL($sqlQuery12); $getData12->Open(); $getData12->disconnect(); // Do something with $getData12
-
RE: If you ever wondered whether or not "AI" is actually "BS"...
@bridget99 said:
This may sound troll-worthy, but about 80% of the crap postulated in that article just boils down to fancy applications of Javascript "eval()."
If you're using eval() you're DOING IT WRONG.
An expert system is not like that. It uses its knowledge base to make logical decisions based on the underlying rules. The knowledge is NOT the definition if its behavior. It doesn't determine HOW the logical decisions are made. Here's an example: a text translation engine. The underlying logic of translation is unchangeable, it's fixed, just identify a sentence and, using its knowledge, interpret it and translate that sentence to another language. What changes is the knowledge: the vocabulary, the grammar, the language syntax.
-
RE: Clearly I am insane
@ender said:
@ASheridan said:
I'm not sure why they've done this, but it was confusing at first to diagnose when I was having issues because of it.
To support the 0.01% of users that change languages so the directories can appear in localized names (the functionality actually exists at least since XP, but it wasn't used there except for renaming Start Menu entries).Really, 0.01%? Where did you get that number? Are you american?
-
RE: Anyone want a programming job?
Make him an obfuscated code that will work as expected before the due date but will just print "I pay people to do my homework" afterwards.
-
RE: Mail oops
If he were smart, he would have used the undo send function on GMail.
Too late now, I guess.
-
Object-oriented argument passing
The application I'm currently supporting has a funny way of using OOP. Somewhere along the development, the original programmers discovered classes and their beauty. Like, for example, how you can instance an object to keep values on it. And then discard the object.
[code]$empdata = new employee(strtoupper($GetEmployeeData[emp_name]), strtoupper($GetEmployeeData[emp_email]));[/code]
[code]$Result = RemoveEmployee($empdata->name, $empdata->Email);[/code]
[code]return $Result;[/code] -
RE: We'll need to refactor this later
I've just got into a project where a critical part of the application is executed like this: the PHP code calls a Perl script, which then runs another PHP file. I've questioned the original developer (which happens to be my boss) why oh why they'd do something like that. His answer was that they were still learning back then (and apparently this was supposed to be efficient)... Sigh.
Oh by the way, they already rewrote the whole application once, two years ago. This is "version 2". I wonder what the "version 1" code was like (I'd look up on the repository but guess what? They didn't used version control back then!)...
-
RE: Wooden Table Perfection
Rule of Cool applied to web design? Anyway, not really a WTF in my opinion. If the scrolling wasn't so sluggish here I think that would be a very neat effect.
Still, the class name made me chuckle.
-
RE: Most games are written in Excel
That was a poorly-worded statement but it has some truth to it. Most parts of Game Design can be and are generally made in Excel, from items to enemy statistics and spreadsheets about game difficulty over time (stuff that is actually very useful for game and level designers, for balancing the game).
Most programmers will hear that and say "WTF?" instantly but that's because they consider the code to be the foundation of everything. Games are created fairly different than your average business ERP, SCM or [3 letter acronym here]. Programmers may create the engine, but the "game" as a whole requires levels, assets, game logic, data etc. Stuff that is often conceived by a game designer in Excel or Word. That was probably what her teacher meant.
-
RE: Why?
Well, different from A.getClass() that returns A, A.getTheClass() will return B. So, yeah...
-
RE: I18n fail message box
I like how this went completely offtopic.
Not that unusual really. Every once in a while I still come across a website that works beter in IE than Firefox.
Well, that's why I have IE Tab installed. Also, Chrome.
-
RE: I18n fail message box
TRWTF here is that you have Internet Explorer pinned on your start menu. Unless you're a web developer that's a waste of space there. Or maybe TRWTF is Vista? Hmm.
-
RE: More Adobe WTF
@The poop of DOOM said:
@boomzilla said:
FTFY. I can't think of any software by IBM that's actually popular.Lotus Notes
Whoa hold on, Lotus Notes is popular?
I think AIX or DB2 could be considered popular, or maybe even Websphere Application Server, but... Lotus Notes?
-
RE: The new guy needs to be productive right away
@Master Chief said:
@serguey123 said:
Soooo, Nagesh and company working with you explain why your workplace sucks
Because they're constantly asking him for the codez?
ba dum tsh
They ask him to "do the needful".
-
RE: The most accurate weather forecast ever
@renewest said:
@Kneth said:
2 years into the future?
No, it displays the forecast as of approx. two years ago.
My thoughts exactly.
Isn't TRWTF that it does not show the date the forecast is for?
Nah, TRWTF is obviously Windows Mobile.
-
RE: Those spammy ads are getting lazy
@Lorne Kates said:
@blakeyrat said:
Edit: Before replying, keep in mind Blakeyrat's Law.
Blakeyrat's Law: Any discussion of an ad will quickly devolve into a discussion of the use and/or morality of ad-blockers.
You know who else didn't used ad blockers? Hitler.
Think about it.
Godwin's Law: As the length of a thread approaches infinity, the probability of a comparison involving Adolf Hitler or the Nazis approaches 1. Corollary: Outside of a small number of specific topics (for example, discussion of the British National Party), making such a comparison automatically loses the debate.
-
RE: Another of IBM great ideas!
Considering they encourage employees to come up with new patents, I can see how such a stupid idea came up published.
I just hope this will never be made into an actual product. Not only it's ridiculous by itself, but requiring a remote server to process the aging introduces a SERIOUS security hole. Just think about it: a "fake" aging server capturing files, acting as your good ol' aging server, but sending the information to somewhere else... That's bound to be exploited and causing havoc!
-
RE: Short but insane Adobe WTF
@dhromed said:
@LegacyCrono said:
What the...? How does that even work?
In order for FlashBug to work, it probably needs to hook into, and perhaps modify, the existing installation of Flash.
The insane thing is that it is a problem entirely created by Adobe, and yet is is not their problem, and yet may still be fixable by them.
Still, I'd first try to throw some mud at the authors of flashbug. Thay guy claws up the Flash installation, he probably realizes it can mess shit up.
Right, but... affecting Fireworks UI? Does it even depends on Flash technology to work?
-
RE: Yale School of Art
Gotta have balls to put this on the source code:
[code] [/code]