- 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
This is the same technique we used in our databases assignment. The system works!
Admin
Doesn't get much less worthless than this. [8-|]
Admin
To simplify the system, the first row will contain field names, NOT actual data.
To enhance the system, the row of field names will be repeated every 25 rows.
[;)]
Admin
well, it could just be 1 column of csv :)
Admin
Wow, you could implement pointers to other cells by storing it as "column,row,column!"
E.g. 12,5,8 would refer to the cell at column 8 in the same row where the value in column 12 equals 5!
Admin
Great lords of stinking monkey fudge! Someone got paid to create this? Did he wipe afterwards, or at the very least wash his hands?
Admin
In a company I first worked for some "specialist" in his field (Metallurgy) who happens to know C (A-Z in one function C) actually suggested we change away from a DB to a Excel sheets for our data storage.
Admin
The real WTF is why didn't they just go all the way and do...
create table data (
table varchar(80) not null,
column varchar(80) not null,
id varchar(80) not null,
data varchar(8000) null
)
Example usage to insert customer with id of 100:
insert into alldata values ('customer' , 'name' , '100' , 'john' )
insert into alldata values ('customer' , 'phone' , '100' , '555-1212' )
insert into alldata values ('customer' , 'address' , '100' , '123 main street' )
Admin
This is the right way to do it
CREATE TABLE [Table]
(
[Column] text NULL
)
Simplicity above all!
Admin
About the best I can say about this is at least they used VARCHAR instead of CHAR!
Admin
We're going to need some better goggles.
Admin
Don't be rediculous. You're not supposed to store CSV in the fields... That's supposed to be XML data.
Sheesh.
Admin
I dont know about you but I store my persistent data on our conference room projector. It is high resoluton so I think I can cram lots of data in there.
Admin
That is only implemented in ECSVDB, the E is for Enterprise!
Admin
it's amazing the lengths some people go to to make a relational database non-relational. But this design is lacking in vision... what they really need to do is have a single table called database:
create table database (tableName varchar(255), tableData text)
Then each field could represent a table with rows delimited by tildas (~) and columns delimited by pipes (|)
Think of the simplicity - an entire database stored in a single table.
Insert into database(tableName, tableData) values ('customers', 'fred|jones|1')
update database set tableData = 'fred|jones|1~amy|jackson|2' where tableName = 'customers'
Then you could write some really clever and convoluted string manipulation functions to query data and join 'tables'.
Admin
Oh that's silly. We have "offshored" all our data storage needs. Now whenever any data is needed we call up a special residential warehouse (a data warehouse, heh) built to house and feed the workers, otherwise known as "Memorizers". Then we either ask them to recall some data or we give them some data to memorize. I cannot even describe the savings we realized from not having to buy any hardware or software, and it's so scalable!!! And our users love it, because they don't have to use any complicated query languages (though some practice in accent decoding is necessary).
Admin
I have a feeling the designer of this database used to be a vector-oriented programmer. It's kinda neat to follow someone's career path through the WTFs he leaves behind.
Admin
Hahahaha....that's funny. Make sure you have plenty of "backup" in the form of light bulbs. :)
Admin
This looks like it is a lot more complicated and difficult to maintain than the Vector Oriented Programming stuff.
Also, once you get beyond something like 1000 rows the system will likely grind to halt.
I stopped long ago trying to figure out why people do this sort of stupidity but it so happens that I've come up with a theory on this.
I guess one of the requirements for this project was to use a database. I can just imagine the programmer saying to himself, "They think they can twist my arm into using a stinkin database instead of Excel spreadsheets or CSV? I show em! I don't have to waste my valuable time learning a new technology if I don't want to!"
This way he gets away with not having to know databases and then as soon as he leaves the company he can laugh at the poor soul that inherits this mess. Isn't life great?
Admin
Minor quibble. The CSV format does allow for comma seperated data within a field. That field, however, must be surrounded by double quotes. Double quotes inside of such a field must be escaped using another double quotes character.
Admin
Even in my earliest days I wouldn't have thought that was even remotly a good idea. That's one of the worst WTFs ever. I'd just suggest starting over on that project.
Admin
Strangely enough, some of the early computer "memory" was a CRT with a sensor array in front of it as a cheesy "delay line".
Admin
Actually, the format is less bloated and easier processable than the modern idiot programmer's favorite toy-format, the Xtremely Moronic Language.
Admin
I propose the following solution to programmers who write things like this:
Euthanasia
Admin
Why does this remind of the Flat File Society does relational databases?? Maybe they ARE a real society after all, and exist scattered around the world mining our software for some grim agenda. Anyway I feel sorry already for those among us that will say "The real WTF is..." an somehow try to defend this
Admin
that's not trying =)
Name the popular RDBMS this *sample* code is in the documentation of :
SELECT f1[1][-2][3] as e1, f1[1][-1][5] AS e2 FROM (SELECT '[1:1][-2:-1][3:5]={{{1,2,3},{4,5,6}}}'::int[] AS f1) AS ss;
e1 | e2
----+----
1 | 6
(1 row)
Admin
Good hell... trying to create a table with:
Admin
You're kidding, right?
Admin
That's silly. We give all our data to the gods of fire. When we want to retrieve data, we sacrifice an intern. It gets a little messy sometimes, but we save tons on heating in the winter.
Admin
O...M...G...
Surely this was just someone's malicious attempt to purposefully destroy the usefulness of all the technology they had available?
If not, I can take comfort in the fact that this site makes me feel like a genius every 24 hours.
Admin
In Gods name, why? It's not as if the person that wrote this was unaware of the existence of databases.
This looks as if some moron has decided to waste some elses money on a pet experiment.
Admin
The forum should stop protecting the identity of these perpetrators. Instead, those posting and reporting these incidents should be required to hack into the company’s security badge image database and post them with the WTF.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Then make use of The Daily WTF’s Most Wanted posters during the interview process.
Admin
Wouldn't it be great if we could trick these people into thinking that it is some badge of honor to get "noticed" here.
Interviewer: Have you ever had any code or articles published?
Interviewee: Yes! Several times on the Internet. Here are some links to the Daily WTF.
Interviewer: ...
Admin
It's a fascinating subject. Some early computers (UNIVAC era or there-abouts) used a mercury delay line memory, where a pulse induced in one end of a mercury-filled tube would travel through the tube to be read on the other end in the next cycle.
http://en.wikipedia.org/wiki/Delay_line_memory
Admin
Good lord. Actually USING csv files would be better than that.
Admin
Finally someone has found the perfect datastore to pair with Ruby On Rails. None of those messy domain models to keep track of. This is the future folks.
Admin
Sure - just as long as sender and receiver agree on line endings, quoted forms, column headers, datatypes, and do some fancy footwork on master detail relationships - CSV will do you just fine. OTOH, if you'd rather the data come with that description, or have a schema you can validate against, or write queries against the data without importing it into a database, etc. - then XML is probably the better choice.
Admin
We're not talking about Regular Expressions
Wait.
Admin
Couldn't we just track these people down and brand "WTF" on their foreheads.
Admin
may I ask which other schemes you considered before making this decision ?
CSV is not a "standard" anywhere so it is a poor choice for unambiguous data transmission.
in XML
<row><cell>cell1</cell></row>
and
<row>
<cell>
cell1
</cell>
</row>
are *not* the same
I hoped that worked out, XML makes it hard to post examples, another reason to stand idly by not calling 911 when it looks like it might die !!
Admin
Yeah, just make sure to send your data out to multiple memorizers for redundancy purposes.
Personally, I implemented a Raid 0 with it. Each memorizer gets three sentances. That makes it easier for them to remember. Query process doesn't speed up any though, despite what those stupid consultants said.
Admin
This is a sentence in a comment to a message ridiculing a cryptic database format. This is the second sentence in a comment to a message ridiculing a cryptic database format. This is the third sentence in a comment to a message ridiculing a cryptic database format. This is the fourth sentence in a comment to a message ridiculing a cryptic database format. This is the fifth sentence in a comment to a message ridiculing a cryptic database format. This is the sixth sentence in a comment to a message ridiculing a cryptic database format.
This is a sentence in the second paragraph of a comment to a message ridiculing a cryptic database format. This is the second sentence in the second paragraph of a comment to a message ridiculing a cryptic database format. This is the third sentence in the second paragraph of a comment to a message ridiculing a cryptic database format. This is the fourth sentence in the second paragraph of a comment to a message ridiculing a cryptic database format. This is the fifth sentence in the second paragraph of a comment to a message ridiculing a cryptic database format. This is the sixth sentence in the second paragraph of a comment to a message ridiculing a cryptic database format.
Admin
<font size="2">Paula coded it? It's brillant!
</font>
Admin
Hmm. That reminds me of PostgreSQL.
Admin
Holy religious wars, wtfman, you win
Admin
What do the Youth in Asia have to do with this?
Admin
Sometimes this site hits a little too close to home... I'm taking a quick sanity break from fixing all the code that the other people wrote on the project and the WTF for today is THE EXACT PROBLEM I'M TAKING A SANITY BREAK FROM! ARG!!!!!!<:o)
for the love of pete...
Admin
That is true geniusenessness
Admin
Thought so. I've actually been playing with Postgres recently. I'm finding it to be an incredible database. However, some of the syntax can be a little... well... obfuscated. So far, I'd say that's the exception rather than the rule, but you sure found a real gem.
Admin
I'll have to try that some day! Brilliant!