What is Larry Thinking? #40 => Doing What I Do, Part 1

May 12, 2011

In this edition…

About This Newsletter

Fortunately I’ve created the habit of working on these newsletters continuously, so that when it becomes time to send another one out, there’s not quite so much to do. I say “fortunately” because I’m in the throes of completing the fourth edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book and am pressed for time. And even though I had a lot of work done on this in advance, it still took me a week! Anyway, a few random things in this newsletter, along with more on my ongoing series about being employed in the IT industry.

As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!

What Were You Thinking? => How I Got Here

I’m continuing to get feedback on my recent newsletters that discuss various ways of being employed, and how to improve your skills, when pursuing, or having, a career in IT. Yogesh shared this gem:

I have been working at a web startup (In India) for past 8 months. I realized, after a while, that it was not my ability that hindered my learning. It was reluctance to come out of my comfort zone. Earlier I decided to come out of it, easier it got. 

That’s a great perspective. With all jobs, people aspire towards getting comfortable, I believe, but it’s by being uncomfortable sometimes that we work the hardest and learn the most. Of course, sometimes it’s nice just being comfortable for a while and not working that hard!

An Australian associate of mine named Jason, who has provided tons of useful feedback to me over the past couple of years, made the switch from being employed to being self-employed some months ago. He provided me with the following list of lessons he’s learned in that time (mildly edited):

  • Track your time: you need to know how long tasks take to be able to tell if you are making money or losing money.
  • Reply to emails within 24 hours; don’t keep clients waiting.
  • You will make mistakes: just make sure you learn from them and take time to reflect.
  • Stick to normal business hours.
  • Don’t be afraid to quote too high; always be concerned with quoting too low.
  • Find local agencies to partner up with.
  • Most importantly, have fun, don’t stress too much: working for yourself is way better than working in a soulless office!

Like Yogesh, Jason also specifically mentioned being open to new technologies.

My thanks to Yogesh and Jason for sharing!

On the Web => Fences for Windows

Some time ago I came across Fences, a desktop organization tool for Windows (virtual desktop, that is). I don’t personally use Windows regularly, so I haven’t tried this, but it looks like the kind of thing I would like if I did use Windows, so I thought I’d pass it along. It’s available in both free and commercial versions.

On the Web => PhpStorm IDE

A few weeks ago I had posted on my blog a mention of the PhpStorm IDE. I haven’t personally used it, but it has all the features you’d want in a PHP IDE, such as code completion, unit testing, version control, FTP, debugging, etc., plus bonuses such as support for editing HTML, CSS, and JavaScript. There’s a 30-day free trial available and a personal license costs $99 (US). PhpStorm runs on Windows, Mac OS X, and Linux. JetBrains is the creator of the powerful IntelliJ IDEA Java IDE, so their experience in creating good IDEs is well established.

I received a handful of comments from current users of PhpStorm, and the response has been strongly positive. If you’re looking for a new PHP IDE, check this one out!

On the Blog => Interview Posted Online

Sayyid Alireza Hoseini of bugX.ir recently conducted an email interview with me, that has now been posted on bugX.ir. In case you don’t read Persian, I’ve posted the English version of the interview on my blog.

On the Blog => What Everyone That Writes Should Know About Writing

A few weeks ago, I posted What Everyone That Writes Should Know About Writing. If you already do any writing, or are hoping to, I believe I present some great advice in this post: the most important thing I’ve learned from writing 21 books, dozens of articles, and hundreds of blog postings. I won’t give away the secret here, but head to the blog if you’re curious.

Q&A => With the availability of so many PHP frameworks, what is the role of PEAR?

Some time back, way back, Daniel asked my this question and I’m finally getting around to answering it now. In part I’m thinking about this question because I write about PEAR in my “PHP 5 Advanced: Visual QuickPro Book”, which I’ll be updating in early 2012, so I’m starting to re-evaluate what I discuss in that book. Secondarily, I’ve been assisting some readers in the support forums with their questions on PEAR recently. So with the availability of so many PHP frameworks, what is the role of PEAR and is it still useful?

PEAR is a library of classes of code designed to solve specific problems, such as creating and validating forms, sending HTML email, and so forth. Although the PEAR site describes it as a framework, I don’t think of it as a true framework, or as an alternative to a framework. You can’t, or wouldn’t, build an entire site in PEAR, and you can actually use PEAR libraries piecemeal in a framework-based site. A few years ago, I rather liked what could be found in PEAR, or I liked the promise of PEAR. But the PEAR classes are created and maintained by individuals, meaning that the longevity, development, and viability of any PEAR library depends upon the individual(s) continuing to work on the project. As with any project that doesn’t pay, it’s easy for developers to spend less and less time on their PEAR libraries. Regrettably, many useful PEAR projects have not been maintained (in fact, even the most recent bit of news on the PEAR home page is over a year old). I’m not sure what I’ll do in the next edition of the book, but I probably wouldn’t advise that anyone spend too much time learning or using PEAR, considering the frequency with which PEAR classes become abandoned or deprecated. Secondarily, PEAR can be challenging to install.

