Comment On PHPTXTDB

College radio stations are small, but highly technical organizations. The era of the scruffy stoner spinning disks and mumbling into a microphone have been replaced by software systems that manage the station’s programming around the clock, and play recorded segments of scruffy stoners mumbling into microphones. [expand full text]
« PrevPage 1 | Page 2Next »

Re: PHPTXTDB

2012-11-19 08:08 • by Nagesh (unregistered)
FRIST(Y)For some reason this field must not be empty(Y)posted=yes

Re: PHPTXTDB

2012-11-19 08:08 • by Anon (unregistered)
split("(.Y.)" "frist?")

Re: PHPTXTDB

2012-11-19 08:08 • by LoremIpsumDolorSitAmet
"Do you like our new website? Please respond with either yes (Y) or no (N)."

Why is this not working???

Re: PHPTXTDB

2012-11-19 08:09 • by Justsomedudette (unregistered)
The real WFT good decision boss? Now that's a frist.

Re: PHPTXTDB

2012-11-19 08:13 • by DR (unregistered)
And they implemented WordPress and immediately got hacked.

Re: PHPTXTDB

2012-11-19 08:16 • by Remy Porter
395140 in reply to 395136
Obviously, Chad was more of a leg man.

Re: PHPTXTDB

2012-11-19 08:18 • by LoremIpsumDolorSitAmet
395141 in reply to 395136
Anon:
split("(.Y.)" "frist?")

Why would you ever want to split() on (.Y.) ? Personally, I'd rather join() with them.

Being a registered user is sad because I don't get any funny captchas on which to comment.

Re: PHPTXTDB

2012-11-19 08:18 • by letatio (unregistered)
(Y) giggity

Re: PHPTXTDB

2012-11-19 08:26 • by Something (unregistered)
If this had somekind of proper layout, I would not think it would be THAT horrible of a solution to use text files instead of a database.
The upside is obviously that you are not likely to get SQL injections, and if advanced querying, performance and safety isn't needed this might be OK.

Yet I cannot seem to wonder that a harder solution was chosen over an easier solution, where you just make a connection and start querying. Having to parse the files manually seems more like feature creep than anything else.

CAPTCHA comment: praesent, like a present but with an a

Re: PHPTXTDB

2012-11-19 08:34 • by Smug Unix User (unregistered)
He should have split on the RS character. That is what it there for. Text files are perfectly sensible for when this whole database, internet fad goes away.

Re: PHPTXTDB

2012-11-19 08:39 • by Nagesh (unregistered)
395146 in reply to 395143
Something:
If this had somekind of proper layout, I would not think it would be THAT horrible of a solution to use text files instead of a database.
The horror was that there was no support at all for updating the database except by manual hacking.

Yet I cannot seem to wonder that a harder solution was chosen over an easier solution, where you just make a connection and start querying. Having to parse the files manually seems more like feature creep than anything else.
Opening a database connection is only an easier solution if you already know how to, and know how to set up a database to connect to in the first place. On the other hand, every crappy introduction to any programming language will show you how to do rudimentary text processing, so you don't need to go learn new things in order to do that. Using the tools already in your possession is, if not the easiest path, then certainly the one of least resistance.

Re: PHPTXTDB

2012-11-19 08:50 • by Nagesh (unregistered)
395147 in reply to 395145
Smug Unix User:
He should have split on the RS character. That is what it there for.
Shouldn't that be something like "Smug TOPS-10 User", then? Unix has always preferred linefeeds and spaces for splitting on.

Re: PHPTXTDB

2012-11-19 08:55 • by English Man
So Kyle sat there like a dummy, not thinking to suggest a new system himself, until his boss pulled him up for being incompetent?

Re: PHPTXTDB

2012-11-19 09:02 • by ObiWayneKenobi
395149 in reply to 395148
English Man:
So Kyle sat there like a dummy, not thinking to suggest a new system himself, until his boss pulled him up for being incompetent?


Maybe he figured the boss was like most clueless IT bosses and held on to that old saw "if it's not broke don't fix it" and that he would have been reprimanded/fired for "wasting time" coming up with a new solution instead of getting his work done?

We don't know how long he was in the position. Maybe he was the "new guy" and didn't want to stir the pot.

Re: PHPTXTDB

2012-11-19 09:07 • by AGray (unregistered)
The real WTF is that we really get a sad ending, because most WTFs are sad endings and we didn't get one, even though upon seeing something like 'phptxtdb', we were all expecting it.

