What is Larry Thinking? #57 => Random Stuff, July 2012

July 2, 2012
The Yii Book If you like my writing on the Yii framework, you'll love "The Yii Book"!

In this edition…

What Were You Thinking? => Sponsorships and Ads

In my previous newsletter, I asked your opinion on the idea of my possibly adding ads to these newsletters in order to offset my costs. Generally speaking, the consensus was along the lines of “we’d rather you didn’t”. Or, more precisely, adding ads for products that I wouldn’t personally endorse was frowned upon, but ads for products that I can honestly recommend were acceptable, and sometimes encouraged.

My thanks to everyone for their input on this issue. As you may have noticed, I’ve never done any advertising on my Web site or in my newsletters, not because I’m strictly against the concept or trying to preserve my “integrity”, but for two other reasons:

  1. I, like you, find ads to be annoying.
  2. I don’t imagine ads bring in a significant amount of money anyway. In other words, when I do sell out, it needs to be worth it!

So, for the time being, I’ll continue to not bother with ads at all. In the future, I may consider working out ways to advertise products I do personally use and endorse. That will be a little tricky because I don’t, for example, regularly use Windows, so software I’d be inclined to recommend would be for a much smaller market. But maybe I’ll more regularly recommend books and services (e.g., hosting) that are of a good quality to me. Thanks again!

On the Web => Top 100 E-Commerce Tips

Some time ago I came across a somewhat old post titled Top 100 E-commerce Tips from WebmasterWorld. Despite the fact that the article was published over four years ago, and it’s based upon a slightly older forum thread, there’s still a lot of material in the article worth reading if you do any e-commerce. Even though there are a full 100 tips here, they are short—most are just a single sentence—and quite valid. Admittedly, I disagree with a couple, and feel like a few could be tossed out, but there are many good points made, and many reminders of things that perhaps you’ve forgotten to emphasize on your most recent e-commerce project.

On the Web => Under the Hood of Yii’s Component Architecture

If you haven’t yet seen it, Steven O’Brien wrote an in-depth series of articles on the Yii framework’s component architecture, posted at phpmaster. In the series, O’Brien looks at the CComponent base class in detail. Every class in Yii is an extension of CComponent, so understanding what it brings to the table can be quite useful to the Yii developer. Part 1 looks at the class’s key properties and methods. Part 2 discusses events. And part 3 explains the behaviors. If you’re using Yii, it’s worth reading these to better understand what’s going on at the fundamental level.

Now, admittedly, some of these things are going to change in Yii2, but Yii 1 is what we’re using for the time being.

On the Blog => Interview with Douglas Crockford

SmashingMagazine recently published an interview with Douglas Crockford. Crockford, in case you’re not familiar, is one of the key proponents of JavaScript. One of JavaScript’s “founding fathers”, if you will. His Master Class video series on JavaScript and the history of programming is really quite illuminating.

I introduce the article, and highlight a couple key points, in a recent blog post.

On the Blog => Transliteration in PHP 5.4

In the third edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book, titled “PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide“, I went out on a limb and used a beta version of PHP 6 when writing the book. PHP 6 was about half-way done at the time, and I didn’t want to complete the book, only to have it be outdated immediately thereafter (using PHP 6 wasn’t, by the way, an attempt to trick the reader into buying the book, as some cynical people have suggested). Well…PHP 6 ended up dying due to many complications and I had the proverbial egg on my face (what one reader rightfully called my “Dewey Defeats Truman” moment). In truth, only about 5% of the book or so required PHP 6, so it wasn’t a devastating mistake, but I certainly felt foolish.

I had specifically wanted to discuss PHP 6 because of its intended support for Unicode, which is what the code in the book requires for a couple of examples. Even though PHP 6 was shelved, the key components have since been integrated into PHP 5.2, 5.3, and the recently released 5.4. Transliteration, the ability to convert text from one alphabet to another, was demonstrated in the book using the PHP 6 str_transliterate() function. That function went belly-up, and PHP 5.4 now has the Transliterator class instead. The documentation for the class in non-existent, but I explain what I figured out in a blog post.

Q&A => Do You Ever Use an E-commerce Framework?

Daniel, in response to my previous newsletter’s call for questions and thoughts, asked if I ever use an e-commerce framework, such as Magento or OpenCart. It’s a reasonable question as I do use WordPress to manage my site’s content, and I don’t feel the need to always write a custom solution to every problem.

This is true: a couple of years back I changed my main site to use WordPress. I did this because my site is really just a blog, plus static pages for the books, and WP is the best tool for blogging. Between its plug-ins and widgets, there’s a lot to be said for WordPress. Plus, I like that it has a search engine built in. This isn’t to say that I don’t sometimes consider rewriting my site from scratch, but considering the time I’ve invested to put all the content into WordPress, that’s unlikely to happen, at least not for the foreseeable future.

The same is true for my support forums. Even though I’ve explained how to create a support forum in my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)” book, I still use prepackaged software for that role on my site. In part this is because I started my first forum about a decade ago, using the open-source Phorum, only transitioning to the commercial IP.Board recently because Phorum was no longer behaving well.