Ironically, the Zend Framework has become a good alternative to PEAR. Yes, yes: I said that PEAR is not an alternative to frameworks, which is true, but Zend is a somewhat unique framework, making it an alternative to PEAR in some ways. I don’t personally care for using the Zend Framework as the basis of a site, but the Zend Framework’s greatest feature, in my opinion, is that you can use pieces of it in your own projects easily. On a couple of recent projects, when I’ve had to send HTML email or generate PDFs, using the corresponding part of the Zend Framework was an easy solution. And since the Zend Framework is maintained by the most important PHP-related company, its future is stable and bright.

As a last note I’ll point out that, despite all this, PEAR is still very useful, but not directly to the average person. Many of the best additions to the PHP core over the past few years were originally PEAR projects. The Filter extension is the best example. Thus, PEAR is an excellent incubator for functionality to be added to PHP itself in time.

Q&A => What happened to PHP 6?

I forget who specifically asked me this question—What happened to PHP 6?, probably because it’s been asked many times over (in the forums, in emails, on the blog, in Amazon.com reviews, etc.). Before the answer, some context as to how this relates to me (because, apparently, it’s all about me!)…

When I went to write the third edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide”, I had to decide what version of PHP to support. As a writer of technical books, you don’t want the work to be outdated shortly after publication. When I was making this decision, PHP 5 had been out for some time, and work on PHP 6 was about 50% complete. The big new feature in PHP 6, as far as I was concerned, was support for Unicode. In theory, PHP 6 was going to be support any language natively, meaning you could sort lists by your native tongue, write function and variable names in your own characters, and so forth. I thought this was a significant enough addition to go ahead and include it in the third edition of the book. I was wrong. Or at least premature.

In the past couple of years, PHP 6 went from being stagnant, to unavailable, to dead in the water. The problem stemmed from how Unicode works; more specifically, I believe there was a switch from 32-bit to 64-bit (but I could be wrong about that particular detail). Realizing that the progress on PHP 6 to date would have to be scrapped, the PHP developers pulled the plug on the Unicode aspect of the planned PHP 6. Most of the other features intended for PHP 6, such as support for namespaces, were rolled into PHP 5.3. In fact, some of what I demonstrated in the third edition of the book, became possible in PHP 5.3 through additions to the Standard PHP Library.

I have not heard recently what the plan is for PHP 6. It’s possible they make skip PHP 6 and go straight to PHP 7. Being an open source product, there’s no marketing incentive to put out new versions of the language, so it’s only natural that the development path would slow as the language matures. And the adoption of PHP 5 was already rather slow, at least among Web hosting companies. My expectation is that PHP will be continuing along with incremental releases, in the 5.x family, for the next couple of years or so.

What is Larry Thinking? => Doing What I Do: Writing

In this newsletter I’m also continuing what became a series on IT careers. I first wrote about becoming a better programmer, in two parts (1 and 2). Then I wrote about building a career and how I got here. In this newsletter, I’m going to write about some of the specifics of what I do, with the goal of helping you do those things, too (should you want to, that is). I’ll also provide some details as to what you could expect to earn doing these things, because that’s such a mitigating factor. All of the dollar amounts will be in US dollars, and do keep in mind that you need to pay your own taxes on the income: earning $100 does not mean you have $100 to buy stuff with.

If you are hoping to work for yourself, there are many things to think about, but the most important is how you go about making money. I’ll speak to that specifically here. For some context, I’d say I earn about 60-70% of my income from writing, with the other 30-40% coming from some combination of programming and training. Before looking at these particulars, though, I want to make clear one of the great benefits of working for yourself: You can make money however you want (or can)!

First, one option is to come up with and implement “The Next Big Thing.” Your abilities and imagination are the limitations here. Worst-case scenario, you’re out some money and a lot of time; best-case scenario, you’re a billionaire. It really is amazing that you can come up with an Angry Birds or a YouTube or whatever and make it happen without spending much money at all. This is somewhat unique to the IT industry: architects need clients that will pay for the building to be made; doctors need patients; but IT entrepreneurs can fully realize their own vision. And you can make a fortune this way. Statistically, though, most endeavors will make little to nothing. I’ve never personally pursued this route, although I once worked with someone doing just that, but it’s worth considering. Just be certain to balance the goals and dreams against your abilities, time, and money. In other words, in pursuing “The Next Big Thing”, don’t risk more than you can afford to lose.

