/*
If you're reading this, it isn't because you've found a security hole.
this is an open source website. read and learn!
*/
Cosmo7
@Cosmo7
Best posts made by Cosmo7
Latest posts made by Cosmo7
-
RE: Executable comments
-
RE: How not to maintain a news form
In the words of Elvis Costello, I just don't know where to begin.
- You are having problems with your code because it lacks structure and discipline
- The nature of your code dictates that you will rapidly lose the ability to support or modify what you have done
- A quick fix from someone here will not address the root cause of your problem
- If you continue to code this way you will consistently find yourself unable to deliver working solutions
Developing code discipline is not difficult. You could start by asking yourself why you are using the ternary operator. Think about how breaking your code into functions might make your code more abstract, less fine-grained. Consider using the new comment syntax, recently introduced in PHP version 1.0. Overall, try to imagine that you are writing code that a reasonably bright twelve-year old child should be able to understand.
Learning to write coherent code is a wonderful skill that will repay you for the rest of your life. It will make you more capable, more efficient and considerably more popular with your colleagues. You might want to start with your variable names.
-
RE: YouTube WTF
Looks like their users' email addresses are in one table and the usernames and passwords are in another. Something orphaned a row somewhere, so its trying to assemble a message with some nulls instead of the username and password.
Of course this begs the question: why would email addresses need to be in a separate table?
-
RE: That's not a parking spot - really!
In fact, since the yellow line is not complete, it is legal to park at any point along it. The same applies to doubles. Since it is not a single continuous line properly terminated at each end, it's not as per legal specification and not enforcable.
I for one applaud your optimistic imagination regarding parking enforcement systems.
-
RE: The horrible if block
Also note the spaces and indentations, these are buffers so the CPU has enough idle time for the current command to complete before executing the next command.
That's also why the code is in lower case. If you put code in ALL CAPS the processor thinks you arre shouting and executes the code faster.
-
RE: Interface Hall of Shame
Is your faux link a cleverly ironic statement about unintuitive interfaces?
Incidentally, thedailywtf's html is worthy of its own story.
-
RE: YOU DON'T UNDERSTAND ANTENNA!
This Antenna sounds fantastic. Let's have a look at some of the generated code!
They have the meta tag right there, though I thought short tags were supposed to self-close:<meta name="generator" content="Antenna 2.7">
How's the rest of the code? Besides the inline CSS, we get gems like this:<strong><strong><strong><strong><strong><strong><strong><strong>Buy
now</strong></strong></strong></strong></strong></strong></strong></strong></a>
</strong></strong></strong></strong>
Which is amazing, considering that this is on the page selling the application that generated the code.