Do you have adblock enabled?
 
If you can read this, either the style sheet didn't load or you have an older browser that doesn't support style sheets. Try clearing your browser cache and refreshing the page.

(Some Blog)   I'm starting to learn PHP and it seemed to be going ok. Then I heard of weirdnesses like ones this guy lists. Oh god. I can't imagine myself memorizing half these quirks. Equality isn't transitive? What? Does it all start to make more sense somehow?   (me.veekun.com ) divider line
    More: Scary, PHP, screwdrivers, blight, data points, python  
•       •       •

800 clicks; posted to FarkUs » on 23 Dec 2012 at 11:07 AM (3 years ago)   |   Favorite    |   share:  Share on Twitter share via Email Share on Facebook   more»



30 Comments     (+0 »)
 
View Voting Results: Smartest and Funniest
 
2012-12-23 12:43:23 AM  
When I was writing PHP for my old job, I just always kept php.net up in a separate window. PHP is full of weird shiat, and that site will help you sort through it.
 
2012-12-23 01:18:16 AM  
PHP and Javascript are 2 abominations against nature that should die horrible deaths.  If either did proper garbage collection they would both be in the trash bins.
 
2012-12-23 01:45:38 AM  

Snotnose: PHP and Javascript are 2 abominations


Quite possibly, but how did they both get to be more popular than perl?
 
2012-12-23 01:56:07 AM  
They're easier for n00bs to pick up.
 
2012-12-23 05:45:00 AM  
So create two new languages that are as accessible as JS and PHP, and make them much more sturdy, logical, and consistent. You'll make good money.
 
2012-12-23 09:01:09 AM  
Once you write code to use a database, assume every script kiddy in the world will have your entire database.
 
ZAZ [TotalFark]
2012-12-23 09:11:51 AM  
A language must be concise. New languages exist to reduce the boilerplate inherent in old languages. (We could all write machine code.) A language must thus strive to avoid introducing new boilerplate of its own.

Does this guy work at my company? 25,000 lines of C turned into 100,000 lines of pseudo-assembly is turning into 200,000 lines of C++.

See also The Mythical Man-Month where Brooks observes that productivity in lines of code does not vary much in high and low level languages.

Because of the [@], the warning about the non-existent file won't be printed.

This one I understand. @ is the error-suppressing prefix from make.
 
ZAZ [TotalFark]
2012-12-23 09:14:21 AM  
This About That

Javascript allowed you to animate the status bar. Java didn't, and required a plugin to run, and it ran badly in the first few years. Javascript wins.

Later, browsers stopped allowing javascript to get at the status bar because scripts that updated the status bar were either malware or obnoxious.
 
2012-12-23 09:38:30 AM  
I'm starting to learn PHP

Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here.
 
2012-12-23 09:53:52 AM  

ZAZ: This About That

Javascript allowed you to animate the status bar. Java didn't, and required a plugin to run, and it ran badly in the first few years. Javascript wins.

Later, browsers stopped allowing javascript to get at the status bar because scripts that updated the status bar were either malware or obnoxious.


Java runs most large retail internet servers. It sucks for client side anything.
 
2012-12-23 09:54:01 AM  

serial_crusher: Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here.


Right. If you're not starting with straight up 8088 assembly language, you're just a punk kid from silver spoonville.

/was that too much? should I have gone with cobol?
 
ZAZ [TotalFark]
2012-12-23 10:11:35 AM  
The "bunch of files" approach, besides making routing a huge pain in the ass, also means you have to carefully whitelist or blacklist what stuff is actually available, because your URL hierarchy is also your entire code tree. Configuration files and other "partials" need C-like guards to prevent them from being loaded directly. Version control noise (e.g., .svn) needs protecting. With mod_php, everything on your filesystem is a potential entry point; with an app server, there's only one entry point, and only the URL controls whether it's invoked.

Somebody was asking a week or two ago how people could be so stupid to configure their servers to allow their password database to be stolen. This is an example of how security holes breed. Start with a program with surprising, security-related requirements and expect users to close holes they didn't know they had.
 
2012-12-23 10:19:19 AM  
Oh, I could hide 'neath the wings
Of the bluebird as she sings.
The six o'clock alarm would never ring.
But six rings and I rise,
Wipe the sleep out of my eyes.
My shavin' razor's cold and it stings.
 
2012-12-23 10:21:19 AM  

DON.MAC: Once you write code to use a database, assume every script kiddy in the world will have your entire database.


This.  I do network security consulting, one consistent pattern is the compromise happens where php and javascript are involved.
 
2012-12-23 10:23:41 AM  

ZAZ: The "bunch of files" approach, besides making routing a huge pain in the ass, also means you have to carefully whitelist or blacklist what stuff is actually available, because your URL hierarchy is also your entire code tree. Configuration files and other "partials" need C-like guards to prevent them from being loaded directly. Version control noise (e.g., .svn) needs protecting. With mod_php, everything on your filesystem is a potential entry point; with an app server, there's only one entry point, and only the URL controls whether it's invoked.

Somebody was asking a week or two ago how people could be so stupid to configure their servers to allow their password database to be stolen. This is an example of how security holes breed. Start with a program with surprising, security-related requirements and expect users to close holes they didn't know they had.


After fifteen years of internet security awareness on a global scale, we are STILL allowing/encouraging noobs to just run their badly designed and not hardened crap out there into the world and see how it holds up.