Now, as for what I do have extensive experience with, it’s much easier to be published than you might think (although, in truth, I may have a totally warped sense of perspective on that by now). You can begin by writing your own content, for free, on a blog. This will help you become a better writer and may be useful when you start submitting article ideas for other Web sites or print materials. Like any skill, practicing writing makes you a better writer. Find topics and write about them. You’ll learn a lot about the time that’s required, how to present ideas, how to overcome obstacles, and so forth. If you get some feedback from readers, either people you know or strangers, you’ll learn even more. You could perhaps even volunteer to write for someone else’s blog. By doing so you can tap into their success and audience, thereby getting a foot in the door.

When it comes time to getting paid for publishing, there are two avenues: books and articles. I don’t think self-publishing is a viable option unless you’ve already made a name for yourself (I say that because I have made a name for myself, in all modesty, and I still am unsure as to how viable self-publishing will be for me). I think you’d have the best luck in publishing articles if you went with an agency, such as Studio B. Studio B handles both articles, where Studio B is really representing the client (i.e., the Web sites where the articles would be published), and books, with a typical agency model. You still need to prove yourself to Studio B to get involved with them, but I can’t imagine their criteria is too stringent. Once established with Studio B, you’ll receive monthly newsletters with what they’re specifically looking for. All you’ll need to do is find an appropriate topic, come up with a proposal, and you’re on your way. In case you’re curious, you can expect to make anywhere from about $150 to $500 or so per article: not a lot of money, but decent for the amount of work required. Secondarily, publishing articles gets your name out there, which can help both a book career and a Web development, trainer, or consultant career.

For publishing books, it’s simple. In theory. Yes, it helps to have published some books already and it does help to know someone, but at the end of the day, it’s just a matter of getting the right idea to the right publisher. The biggest mistake most people make is not understanding the publisher’s needs: For Dummies isn’t going to do a book on, say, the Eclipse IDE, and Peachpit Press isn’t going to accept your proposal for an intro to PHP book (because they already have one!). Just get a good book idea to an appropriate publisher. Pretty much every publisher has submission guidelines on their Web sites, which you should follow exactly (because if you can’t do that, you probably can’t write a good book).

As for making money through books, it’s not as great as you might think. There are two issues: advance and royalties. An advance is given for writing a book and is money that’s yours to keep. The royalty rate is what you make per book, and all royalties first go towards paying the advance back to the publisher. Some publishers give larger advances (maybe around $10,000); other publishers give smaller or no advances, but higher royalty rates. I make, for example, maybe an average of $1.50-$2.00 per book, meaning that I need to sell at least 5,000-6,500 books before I earn money beyond the advance. Roughly speaking, I believe total sales north of 10,000 copies is considered to be good. If you think you want to make money writing books, assume that for an individual book you may get an advance of $8,000. If it sells well, maybe you sell 8,000 copies, which brings in approximately $12,000-$16,000. But that extra $4,000-$8,000 (above the advance) would be paid over some years. And that’s for about four months of hard work: the time often allotted to complete a book. If your book sells very well, you can make much more, but statistically, that’s not common. However, an ancillary benefit of getting published is that you’ll have some new work come to you (because your name is on a book) and you can charge more to do that work (because your name is on a book).

I had intended to write about everything I do in this newsletter, which includes Web development, programming, and training, but as this newsletter is getting long, and I have a book to finish, I’ll complete this line of thinking in the next newsletter.

Larry Ullman’s Book News => “PHP and MySQL for Dynamic Web Sites” (4th Edition)

As already mentioned, I’m still toiling away on the fourth edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book. I’ve finished the first draft through Chapter 14 and I’ve done the rewrites through Chapter 5. In Chapter 11, “Web Application Development,” I changed the structure a bit, and elongated the section on PHP and JavaScript (it was an area of common confusion in previous editions). In Chapter 13, “Security Approaches,” I added two new sections, one on using the Filter extension for data validation and sanitization, and the other on using the Fileinfo extension to help verify the authenticity of an uploaded file’s type. I’m currently working on Chapter 16, “An OOP Primer,” which is an entirely new chapter. Then I’ll write the other new chapter: Chapter 15, “Introducing jQuery.” It looks like I should have the book done by the end of the month or so, making it available late summer.

The JavaScript book will get all of my attention after I complete the PHP and MySQL book, and I have no other deadlines for the rest of the year, so I’m optimistic about its future!