See you there!
Once again the Google Polymer Summit was a blast. This time in London.
The prime reason to use PHP is the prime reason to leave it
People have argued in the past that PHPs badness is it’s advantage. And it’s true. The speed at which non-programmers can put out functional and even notably use- and successfull websites is staggering. An absolute absence of arrogance in the community and the silly utter wackyness of the language keeps everyone focused on solving the problem and not building an architecture that one can get high over but never gets finished. Paul Graham calls this the Blub Paradox, and explains the advantage C has over Lisp due to the weaknesses C has vis-a-vis Lisp, and not its power.
PHPs documentation and the availability of answers on the interweb are still an example for many other technologies and the duct-tape & chickenwire approach to getting things done on the *nix platform make for some awesome environments that everyone can tinker with. An environment where even *nix fanatics are happy and gladly join forces with Mac-Hippsters who like to fiddle with nice UIs on their *nix platform and non-tech beancounters who are longing for something they can understand and click on that is up and running next week.
The installbase of the usual PHP applikations puts every other web-oriented technology stack to shame and even PHPs security track-record is pretty impressive, given the size of its installbase.
Yet I do think PHP is on the way out. At least with me.
Why is that? Well, the point lies in the above. PHP and it’s amatureishly designed applications are a mess. A working mess, but a mess none-the-less. And, this is perhaps the biggest downfall. The teams working with PHP rarely know true indepth rules of software development. Example: Up to this very day I’ve run into more PHP developers whom I’ve had to explain why versioning is an important thing than ones that already knew and were using it. It’s just one example, if one which sounds patently absurd to any real developer, but there is truth to this in many different fields of development with projects with PHP stuff at their core.
PHP originated as a templating language for end-users, very much like SQL started as a query interface for office workers. Simple and easy to use, but very hard to scale technology wise. This shows at every corner to this very day.
Why and where the move to NodeJS makes sense
This however, to me, is not the main point making a move from LAMP to Node attractive.
The interesting part about Node is, that while being built on a losely typed language (a fact that has the C-family members and Java folks abruptly wake at night, bathed in cold sweat) and having hippster written all over it, Node does come with a factual demand for the newest and flashiest in technology. Which is not a bad thing, no matter how it may sound. For example, it makes no sense at all to do Node without looking into load-balancing and stream-handling at the same time.
And here lies Nodes big advantage yet, in my opinion: You can not be a non-programmer and get something useful done with node. Especially if you’re a ’non-programmer‘ that has been doing LAMP for the past 15 years. The barrier of entry is notably higher that with PHP, despite having one programming language less to deal with. You need basic knowlege of TCP/IP and HTTP to get up and running with Node. You have to be ready for the world of distributed and virutalised serverpower where the question about the underlying host technology is just about academic and nothing else. You have to feel safe doing low-level things whilst at the same time not crying like a baby when you notice you’re lacking that one single FTP thingie to dump all your shit on to get your unmaintainable ball-of-mud running instantly.
NodeJS is hip, but it is a specialist technology none-the-less, which put’s it in a position that PHP can never reach. And probably wouldn’t want to reach either.
I find myself longing for environment where people building non-trivial webapps take approaches beyond the next WordPress plugin and the next bizar hack to get things running half-way and understand the requirement for avoiding the quick-and-dirty way. While that is possible in PHP, I’ve come to the conclusion that it’s too difficult to find the right people in the PHP community and that it as a whole is to large and has to many fiddlers and part-time proggers and not enough ‚real‘ programmers to be sure you’re getting the right mate or joining a crew that actually knows what it is doing.
That is the one last big reason why I’m looking into moving to Node and away from PHP.
We’ll see how this goes.
Working with Drupal with a current project because it’s the prime go-to CMS here is like a live alice in wonderland trip. A strange historically grown mess, barely tamed by sanitiy and a relentless chaotic community that all by accident seem to come up with hacks that somehow solve the problem in some way. And yet there’s a solid global corporation building its business all around Drupal [acquia.com]. The surreal hacks with which the Drupal people solve their problems are mindboggling, and yet everybody seems totally OK with it. And Drupals track record of deployments is impressive.
I guess with PHP it’s somehow like the C vs. Lisp argument: C is so shitty compared to Lisp that you have to get yourself together and work as a team, or you won’t get anything done. Hence Lisp has this loner exisitance on the side and all the real work gets done in this ancient C thing.
PHP is a simular thing. It is so bad that no respectable programmer would pick it up voluntarly nowadays, but yet it grew out of Perl (which is worse in some ways), was somewhat of an improvement and was at the right place at the right time. The badness of PHP accounts for its considerable lack of arrogance (compare the PHP community to the Ruby community for instance) and for no one feeling guilty when he does a quick bad hack.
As a programmer you don’t feel dirty when you do bad programming in PHP, you already felt that when you picked PHP as the solution. Hence quite a bit of work gets done in PHP. That’s why PHP has Drupal and Typo3 and Joomla and the Java Community has nothing of that proportions. The barrier of entry into PHP is *very* low which gives it its momentum.
preg_replace("/\/\w*?\.css/", "/", get_stylesheet_uri());
Gibt den Pfad des aktiven Themes zurück, auch wenn dies ein Child-Theme ist. Vorrausgesetzt, das Child Stylesheet ist mit WordPress Bordmitteln im Theme eingebunden und aktiviert.
Returns the path of the actual active theme, even if this is a child theme. This only works if the child themes stylesheet is included with WordPress methods.
Return value comes with trailing Slash!!
List all active apache web vhosts on Ubuntu/Debian Linux / Liste alle aktiven Apache Web VHosts auf einem Ubuntu/Linux Server auf:
ls /etc/apache2/sites-enabled | sed 's,\s,\n,g' | sed 's,^,/etc/apache2/sites-enabled/,g' | xargs cat | grep -v "#" | grep ServerName | sed 's,ServerName,,g' | sed 's,\s,,g'
Auf Mac OX X einen User einer Gruppe hinzufügen:
sudo dseditgroup -o edit -a [UserNameToAdd] -t user [Groupname]