NaNoWriMo 2016

Ever since Marie wanted to learn to program in 2009, I’ve wanted to write a book to help her. But I never could get started.

The National Novel Writing Month is November every year for just this purpose: to motivate people to put 50,000 words on paper (about the size of the novel, Slaughterhouse-Five), editor be damned.

I first heard about it in 2007, when I started using Scrivener, but dismissed it because the requirement that a novel be fiction. I only just found about NaNo Rebels, which allows you to customize the “50,000 words” into nearly any other creative exercise, including non-fiction. So yesterday, this was born:

NaNoWriMo 2016 Participant Badge

Nowadays, I use Ulysses. I simply created a group in the software and set a 50,000 word goal and started typing away!

NaNoWriMo 2016 Day 2

Goal setting on my iPad.

I don’t know if I can finish since it’s about a good sized blog article each and every day. We’ll see how it goes. So far it’s been a bit strange writing a book. For instance, I can’t use my WordPress shortcode macros lest I ruin the word count.

Periodically, I’ll dump the output to my blog, which you can track here. Wish me luck!

If you want to buddy up, I’m “tychay” there.

I come to bury PHP, not to praise it?

(I received an answer request from someone on Quora for this question. At the time of my writing, there were only two answers, both that boiled down to “use Python.” While I feel I was asked to balance out that with some PHP cheerleading, I can’t bring myself to do that. Nor, can I hop on the bandwagon.)

Between PHP and Python which is better for a startup?

My answer reads like a Zen koan: it depends on the nature of the problem; it doesn’t really matter. It becomes the nature for future problems; that makes it matter.

Continue reading an to see that the koan does actually make sense after the jump

Why do Python programmers hate PHP?

Why do Python programmers hate PHP?

I saw a colleague answer this question and thought I’d give a go:

Are sure it’s just Python programmers? I think that relatively speaking Ruby developers and Java developers hate on PHP more (and Perl and Javascript developers less).

From a software language design perspective, the PHP language is an ugly hack. One of the creators of Java said that when he thinks of PHP his heart goes dark (showing a complete black slide in his presentation for emphasis). The more structured the language (and Java and Python certainly are), the more offensive this ugliness is. (Ruby gets this view not from the language but for being the home of a lot of programmers who were trained in Java in school and for Ruby on Rails being a popular framework in the webspace already crowded out by PHP.)

However, there are t-shirts out there of me saying back in 2006, “PHP is a ball of nails, but when you throw it at a wall, it sticks” and that still applies today—it’s ugly, true; but it works. If anything, the language is far more ubiquitous on the web now than then, though that’s mostly due to the popularity of applications written in PHP such as WordPress and Facebook rather than any success in the language itself. The language has proved remarkably successful due to its adaptability and limited focus on what problems it tries to solve.

I imagine that this popularity-in-spite-of-aesthetic-beauty is offensive to those working in the web who think themselves above the direct, simple, and crass. That reality may sit so ill with some people that they feel the need to disparage PHP which becomes an object of their derision and the villain in their story. It’s only natural for a cohort in the minority to feel that way toward a market leader: Apple Macintosh users used to act like that toward Windows PCs, Windows Phone users act this way toward iOS and Android, etc.

The irony is that PHP is a market leader in only one tiny aspect of the programming market: the server-side, non-event-driven web. It has no footprint in the client-side web, none in application space or even the mobile app space, no recognized products in non-web tools and applications; and is just a rounding error in the DevOps space (to pick just one area where Python seems dominant/ascendant). It even makes no pretension to be a programming language to facilitate learning programming (another area Python is better suited to). Since all these areas are growing as the niche PHP represents is static, I find it ironic people still wage language-religious jihad against PHP.

That’s like hating on a horseshoe monopoly after the automobile has been invented.

And I say this as someone who has programmed PHP for 16 years and gives keynote speeches in the language.

On being a beginner (again)

Compiled from three separate discussions on IRC, twitter, and in person:

“Whatcha do with your time these days? Learning Rails? 😈”