public bool IsRealWtf(bool expectation = false)

{
return expectation == _Ending;
}

Re: PHPTXTDB

2012-11-19 09:07 • by @Deprecated
Kyle walked Bill through the process. First, he opened i.phptxtdb. This file stored an image name and a base64-encoded representation of the image.


No wonder it took so long... base64 encoding images by hand is a real pain!

Re: PHPTXTDB

2012-11-19 09:09 • by ip-guru
395152 in reply to 395149
isn't it a bit unfair to pick on chard when this is clearly an Amateur project?
I though this site only highlighted WFT's from professionals.

Re: PHPTXTDB

2012-11-19 09:10 • by Captcha:nibh (is that one new?) (unregistered)
The "string split" solution is not actually such a bad method. Sure, you're gonna get a lot of collisions with "(Y)", but how likely do you think that is if you use "(i|=J7}Y&.`Gb)" ?

Re: PHPTXTDB

2012-11-19 09:11 • by urza9814 (unregistered)
I did something like this once for a university club, but only because they didn't let us have database access of any kind. Except my solution simply wrote blog entries straight to an RSS file and then read that back to display them. And my solution had an editor page so you never needed to manually enter into the text file. And my solution was (obviously) XML instead of '(Y)' delimited. And I used an existing PHP library to read back the RSS file.

OK, so I did something not very similar to this once.

Re: PHPTXTDB

2012-11-19 09:18 • by Remy Porter
395155 in reply to 395152
College radio stations tend to be fairly professional organizations. It's not like it's some club that people do on the side- it's a job which people get paid for.

Re: PHPTXTDB

2012-11-19 09:20 • by James (unregistered)
I've done one of those. It started out being database backed, having made the foolish assumption that I might be able to use a database on a server that clearly already had one installed.

I'm pretty sure the story isn't about mine, though, since it appears to still be running. The last time I had anything to do with it was writing a brief description and apology for the next guy to pick it up. Unless the happy ending was part of the anonymization, of course.

Re: PHPTXTDB

2012-11-19 09:39 • by Frosh
395157 in reply to 395145
Smug Unix User:
Text files are perfectly sensible for when this whole database, internet fad goes away.


Surely you mean "perfectly cromulent."

Re: PHPTXTDB

2012-11-19 09:49 • by Pista (unregistered)
395158 in reply to 395152
ip-guru:
isn't it a bit unfair to pick on chard when this is clearly an Amateur project?
I though this site only highlighted WFT's from professionals.


Being done for a business organization (the college radio), it wasn't an amateur project, but a professional one. This is true even if I'd rather cut my tongue instead of calling that guy a "professional"

Re: PHPTXTDB

2012-11-19 09:57 • by camelotbob (unregistered)
"College radio stations are small, but highly technical organizations. "


You smoke what? Seriously, who believes that!??

Re: PHPTXTDB

2012-11-19 10:02 • by D-Coder
395160 in reply to 395153
Captcha:nibh (is that one new?):
The "string split" solution is not actually such a bad method. Sure, you're gonna get a lot of collisions with "(Y)", but how likely do you think that is if you use "(i|=J7}Y&.`Gb)" ?
"(i|=J7}Y&.`Gb)"? That's amazing - I've got the same combination on my luggage!

Re: PHPTXTDB

2012-11-19 10:32 • by Cbuttius
I request the radio station to play some Grimbitch, please...

Re: PHPTXTDB

2012-11-19 10:33 • by Evo
How does one even 'overflow the buffer' in PHP? Or is it supposed to mean exhausting the memory?

EDIT: Actually, that might be fgets... But that one he could've fixed by simply removing the second parameter.

Re: PHPTXTDB

2012-11-19 10:33 • by JC (unregistered)
This is all perfectly sensible in a BI enviro.....

.... oh never mind.

Re: PHPTXTDB

2012-11-19 10:35 • by xOneca (unregistered)
395164 in reply to 395153
Captcha:nibh (is that one new?):
The "string split" solution is not actually such a bad method. Sure, you're gonna get a lot of collisions with "(Y)", but how likely do you think that is if you use "(i|=J7}Y&.`Gb)" ?

You better not to tempt your fate...

Re: PHPTXTDB

2012-11-19 10:41 • by foo (unregistered)
395165 in reply to 395141
LoremIpsumDolorSitAmet:
Being a registered user is sad because I don't get any funny captchas on which to comment.
You do. Just look at other's comments. The few CAPTCHAs in use here have all be commented on, many times.