All that being said, the answer is that while I’m all for using off-the-shelf solutions, I haven’t done so with e-commerce in quite some time. When I was first starting out, I used a couple of e-commerce frameworks for a couple of projects, but it’s been years since I have.

The problem with many frameworks is that you have to spend so much time learning how to use them for them to be beneficial in the long run. In other words, it’s best to learn a framework and really get in the habit of using it frequently. For example, if you want to use Drupal, you should master it and use Drupal a lot.

When I did use an e-commerce framework (back in the day), it was for clients on a limited budget without much customization needed and so a framework was appropriate. These days, when I do e-commerce, it’s normally a custom job and part of a larger application. In those cases, I’d rather write the software from scratch or use my preferred general framework (Yii) than try to learn and implement another framework that I may only use once a year.

I absolutely see nothing wrong with using an e-commerce framework, though. In fact, perhaps by learning how one of those solutions works, you can better understand how to write your next custom e-commerce site from scratch!

What is Larry Thinking? => Skills Required for Jobs Today

In response to the previous newsletter, Rachel sent in some questions about what job skills would be best, in terms of both job opportunities and the ability to make money. Coincidentally, I recently had an interaction with someone on Twitter, who had landed his first formal Web development job (and had, ahem, got started by reading my books). That person, James, was kind enough to share some of his experience with me via email, and so I thought I’d combine these two happenstances to talk about what skills it seems you should have when looking for a job today.

In Rachel’s situation, where she lives (the United Kingdom), she was finding more jobs that were asking for ASP.NET over PHP. This surprises me some, but I think I’ve forgotten that people still use Windows servers. In the realm in which I work and communicate, it’s all about *nix, including Mac OS X, but I saw more people using Windows servers in both Turkey and in the educational environment. I can’t speak at large about ASP.NET vs. PHP jobs, although the statistics clearly indicate that more sites world wide are using PHP than ASP.NET by far. However, sometimes you have to focus on the jobs nearby. I don’t know which set of skills pays better, but my general suggestion would be that if you were to go into ASP.NET, you might as well go into Windows development as a whole. In other words, drop the PHP/MySQL/open source route and adopt Windows/ASP.NET/SQL Server, etc.

As for what James discovered (and he’s also in the UK), the skills required that he repeatedly saw listed include:

  • JavaScript/jQuery
  • SQL

He also mentioned that prospective employers wanted applicants to have experience with MVC frameworks, too. I think that’s a very reasonable list of skills, and reflective of what I do most frequently (when I’m doing Web development, that is).

From what James saw, having a computer science degree was assumed, although a portfolio and experience were just as important. As I’ve mentioned several times before, one of the great things about doing Web development is you can build up your own portfolio and experience for little or no money. While having clients is preferred, don’t let a lack of clients stop you from creating work.

In terms of interviews, James said that they weren’t asking many of the standard questions you see online (on interview help sites), but rather about experiences with specific languages and techniques. Again, here is where having a body of work is most useful.

In my recent trip to San Francisco (which I’ll blog about shortly), educators were talking about how unreasonable job ads were: “You need to be an excellent programmer with years of experience and a computer science degree while still being able to do graphic design and database design, and this is an entry-level job!” Clearly that’s an exaggeration, but not much of one.

I think part of the problem is that money is tight; companies now want one person to do two jobs. My inclination is that with most jobs, the companies are misrepresenting, to some degree, what they actually expect, just as applicants will likely misrepresent what they can actually do!

Book Giveaway => Lots Of Books!

In my previous newsletter, I gave away the remaining copies (almost) of three of my books:

There was a good response, with lots of people interested in the “Modern JavaScript” book. Unfortunately, I had exponentially more entrants than I had books, so not everyone went away happy.

I also forgot, and then remembered, to giveaway a couple of copies of both the “Modern JavaScript” and the “PHP and MySQL…” book through Twitter. I’m still figuring out how best to use Twitter, but I think that giveaway went okay. Well, the books went quickly, that’s for sure.

My next book giveaway will probably be at the end of the summer, when the third edition of my “PHP Advanced and Object-Oriented Programming” book comes out.

My thanks to everyone for their interest in my work!

Larry Ullman’s Book News => “PHP Advanced and Object-Oriented Programming”

And, finally, most of my time has been spent working on the third edition of my “PHP Advanced and Object-Oriented Programming” book. I’m happy to say that 10 out of 15 chapters have been submitted. But I regret to say that I am, as always, behind schedule. I will get those last five chapters done in July and the book will come out late summer, I believe. The good news is that there’s plenty of new content, with an emphasis on OOP. So far I’ve added:

Those are the main new sections. There are also little added bits here and there, including in sidebars and tips. I’m using some new examples in the OOP sections, and adding more OOP design theory discussion.

Most of the remaining chapters are new material, too, which will cover:

As you can imagine, this will keep me pretty busy in July.