News for hackers. Stuff that matters.
Re:A command line refactoring tool for PHP by mootothemax on Monday April 08, 2013 @05:48AM (#5510814)
Can tools like these fix code like that, or at least help?

If you're working with PHP professionally, invest in PHPStorm. The time savings it brings - not to mention, the improved reliability - make it an instant win.

Re:A command line refactoring tool for PHP by pytrin on Monday April 08, 2013 @06:17AM (#5510880)
How is it better than Netbeans or Eclipse? I've been using mostly the former (after Zend Studio went AWOL). How does PHPStorm compare to those alternatives?
Re:A command line refactoring tool for PHP by mootothemax on Monday April 08, 2013 @06:27AM (#5510912)
How is it better than Netbeans or Eclipse?

It's been a couple of years since I last looked at Netbeans/Eclipse, so take this with a grain of salt: PHPStorm just works.

The biggest issues I used to have were finding Netbeans very slow, and auto-complete in both Netbeans and Eclipse being somewhat unreliable - great when they worked, but that wasn't 100% of the time.

Essentially, PHPStorm is what I always wanted Netbeans/Eclipse to be.

As I say, though, it's been a long time since I last looked, and that's for a very good reason: at long last, I'm completely satisfied with my IDE.

Re:A command line refactoring tool for PHP by pytrin on Monday April 08, 2013 @06:50AM (#5510965)
Thanks, checking out their free trial now
Re:A command line refactoring tool for PHP by dmiladinov on Monday April 08, 2013 @10:36AM (#5511914)
PHPStorm is like the perfect gateway drug. I first became familiar with JetBrains products through PHPStorm, but have since upgraded to IntelliJ IDEA. IntelliJ IDEA is the perfect polyglot IDE, with support for the following either in-built or via plugin (and forgive me if I leave anything out, or add it in a reply):

- Java

- Scala

- Clojure

- Android

- PHP

- html/css/javascript

- Python/Django

- Ruby/Rails

- Groovy/Grails

- Actionscript/Flex

I'm a raving fan!

Re:A command line refactoring tool for PHP by sneak on Monday April 08, 2013 @12:46PM (#5512813)
If you're working with PHP professionally, you probably have enough privilege in the world to be able to spare the few afternoons it'll take you to learn a real programming language and stop having to suffer such amateur-hour bullshit day-in, day-out.

Seriously, spend a weekend learning Python or Ruby. Your life will improve vastly.

Using a shiny and expensive IDE to make hacking PHP suck less is like buying a huge box of band-aids as the solution to the problem of your carving knife continually cutting you open.

Re:A command line refactoring tool for PHP by mootothemax on Monday April 08, 2013 @01:06PM (#5512956)
If you're working with PHP professionally, you probably have enough privilege in the world to be able to spare the few afternoons it'll take you to learn a real programming language and stop having to suffer such amateur-hour bullshit day-in, day-out.

Ugh, really? For what it's worth, I've been doing web development professionally for the last fifteen years, and actually really enjoy coding with PHP.

If you're suffering from amateur-hour bullshit day-in, day-out, I'd kindly suggest that you're doing whatever you do wrong.

Seriously, spend a weekend learning Python or Ruby. Your life will improve vastly.

Python never really did that much for me, but I probably should investigate Ruby one of these days. Right now though, I'm enjoying playing with Erlang, and want to take a look at Go at some point.

Horses for courses, I'd say.

Using a shiny and expensive IDE to make hacking PHP suck less is like buying a huge box of band-aids as the solution to the problem of your carving knife continually cutting you open.

Surely using an IDE, for whatever language, will generally make your life better?

Whilst syntax-highlighted Vim or even Notepad++ have their merits, you can't beat a lot of the features modern IDEs provide, PHP, Python, Ruby, Erlang or otherwise.

Re:A command line refactoring tool for PHP by sneak on Monday April 08, 2013 @01:56PM (#5513328)
> For what it's worth, I've been doing web development professionally for the last fifteen years, and actually really enjoy coding with PHP.

Me too— except that last part. My first web app was PHP in 1998.

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...

Just because you enjoy it doesn't mean that you should.

If you know Python already, Django will change your life. Go try it.

Re:A command line refactoring tool for PHP by itsybitsycoder on Monday April 08, 2013 @09:11PM (#5515847)
I'm a PHP developer who knows Python. I tried to learn Django awhile ago and to be honest I wasn't that impressed. Super leaky abstraction... nearly every single error message was something about string manipulation inside the Django code itself, with no reference at all to my own code. It made it totally impossible to learn by doing. Also, this was probably a result of my lack of experience with Django, but the way I was told to organize my Django project (with functionality kept in modules) felt very wrong in a web app (as opposed to a website) where all the pieces are interconnected. I ended up having only one custom module that would be totally unreusable for anything else, which made me question the point of putting it in a module at all.
Re:A command line refactoring tool for PHP by sneak on Wednesday April 10, 2013 @06:08AM (#5524209)
You're right: PHP silently converts your vars to strings and then does the wrong thing without ever telling you.
Re:A command line refactoring tool for PHP by itsybitsycoder on Wednesday April 10, 2013 @02:28PM (#5527037)
I think you misunderstood. I'm not talking about Python throwing errors about the types of my variables. Like I said, I'm already quite comfortable with Python. I'm talking about Django failing to check whether my Django-specific code (e.g., templates) is valid, so that Python gives me an error message that appears to originate inside the Django codebase, instead of Django giving me an error message about the syntax of my template.

I've only briefly tried CakePHP, but IIRC its error handling was excellent.