So please pick one at random and make your funny comment. But be sure it's the same funny comment made dozens of times before, otherwise some of us might never recover from the shock of the unexpected.

CAPTCHA: wisi - I wisi had a funny remark on that. LOL! ROFL! How funny!

Re: PHPTXTDB

2012-11-19 10:41 • by Gazpacho (unregistered)
(Y)God(Y)

Re: PHPTXTDB

2012-11-19 10:45 • by foo (unregistered)
395167 in reply to 395151
@Deprecated:
Kyle walked Bill through the process. First, he opened i.phptxtdb. This file stored an image name and a base64-encoded representation of the image.


No wonder it took so long... base64 encoding images by hand is a real pain!
If you can do the JPEG encoding by hand, the additional base64 step is a piece of cake.

Re: PHPTXTDB

2012-11-19 10:47 • by foo (unregistered)
395168 in reply to 395153
Captcha:nibh (is that one new?):
The "string split" solution is not actually such a bad method. Sure, you're gonna get a lot of collisions with "(Y)", but how likely do you think that is if you use "(i|=J7}Y&.`Gb)" ?
If you're the owner of this site, then very likely, since today. :)

Seriously, random strings (long enough) are fine (see MIME boundaries), unless you need to document them and put the documentation in the "database" itself. Then you have the same escaping problem, whatever you use.

Re: PHPTXTDB

2012-11-19 10:49 • by Rodnas (unregistered)
395169 in reply to 395152
ip-guru:
isn't it a bit unfair to pick on chard when this is clearly an Amateur project?
I though this site only highlighted WFT's from professionals.


Yes (Y) professionals like Paula Bean.

Re: PHPTXTDB

2012-11-19 10:58 • by Zylon
395170 in reply to 395155
Remy Porter:
It's not like it's some club that people do on the side- it's a job which people get paid for.

Dude... lern 2 em dash. Or at least type two hypens.

Re: PHPTXTDB

2012-11-19 11:06 • by Cbuttius
395171 in reply to 395155
Remy Porter:
College radio stations tend to be fairly professional organizations. It's not like it's some club that people do on the side- it's a job which people get paid for.


A very clever program would allow a pre-recorded program other than the request slot whereby it can "dynamically" insert based on what the public has requested.

Of course you would use some kind of online request list.

However to make it more interesting you can't just play the popular songs or the producer's own choices. The purpose of a request section should be to get some less-usual music played on the show.

Re: PHPTXTDB

2012-11-19 11:08 • by Y_F
I wept. Klye, enjoy the programmer's paradise... for all of us!

Re: PHPTXTDB

2012-11-19 11:20 • by C-Derb (unregistered)
395173 in reply to 395163
JC:
This is all perfectly sensible in a BI enviro.....

.... oh never mind.
+1 Best comment of the day so far!

Re: PHPTXTDB

2012-11-19 11:22 • by Paul Neumann (unregistered)
395174 in reply to 395170
Zylon:
Remy Porter:
It's not like it's some club that people do on the side- it's a job which people get paid for.
Dude... lern 2 em dash. Or at least type two hypens.
But side-- is center, isn't it?

Re: PHPTXTDB

2012-11-19 11:24 • by hikari
395175 in reply to 395145
Smug Unix User:
He should have split on the RS character. That is what it there for. Text files are perfectly sensible for when this whole database, internet fad goes away.


I think there are a great number of people who have never looked at an ASCII table, so it doesn't occur to them that there are characters outside the range of ones you normally see.

Of the ones who do realize this I suspect there is an even smaller proportion who know what the likes of FS, GS, RS, and US are for.

The last thing I worked with that actually used them was ISO/IEC 8211.

Re: PHPTXTDB

2012-11-19 11:26 • by ubersoldat
Kyle cut him off. “I would be happy to. I’ll make the time.”


Yeah, still in college. By the time Kyle learns how the real world TM operates, he would have said something along the line: "yes, it's possible, you just need to allocate the resources for this".

I love enterprise environments.

Oh, and Chad maybe read somewhere that ORM's were evil and some how thought that DB's were evil too... for some reason.

Finally, TRWTF is using a RDBMS for a CMS.

Re: PHPTXTDB

2012-11-19 11:31 • by just stop it (unregistered)
395177 in reply to 395146
Nagesh:

