Live data from Hacker News

PHP Addiction

marco.org

211–220 of 320 posts

Re: PHP Addiction

#211
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing . Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got…

Spending a bunch of time to make my environment work great (and keep it working great) is the opposite of what I'd consider "fantastic".

This is why I dropped Linux/BSD on the desktop over a decade ago, and switched to something I don't have to think about, and instead I can simply use to get my actual job done.

Re: PHP Addiction

#212

Earlier quoted context omitted.

That's php, just cleaner. If we don't recognize that as one of php's strength we're doomed to fail. Of course once you master it, you separate the code from the html and call it from the view like this: hello.nxt name = request.get('name','world') list = ['this','language','rocks'] response.render('hello.html',name,list) hello.html Hello {{ name.upper }} {% for item in list %} {{ item }} {% endfor %} But what do I kn…

Funny mixing PHP into HTML is one of the things I hate the very most. And is one of the first problems usually solved by PHP web frameworks. Well, templating is actually generally a primary component of "all pieces included" web frameworks in any language.

Exactly, but that's the easiest way to start learning. That's how everybody got their feet wet in web development. Then you jump to MVC and best practices.

My point is, the language has to be designed as a web framework from the get go, routers, templates, models, everything should be right there so noobs feel confident from day one. That's the only way to conquer the world.

Re: PHP Addiction

#213
post #171

Earlier quoted context omitted.

I don't know enough about MySQL vs Postgres or RedHat vs Ubuntu to make a point with them, but sometimes it's not about being cool. Apache is a webserver from 1995. It uses a process (sometimes a thread) per request, a architectural decision which made it nearly fundamentally incapable of solving the C10K problem. Only back in January was the Event MPM added (and it's still experimental), allowing you to have many Ke…

You wrote a well thought out response. I owe you a response in kind. People have a tendency to overrate their rational capacity to reason out a viable decision. While you listed a few solid critiques, the situation is infinitely more complex. And by infinitely , I do mean exactly that. As in, beyond your capacity to reason it out. In the end, the only right decision is a decision which withstands the test of time. Bo…

Reading through your responses, I'm curious about how much experience you actually have in our industry. Most of what you claim is easily falsifiable.

The idea that C10K doesn't matter is definitively untrue. I've worked with numerous large systems (games, content) where Apache was the problem, and swapping it out was the solution to making maximal use of the hardware and the (gigE+) pipes.

Even outside of saturation, there are large-scale systems that benefit from being able to park an open socket and provide asynchronous notifications over that socket (in web terms, think websockets). If you're paying for a thread or process for every socket, this becomes prohibitively expensive very quickly.

It's also not an unusual use case outside of traditional web development, and now with websockets, this kind of architecture is likely to see considerably more use. This approach provides numerous advantages to legacy polling approaches, but does not work on traditional short-lived connection software architectures.

In addition to the above, your discussion of robustness really has no bearing on Apache's architectural suitability in production use-cases.

Auto-restart functionality exists for other architectures, and in addition to that, it's standard practice to deploy multiple servers with automatic failover behind a load balancer -- in addition to the server process itself, the OS can crash, disk drives can fail, power supplies can blow, etc.

Additionally, you shouldn't have production processes crashing regularly, and shouldn't be making significantly performance-impacting architectural choices on the basis of Apache's ability to restart a child process. Software crashes in production are a worst-case failure, akin to a drive failing, and should never be so common as to justify Apache's performance costs/constraints.

Re: PHP Addiction

#214
post #83

Earlier quoted context omitted.

Are you seriously basing a whole argument on what the hello world program looks like? That has nothing to do with actual real world programs. Mixing logic & presentation might make it easier to get something running quickly, but it's one of the downsides of PHP that these things get mixed up when they probably shouldn't for a project of reasonable size. The whole idea that it's an advantage of PHP that you can get so…

> Actually, it's much better if it requires some amount of thought and planning to code something up because that increases the likelihood that you'll do it right the first time and build on a solid foundation. This is solid advice for an engineer. And absolutely moronic for a businessman. Choosing what platform to use is a business decision. If you take too long to get it right, you will never get the chance to make…

> PHP is amazing at letting you write something fast and rewrite it into something more manageable later.

From experience, the mountain of technical debt organizations acquire when starting with PHP can make it near impossible to rewrite it into something more manageable later, and it's a false dichotomy to claim PHP lets you write something fast while the alternatives do not.

Re: PHP Addiction

#215
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing . Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got…

I'm a longtime fan of Linux and have used it as my desktop of choice for years, but apparently you and I have a different idea of what "beautiful" is. That screenshot is a ghastly smattering of black, grey, and red, with no unified look or feel. Sublime Text is really good looking in its own right, but that overall desktop doesn't look appealing to me.

Granted, I use Gnome Shell for my desktop of choice, and find that much closer to my definition of "beauty", while KDE4 is busy chasing some idea of beauty that more resembles a mish-mash of Win7 style glass that spends more time distracting my eyes than allowing me to work, so take my opinion with a grain of salt.

I think OSX has come closest to the mark of "beauty" from a desktop environment, but it's such a terrible window manager compared to X11 that I can't stand using it except when I have no other good choice. Even then the only thing keeping me from insanity is a set of third party window managing tools that still only get me about 50% of the way to where I want to be.

Re: PHP Addiction

#216
post #18

Earlier quoted context omitted.

So Java then?

I've never seen a web host include java, and no shared host has enough resources to support the JVM in the first place. It's a similar problem as Ruby and Python, believe it or not.

Heroku will host JVM-based webapps for you. They have Scala and Clojure support.

Re: PHP Addiction

#217

Earlier quoted context omitted.

Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing . Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got…

I'm a longtime fan of Linux and have used it as my desktop of choice for years, but apparently you and I have a different idea of what "beautiful" is. That screenshot is a ghastly smattering of black, grey, and red, with no unified look or feel. Sublime Text is really good looking in its own right, but that overall desktop doesn't look appealing to me. Granted, I use Gnome Shell for my desktop of choice, and find tha…

Gnome shell, while still somewhat unfinished, has some very cool ideas. I really like the JavaScript shell extensions that you can enable/disable right from the Gnome Shell Extension website. I was surprised when I stumbled on that.

Re: PHP Addiction

#218
post #171

Earlier quoted context omitted.

I don't know enough about MySQL vs Postgres or RedHat vs Ubuntu to make a point with them, but sometimes it's not about being cool. Apache is a webserver from 1995. It uses a process (sometimes a thread) per request, a architectural decision which made it nearly fundamentally incapable of solving the C10K problem. Only back in January was the Event MPM added (and it's still experimental), allowing you to have many Ke…

You wrote a well thought out response. I owe you a response in kind. People have a tendency to overrate their rational capacity to reason out a viable decision. While you listed a few solid critiques, the situation is infinitely more complex. And by infinitely , I do mean exactly that. As in, beyond your capacity to reason it out. In the end, the only right decision is a decision which withstands the test of time. Bo…

[deleted]

Re: PHP Addiction

#219
Being addicted to PHP is like being addicted to coffee; for some of us, it works, and we're just fine with that. Code quality comes from the programmer, not the language.

Re: PHP Addiction

#220
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

I personally love having Mac OSx and Ubuntu Server running in a VM. Best of both worlds, IMO. I don't have to mess up my Mac install, and I can dev in a "real" linux environment.
Post reply on HN