I did pick up Objective-C again after an aborted attempt at learning Swift. Mostly I’m trying to catch up on the javascript frameworks that have come out since I stopped coding. Right now it’s AngularJS—I figure I can jury-rig React into it if performance becomes an issue.

On the non-programming side, I’ve been messing with Ansible because I just got tired of doing things by hand—and I never needed to learn this because I’ve always had operations engineers working with me.

The ripping on Rails thing is over with me because there’s no point in arguing over how to solve a solved problem—today, the web problem is the easy part. What I find strange is people still feel the need to defend Ruby on Rails. I mean who the fuck cares what your middle layer code is written in when everything is an API to something written in Javascript?

“I don’t like that everything is an API to something in Javascript. As a user, the Web feels slower and flakier than it used to.”

I don’t like that everything on the front-end is pushed toward a single-page application. The reason for this is that the DOM-based model of front-end javascript (e.g. jQuery) gets so taxing when the application gets big because you’re bolting feature-on-feature, library-on-library to get it to work as smoothly as you envision. At a certain point, a true MV(VM) javascript framework (e.g. AngularJS) gives you much more because it abstracts all that in a consistent manner.

As soon as you buy into one of these, you’re invested into a huge initial javascript payload which causes you to not want the user to leave the page to unload anything, which then forces you into an API-based model with HTML partials and a client-side route/sitemap and more crap in the payload until you have a single-page application.

And then pretty soon your website is like Flickr where I swear every tenth click I’ve got to reload the page because the UI became non-responsive and I’m deciding to open the app in my iPhone just to do something without that frustration. How fucked up is that?

But then I look at Bootstrap and I figure, I’d rather have a SPA than everything looking like it was designed by some Apple-loving hipster (and this coming from a person who has used and loved Apple products longer than they’ve been alive).

“I’ve always enjoyed your talks and lamented that you didn’t remain on the PHP speaking circuit.”

Maybe I’ll start speaking when I have something to say. Like I’ve said before, PHP solves the “web problem” very well, but the web-problem is not a hard problem anymore.

Remember, it’s been four years since I’ve done any UI programming so everything is new to me. Basically, I’m a newbie, and I don’t think anyone wants to hear from someone who doesn’t know what they’re talking about.

But I did notice this from managing engineers: the worst problem a coder can get into is fear of having to start over. You get good at what you’re good at and when things pass you by, you feel the need to protect what you have because its what you know.

That’s how I feel about Ruby on Rails and that’s how I feel about me and PHP.

So, I’m a beginner again.

Pork Tocino

If you live in The Richmond, you know that B*Star Bar is like eating at Burma Superstar but without the line.

Breakfast plate with pork tocino, garlic fried rice topped with two eggs cooked over easy. Spoon in foreground
Pork Tocino with Garlic Fried Rice
B*Star Bar, The Richmond, San Francisco, California, United States

Sony DSC-RX1
0.013 sec (1/80) @ f/4.5, iso400, 35 mm

My favorite brunch dish there is the Pork Tocino. Grilled jerk pork over a bed of garlic fried rice and cherry tomatoes, topped with scallions and balsamic vinegar.

Since Marie loves their Huevos Racheros, I end up ordering this dish a lot. The only times I don’t is when we bring a guest, then I suggest they get it and I order something else.

Continue reading about some WordPress plugin notes after the jump

FYWP #257-262: wpautop and shortcodes/oEmbed do not play nice at all

It occurs to me that wpautop() is the register_globals of WordPress—a feature that was instrumental for its growth and popularity, but really needs to DIAF. They should rename the function wppeepee() because it finds a way to pee pee on your content at the most inopportune moments, causing unending headaches in your code.

For those of you who don’t know, wpautop can be seen as nl2br() on steriods, or (as I prefer to call it) a poor man’s Markdown. It’s been in WordPress for almost forever, and it’s hard to imagine writing a blog post without it, even if it’s a Really Bad Idea™.

Continue reading about the interaction of wpautop, shortcodes and oEmbed after the jump

I'm speaking again!

