My first look at an inherited project
-
One thing that intrigues me, for all the "PHP is TRWTF" comments, how come there aren't so many PHP TDWTF entries?
Because some mess is not a WTF but a business as usual and not every WTF has a representative snippet that could be posted for others to laugh at.
Just yesterday I was trying to replace old weird interface with a simpler one (in C++, not PHP). The old interface is a WTF, but it is not funny enough to post. It is just confused like many other things that guy wrote. Now I came across a particularly ugly abuse of that interface that is difficult to sanitize. It features a goto and using argument passed by reference as work variable and is totally convoluted. But it's not really a WTF. It's just a run-of-the-mill crappy confusing code like half of what the guy wrote. The code is a real WTF, but in all the time I am dealing with it I didn't come across anything that would stand out as TRWTF that I could post. It's just uniformly horrible code.
And I think the situation is similar with PHP. There are heaps of confused, crappy code with poor error handling and lacking safety checks. But all that abuse is common, so the worst abuses don't really stand out to be posted and laughed at.
-
Indeed. I never managed to wrap my head around Jackson Pollock until visiting MOMA in New York, who have (or had) a room entirely dedicated to his work. It was very cleverly laid out, such that you only actually saw the works once you were in the room - the effect was something like a pangalactic gargleblaster
similar to having your brains smashed in by a slice of lemon wrapped round a large gold brick.
There's a helluva lot of good stuff at MOMA. Even (or, maybe, especially) cultural pygmies who "hate modern art" should go.
Mind you, my last visit did have its own WTF moment. There was a Richard Long retrospective on; stood in front of a giant spiral of stones arranged on the floor, one "typical american" said to her friend, without a hint of irony in her voice
How do you learn to do something like that?
-
confused, crappy code with poor error handling and lacking safety checks
Whenever you see this sort of thing, whatever language it is in, you've got trouble ahead. C is infamous for it since you have to explicitly check for errors there.
-
How do you learn to do something like that?
Sounds like she appreciated it a lot more than you did.
-
Also, you won't be able to draw something that's right in front of you because that takes a different set of skills that aren't developed by tracing over a projection.
Do I get points for referencing an "art house" film?Image - Drawing something right in front of you by (more or less) tracing over a projection.
URL here if it doesn't show up.: <>
-
Looks like someone doesn't like hotlinking...
-
Disagree. Renaissance and Baroque (and Rococo, for that matter) art most definitely had a message.
As I said, there's going to be expression regardless. I guess the major difference is that modern art regarded expression and originality as substitutes for technique.
-
Do I get points for referencing an "art house" film?
Image - Drawing something right in front of you by (more or less) tracing over a projection.
That way actually does teach you how to draw. I was referring to the modern practice of projecting the image directly onto the drawing/painting surface.
-
I was referring to the modern practice of projecting the image directly onto the drawing/painting surface.
I never actually see that, though, and "tracing" is usually reviled in the art communities.
-
The practice may have gone out of style. It was quite common 10-20 years ago. There seems recently to be a renewed interest in classical techniques.
-
Looks like someone doesn't like hotlinking...
@system's propensity for caching the images seems to get round the hotlinking problem by the looks of it...
-
I never actually see that, though, and "tracing" is usually reviled in the art communities.
These days it's much easier to do, through the magic of computers (my wife who, among other things, is an illustrator can be a bit of a killjoy in pointing out how something cool was done).
It seems like cheating, but on the other hand isn't the result more important than how it was arrived at?
-
It seems like cheating, but on the other hand isn't the result more important than how it was arrived at?
It's not a problem of course if you take a photgraph of a thing or a landscape and put that in photoshop at 15% opacity, and start wacomming it up.
Draw from reference and all that.
-
Had that going on when I was a wee one…
-
-
do_realStuff2
-
-
mysqli::doReal_stuff2
-
$pdo->doRealStuff();
-
-
doRealStuff2Ex
-
-
-
-
mysqli::realStuffDo()
FTFTFY.
-
@dkf said:
mysql_do_real_stuff
Which is subtly different to mysqlDoRealStuff()
And don't even get me started on
mysqli_do_real_stuff()
vs.mysqli::doRealStuff()
-
Too late laughs
Which is even funnier when they're actually supposedly synonyms. I haven't peered into the abyss yet to be sure if they really are or not.
-
Too late laughs
Not really, everyone was waxing on the
mysql_
stuff, notmysqli_
. And you only showed OOP style.So I feel that my post is vindicated and in no sense something I was typing with one hand while talking on the phone with a client...
-
-
-
And don't even get me started on mysqli_do_real_stuff() vs. mysqli::doRealStuff()
Am I to understand that you're not a fan of having a procedural and object oriented way of doing things? What if I really like having the option of manually passing database connections around between each function call?
-
The entire fact MySQLi is both OOP and procedural is a WTF in itself. Even though it's been justified as 'easier to port' the fact that some of the functions had their order of parameters altered compared to
mysql_*
made that largely not happening, and they might as well have just gone full OOP and be done with it.
-
What if I really like having the option of manually passing database connections around between each function call?
The entire fact MySQLi is both OOP and procedural is a WTF in itself.
Here, have some text so Discurse won't complain.
-
-
Big client. Very important. A whale, really.
Have you dealt with many other clients so that you have a firm* basis for comparison?
* Pun retrospectively intended.
-
That's why you have the OOP style. The object instance itself also includes the database connection so if you want to pass multiple connections around you just pass the objects themselves, job done.
-
I'm going to start having to flag my sarcasm...
-
I pride myself on always researching my stuff. I had to go by reference diagrams and Swedish documentaries only, unfortunately. Now, if someone would volunteer...
-
Sorry, I'm going to have to start flagging my literalism. It's probably Asperger's-related.
-
Now, if someone would volunteer...
I'm not going to be able to help much, I've only had dealings with one client and it was a small fry really.
-
Let me guess, McDonalds?
-
function doStuffToTag @mikeTheLiar 2() { ... }
-
function doStuffToTag @mikeTheLiar 2() { ... }
The "mention @mikeTheLiar" meme seems to be contagious - it's spreading...
-
The "mention @mikeTheLiar" meme seems to be contagious - it's spreading...
Dawkins would be proud.
-
@mikeTheLiar is the herpes of TDWTF Discourse
-
-
@mikeTheLiar is the herpes of TDWTF Discourse
Oh the irony that a forum software, designed to foster more civilized discourse on the internet, is abused in such a way!
-
Richard "trying to prove the non-existence of god" Dawkins?
Yes, but especially all of his meme nonsense.
-
Oh the irony that a forum software, designed to foster more civilized discourse on the internet, is abused in such a way!
Well, no one's been injured or truly insulted, I think. We can probably plead multiculturalism about what we think is or isn't civilized.
-
Well, no one's been injured or truly insulted, I think. We can probably plead multiculturalism about what we think is or isn't civilized.
"In my country, we have a holiday for mentioning @mikeTheLiar"