- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
It's not quite a Rosetta stone of fail
Admin
It's Genius. When the system malfunctions, no one will ever need to search for the failure point as the whole program is a single line of SQL.
Admin
I think we've found the "SQL God".
Admin
Very Zen.
Admin
I'd like to see code from a compiled language in an SQL query. That would be enterprisey.
Admin
Admin
Someone please tell me there is a caching mechanism (mysql query caching) that makes sure poor mysql doesn't have to endure this at every request.
I'd like to sleep peacefully tonight.
Captcha: wisi I wish i knew
Admin
!(MVC separation is this thing you do when you are not busy with real work)
Admin
It amazes me that anyone would ever bother writing their own bug/ticket system when there are much better and often, free versions available. Of course, we currently use one of these at work, whipped together in a weekend by the "Development Manager". I could see using a homebrew solution if you wanted to use it as a simple "proof of concept" for some new technology you were evaluating (say, NHibernate), but if you're going to write it the same crappy way as the rest of your code, you might as well use a more polished solution; there's absolutely NO reason to write your own in a situation like this except ignorance or a perceived "But we need oddball Feature X that no other bug tracking system has, and that we probably won't use either! We MUST write our own, customized solution!"
Also, let's see here:
Result: My eyes, the goggles do nothing!
Admin
Does any of those provide the functionality in one very Zen line?
Admin
Well, string concatenation in "Classic" ASP is extremely slow (time, and memory use, goes up expoentially with each concatenation, rather than linearly as you'd expect), so getting something else to do the concatenation for you certainly helps. The most common way, however, was to use arrays, as the Join() function created the final string directly, rather than using the concatenation functions within VBScript. Of course, if this is then read from the sproc using rs.movenext, it's a massive time sink there, too (The better way would be to use getrows() to return an array, or even better, getstring() to just dump it directly into a string)!
Admin
Admin
I worked at such a beast where a team wrote VB.Net like code that adhered to an interface, compiled and placed it in a database (binary data in a blob field) using a intermediate tool. These business rules were pulled out of the blob field, loaded into memory, and executed. Just another way to introduce dependency injection I suppose, but I'd never purposely design such a beast.
Admin
I'd still be willing to bet that they don't cache the results of this monster of a query, even though the query never changes and the results probably will only change occasionally (whenever there's a new query).
Admin
I can just imagine the developer thinking,
"I can't believe this is the only way to build a dynamic HTML page!"
Admin
You've inspired me. In DB2 for the iSeries (and probably others, but I'm most familiar with it) you can define external procedures for use with SQL stored procedures for all your C, RPG and CLP programs as long as their entry parameters are all compatible with SQL types.
There has to be a way I can save a program object's binary data into a database table as BLOB type, select the appropriate code with SQL call a CLP from a stored procedure that creates a new *PGM object and streams in the binary data call the program object and then delete the program when it finishes
Admin
Tragically, I've written code like that in my early days directed by my mentor to do so. What a fool I was to listen.
Admin
Admin
You've never installed Bugzilla. It's the regex of ticket systems.
Admin
Admin
Mommy, Mommy, look what I can DO!!! It's SQL, HTML, and JavaScript all at once!"
"Yes dear, but just because you can, doesn't mean you should. Now put that tool away before you go blind... or make us go blind."
Admin
Pffft. The stored proc doesn't even build SQL strings to dynamically execute.
Amateurs.
Admin
I believe you can use also Java (in addition to C and DB2's SQL dialect) to defined stored procs on the x86 Linux and Windows versions, at least as of 8.2.
And, my favorite part, all SQL stored procs in DB2 (at least, the non-Mainframe versions that I've seen). really are just C programs. They get translated to C server side, compiled, and installed into the db instance. I discovered this when I wasn't able to get stored proc compilation working correctly on my laptop instance.
Admin
I mean, all SQL based ones. Not the Java ones. Though that'd be an entertaining form of evil.
Admin
This solution is obviously incomplete. I don't see any CSS in the select statement.
Captcha: "acsi" A character encoding scheme used by dyslexia researchers.
Admin
του code è die merde.
Admin
CREATE ASSEMBLY CLRinDB AUTHORIZATION dbo FROM @assembly_bits WITH PERMISSION_SET = EXTERNAL_ACCESS
Admin
Admin
OK, the 'php god' one was obviously fake. But this... this one might actually be legitimate. I can't tell.
Admin
Can't quite recall ever seeing that, but the inverse - SQL code in a compiled language - makes me shudder at the memories of working with Oracle SQL embedded in C++. A marriage made in hell, especially given the hideousness of Oracle's C++ headers and the widely varying support for C++ in compilers at the time (2000 - 2001).
Admin
Admin
The PHP God article seemed perfectly plausible to me. I once worked with a self proclaimed Perl God who wrote similar monstrosities. All of them were packaged up in a single, many thousand line Perl module named after the developer in question. This at least made it easy to replace the bulk of his idiocy with sane code by either searching and replacing the truly bogus function calls (the guy loved reinventing the wheel), then replacing the rest by replacing "use BobLib" with a bunch of more modular (ahem) modules.
Admin
I have actually had to fix code like this before. And this code came from a Sr. positioned person who was very proud of the elegant solution. Ughhh, slapping my forehead.
Admin
Admin
Embedded SQL inside COBOL/RPG/C is so passé. Let's do it the other way around, way of the future !
Admin
Admin
You can store Java stored procedures as bytecode in a BLOB column. It has been done.
Admin
I want to make programs that only do what you want them to if they are given the ability to compile and run themselves. Preferably using two different languages.
Admin
WinFS was half way there.
Admin
Why would you do that when you can generate the dynamic binary with the table values (converted to hex, of course) already embedded? Compiling just seems like an extra step to me.
Admin
Admin
Boy, at our site, that would be a PAGE!!! We're currently at 1.2 million requests.
Admin
No one had access to the DB, or did it use some sort of transdimensional, unicorn magic storage system...
Here's a start:
UPDATE dbo.Users SET EmailAddress = @NewAddress WHERE UserId = @YourUserId
Admin
And yet still not as much of a WTF as FogBugz. Classic ASP? Nah, let's WRITE OUR OWN LANGUAGE BWAHAHAHAHAHA
Admin
Admin
Meh, as much as it pains me to say, this kind of makes sense that they did it this way... Rather than trying to maintain two or more seperate code bases in two different languages which have to look and behave identically, they just created their own red-headed step child of a language (which nobody loves of course) to be interpreted into different languages depending on the env (Unix or windows).
Admin
I quite enjoy Pro*C++
Admin
This is the entirety of my comment!...
Admin
See, I always wondered why they said learning more than one language would help me get a job...
It's for bits of genius like this!
Admin
i LIKE this pattern of conditional conditional.