After a couple year hiatus, I thought it’d be nice to start speaking again — the disconnect of basically stopping speaking at open source conferences when I started working at two companies producing some of the world’s largest open-source products ([WordPress][] and [Wikipedia][]) was becoming too much.

I decided to apply this year. Luckily, [Northeast PHP Conference][nephp] forgot to check the The Great Offensive PHP Speaker Blacklist™, and accepted my talk!

The talk will be: [Ten Evil Things: Features Engineering at Wikipedia][10 evil things]. Now with 30% less swear words, but don’t worry, it’ll still be fun. 😀

When registering, belatedly, I noticed they had an interesting preferences page, I thought I’d share my answers with you

[WordPress]: http://wordpress.org “WordPress: Blog Tool, Publishing Platform, and CMS”
[Wikipedia]: http://en.wikipedia.org “Wikipedia: The free encyclopedia”
[nephp]: http://www.northeastphp.org “Northeast PHP Conference 2013”
[10 evil things]: http://www.northeastphp.org/talks/view/156/Ten-Evil-Things-Features-Engineering-at-Wikipedia “Ten Evil Things: Features Engineering at Wikipedia—Northeast PHP Conference”

Continue reading my answers to their questions after the jump

Enterprise job recruiting

> Hi Terrence,
>
> I am following up on previous emails and calls. I am doing some research on PHP. I understand that you are focused on [canonical model](http://en.wikipedia.org/wiki/Canonical_Model) management, [SOA](http://en.wikipedia.org/wiki/Service-oriented_architecture) or [ESB](http://en.wikipedia.org/wiki/Enterprise_service_bus) initiatives. Do you have 10 minutes for a quick call tomorrow afternoon?
>
> The [redacted] platform enables rapid service design, construction, and management all from a Canonical Model. This enables the following:
> 1) Your services are managed in our repository aligned to all of your business capabilities
> 2) Impact analysis on how a change from a provider system ([Logical Model](http://en.wikipedia.org/wiki/Logical_data_model)) can impact the Canonical and other services
> 3) Rapidly propagate the changes to the impacted services
> 3) Rules based [version management control](http://en.wikipedia.org/wiki/Version_control)
> 4) Mapping provider systems to the canonical model reduces the number of mappings required by over 99% for a complex integration projects.
>
> I know this is a busy time of year. If someone else is better suited for this discussion, can you please refer me to them?

I understood every third word.

The other day, I sat through a presentation from from an enterprise consultant, they had an 8 category scrum chart just for feature choice and a 10 category one for development. The former had categories like: “paths to insight” -> “validation” -> “harvesting”, so I spent most of my time imagining what would happen if people were story cards that ended up dying due to being harvested at the end of validation due to improper paths to insight.

Maybe if they spent less time throwing verbiage and more time doing, [Enterprise](http://terrychay.com/article/php-enterprise-scalability.shtml) [wouldn’t](http://terrychay.com/article/php-pro-con.shtml) [be such](http://terrychay.com/article/php-enterprise-myths.shtml) [a joke](http://terrychay.com/article/enterprise-scalability.shtml).

22 categories? **This** is agile?

My theory is that someone with [Wernicke’s aphasia](https://en.wikipedia.org/wiki/Wernicke%27s_encephalopathy) would make [a killing in Enterprise software development](http://www.youtube.com/results?search_query=wernicke%27s+aphasia).

You lost me there, bub

Reading [this blog post ranting on PHP][phphorrors]

> No corporation supports PHP’s growth & maturity like Sun & Google do for Java, Google (Guido van Rossum) for Python (jnc Django framework), Ruby (inc RoR) by 37 signals etc…

37Signals & Ruby? Thank his noodly appendage PHP’s support isn’t as terrible as that company on that language.

You lost me there, bub.

When it comes to engineering choice, programming language is not even in the top 10 of important choices a software architect has to make. If you’re worried about the language, you’re worried about the wrong thing. (I’m also a little amused that the author holds Python as a language with great unicode support.)

[phphorrors]:http://www.theroadtosiliconvalley.com/technology/php-coding-horrors-poor-excuses/ “PHP: coding horrors & poor excuses—The Road to Silicon Valley”