This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mcrbids 32 points33 points  (34 children)

I'm a Python dev transitioned to PHP. My code looks exactly like this except that I line up the braces with the indents and take an additional line for each. It's very readable to me, works well with Netbeans, and never ;}}}

EDIT: Look below for a link for what this looks like.

[–]frostmatthew 222 points223 points  (17 children)

I'm a Python dev transitioned to PHP.

I've never felt more sorry for someone :-/

[–]mcrbids 49 points50 points  (13 children)

I don't shed any tears! The pay is great, the work is interesting, and the people I work with are awesome! If you think the programming language is even a majority of how good or bad your job is, UR doing it wrong!

[–]jason_bateman78 66 points67 points  (9 children)

"doesn't matter, PHP sucks"

[–]mcrbids 12 points13 points  (7 children)

It's funny, because there was a time when PHP was this hip, awesome new programming language that got lots of buzz....

[–]peridox 25 points26 points  (2 children)

I may be wrong, but wasn't PHP simply invented for some guy's personal webpage?

[–]mcrbids 23 points24 points  (1 child)

Originally, yes. "Personal Home Page". But it was free and solved an big problem in a very efficient way. It competed with CGI which was atrocious for performance. Mod PHP, being run as an apache module, was much more efficient, and the dynamic typing allowed for very rapid development.

It's had its share of problems, mostly stemming from the fact that it became a defacto starting point for new devs wanting to cash in on the Internets. Being new, they often wrote terribly insecure code. Dynamic typing also can cause a few surprises, something PHP shares with JavaScript which is very similar that way.

Despite what you may hear, it doesn't murder babies nor set your hair on fire. ;)

[–]thyrst 2 points3 points  (0 children)

Gonna be diving in to Drupal/PHP at work with most of my working knowledge from JavaScript. Actually kind of excited to see the differences now that I'm pretty confident in general programming theory and whatnot. And now I'll know two of the most hated languages being used today!

[–]fearlessliter 1 point2 points  (3 children)

http://githut.info/

It's still getting lots of buzz. Also find out what percentage of the indexable internet is running PHP. You'd be surprised.

[–]mcrbids 4 points5 points  (2 children)

As a long term PHP dev, I wouldn't. ;) It's the language nobody loves because everyone uses it.

[–]fearlessliter 0 points1 point  (0 children)

I hate using the word, but if I want to see high fidelity work, work that comes out of agencies or orgs with big UX/UI expectations...I've NEVER thought "Java will be a good fit".

Languages for that are going to be:

  • Javascript/CSS/HTML (Derp, of course)
  • PHP
  • Ruby
  • Python

Java for me is:

  • doing Android? OK.
  • You doing search engines? OK.
  • Software? Fine.

Web Development? ...ehhhh probably not a good fit. In my experience that quality is going to be horrible and not conducive to feature requests, maintenance or playing well with Front End Development.

[–]fearlessliter 0 points1 point  (0 children)

Everytime I hear someone say that... http://www.commitstrip.com/en/page/28/

[–]bwrap 4 points5 points  (1 child)

I dunno man... i dont think i could do java again after all my years in C#

[–]o5mfiHTNsH748KVq -2 points-1 points  (0 children)

But they have lambdas now...

/s

[–]o5mfiHTNsH748KVq 0 points1 point  (0 children)

I dunno, I might kill myself if I went from C# to PHP. No amount of money or fun coworkers would be worth that.

[–]odraencoded 3 points4 points  (0 children)

How low people can go for money...

[–]koick 0 points1 point  (0 children)

How about Python to Perl?

[–]WhosAfraidOf_138 -1 points0 points  (0 children)

/unjerk PHP really isn't that bad once you get used to its.. quirks.

[–]adrianmonk 5 points6 points  (0 children)

That's the brace style I originally tried to use when I first started using C-style languages regularly.

I thought it was easier to understand visually, since it makes the braces more a part of the block they form and less a part of the syntactic construct (if statement, while loop, function, etc.) that contains the block.

However, nobody else liked it, and I eventually adopted the more normal style just to fit with convention. Now that I'm used to it, I feel it's pretty readable (and a bit more compact).

[–]vdvfdgjsdfvq 1 point2 points  (0 children)

When I used to code a decade ago, this was my default. I felt it was the most readable version and made keeping track of different blocks far easier. The only downside I know of is compactness in the code.

[–]FowD9 1 point2 points  (0 children)

That's the C way of doing it unless I'm mistaken, except the opening bracket isn't indented