On behalf of security consultants everywhere, thank you, thank you dev sheds and coding languages of the world.  You keep me employed well past my pull date as a system admin.
 
2012-12-23 02:03:40 PM  
i kinda think database sterilization should be something automagically done in every language.. and the fact that it's not just shows you the gayness of it all..
 
2012-12-23 02:37:56 PM  

unlikely: serial_crusher: Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here.

Right. If you're not starting with straight up 8088 assembly language, you're just a punk kid from silver spoonville.

/was that too much? should I have gone with cobol?


FORTRAN.
 
2012-12-23 03:04:44 PM  

This About That: Snotnose: PHP and Javascript are 2 abominations

Quite possibly, but how did they both get to be more popular than perl?


They are slightly less abominable.
 
2012-12-23 04:42:15 PM  
Was it a php error that greened this?
 
2012-12-23 05:28:50 PM  

simplicimus: unlikely: serial_crusher: Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here.

Right. If you're not starting with straight up 8088 assembly language, you're just a punk kid from silver spoonville.

/was that too much? should I have gone with cobol?

FORTRAN.


TI Extended Basic (You'll need the cartridge)

gau.ns.ca
 
2012-12-23 08:20:02 PM  

MoonPirate: Was it a php error that greened this?


Warning: Division by zero in /home/fark/public_html/phpsucks.php on line 2
 
2012-12-23 09:13:54 PM  

This About That: Snotnose: PHP and Javascript are 2 abominations

Quite possibly, but how did they both get to be more popular than perl?


Because they designed PHP to be so simple even an idiot can use it.  The result is exactly as expected.  Web software designed, written, and maintained by idiots.

/the only acceptable use of javascript is to set focus on a data entry field
//perl guy, here
 
2012-12-23 09:17:05 PM  

OgreMagi: This About That: Snotnose: PHP and Javascript are 2 abominations

Quite possibly, but how did they both get to be more popular than perl?

Because they designed PHP to be so simple even an idiot can use it.  The result is exactly as expected.  Web software designed, written, and maintained by idiots.

/the only acceptable use of javascript is to set focus on a data entry field
//perl guy, here


And play Lemmings in a browser window.
 
2012-12-24 02:09:11 AM  

Generation_D: DON.MAC: Once you write code to use a database, assume every script kiddy in the world will have your entire database.

This.  I do network security consulting, one consistent pattern is the compromise happens where php and javascript are involved.


it's not that they cannot be written in securely. i've done it


the problem is that those of us that are capable of writing secure PHP and JS get hired by firms to do more serious programming.
 
2012-12-24 02:12:48 AM  

OgreMagi: /the only acceptable use of javascript is to set focus on a data entry field


then you haven't done any web programming in over a decade. partial page updating via javascript (usually called "AJAX" .. but who the fark uses XML other than some of the other divisions at microsoft. real people use JSON) is incredibly useful. Properly used partial page updating, data posting, etc via javascript can make the web page much more responsive and create much less network, processor and disk loads on the server.
 
2012-12-25 09:42:11 AM  

PC LOAD LETTER: Java runs most large retail internet servers. It sucks for client side anything.


Many people in this thread will thing this guy is trolling. The rest are too busy crying as tivoli fills with red due to yet another Websphere MQ related explosion to post.

A remarkable number of those large internet retailers don't run x86 except on the presentation layer either.
 
2012-12-25 09:37:29 PM  

unlikely: serial_crusher: Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here.

Right. If you're not starting with straight up 8088 assembly language, you're just a punk kid from silver spoonville.

/was that too much? should I have gone with cobol?

I cut my teeth on 6510 assembly language so I am really getting a kick out of this thread.
 
2012-12-26 02:49:56 AM  

Teufelaffe: When I was writing PHP for my old job, I just always kept php.net up in a separate window. PHP is full of weird shiat, and that site will help you sort through it.


Thanks, I guess I'll do that.


serial_crusher: I'm starting to learn PHP

Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here.


Nope, this is the first thread I've ever submitted on the matter.
And dude, come on: By answering a question about a market-dominant tool with a snooty "Well, there's your mistake", you just linux_yes-ed the thread. Dwell on that for a moment.


unlikely: serial_crusher: Well, there's your first mistake. Are you the same guy who's been posting a million other "what programming language shoulda learn first" and similar threads? Because if you didn't listen in those, I'm not inclined to say anything helpful here

Right. If you're not starting with straight up 8088 assembly language, you're just a punk kid from silver spoonville.

/was that too much? should I have gone with cobol?


Heh. I (submitter) actually have coded in IA32 assembly, although I haven't used it since college -- my last use of it being to make a computer game in it for a term project back then.

/never learned COBOL
 
2012-12-26 02:56:03 AM  

Isildur: snooty


ok, maybe that was hypocritically harsh of me, given that I was the original one complaining about the language. I guess I was just peeved by your assumptions.
 
2012-12-26 11:11:19 AM  
It only gets worse.
 
Displayed 30 of 30 comments

View Voting Results: Smartest and Funniest

This thread is archived, and closed to new comments.

Continue Farking
Submit a Link »
On Twitter








In Other Media
  1. Links are submitted by members of the Fark community.

  2. When community members submit a link, they also write a custom headline for the story.

  3. Other Farkers comment on the links. This is the number of comments. Click here to read them.

  4. Click here to submit a link.

Report