Opening a database connection is only an easier solution if you already know how to, and know how to set up a database to connect to in the first place. On the other hand, every crappy introduction to any programming language will show you how to do rudimentary text processing, so you don't need to go learn new things in order to do that. Using the tools already in your possession is, if not the easiest path, then certainly the one of least resistance.


It's also the path that eventually leads you to believe your hammer is golden.

Re: PHPTXTDB

2012-11-19 11:36 • by asd (unregistered)
I've done something similar a long time ago. I was about 14 or 16 back then. Since it was a javascript "app", all the data was initially stored in one big, ugly JS file, like

stuff[0]["name"] = "foobar";
stuff[0]["type"] = "something";
stuff[0]["price"] = "235";

stuff[1]["name"] = "moo";
stuff[1]["type"] = "something else";
stuff[1]["price"] = "42";

so yes, instead of putting it all in a database, or at least in a JSON or XML file, I made the PHP code explode each line at = first, and then at ][ and ], I think. I had no idea about regex either. Also, the JS file was required to have special comments to mark the area to parse.

Re: PHPTXTDB

2012-11-19 11:41 • by Ralph (unregistered)
Hey I'd much rather have PHPTXTDB than PHPBINDB because decoding undocumented arbitrarily-formatted binary data structures is even worse! Yes, I'm looking at you, almost-every-proprietary-software-vendor-out-there.

Re: PHPTXTDB

2012-11-19 12:12 • by (i|=J7}Y&.`Gb) (unregistered)
395180 in reply to 395153
Captcha:nibh (is that one new?):
The "string split" solution is not actually such a bad method. Sure, you're gonna get a lot of collisions with "(Y)", but how likely do you think that is if you use "(i|=J7}Y&.`Gb)" ?


(i|=J7}Y&.`Gb) is my name you insensitive clod.

Re: PHPTXTDB

2012-11-19 12:18 • by Jeff (unregistered)
395181 in reply to 395180
(i|=J7}Y&.`Gb):
Captcha:nibh (is that one new?):
The "string split" solution is not actually such a bad method. Sure, you're gonna get a lot of collisions with "(Y)", but how likely do you think that is if you use "(i|=J7}Y&.`Gb)" ?

(i|=J7}Y&.`Gb) is my name you insensitive clod.
Yes but you're just one person; you don't expect the entire world to redesign its software systems just to accommodate you, do you?

Re: PHPTXTDB

2012-11-19 12:29 • by Oyo (unregistered)
Chad simply was ahead of his time. Today we call this NoSQL.

Re: PHPTXTDB

2012-11-19 12:31 • by Some Random Texan (unregistered)
395183 in reply to 395171
Cbuttius:
Remy Porter:
College radio stations tend to be fairly professional organizations. It's not like it's some club that people do on the side- it's a job which people get paid for.


A very clever program would allow a pre-recorded program other than the request slot whereby it can "dynamically" insert based on what the public has requested.

Of course you would use some kind of online request list.

However to make it more interesting you can't just play the popular songs or the producer's own choices. The purpose of a request section should be to get some less-usual music played on the show.



Oh silly me. I thought the request segment was there to let the callers randomize the daily play list, instead of the machine. Expecting people to call in songs that aren't in the top 25 would be madness. After all, people these days think entertainment is supposed to be fed directly to your brain without that harassing superstitious "free will".

CAPTCHA: ideo - what happens when an idea fades because the thinker can't hold onto original thought for more than a split second.

Re: PHPTXTDB

2012-11-19 12:36 • by Ryan (unregistered)
“I would be happy to. I’ll make the time.” Is absolutely the right answer

Re: PHPTXTDB

2012-11-19 12:39 • by not frist at all (unregistered)
395185 in reply to 395181
Jeff:
Yes but you're just one person; you don't expect the entire world to redesign its software systems just to accommodate you, do you?
I didn't even read the responses to this comment and knew it was some fag linking xkcd. It's not clever. It's not funny. The initial comment was all I needed to know that someone would link the cartoon where the parents iteratively one-up each other on how to screw the school system.

It was funny to read when it came out. It's even funny when clicking on the Random button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered xkcd.

You probably still use lmgtfy and think you're so damn clever.

It means in real life, you're an unoriginal hipster doofus.


Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Bobby Tables. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making a computer out of rocks. Got a story about password security or encryption? Link to the one where they beat the password out of the guy with a wrench.

Fuck off. You're not clever.
« PrevPage 1 | Page 2Next »

Add Comment