<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:series="http://unfoldingneurons.com/"
><channel><title>Larry Ullman &#187; Flex</title> <atom:link href="http://www.larryullman.com/category/flex/feed/" rel="self" type="application/rss+xml" /><link>http://www.larryullman.com</link> <description>Translating Geek Into English</description> <lastBuildDate>Mon, 21 May 2012 11:03:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Finding Book Bonus Content</title><link>http://www.larryullman.com/2011/12/20/finding-book-bonus-content/</link> <comments>http://www.larryullman.com/2011/12/20/finding-book-bonus-content/#comments</comments> <pubDate>Tue, 20 Dec 2011 19:27:36 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[C and C++]]></category> <category><![CDATA[Flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Ruby]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[jsdd]]></category> <category><![CDATA[phpmysql4]]></category> <category><![CDATA[phpvqs4]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2925</guid> <description><![CDATA[For many of my books, bonus content is made available through the publisher. Sometimes this is material that was intended for the book but had to be cut, such as an appendix or a chapter, and sometimes the material is a true bonus, such as a video screencast. Because it&#8217;s not clear for everyone how [...]]]></description> <content:encoded><![CDATA[<p>For many of my books, bonus content is made available through the publisher. Sometimes this is material that was intended for the book but had to be cut, such as an appendix or a chapter, and sometimes the material is a true bonus, such as a video screencast. Because it&#8217;s not clear for everyone how to access this bonus material, I thought I&#8217;d quickly post instructions here.</p><ol><li>Head to <a
href="http://www.peachpit.com">Peachpit.com</a> (almost all of my books are published by Peachpit Press)</li><li>Click on <a
href="https://memberservices.informit.com/my_account/login.aspx?partner=52">Account Sign In</a> at the top of the page.</li><li>If you don&#8217;t already have an account with Peachpit.com, click the <a
href="https://memberservices.informit.com/my_account/register.aspx">Create a new one&#8230;</a> link to register.</li><li>After you have registered, login.</li><li>On your account page (after logging in), click <em>Registered Products</em>.</li><li>On the Registered Products tab, click <em>Register Another Product</em>.</li><li>Follow the instructions to register the book.</li><li>Return to the Registered Products page.</li><li>For the book in question, click the <em>Access Bonus Content</em> link. That will take you to a page with all the bonus content for a given book.</li></ol><p>Besides being able to access bonus content, there are other benefits to registering at Peachpit&#8217;s site. And while you&#8217;re there, you can also check out <a
href="http://www.peachpit.com/authors/bio.aspx?a=2a14d669-06f6-48cf-a5b8-907169808b9f">my author page</a>, which lists the books I&#8217;ve written for Peachpit, the articles I&#8217;ve published there, and the blog postings I&#8217;ve published there. Both the articles and blog postings are viewable without registration or logging in.</p><p>I hope that helps anyone having trouble finding the material they&#8217;re looking for.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/12/20/finding-book-bonus-content/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>What Is Larry Thinking? #47 =&gt; Random Monkey Appearances</title><link>http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/</link> <comments>http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#comments</comments> <pubDate>Mon, 21 Nov 2011 04:21:41 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[jsdd]]></category> <category><![CDATA[mongodb]]></category> <category><![CDATA[newsletter]]></category> <category><![CDATA[nosql]]></category> <category><![CDATA[phpmysql4]]></category> <category><![CDATA[yii]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2869</guid> <description><![CDATA[In this edition… About This Newsletter What Were You Thinking? =&#62; Using JavaScript On the Web =&#62; Introduction to MongoDB On the Web =&#62; The Protocol-Relative URL On the Web =&#62; 10 Steps to Becoming a Great Web Developer On the Blog =&#62; My Yii Book Update On the Blog =&#62; Adobe&#8217;s Significant Flash and [...]]]></description> <content:encoded><![CDATA[<p>In this edition…</p><ul><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#about">About This Newsletter</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#you">What Were You Thinking? =&gt; Using JavaScript</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#web1">On the Web =&gt; Introduction to MongoDB</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#web2">On the Web =&gt; The Protocol-Relative URL</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#web3">On the Web =&gt; 10 Steps to Becoming a Great Web Developer</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#blog1">On the Blog =&gt; My Yii Book Update</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#blog2">On the Blog =&gt; Adobe&#8217;s Significant Flash and Flex Changes</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#qa1">Q&amp;A =&gt; How Do You Choose Between Competing Technologies?</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#qa2">Q&amp;A =&gt; How Do You Spend Time Between Projects?</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#thinking">What is Larry Thinking =&gt; Starting a New Project</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#giveaway">Book Giveaway =&gt; “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” (4th Edition)</a></li><li><a
href="http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/#news">Larry Ullman&#8217;s Book News =&gt; “Modern JavaScript: Develop and Design”</a></li></ul><p><span
id="more-2869"></span></p><h2 id="about">About This Newsletter</h2><p>Hello, hello. Not a very cohesive theme in this newsletter, but in it, I write about: Web development technologies, how to start new projects, and how to spend one’s downtime. Oh, and there’s one of those bookgiveawaythingies that y’all like so much!</p><p>As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!</p><h2 id="you">What Were You Thinking? =&gt; Using JavaScript</h2><p>In <a
href="http://www.larryullman.com/2011/10/21/what-is-larry-thinking-46-javascript-sexism-and-bad-user-interface/#you">my previous newsletter</a>, I asked for input as to how <em>you</em> use JavaScript, what you know you’re confused by, what you’d like to learn more about, and so forth. I received oodles of replies, which were very much appreciated. I haven’t responded to quite everyone yet, but do plan to still. And all respondents are going into a pool of candidates for a free copy of the book when I have my copies to give away (that looks like February now, or thereabouts).</p><p>The bulk of the responses emphasized that I just need to do what I do normally, but this time for JavaScript. In other words, there’s a certain way that I go about presenting technical information that seems to work for many people, and I need to be true to those inclinations. That’s quite flattering and reassuring, as I often second-guess myself when writing new books. It’s also a good reminder not to over extend myself or the book, and as I do the rewrites I’ll be certain to adjust accordingly.</p><p>I remember that when I first started writing computer books, I looked at the books that were out there, and many writers seem to want to impress the reader with what she or he (i.e., the writer) knows. Maybe wasn’t the intent, and maybe other writers just have a broader sense of what readers need to know than I do. In any case, my belief has always been that <em>a technical book isn’t about what I know but about what you, the reader, needs to know</em>. Further, it’s not my aim to impress you with my knowledge, but for you to be impressed by what you’ve managed to learn and do. So, as I finish the JavaScript book and perform the rewrites, this is a good reminder for me to keep the content simple (-ish), straightforward, and, above all, useful. When I question if some tip or sidebar is too advanced or unnecessary, that’s probably an indicator that it is.</p><p>A good idea that came up a couple of times is to demonstrate and discuss key JavaScript libraries. The book will already introduce some frameworks, but I think libraries merit coverage, too. I’m also now debating doing a chapter on mobile JavaScript. I’m leaning towards doing one, but am pressed for time.</p><p>Finally, a couple of people have volunteered to act as proofreaders on the book. The offer is much appreciated, and something I would have definitely taken advantage of if I was self-publishing. However, as this book is going through a traditional publisher, there are already several proofreaders involved. Adding more proofreaders might help catch a thing or two, but would further overwhelm me (it takes a lot of work to assign chapters, read feedback, and so forth) and I’m already so very behind. But I thank everyone again for their offers to help.</p><p>And my thanks once again to everyone for their thoughts and feedback. If you have any more suggestions, please keep them coming!</p><h2 id="web1">On the Web =&gt; Introduction to MongoDB</h2><p><a
href="http://phpmaster.com/">phpmaster</a> recently posted an article titled <a
href="http://phpmaster.com/introduction-to-mongodb/">Introduction to MongoDB</a>. I’m not entirely sold on non-relational databases yet, in that while I can see how wonderfully beneficial they can be in many situations, they’re not as ubiquitously useful as all the hype would seem to suggest. But in any case, a good article like this one is worth the time to read. The article introduces <a
href="http://www.mongodb.org/">MongoDB</a>, shows how to install support for it in PHP (although the instructions are for Unix-like systems), and provides code for actually interacting with a MongoDB database.</p><h2 id="web2">On the Web =&gt; The Protocol-Relative URL</h2><p>Some time back, I came across this excellent nugget of information that <a
href="http://paulirish.com/">Paul Irish</a> has put forth about the <a
href="http://paulirish.com/2010/the-protocol-relative-url/">protocol-relative URL</a>. I don’t want to reveal the details here (it’s a short article, and you ought to read it), but the gist is that there’s a very simple way to link CSS, images, JavaScript, and whatever other resources so that they’ll be served over HTTP on HTTP pages and provided over HTTPS on HTTPS pages. I wish I had thought to use this when I wrote <a
href="http://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/">my e-commerce book</a> (instead of using two different header files)! Sometimes the simple solution is the most brilliant one…</p><h2 id="web3">On the Web =&gt; 10 Steps to Becoming a Great Web Developer</h2><p>I just recently Stumbled Upon an article titled <a
href="http://komunitasweb.com/2009/10/10-steps-to-becoming-a-great-web-developer/">10 Steps to Becoming a Great Web Developer</a>. Even though the article is two years old, I think it does a great job of laying out the steps one would take to become a Web developer, starting with the basics of HTML, then moving into a server-side technology, and then getting into SQL, CSS, and JavaScript. On the higher end, there are regular expressions, Unix/Linux commands and administration, Web servers, version control, and frameworks. I would question some of the specific resources mentioned, but overall this is a nicely presented list and I can’t argue with the order. Two years later, perhaps the only thing I would add would be to start learning about mobile Web development, and a commenter on my original blog posting suggested XML and JSON, which would be good additions, too.</p><h2 id="blog1">On the Blog =&gt; My Yii Book Update</h2><p>In my blog and in these newsletters, I’ve informally mentioned my intent to write a book on the <a
href="http://www.yiiframework.com">Yii framework</a>. In theory, I would be writing it about now, but I’m very much behind on my JavaScript book so that’s not happening at the moment. I have been receiving more questions about this potential book, so I recently posted <a
href="http://www.larryullman.com/2011/11/03/my-yii-book-update/">a quick update</a> on the reasons for the book, how I plan on doing it, and when that might actually happen.</p><p>Thanks to anyone interested in that book!</p><h2 id="blog2">On the Blog =&gt; Adobe&#8217;s Significant Flash and Flex Changes</h2><p>I just <a
href="http://www.larryullman.com/2011/11/17/adobes-significant-flash-and-flex-changes/">posted the following on my blog today</a>, and thought I’d share it here since it’s so topical…</p><p>Last week, or thereabouts, Adobe announced that it was discontinuing support for Flash on mobile devices. This is, by all accounts, a wave of the white flag in Adobe’s battle against Apple and its iOS devices (if only Steve Jobs were alive today to celebrate). I didn’t think too much of that decision: it does make sense to use HTML5 or native apps for dynamic content to be run on mobile devices anyway. And Flash would still continue to run on desktops, where something like 99% of browsers have the plug-in and 90-some% of video is run through Flash. Flash is such a large component of Adobe’s various technologies that I can’t imagine Adobe leaving it behind.</p><p>And then Adobe announced today that it was offering Flex to the Apache Software Foundation (managers of the ubiquitous Apache Web server, among other projects).  Apache will need to vote on whether to accept Flex or not. This announcement does surprise me, as Flex is used not only for Flash creation, but also desktop and mobile application development via the AIR platform. Adobe says it will continue to support Flash and Flex, but clearly Adobe is moving more towards HTML5.<br
/> An interesting, and rather big, development. One does not normally think of a technology with such a large market share being outright dropped. We shall see how this plays out…</p><h2 id="qa1">Q&amp;A =&gt; How Do You Choose Between Competing Technologies?</h2><p>Richard emailed me recently, asking how I approach the situation where two competing technologies can be used for a given project. With his specific example, Richard was trying to decide between using HTML5 or Flash for an animated game. Assuming that both technologies were equally capable of performing the task, how does one make the choice? In simplest terms, Flash will provide the same experience for all users, so long as their browser supports Flash. This, unfortunately, rules out most (and as recently announce, all) mobile devices. Conversely, HTML5 will work equally well on all modern browsers, but will not work at all on older ones.</p><p>In response to Richard, I came up with two criteria for making any decision as to what technology to use for a project. First, one has to determine <em>what technologies can achieve the task</em>. Sometimes that alone makes the decision for you, when there’s only one possible solution. Considering the range of technologies and programming languages out there, this is rarely the case these days. For example, for a while, one could only develop iOS apps using Objective-C. But in most situations, there will be more than one option.</p><p>The next question is twofold then: <em>who is the target audience</em> and <em>what needs to be supported</em>? In this particular example, if the target audience is mobile users and outdated browsers don’t need to be supported, then HTML5 makes sense. If the target audience is all desktop users and mobile devices don’t need to be supported, then Flash. If everyone needs to be supported, then <em>both technologies</em> is the best solution.</p><p>With my own work, I normally aim for the broadest support over the newest thing, unless the point <em>is</em> the newest thing (e.g., you can’t make a site about HTML5 and have it be backwards compatible). I’m really not on the cutting edge of technologies, as many people are. I may be relatively on the cutting edge of <em>useful</em> technologies, but my goal is always to use the best tool, not the coolest one.</p><p>A third criteria that I failed to include in my reply to Richard, but is worth considering, is what technology you, the developer, are strongest with. Now, to be clear, this should not have a significant impact on the decision. I’ve seen people use technologies for the wrong tasks too many times, simply because that was the technology the person knew best (e.g. creating graphical desktop applications with PHP, which is possible, but not wise). My point with this criteria is that if you have two comparable choices and you’re stronger with one, then use that by all means. The project will go faster and the end result will be better.</p><h2 id="qa2">Q&amp;A =&gt; How Do You Spend Time Between Projects?</h2><p>David posed this question, asking me specifically, I believe (as opposed to asking for general advice towards this end). Being me, I’ll both answer for myself and give some advice.</p><p>When you work for yourself, the time between projects is especially important. For starters, this is time you’re not making money, so it needs to be used wisely. But if you treat the time between projects as an investment in yourself, and therefore your business, hopefully the period without money coming in will pay off in time. I don’t actually have much time off between projects, which is both a good thing (i.e., I’m busy making money) and a bad thing (I’m stressed and secondary things aren’t getting done). But when I do have downtime, at that moment, I look to the past and I look to the future.</p><p>In terms of the past, downtime between projects is when you should make sure that you’ve done everything that needs to be done but got put on the back burner while you were toiling away. This can be replying to emails, doing a little something for a client that wasn’t a priority, and updating your own Web site, LinkedIn profile, and so forth. When I overhauled my Web site a year ago, I was aghast by how out of date and unhelpful it had become. Having such public, poor representations of yourself out there is bad for business in the long run, even if only a little bit. You should have some sort of task management application, and in it you should keep a running list of “high priority someday” tasks, such as those I’ve just mentioned. Complete as many of these as you can as soon as your downtime begins, because if you don’t do it then, when will you?</p><p>In terms of the future, it’s largely a matter of improving one’s skills, whether that means learning something new or solidifying existing knowledge. In my task management application, I have a running list of topics that I’m interested in (these are non-high-priority-but-someday tasks). I take some time to investigate those during these little breaks.</p><p>Finally, I think it’s really important to recharge one’s batteries during these downtimes, whatever that may mean for you. To me, that primarily means getting away from my computer and doing something active. Part of the reason that I suspect I’m struggling in completing this JavaScript book is that I didn’t have enough (well, any) downtime between it and the previous book I wrote.</p><p>Time spent not working may seem like time spent not getting things done and not making money, but there’s a lot to be said for having some recovery time between projects. And I think, perhaps unmeasurably, such downtimes reap their own benefits in the long run.</p><h2 id="thinking">What is Larry Thinking? =&gt; Starting a New Project</h2><p>Last week, a friend came over to my house, hoping to learn about Web development. This friend has almost completed her PhD from Cornell in computer science, has taught college-level classes on programming languages, and worked at Google, too, so her technical knowledge is excellent, probably exceeding mine. She’s wanting to learn Web development, and while she has had no problems picking up the syntax and fundamentals of PHP, the big picture of Web development was eluding her. We went over a few things and, at one point, she asked how I had learned this or that. And, to be completely honest, I’ve been doing this long enough now, and my memory regarding my own development is sketchy at best, that I couldn’t answer her. But I can certainly recall that starting a big Web project, especially when you’re just beginning, is a daunting enough task as to be overwhelming, and perhaps you, too, don’t know where to begin.</p><p>Simply put, projects are a combination of <em>data</em>, <em>functionality</em>, and <em>presentation</em>. Games have a lot more of the latter two and many Web-based projects focus on the data, but those are the three elements, in varying percentages. When you go to begin a new project, it’s in one of these three areas that you must begin. And you should always start with the functionality, as that dictates everything else.</p><p>The functionality is what a Web site or application must be able to do, along with the corollary of what a user must be able to do with the Web site or application. The functionality needs to be defined in advance, and ought to be clearly stipulated in the contract (when there is one). Use a paper and pen (or note-taking application), and write down everything the project requires:</p><ul><li>Presentation of content</li><li>User registration, login, logout</li><li>Search</li><li>Rotating banner ads</li><li>Random monkey appearances</li><li>Et cetera</li></ul><p>Try your best to be exhaustive, and to perform this task without thinking of files and folders, let alone specific code. Be as detailed as you can about what the project has to be able to do, down to such things as:</p><ul><li>Show how many users are online</li><li>Cache dynamic pages for improved performance</li><li>Not use cookies or only use cookies</li><li>Have sortable tables of data</li></ul><p>The more complete and precise the list of requirements is, the better the design will be from the get-go, and you’ll need to make fewer big changes as the project progresses.</p><p>Once you’ve come up with the functionality (with the client, too, if one exists), it’s time to start coding and creating files and folders. You can start that process from one of two directions: the data or the presentation. I’m a data-first person, but let’s look at the presentation side to start.</p><p>If you’re a designer, or are working with clients that think in visual terms primarily, it makes sense to begin any new project in terms of how it will look. You may want to start with a wireframe representation, or actual HTML, but create a series of pages that provides a usable bases for how the site will appear from a user interface perspective. You don’t need to create every page, and in a dynamically-driven site you actually shouldn’t, but address the key and common components. The end goal is the HTML, CSS, and media, in a final or nearly-final state. Once you’ve done that, and the client has accepted it, you can work your way backwards through the functionality and data.</p><p>If you’re a developer, like me, incapable of thinking in graphical terms, it makes sense to begin any new project from the perspective of the data: what will be stored and how the stored information will be used. For this task, you’ll want to use a paper and pen, or a modeling tool such as the <a
href="http://www.mysql.com/products/workbench/">MySQL Workbench</a>, but the goal is to create a database schema. Always err on the side of storing too much information, and always err on the side of pure normalization (when using a relational database). Once you’ve done that, I normally populate the database with some sample data. This allows me to then create the functionality that ties the data into a sample presentation. By doing so, I, and the client, can confirm that it’s looking and working as it should. From there, you can implement more functionality, and then have the presentation finalized.</p><p>So that’s the process in a nutshell.</p><h2 id="giveaway">Book Giveaway =&gt; “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” (4th Edition)</h2><p><em>You must be subscribed to the newsletter to qualify for the book giveaway.</em></p><h2 id="news">Larry Ullman’s Book News =&gt; “Modern JavaScript: Develop and Design”</h2><p>I just submitted Chapter 8 of “Modern JavaScript: Develop and Design”, which means I’m about 50% done with the first draft (well, first submitted draft: there are multiple internal drafts prior to that). Progress is still going more slowly than I’d like, but… I always hope I’m about to turn a corner and speed up and one of these days, I will. In fact, I’ve got another deadline to shoot for (having blown past the original), so I will be doing everything I can to get this done ASAP. If anyone knows how to put more hours in the day, or days in the week, please let me know!</p><p>Since my last newsletter, I’ve written chapters on: arrays and objects (Chapter 6); functions (Chapter 7); and events (Chapter 8). Next is Chapter 9, on the browser (including CSS and DOM manipulation), Chapter 10, on forms, and Chapter 11, on Ajax. With the core concepts of JavaScript behind me (really, Chapters 4-7), these chapters are getting into more interesting and useful stuff. For example, two events have been used ever since Chapter 2, but now the examples can take advantage of other events. And although most of the chapters in the book thus far use an HTML form is some way, the forms chapter can now be more of a “cookbook” type chapter, explaining how to best work with specific form element types.</p><p>The third part of the book, beginning with Chapter 13, is still somewhat up in the air. There will be a chapter on frameworks, one on HTML5 and JavaScript, and another on advanced programming. Depending upon time and space, I’ll do a chapter on libraries (individual libraries, as opposed to frameworks), server-side JavaScript, and JavaScript for mobile apps.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/11/20/what-is-larry-thinking-47-random-monkey-appearances/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Adobe&#8217;s Significant Flash and Flex Changes</title><link>http://www.larryullman.com/2011/11/17/adobes-significant-flash-and-flex-changes/</link> <comments>http://www.larryullman.com/2011/11/17/adobes-significant-flash-and-flex-changes/#comments</comments> <pubDate>Thu, 17 Nov 2011 22:12:49 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[adobe]]></category> <category><![CDATA[flash]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2864</guid> <description><![CDATA[Last week, or thereabouts, Adobe announced that it was discontinuing support for Flash on mobile devices. This is, by all accounts, a wave of the white flag in Adobe&#8217;s battle against Apple and its iOS devices (if only Steve Jobs were alive today to celebrate). I didn&#8217;t think too much of that decision: it does [...]]]></description> <content:encoded><![CDATA[<p>Last week, or thereabouts, <a
href="http://www.adobe.com">Adobe</a> announced that it was discontinuing support for <a
href="http://adobe.com/go/flash">Flash</a> on mobile devices. This is, by all accounts, a wave of the white flag in Adobe&#8217;s battle against <a
href="http://www.apple.com">Apple</a> and its iOS devices (if only Steve Jobs were alive today to celebrate). I didn&#8217;t think too much of that decision: it does make sense to use HTML5 or native apps for dynamic content to be run on mobile devices anyway. And Flash would still continue to run on desktops, where something like 99% of browsers have the plug-in and 90-some% of video is run through Flash. Flash is such a large component of Adobe&#8217;s various technologies that I can&#8217;t imagine Adobe leaving it behind.</p><p>And then Adobe announced today that it was offering <a
href="http://adobe.com/go/flex">Flex</a> to the <a
href="http://www.apache.org">Apache Software Foundation</a> (managers of the ubiquitous <a
href="http://httpd.apache.org">Apache Web server</a>, among other projects).  Apache will need to vote on whether to accept Flex or not. This announcement does surprise me, as Flex is used not only for Flash creation, but also desktop and mobile application development via the <a
href="http://www.adobe.com/go/air">AIR</a> platform. Adobe says it will continue to support Flash and Flex, but clearly Adobe is moving more towards HTML5.</p><p>An interesting, and rather big, development. One does not normally think of a technology with such a large market share being outright dropped. We shall see how this plays out&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/11/17/adobes-significant-flash-and-flex-changes/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>What Is Larry Thinking? #43 =&gt; Future Tech</title><link>http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/</link> <comments>http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#comments</comments> <pubDate>Sun, 31 Jul 2011 01:44:33 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[app]]></category> <category><![CDATA[book]]></category> <category><![CDATA[css3]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[flash builder]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[modernizr]]></category> <category><![CDATA[newsletter]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2692</guid> <description><![CDATA[In this edition… About This Newsletter What Were You Thinking? =&#62; Doing What I Do On the Web =&#62; Flash Builder 4.5 for PHP On the Web =&#62; The Modernizr JavaScript Library Q&#38;A =&#62; What Do You Think About HTML5, CSS3, and the Future? Q&#38;A =&#62; Where Are Your Thoughts on HTML5, Browsers, and Mobile [...]]]></description> <content:encoded><![CDATA[<p>In this edition…</p><ul><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#about">About This Newsletter</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#you">What Were You Thinking? =&gt; Doing What I Do</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#web1">On the Web =&gt; Flash Builder 4.5 for PHP</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#web2">On the Web =&gt; The Modernizr JavaScript Library</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#qa1">Q&amp;A =&gt; What Do You Think About HTML5, CSS3, and the Future?</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#qa2">Q&amp;A =&gt; Where Are Your Thoughts on HTML5, Browsers, and Mobile Devices?</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#thinking">What is Larry Thinking =&gt; Quantum Computing</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#giveaway">Book Giveaway =&gt; &#8220;PHP for the Web: Visual QuickStart Guide&#8221; and &#8220;Effortless Flex 4 Development&#8221;</a></li><li><a
href="http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/#news">Larry Ullman&#8217;s Book News =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; (4th Edition) and &#8220;Modern JavaScript&#8221;</a></li></ul><p><span
id="more-2692"></span></p><h2 id="about">About This Newsletter</h2><p>Hello, hello, hello. For those of you in the United States, I hope you&#8217;re reading this in a quiet, air conditioned room (it&#8217;s been a brutally hot summer here in the states)! The three weeks since the last newsletter went by quickly, so much so that it&#8217;s actually been about four weeks! This newsletter begins with a reader response to my extended &#8220;Careers in IT&#8221;/&#8221;Doing What I Do&#8221; series, posted in the <a
href="http://www.larryullman.com/tag/newsletter/">past several newsletters</a>. Next you&#8217;ll find references to a few interesting things online, followed by answers to some questions I&#8217;ve received (thanks for those!). At the conclusion of the newsletter, there&#8217;s a blip about <em>quantum computing</em>, stemming from a fascinating article in <em>The New Yorker</em> a couple months back. All in all, this newsletter is largely about <em>future tech</em>. And, per usual, the newsletter ends with news about my forthcoming books. Oh, and there&#8217;s a book giveaway, too, with another one to follow in about a month or so.</p><p>As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!</p><h2 id="you">What Were You Thinking? =&gt; Doing What I Do</h2><p>Over <a
href="http://www.larryullman.com/tag/newsletter/">several issues of this newsletter</a>, I discussed careers in IT and doing what I do. Something I&#8217;ve mentioned before is that a great thing about working in IT is that you can imagine, and realize, your own projects. This is not something that architects or doctors can do (not ethically, at least!). Specifically I mentioned that you&#8217;re able to try to create your own Next Big Thing, and can often do so with little introductory cost. Ross replied with a good point about how &#8220;aiming for &#8216;The Next Big Thing&#8217; may skew the discussion a bit&#8221;. There are lots of levels of success, many of them far more attainable than trying to earn yourself billionaire status. Ross says that he tries to objectively analyze a project, determining the likelihood of making money and, at what level. Having a sense of that makes it easier for him to adjust the risk—financial and otherwise—he takes accordingly. The question Ross asks himself is &#8220;Can a creation be profitable and sustainable, and do the finances work [for the creator's] personal situation?&#8221;</p><p>My thanks to Ross for this input, and I hope I didn&#8217;t badly misrepresent his perspective. I agree that it&#8217;s important to look at projects not just in terms of how financially successful they can be, but also in terms of whether the reasonable estimate of success matches the amount of personal risk. And, Ross&#8217;s bigger point is that there are multiple goals one can shoot for, many of them far more attainable than others.</p><p>I would also point out that, so long as the personal risk and loss isn&#8217;t too great, there&#8217;s a lot of value that can be gained through failure. Not that I like it when projects fail, but as Walter Brunell said, &#8220;Failure is the tuition you pay for success.&#8221;</p><h2 id="web1">On the Web =&gt; Flash Builder 4.5 for PHP</h2><p>Version 4.5 of the <a
href="http://www.adobe.com/products/flex/">Flex framework</a> makes it easier to develop applications destined for mobile devices, but version 4.5 of the corresponding <a
href="http://www.adobe.com/products/flash-builder.html">Flash Builder IDE</a> also comes with a nice bonus: even better integration with <a
href="http://www.php.net">PHP</a>.</p><p>PHP is my Web programming language of choice, and in version 4 of the Flex framework and the Flash Builder IDE, <a
href="http://www.adobe.com">Adobe</a> made a purposeful attempt to increase usage of Flex among the PHP community (this is also when I really began embracing Flex). For example, Flash Builder 4 comes with a wizard for connecting to PHP scripts, including creation of boilerplate PHP code. The new Flash Builder 4.5 IDE, recently released, comes in a couple of versions: <em>Standard</em>, <em>Premium</em> (with extra wizards, debugging tools, and profiling utilities), <em>Flash Builder 4.5 for PHP Standard</em>, and <em>Flash Builder 4.5 for PHP Premium</em>. The Flash Builder 4.5 for PHP versions were created in conjunction with <a
href="http://www.zend.com">Zend</a>, and include an integrated version of <a
href="http://www.zend.com/en/products/studio/">Zend Studio 8</a>. As both Flash Builder and Zend Studio are built upon <a
href="http://www.eclipse.org/">Eclipse</a>, this is a natural fit. And Flash Builder 4 started using <a
href="http://framework.zend.com/download/amf">Zend AMF</a> to transmit data in Action Message Format between Flash applications and PHP scripts; the two companies have been working together for a while.</p><p>Needless to say, if you&#8217;re already doing Flex and PHP development (like I am), Flash Builder 4.5 for PHP is the perfect tool. The ability to do all the programming, both server-side PHP and client-side Flex, in one application, will save a lot of time. Just the debugging alone…Flash Builder 4.5 for PHP will let you debug both the PHP script and the Flash application without changing programs!</p><p>In terms of pricing, Flash Builder 4.5 Standard is $249.00, if purchased new, and Zend Studio is $299.00 (all prices are in US dollars and accurate as I write this). Flash Builder 4.5 for PHP Standard is $399.00, so there&#8217;s a decent price break compared to having the applications individually.</p><p>For a good, quick introduction to Flash Builder 4.5 for PHP, see <a
href="http://www.adobe.com/devnet/flash-builder/articles/introducing-flashbuilder45-php.html">this article at the Adobe Developer Connection</a>.</p><h2 id="web2">On the Web =&gt; The Modernizr JavaScript Library</h2><p>HTML5 and CSS3 add useful and cool new features, but, as always, browser support is still an issue. If you want to develop sites using cutting edge options, while still being backwards-compatible, a great tool to use is <a
href="http://www.modernizr.com/">Modernizr</a>. The concept is simple (and brilliant): Modernizr identifies what features the user&#8217;s browser supports and adds corresponding classes to the opening HTML tag. In your CSS, you can then add styling to just those classes. The result is that browsers that support, say, <strong>@font-face</strong> or <strong>canvas</strong>, will get the stylized version, and browsers that don&#8217;t, won&#8217;t. Modernizr also creates a JavaScript object that represents the browser&#8217;s capabilities. This object could be used to customize your JavaScript accordingly, too. And Modernizr has IE-specific tools, that add HTML5-like functionality to that browser.</p><p>For good, quick introductions, see the <a
href="http://www.modernizr.com/">Modernizr site</a>, <a
href="http://www.alistapart.com/articles/taking-advantage-of-html5-and-css3-with-modernizr/">this article at A List Apart</a>, and <a
href="http://webdesignernotebook.com/css/how-to-use-modernizr/">this article at Web Designer Notebook</a>. Modernizr just came out in version 2 and is open source.</p><h2 id="qa1">Q&amp;A =&gt; What Do You Think About HTML5, CSS3, and the Future?</h2><p>HTML5 has received a ton of press and talk over the past few months and it definitely needs to be on any Web developer&#8217;s radar. Martin wrote in, asking me</p><blockquote><p>Are you excited by HTML5, CSS3, the W3C&#8217;s direction of web standards and ultimately the future of where the web is going?  How do you perceive PHP and MySQL adapting within this ever changing environment?</p></blockquote><p>The two simple answers are, &#8220;I&#8217;m kind of excited&#8221; and &#8220;I don&#8217;t think these changes will have a huge impact on PHP and MySQL&#8221;. As for the first answer, I&#8217;m not trying to be cynical or jaded here, but we&#8217;ve got to keep in mind the glacial pace with which new standards are adapted by corporations. It will be years before HTML5 will be reliable for all the major browsers. And one must keep in mind that the version of HTML5 that will eventually be formalized will undoubtedly be different than the version being discussed today. There are some great new features suggested in HTML5, such as local storage, an email input type, support for regular expressions, and many new elements, but it&#8217;ll be eons before those features are going to be universally (or universally-enough) usable in your sites. Now, tools such as <a
href="http://www.modernizr.com/">Modernizr</a> (just mentioned) help, and going ahead and adopting HTML5 today, with the knowledge that the site won&#8217;t work the same in all browsers, is only a problem if universal support is a goal; cutting-edge sites quite blatantly insist that visitors use a good, modern browser.</p><p>But the HTML5 proposal is a good thing, as it acknowledges what today&#8217;s Web is compared to the Web that was envisioned when HTML was created. On the other hand, where will the Web be in years from now when HTML5 is finally adopted?</p><p>I&#8217;m intrigued by some of the additions in CSS3, but not being a designer, they don&#8217;t have as much of an impact on me as HTML5.</p><p>As for PHP and MySQL adapting to HTML5, I don&#8217;t see that being much of an issue. PHP and MySQL are server-side technologies; HTML5 is the very definition of a client-side technology. For the most part, switching a site to HTML5 will have no more impact on the server side of things than if you switched from HTML 4.01 to XHMTL 1.1. Now, HTML5 does support client-side storage, so that may affect how you do some things, but I don&#8217;t think the impact on PHP and MySQL will be significant.</p><h2 id="qa2">Q&amp;A =&gt; Where Are Your Thoughts on HTML5, Browsers, and Mobile Devices?</h2><p>On a similar note, Jorge sent in a question, asking me what I think of HTML5, both with respect to its impact on browsers and mobile devices (smart phones, tablets, etc.). In terms of browsers, I&#8217;ve just addressed that in reply to Martin&#8217;s question, but HTML5 for mobile devices is an intriguing prospect. The difference is this: the mobile platform itself means that mobile users will always have current, HTML5-capable Web browsers. I recently read an interesting article at the <a
href="http://www.chicagotribune.com">Chicago Tribune&#8217;s Web site</a> (my home town paper) about using HTML5 for mobile app development (the article does not seem to be currently available). <a
href="http://www.ft.com">The Financial Times</a> and <a
href="http://www.espn.com">ESPN</a> just released new applications for mobile devices, but instead of creating standalone apps, they used HTML5 to make Web apps. HTML5 provides all the functionality the apps needed, such as content storage for offline reading, video support, and the ability to respond to touch and gestures. By creating a Web app, one application can reliably work on all the platforms, and the proceeds from the app do not have to be split with Apple or the Android store.</p><p>In no way am I suggesting that HTML5 is the only smart way to create mobile apps—there&#8217;s still plenty HTML5 can&#8217;t do, but this is an interesting turn of events that I, for one, didn&#8217;t see coming.</p><h2 id="thinking">What is Larry Thinking? =&gt; Quantum Computing</h2><p>In the May 2, 2011 issue of <em>The New Yorker</em> (one of my longtime favorite periodicals), there was a fascinating article by Rivka Galchen, titled &#8220;<a
href="http://www.newyorker.com/reporting/2011/05/02/110502fa_fact_galchen">Dream Machine</a>&#8220;. The article discusses the topic of <em>quantum computing</em>, which I believe will—someday—have a huge impact on our lives. I&#8217;ll try to summarize the key points as best as I can, considering I have no science background, but you can check out the article at a library or pay to read it online if you want the full story. Note that text in quotation marks below come verbatim from the article, starting with this assertion:</p><blockquote><p>&#8220;With one millionth of the hardware of an ordinary laptop, a quantum computer could store as many bits of information as there are particles in the universe.&#8221;</p></blockquote><p>Computers being used today are binary: at the most basic, fundamental level, there are <em>bits</em>, each bit representing either 0 or 1. Everything you do on your computer comes down to zeros and ones. These computers are based upon classical mechanics, discovered by Isaac Newton, although few of us ever think of that when surfing the Web, I&#8217;m sure. Classical mechanics, also called <em>classical physics</em>, still accurately describe much of the physical world at large, but on an atomic level, classical mechanics don&#8217;t hold up so well. <em>Quantum mechanics</em>, or <em>quantum physics</em>, does a better job of explaining what&#8217;s going on in the atomic and sub-atomic levels.</p><p>One principle of <a
href="http://en.wikipedia.org/wiki/Quantum_mechanics">quantum mechanics</a> is that the same particle can exist in two places at once (this is referred to as <em>superposition</em>). A second principle is that two particles can be <em>entangled</em>: they can communicate with each other &#8220;regardless of their distance in space and time&#8221;. Whoa. Taking these two principles, a quantum computer is built using quantum bits, or <em>qubits</em>, instead of regular bits. Unlike a regular bit, which can represent 0 or 1, a qubit can also represent <em>0 and 1</em>, thanks to superposition. Whoa. Thanks to entanglement, qubits can &#8220;instantly share information&#8221;. Whereas data in a traditional computer must be transmitted from bit to bit, qubits will communicate instantly (and in an un-observable manner). Whoa.</p><p>This may all sound quite theoretical, too philosophical to be useful. But venture capital is going into this area, trying to build quantum computers for specific purposes, and Google&#8217;s been striving towards quantum-computing since 2006. Yale has already created a two-qubit computer, and Oxford an eight-qubit one. An estimate is that fifty to a hundred qubits would be as powerful as today&#8217;s laptop.</p><p>To test the capability of quantum computers, researchers try different tests, such as <a
href="http://en.wikipedia.org/wiki/Grover's_algorithm">Grover&#8217;s algorithm</a>, which is a quantum algorithm for searching an unordered database. A test of Grover&#8217;s algorithm can be as simple as four-card monte: four cards are face down, one is a queen, how many steps does it take to find the queen? A conventional computer using a straightforward algorithm finds the queen in an average of about 2.25 steps. (You could probably write that program yourself: check the first card; if that&#8217;s not it, check the second; if that&#8217;s not it, check the third; if that&#8217;s not it, then you know it&#8217;s the fourth. There are three steps, maximum, and sometimes you&#8217;ll get luckier.) <strong>A quantum computer can solve this puzzle in just one step.</strong> (The article explains how, but the explanation is complicated.)</p><p>That particular example may not sound that useful, so let&#8217;s turn to <a
href="http://en.wikipedia.org/wiki/Prime_factorization">prime factorization</a> (or <em>integer factorization</em>). Take two prime numbers and multiply them: say, 3 and 7 results in 21. You and I know looking at that number–21–that it is the product of 3 and 7. In an instant, most of us can reverse-engineer that calculation. But as the two original prime numbers get larger, it becomes exponentially harder to determine what two primes were used to make the resulting product. In 2009, researchers were able to determine the factors of a 232-digit number. It took hundreds of machines two years to do that. That particular number required 768-bits to be represented in the computer. The researchers estimated that just changing to a 1024-bit number would be about one thousand times harder. But why is this significant? Because prime factorization is the basis of modern cryptography, such as RSA. <strong>A conventional computer cannot reasonably break encryption schemes based upon prime factorization, but a quantum computer could break one in an afternoon.</strong></p><p>This article on quantum computing was a really fascinating read, in my opinion, and I encourage you to check it out. I hope that my synopsis has been intriguing enough and sufficiently accurate. The article goes into further details about some of the key people involved in these fields, the histories of computers and physics, and some of the technical challenges to quantum computers, like qubit <em>fidelity</em> (e.g., the two-qubit computer solves the four-card monte puzzle in one step, but is only correct 80% of the time). And I didn&#8217;t touch upon the <em>Many Worlds</em> theory, which suggests that perhaps quantum computers function by performing calculations in parallel universes! Whoa.</p><h2 id="giveaway">Book Giveaway =&gt; &#8220;PHP for the Web: Visual QuickStart Guide&#8221; and &#8220;Effortless Flex 4 Development&#8221;</h2><p><em>You must be subscribed to the newsletter to qualify for book giveaways.</em></p><p><strong>Larry Ullman&#8217;s Book News =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; (4th Edition) and &#8220;Modern JavaScript&#8221;</strong></p><p>The complete draft of the fourth edition of my &#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide&#8221; book has now been submitted to the publisher and I&#8217;ve completed the rewrites on most of the book as well. Now I need to review the PDF layouts of each chapter, and then it&#8217;s off to the printer. Well, after the indexer and other important people take a crack at it first…</p><p>Some key new features in this edition will be:</p><ul><li>Extra material on database design, JOINs, advanced SQL, and advanced MySQL functions</li><li>About a dozen pages on server (i.e., <a
href="http://httpd.apache.org">Apache</a>) configuration and manipulation</li><li>A new chapter introducing the <a
href="http://jquery.com">jQuery</a> JavaScript framework, walking through form validation, DOM manipulation, and Ajax</li><li>A new chapter introducing Object-Oriented Programming (OOP) in PHP, focusing on the basic syntax and principles, with examples recreating earlier MySQL-based scripts and another example performing date and time validation and manipulation</li></ul><p>The final page count for the work I submitted isn&#8217;t in, but I <em>think</em> I should be able to get the extra material in there.</p><p>Along with the above, I&#8217;ve removed references to PHP 6 (my &#8220;Dewey Defeats Truman&#8221; moment, as <a
href="http://www.larryullman.com/forums/index.php?/topic/450-there-is-no-php-6-version-why-then-does-this-book-has-php6-as-title/">Paul so brilliantly named it</a>), changed a couple of the examples, fixed any minor problems, and added a &#8220;Review and Pursue&#8221; section to the end of each chapter. That section, as in the fourth edition of my &#8220;PHP for the Web: Visual QuickStart Guide&#8221; book, has review questions on the material just introduced and prompts for how you can extend the newfound knowledge.</p><p>For the first time ever, I&#8217;m doing screencasts to accompany the text. These videos will be embedded in some electronic versions of the book and made available separately (as I understand it). Most of the videos demonstrate and expand upon specific book content. I&#8217;m in the process of doing those videos over the next month.</p><p>The book should be available in a store near you, and online, within two months at the latest.</p><p>In August, I officially turn my full-time attention to my next book, &#8220;Modern JavaScript.&#8221; Whohoo!</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/07/31/what-is-larry-thinking-43-future-tech/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>What is Larry Thinking? #42 =&gt; Doing What I Do, Part 3</title><link>http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/</link> <comments>http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#comments</comments> <pubDate>Mon, 04 Jul 2011 21:02:19 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Adobe AIR]]></category> <category><![CDATA[Flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[app]]></category> <category><![CDATA[book]]></category> <category><![CDATA[ecom]]></category> <category><![CDATA[flash builder]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[newsletter]]></category> <category><![CDATA[phpmsyql4]]></category> <category><![CDATA[phpvqs4]]></category> <category><![CDATA[stored procedures]]></category> <category><![CDATA[writing]]></category> <category><![CDATA[yii]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2674</guid> <description><![CDATA[In this edition… About This Newsletter What Were You Thinking? =&#62; The JavaScript Book On the Web =&#62; Flash Builder 4.5/Flex 4.5 for Mobile Apps On the Blog =&#62; Cookies and Sessions in Yii On the Forum =&#62; FALSE Comparisons in PHP Q&#38;A =&#62; Could You Say More About Stored Procedures? What is Larry Thinking [...]]]></description> <content:encoded><![CDATA[<p>In this edition…</p><ul><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#about">About This Newsletter</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#you">What Were You Thinking? =&gt; The JavaScript Book</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#web">On the Web =&gt; Flash Builder 4.5/Flex 4.5 for Mobile Apps</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#blog">On the Blog =&gt; Cookies and Sessions in Yii</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#forum">On the Forum =&gt; FALSE Comparisons in PHP</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#qa">Q&amp;A =&gt; Could You Say More About Stored Procedures?</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#thinking">What is Larry Thinking =&gt; Doing What I Do: Web Development</a></li><li><a
href="http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/#news">Larry Ullman&#8217;s Book News =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; (4th Edition) and &#8220;Modern JavaScript: Develop and Design&#8221;</a></li></ul><p><span
id="more-2674"></span></p><h2 id="about">About This Newsletter</h2><p>Another three weeks(-ish), another newsletter! It may only matter to me, but I&#8217;m happy to say that since I started using <a
href="http://www.literatureandlatte.com/scrivener.php">Scrivener</a> to write this newsletter (in late 2010), I&#8217;ve done a much better job in getting these out regularly. Although, since they only go out once a month, or slightly better, it may always seem to you that the newsletters come from out of the blue. Anyway&#8230;in this newsletter I present a random collection of stuff, including the conclusion of my on-going series on building a career in IT. In my next newsletter, I plan on speaking, briefly, about quantum computing, having recently read a <em>fascinating</em> article on the subject.</p><p>As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!</p><h2 id="you">What Were You Thinking? =&gt; The JavaScript Book</h2><p>In the previous newsletter, I <a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#you">posted a question</a> about whether it matters to you if I self-publish my intended JavaScript book or if I use a traditional publisher. I also asked the general question as to what readers look for in a book, beyond the content and perhaps writer. There was an excellent response and I thank everyone for their thoughts.</p><p>The bottom line was that most people don&#8217;t care about the publisher. Some people specifically like, say, O&#8217;Reilly books or the Visual Quick* Series, but many don&#8217;t pay much attention to the publisher (I&#8217;ve always suspected that many readers don&#8217;t pay much attention to who the writer is either). The strongest feedback was just for it being made available in specific formats—PDF, print, what-have-you, and that it be of good quality.</p><p>It was also nice, and quite flattering, to hear many people express their interest in purchasing the book, regardless of whether I self-publish or use a traditional publisher. I am, indeed, fortunate to have the readership that I do.</p><p>Thanks again to everyone that responded and to those of you interested in this book. The actual decision regarding this JavaScript book can be found in the &#8220;Larry Ullman&#8217;s Book News&#8221; section at the end of this newsletter (this is called &#8220;burying the lead&#8221;!).</p><h2 id="web">On the Web =&gt; Flash Builder 4.5/Flex 4.5 for Mobile Apps</h2><p>Version 4.5 of both the Flex framework and the Flash Builder IDE just came out and the outlook is very exciting. As announced some time ago, the focus in Flex 4.5 is on developing for mobile apps. This means a new wave of components optimized for mobile platforms. That alone might sound &#8220;kind of cool&#8221;, but this release is much, much bigger than that.</p><p>Instead of using Flex to write Flash content that runs in a Web browser in a mobile device (but not on Apple devices), thanks to <a
href="http://www.adobe.com/go/air/">Adobe AIR 2.6</a>, <em>you&#8217;ll be able to write true mobile apps in Flex</em>. With the initial release, you&#8217;re able to create apps for the Google Android platform (the largest platform, in terms of sales of mobile devices today). Version 4.5.1 was just released, which adds support for iOS (iPod Touch, iPhone, and iPad) devices and the Blackberry Tablet OS. To summarize:</p><blockquote><p>If you know Flex, you can create mobile applications that run on all major mobile platforms in no time at all!</p></blockquote><p>This could not come at a better time for me. I have a couple of mobile app ideas that I want to develop and was planning on learning how to do so later this year (yes, yes, I&#8217;m totally on the cutting edge of the mobile app craze, eh?). I was still hemming and hawing over whether to pursue the iOS route, which would be natural for me (I primarily use Macs and am comfortable with the C family of languages), or go the Google Android route, which would be harder (Java is the default language there), but technically has a broader market. And now, thanks to Flex 4.5 and Adobe AIR, I won&#8217;t have to choose between them.</p><p>To see the development process, and the output, in action, check out <a
href="http://tv.adobe.com/watch/adobe-technology-sneaks-2011/sneak-peek-of-mobile-application-development-with-flex-and-flash-builder/">this sneak peek video at Adobe</a>. There&#8217;s also <a
href="http://www.adobe.com/devnet/flex/articles/mobile-development-flex-flashbuilder.html">this pretty good article</a> on mobile development using Flex and Flash Builder. It&#8217;s a very impressive concept and, as far as I know, the only &#8220;write once, run everywhere&#8221; development solution for mobile apps. This, of course, is the promise of Adobe AIR itself, which allows you to write one application that can run on multiple operating systems (I still seem to be a bigger fan of AIR than the world at large).</p><h2 id="blog">On the Blog =&gt; Cookies and Sessions in Yii</h2><p>In my ever-ongoing series on the <a
href="http://www.yiiframework.com">Yii framework</a>, I&#8217;ve recently written two postings on managing state using the framework. The <a
href="http://www.larryullman.com/2011/05/03/using-sessions-with-the-yii-framework/">first is on sessions</a>; the <a
href="http://www.larryullman.com/2011/06/04/using-cookies-in-the-yii-framework/">second on cookies</a>. Neither is particularly difficult to do using Yii, once you know the right code, of course. With cookies, Yii has built-in extra security measures you can take, for example, to help prevent Cross-Site Request Forgery (CSRF) attacks.</p><h2 id="forum">On the Forum =&gt; FALSE Comparisons in PHP</h2><p>I&#8217;m hoping that you&#8217;ll take this as a comfort, but you should be aware that we all, no matter how long we&#8217;ve been programming, are capable of creating bugs when programming. Through the <a
href="http://www.larryullman.com/forums/index.php?/topic/301-problems-with-ecommerce-example-2-demo-site/">keen testing of a reader</a>, a bug was caught in the second example site from my &#8220;<a
href="http://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/">Effortless E-Commerce with PHP and MySQL</a>&#8221; book. It&#8217;s a common enough mistake that I should have caught it myself and yet&#8230; You can read my formal explanation regarding the specific code <a
href="http://www.larryullman.com/forums/index.php?/topic/301-problems-with-ecommerce-example-2-demo-site/page__pid__2163#entry2163">in the forum</a>, but the premise is this:</p><p>Say you have the conditional <code>if ($var) {</code>. That conditional will be TRUE so long as <strong>$var</strong> has a TRUE value. But what is a TRUE value? It&#8217;s easiest to understand what a TRUE value is by knowing what a FALSE value is. These are all FALSE values:</p><ul><li>FALSE (case-insensitive)</li><li>NULL</li><li>(No actual value)</li><li>&#8220;&#8221; (An empty string)</li><li>0</li><li>0.0</li><li>‘0&#8242;</li></ul><p>There are a couple of other higher-end FALSEhoods, such as an empty array. It should be fairly obvious that FALSE, NULL, no actual value, and an empty string are all FALSE values; the bug arises when you forget that zero, in any form, is also FALSE. And here&#8217;s how it can manifest itself as a bug (this is a different example than the one in the book and referenced in the forum)…</p><p>The <strong>stripos()</strong> function is used to identify whether or not string Needle is found within another string Haystack. If the Needle is not found, <strong>stripos()</strong> returns FALSE. If the Needle is found, <strong>stripos()</strong> <em>does not return TRUE</em>, but rather <em>returns the indexed position where Needle begins in Haystack</em>. This code, therefore, could be a problem:</p><p><code>if (stripos($haystack, $needle)) {…</code></p><p>The intent is to see if <strong>$needle</strong> exists in <strong>$haystack</strong>. However, if <strong>$needle</strong> is the first part of <strong>$haystack</strong>, <strong>stripos()</strong> will return 0, which will be interpreted by that conditional as FALSE. The bug-free solution is to change the conditional to test if the value returned by <strong>stripos()</strong> is not identical to FALSE:</p><p><code>if (stripos($haystack, $needle) !== false) {…</code></p><p>Note that you have to explicitly use the <em>not identical</em> operator (<strong>!==</strong>), as using the <em>not equal</em> operator (<strong>!=</strong>) would again be a bug, as the zero returned by the function would, in fact, be equal (but not identical) to FALSE.</p><p>Again, I hope you can take some solace in knowing that we all make mistakes, no matter the level of experience (or maybe that&#8217;s depressing?). I personally find it frustrating to make mistakes that I&#8217;m already aware of as a possibility, but on the bright side, making mistakes you know about makes them easier to fix!</p><h2 id="qa">Q&amp;A =&gt; Could You Say More About Stored Procedures?</h2><p>Oguz had prompted me to write a bit about stored procedures in general and in MySQL in particular. Stored procedures are one of those higher-end database concepts which you may have heard about but never really used (other examples include VIEWs and UNIONs). I previously wrote about stored procedures in my &#8220;<a
href="http://www.larryullman.com/books/mysql-visual-quickstart-guide-2nd-edition/">MySQL: Visual QuickStart Guide</a>&#8221; and my &#8220;<a
href="http://www.larryullman.com/books/php-5-advanced-visual-quickpro-guide-2nd-edition/">PHP 5 Advanced: Visual QuickPro Guide</a>&#8220;, and then relied upon them extensively in the second example of my &#8220;<a
href="http://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/">Effortless E-Commerce with PHP and MySQL</a>&#8220;.</p><p>Both <em>stored procedures</em> and <em>stored functions</em> fall under the category of <a
href="http://dev.mysql.com/doc/refman/5.1/en/stored-routines.html">stored routines</a>, added to MySQL in version 5.1 (and MySQL is still adding features in this area). A stored routine is simply a memorized set of SQL queries and code. Think of it like taking any block of PHP code that interacts with a database, has conditionals, does something with the query data, etc., but store all of that in the database itself. The primary difference between a stored procedure and a stored function is that a stored <em>function</em> can return only a single value whereas a stored <em>procedure</em> can return an entire result set (i.e., multiple rows of multiple columns of data). For example, in &#8220;PHP 5 Advanced&#8221;, a stored function is created that returns the distance in miles between two points on the globe, which involves complicated trigonometry using latitude and longitude. A call to that function is then part of a standard SELECT query, as if it were any other predefined MySQL function. Conversely, in &#8220;Effortless E-Commerce with PHP and MySQL&#8221;, stored procedures are used to update shopping carts, return a list of sale items, and much more. Both types of routines can also take arguments, just like functions in PHP.</p><p>Stored routines offer several benefits, the most important of which is improved security. Because all of the database references—table and column names—are in the stored routines, a PHP script using those routines need not have any knowledge of the particulars of the database. Further, a stored routine can use its arguments in queries with the same security as <em>prepared statements</em>, thereby preventing SQL injection attacks. Applications with the highest level of security requirements, such as banking, rely upon stored routines.</p><p>You can also get better performance using stored routines, both because the routines can be cached and because less data has to be transferred to the database (just the data itself gets transferred; all the SQL is already in the database). Using stored routines also offers improved application portability, in that many different types of clients—PHP scripts, command line tools, GUI applications, etc.—can make use of the same stored routines.</p><p>There are arguments against using stored routines, too. For starters, you&#8217;ll need a relatively current version of MySQL, and the ability to create an execute stored routines (these are permissions not necessarily offered by, for example, shared hosting environments). Stored routines also marry your applications to specific database applications (e.g., MySQL or Oracle), although stored routines are part of the SQL standard and may be somewhat translatable from one database application to the next. And, as with most things, there&#8217;s a learning curve involved and debugging applications that use stored routines becomes a bit harder.</p><p>You can find out more about stored routines in the books I mentioned, in the <a
href="http://dev.mysql.com/doc/refman/5.1/en/stored-routines.html">MySQL manual&#8217;s main page for stored routines</a>, and in the stored routines <a
href="http://dev.mysql.com/doc/refman/5.1/en/faqs-stored-procs.html">FAQ</a> and <a
href="http://dev.mysql.com/doc/refman/5.1/en/stored-program-restrictions.html">restrictions</a> pages of the MySQL manual.</p><h2 id="thinking">What is Larry Thinking? =&gt; Doing What I Do: Web Development</h2><p>In this newsletter I&#8217;m finishing what became a series on IT careers. I first wrote about becoming a better programmer, in two parts(<a
href="http://www.larryullman.com/2011/02/01/what-is-larry-thinking-36-becoming-a-better-programmer-and-more/#thinking">1</a> and <a
href="http://www.larryullman.com/2011/02/25/what-is-larry-thinking-37-becoming-a-better-programmer-part-2/#thinking">2</a>). Then I wrote about <a
href="http://www.larryullman.com/2011/03/22/what-is-larry-thinking-38-building-a-career/#thinking">building a career</a> and <a
href="http://www.larryullman.com/2011/04/16/what-is-larry-thinking-39-how-i-got-here-and-the-future/#thinking">how I got here</a>. Next, I wrote about <a
href="http://www.larryullman.com/2011/05/12/what-is-larry-thinking-40-doing-what-i-do-part-1/#thinking">some of the specifics of what I do</a>, focussing on the writing side. In the <a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#thinking">previous newsletter</a>, I discussed training. This leaves me with the last thing that I do: Web and application development (i.e., programming).</p><p>Web and application development jobs have a wide range of possibilities with a wide range of potential income. Small, simple jobs may pay a few hundred dollars; big, complex, and well-funded projects can pay tens of thousands or hundreds of thousands. Getting any job, regardless of size, is a two-step process: 1) finding out about the job; and, 2) convincing the client to hire you.</p><p>There are online sites for finding projects, but you&#8217;ll be competing with everyone else there. You&#8217;ll have better luck by networking: connecting with people, businesses, and organizations that might be able to make use of your abilities. For example, for a couple of years I was the outside programmer that did the dynamic functionality for a graphic designer. She got the projects, managed the clients, the contracts, and the billing, and I just did my share of the work. A perfect arrangement for me! Local user groups, schools, and similar communities can be good ways to hook up with people in a casual way that might pan out down the line.</p><p>As for convincing clients to hire you, the most important criteria in my mind are good communication skills. Everyone says that communication skills are important, but not that many people excel in this area, and way too many don&#8217;t even try to communicate well. <em>Be clear, responsive, and punctual in your communications!</em> Doing so demonstrates that you have a level of professionalism needed to do the work itself. If you can&#8217;t clearly express yourself in an email, if you fail to answer questions asked of you, or if you&#8217;re negligent in responding promptly, it suggests that the work you do will be poorly put together, will fail to meet expectations, and not be done on time, either.</p><p>Secondarily, you&#8217;ll need to have a portfolio showing what you&#8217;re capable of. If you don&#8217;t have a portfolio, then give them something that they can look at. One of my very first clients, for whom I&#8217;m still working, wanted a bit of JavaScript coding for his site. At that time I had no portfolio to show him, so as part of my bid, I did the work itself and presented that. Nothing more clearly indicates your ability to do a project than actually doing the project! Further, the client could also see, before he hired me, that the project would be finished quickly (because it already was). Yes, I ran the risk of making no money for my efforts, but at the time I needed the work and had to go out on a limb. It really panned out, and I would do it again if I felt I had to (arguably, I have had to in the past, as getting published involves some amount of writing on spec).</p><p>And this leads me to a point that you&#8217;ll (hopefully) learn in time as you grow your skills and your budget: you&#8217;ll always adjust your bids not just to the project and the client but to your situation. When I&#8217;m especially busy or if a project isn&#8217;t that interesting, clients will get the &#8220;I don&#8217;t really want to do this project but if I am going to do it, I&#8217;m going to get paid well&#8221; bid. When I&#8217;m not that busy or a project is interesting, I&#8217;ll provide a cheaper bid. Life is always a matter of time versus money, and the professional is constantly making adjustments along that scale.</p><p>As a final cornucopia of thoughts, first, don&#8217;t be afraid to overbid. Even if you&#8217;re desperate, you may really come to regret getting a project at a low bid. If anything, it tells you a lot about a client that wants the lowest price: you probably don&#8217;t want to work with people that want things on the cheap. There is no doubt you will sometimes make less money on a project than you should (and hopefully sometimes make more), but try not to plan on shortchanging yourself. For that matter, have a good contract in place with expectations clearly laid out so that you don&#8217;t get steamrolled.</p><p>Next, you could consider becoming a specialist in one area: CMS (e.g., Joomla), WordPress, etc. You run the risk of not being able to get work as easily, because you are so specialized, but you may also be able to make more money, and get better at a smaller set of skills faster, by narrowing your focus.</p><p>And lastly, if you&#8217;re working on a project and you&#8217;re having problems and aren&#8217;t going to make the deadline, handle the situation professionally. Never hide from clients, be as honest as you can, and always reply to emails promptly. For more strategies along these lines, check out <a
href="http://brainzooming.com/project-management-techniques-when-time-running-down/6869/">this nice article</a>.</p><p>So that&#8217;s it on my long series on building a career in IT. As happens with me, all the time, what started off as a simple idea expanded and expanded. I worry that I ran out of steam at the end here, but hopefully you&#8217;ve benefitted from this discussion somehow, and I&#8217;ve helped you, in whatever small way, in pursuing your dream of an IT career (as for me, my dream involves a hammock overlooking the Caribbean Sea).</p><h2 id="news">Larry Ullman&#8217;s Book News =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; (4th Edition) and &#8220;Modern JavaScript: Develop and Design&#8221;</h2><p>I&#8217;m very pleased to say that I&#8217;ve completed the first draft of the fourth edition of &#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide&#8221; (and by &#8220;first draft&#8221;, I mean the first draft submitted to the publisher; there are multiple writing drafts just to get to that point). As with the fourth edition of &#8220;<a
href="http://www.larryullman.com/books/php-for-the-web-visual-quickstart-guide-4th-edition/">PHP for the Web: Visual QuickStart Guide</a>&#8220;, I added a &#8220;Review and Pursue&#8221; section to the end of each chapter. I also expanded the coverage of SQL and MySQL, including much more on JOINs. One new chapter introduces the <a
href="http://www.jquery.com">jQuery</a> JavaScript framework, with examples of form validation and performing Ajax requests. Another new chapter introduces the fundamentals of Object-Oriented Programming, using the MySQL Improved extension for several examples, and the <a
href="http://www.php.net/datetime">DateTime</a> class for another. In the appendix, I&#8217;ve included a few pages on configuring the Apache Web server, providing the syntax for performing common tasks such as password protecting directories and URL rewriting.</p><p>Last, but not least, I am pleased to announce that I have in my hands a contract to write the book &#8220;Modern JavaScript: Develop and Design&#8221; for Peachpit Press. This is the publisher I&#8217;ve worked with the most, and so I&#8217;m quite comfortable with them. The book will be in a new series, titled &#8220;Develop and Design&#8221;, specifically created for code-based books (the first title in the series is on ActionScript). The series does <em>not</em> use the two-column format like the Visual QuickStart/QuickPro series (which some people like, some people don&#8217;t), and will be in full color, a first for me. The publisher has allotted me up to 600 pages, which is quite a lot, and by using a publisher, the book will have the widest possible availability (Peachpit Press really worked with me on making this happen). I&#8217;ll begin formally writing the book in late July or early August so that it comes out by the end of the year. Once again, my thanks to everyone for their interest in this book, and for all of the feedback.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/07/04/what-is-larry-thinking-42-doing-what-i-do-part-3/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>What is Larry Thinking? #41 =&gt; Doing What I Do, Part 2</title><link>http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/</link> <comments>http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#comments</comments> <pubDate>Thu, 09 Jun 2011 13:23:04 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Adobe AIR]]></category> <category><![CDATA[Flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[api]]></category> <category><![CDATA[book]]></category> <category><![CDATA[dragonfly]]></category> <category><![CDATA[newsletter]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[training]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2606</guid> <description><![CDATA[In this edition… About This Newsletter What Are You Thinking? =&#62; The JavaScript Book On the Web =&#62; Improving Application Performance On the Web =&#62; Opera Dragonfly On the Blog =&#62; UTC and Time Zone Support in MySQL On the Blog =&#62; How I Cut My Bandwidth in Half Q&#38;A =&#62; Should I use PHP [...]]]></description> <content:encoded><![CDATA[<p>In this edition…</p><ul><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#about">About This Newsletter</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#you">What Are You Thinking? =&gt; The JavaScript Book</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#web1">On the Web =&gt; Improving Application Performance</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#web2">On the Web =&gt; Opera Dragonfly</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#blog1">On the Blog =&gt; UTC and Time Zone Support in MySQL</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#blog2">On the Blog =&gt; How I Cut My Bandwidth in Half</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#qa">Q&amp;A =&gt; Should I use PHP or JavaScript to Handle API Data?</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#thinking">What is Larry Thinking =&gt; Doing What I Do: Training</a></li><li><a
href="http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/#news">Larry Ullman&#8217;s Book News =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; (4th Edition) and More!</a></li></ul><p><span
id="more-2606"></span></p><h2 id="about">About This Newsletter</h2><p>No overarching theme to this newsletter, just some things that have popped up over the past three weeks, plus a preview of my next few months with respect to the books I&#8217;ll be writing. This newsletter also continues my spontaneous series on pursuing careers in IT, specifically focusing on training and teaching.</p><p>As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!</p><h2 id="you">What Are You Thinking? =&gt; The JavaScript Book</h2><p>If you&#8217;ve been reading this newsletter for a while, you&#8217;re probably familiar with, if not sick of hearing about, my intent to self-publish a book on JavaScript (I&#8217;ve posted a rough <a
href="http://www.larryullman.com/2011/03/17/my-forthcoming-javascript-book-table-of-contents/">Table of Contents</a> and <a
href="http://www.larryullman.com/2011/03/15/previewing-my-forthcoming-javascript-book/">description</a> online). Part of the reason for self-publishing this particular book is that most every publisher already has their own JavaScript book already. Another part of the reason was to have the most control over the final product, both in terms of the content and the destination formats. I may or may not make more money self-publishing, so that&#8217;s not really a mitigating factor (I&#8217;ll make more per copy sold, electronic or print, but wouldn&#8217;t likely sell as many copies as I would through a publisher).</p><p>I&#8217;ve already started writing the book and done some research with respect to self-publishing, all with the hope of releasing the book some time this summer. In a surprising turn of events, a publisher has come to me wanting to put out the book. The publisher is very much willing to work with me on the concerns I have about control and the quality of electronic formats. And the publisher is better equipped to get the book into more places, including various electronic and online resources, international destinations, and translations. I&#8217;m clearly being coy about some of the details, but my question to those of you that might be interested in a JavaScript book written by me is whether you have a strong preference between a self-published book and one that&#8217;s traditionally published. Does it make a difference to you? Once you set aside the issues of subject and writer (which would be the same in both cases here), what criteria do you have for whether you buy a book and for how much you like a book?</p><p>As a writer, I have an entirely different sense of these things, so I would greatly appreciate any feedback you may have on this particular issue. I know which way I&#8217;m leaning here, but want to make sure I&#8217;m not overlooking something important. Thanks!</p><h2 id="web1">On the Web =&gt; Improving Application Performance</h2><p>I&#8217;m a big fan of <a
href="http://www.adobe.com/go/air">Adobe AIR</a>, and not just because <a
href="http://www.larryullman.com/books/adobe-air-adobe-integrated-runtime-with-ajax-visual-quickpro-guide/">I&#8217;ve written a book on it</a>! I&#8217;ve been developing AIR applications, for in-house and client use, for a few years now, in both JavaScript/HTML and Flex. I&#8217;ve recently, and not so recently, come across these two good articles on Adobe AIR:</p><ul><li><a
href="http://www.adobe.com/devnet/air/articles/air_performance.html">Performance-tuning Adobe AIR applications</a></li><li><a
href="http://www.adobe.com/devnet/air/articles/10_tips_building_on_air.html">Ten tips for building better Adobe AIR applications</a></li></ul><p>From the titles, the articles are self-explanatory, but the emphasis is on <em>performance</em>. The interesting thing about the first article is that it discusses the <em>theory</em> of performance, which people don&#8217;t think about enough (e.g., what does it mean to perform well?). The article uses a specific example for which one could easily come up with three different senses of &#8220;performance&#8221; (the article uses Flex for the code).</p><p>The second article has lots of specific, excellent tips, many of which being applicable to any application you develop (although the example also uses Flex for the code, it&#8217;s mostly ActionScript that you&#8217;ll see).</p><p>Even if you&#8217;re not using Adobe AIR, I would think these articles would be worth reading, as the subject of application performance is one we could all always continue to learn more about.</p><h2 id="web2">On the Web =&gt; Opera Dragonfly</h2><p>Admittedly, <a
href="http://www.opera.com">Opera</a> is about the fourth browser on my list (after, in order, Safari, Chrome, and Firefox), but the release of <a
href="http://www.opera.com/dragonfly/">Opera Dragonfly</a> may just change that for me, at least when it comes to Web development. Historically I&#8217;ve always relied upon Firefox&#8217;s <a
href="http://getfirebug.com">Firebug</a> extension when I need a good development debugging tool, but the Firefox browser has become such a memory hog for me that I&#8217;ve stopped using it on a regular basis. Of course, it&#8217;s probably a memory hog exactly because I&#8217;ve installed so many extensions (Firebug and the Web Developer Extension and …)!</p><p>On a cursory glance, Dragonfly may have everything I need:</p><ul><li>DOM viewer</li><li>JavaScript debugger: allowing you to set breakpoints, inspect the values of variables, and set conditions to watch for</li><li>HTML and CSS editor</li><li>Resource inspector: what resources are loaded by the page</li><li>Network traffic tool: a must for debugging Ajax, including the ability to craft your own requests to see the response</li><li>And more</li></ul><p>Unlike Firebug and other extensions, Dragonfly is built into Opera. Also unlike any comparable tool, Dragonfly can be used for remote debugging, including content destined for mobile devices or televisions!</p><p>I don&#8217;t know that Dragonfly alone will make me switch to Opera as my primary browser, but I have a strong feeling it will be my primary development browser for some time.</p><h2 id="blog1">On the Blog =&gt; UTC and Time Zone Support in MySQL</h2><p>In the third edition of my &#8220;<a
href="http://www.larryullman.com/books/php-6-and-mysql-5-for-dynamic-web-sites-visual-quickpro-guide-3rd-edition/">PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide</a>&#8221; book, and now in the fourth, too, I discuss using <em>Coordinated Universal Time</em> (strangely enough, abbreviated UTC) for storing dates and times in a MySQL database. I ran into a hiccup installing support for time zones in MySQL on my Mac, so I recently wrote <a
href="http://www.larryullman.com/2011/05/27/utc-and-time-zone-support-in-mysql/">a short blog post</a> introducing the subject and detailing the installation particulars on both Windows and Mac OS X.</p><h2 id="blog2">On the Blog =&gt; How I Cut My Bandwidth in Half</h2><p>Every so often I take a look at the Web stats for my site, as I expect we all do from time to time. It can be addicting stuff. Looking over the numbers in May, I realized that I managed to cut my bandwidth in half (since January), without ever intending to. In <a
href="http://www.larryullman.com/2011/05/16/how-i-cut-my-bandwidth-in-half/">this blog post</a>, I write about the steps I took that achieved this result, even though that wasn&#8217;t a goal.</p><h2 id="qa">Q&amp;A =&gt; Should I use PHP or JavaScript to Handle API Data?</h2><p>Daniel, who asks many good questions for use in these newsletters (thanks!), posed this:</p><blockquote><p>Can I use PHP or JavaScript to look through an array or parse data from a Web Service API in XML or JSON?</p></blockquote><p>The answer, in my opinion, depends upon what you intend to do with the data. If the data is needed temporarily, for example, to show something in the Web browser, you can use JavaScript. The benefit to JavaScript is that it will be the client (i.e., the Web browser) making the request, not the server, which can improve performance and reduce the server load. The downside is that JavaScript must be enabled in the browser and there are restrictions/tricks to performing cross-domain requests using JavaScript.</p><p>If the data will be needed for a longer period, if the same data might be presented to multiple users, or if you must do complex manipulation of the data, I would recommend using PHP. You&#8217;ll most likely want to use the <a
href="http://www.php.net/curl">cURL</a> library in PHP to do this, meaning your PHP version must support cURL and you&#8217;ll need to learn how to use it (although cURL isn&#8217;t that complicated and the PHP manual has good examples).</p><p>As with any time using an API (Application Programming Interface), I would strongly recommend you take the time to read the API&#8217;s usage terms to ensure compliance. For example, it may not be legal for your site to store data retrieved through an API, which would be another factor to consider.</p><h2 id="thinking">What is Larry Thinking? =&gt; Doing What I Do: Training</h2><p>In this newsletter I&#8217;m continuing what became a series on IT careers. I first wrote about becoming a better programmer, in two parts(<a
href="http://www.larryullman.com/2011/02/01/what-is-larry-thinking-36-becoming-a-better-programmer-and-more/#thinking">1</a> and <a
href="http://www.larryullman.com/2011/02/25/what-is-larry-thinking-37-becoming-a-better-programmer-part-2/#thinking">2</a>). Then I wrote about <a
href="http://www.larryullman.com/2011/03/22/what-is-larry-thinking-38-building-a-career/#thinking">building a career</a> and <a
href="http://www.larryullman.com/2011/04/16/what-is-larry-thinking-39-how-i-got-here-and-the-future/#thinking">how I got here</a>. In the previous newsletter, I wrote about <a
href="http://www.larryullman.com/2011/05/12/what-is-larry-thinking-40-doing-what-i-do-part-1/#thinking">some of the specifics of what I do</a>, focussing on the writing side. In this post, I&#8217;ll discuss another facet of my daily job: training. Unlike in the last newsletter, I&#8217;ll be more general about money here, as there&#8217;s just too much variation.</p><p>In the previous article, I said that about 60-70% of my income comes from writing, with the other 30-40% from training/teaching and Web/application development. In terms of <em>training</em> and <em>teaching</em>, early on I taught an online course on PHP through the <a
href="http://learn.berkeley.edu/" class="broken_link">University of California at Berkeley</a>. Much like writing, it&#8217;s the type of work that sounds more impressive than it pays! I eventually stopped doing it, as it was a lot of work for not that much money, with quite a bit of responsibility and hassle. If you&#8217;ve done any teaching at all, you know of what I speak. But should you want to pursue this route, the best way to get such jobs is to already be associated with a school in some capacity (i.e., have an &#8220;in&#8221;). There is an argument to be made with this avenue that you&#8217;ll have somewhat regular income, albeit small, and it&#8217;s the kind of thing that you can perhaps use as a selling point for getting other work.</p><p>Off and on for the past several years, I&#8217;ve done more <em>training</em> jobs, by which I mean corporate on-site training over one or more days. Training jobs can pay very well, but are hard to get. If you&#8217;re interested in going that route, you should probably hook up with an organization that manages training. For example, <a
href="http://www.mysql.com/training/">MySQL arranges training courses</a>, so you could work with them (I don&#8217;t know how the arrangement has changed with Oracle&#8217;s purchase of MySQL, though). There are also companies that do all sorts of training, helping to market the courses, provide the facilities, and so forth. To work with one of these organizations (I&#8217;ve had discussions with them myself), it&#8217;s just a matter of proposing a class that appeals to them and extends their catalog. Much like trying to get a book or article published, it&#8217;s a matter of bringing a good idea to the right people. If you can get involved with training, and don&#8217;t mind traveling, you can make a very good living doing this. I personally consider it to be stressful, but I am deathly afraid of public speaking and put a lot of pressure on myself to have all the right answers going into such sessions. I still do training occasionally, though, as it gets me out of the house and pays some bills.</p><p>(As an aside, speaking at conferences is another kind of thing that sounds great but pays very poorly. In fact, at the entry level, speaking at conferences just earns you free admission to the conference. At the higher levels, perhaps your travel will be covered. But conferences are great networking opportunities and being a public speaker can, again, be a way to find other work, establish qualification to do certain work, and perhaps even allow you to charge more for other work.)</p><p>Whether you&#8217;re doing training or teaching (or speaking at conferences), do be mindful of who owns the copyright for the material you put together and whether the sessions can be recorded (and, if so, who owns those recordings). In these situations, a lot of your time and effort goes into the creation of the material, which isn&#8217;t how you will really make money. The true pay comes from actually teaching the course or providing the training. Make sure you&#8217;ll get your due for the work you put in.</p><p>I haven&#8217;t yet pursued this direction at all, but clearly the big push these days (or these past couple of years) is towards online video training. There are many companies, such as <a
href="http://www.lynda.com">Lynda</a>, that provide this service. To get these jobs, I expect, it&#8217;s a matter of convincing the right company that you&#8217;re the right person to create a training series on the right subject (like getting any other training job). I believe the economic model for these is a set sum to produce the video materials and then you&#8217;ll receive payments based upon usage (i.e., upon people watching them). Like with writing, you can help your cause in this area by producing your own low budget video training sessions to demonstrate your abilities. Post the videos you do on your own Web site and on YouTube, pay attention to the feedback you get, and build a career!</p><h2 id="news">Larry Ullman&#8217;s Book News =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; (4th Edition) and More!</h2><p>May was a rough month for me, work-wise, which is to say I didn&#8217;t get nearly as much done as I would have liked. Now, I knew going into the month that that was going to be the case, but still… Anyway, I&#8217;m hoping June will be better. I am a couple of chapters away from completing the first draft of the fourth edition of my &#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide&#8221;, which puts it to be released at the end of the summer. I think the book is turning out well, with nice updates and added content.</p><p>I&#8217;m probably going to use July as a catch-up month, although I have a number of side projects to work on, just nothing with a deadline. Either in July, or immediately thereafter, all of my attention will go to the JavaScript book (déjà vu: I think I&#8217;ve said this a time or two before, but this time I really, really mean it). With as much as I&#8217;ve spoken about this alleged and wily JavaScript book, and as many readers have said they&#8217;re looking forward to it, I&#8217;m starting to get that dread of living up to expectations. But I&#8217;ve got a lot to say about JavaScript, I&#8217;ve been thinking about this book for years, and there&#8217;s so much that can be done with today&#8217;s JavaScript, that I feel optimistic.</p><p>In the Fall, I&#8217;m still hoping to self-publish a book on the <a
href="http://www.yiiframework.com">Yii framework</a>, although I may just do an e-publication of that. In 2012, I&#8217;m planning on (and the publisher has agreed to) doing the third edition of my &#8220;<a
href="http://www.larryullman.com/books/php-5-advanced-visual-quickpro-guide-2nd-edition/">PHP 5 Advanced: Visual QuickPro Guide</a>&#8220;.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/06/09/what-is-larry-thinking-41-doing-what-i-do-part-2/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>FlashBuilder 4.5/Flex 4.5 for Mobile Apps</title><link>http://www.larryullman.com/2011/04/24/flashbuilder-4-5flex-4-5-for-mobile-apps/</link> <comments>http://www.larryullman.com/2011/04/24/flashbuilder-4-5flex-4-5-for-mobile-apps/#comments</comments> <pubDate>Sun, 24 Apr 2011 13:07:16 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[ios]]></category> <category><![CDATA[mobile]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2514</guid> <description><![CDATA[Version 4.5 of both the Flex framework and the Flash Builder IDE is due out May 11 and the outlook is very exciting. As announced some time ago, the focus in Flex 4.5 is on developing for mobile apps. This means a new wave of components optimized for mobile platforms. That alone might sound &#8220;kind [...]]]></description> <content:encoded><![CDATA[<p>Version 4.5 of both the Flex framework and the Flash Builder IDE is due out May 11 and the outlook is very exciting. As announced some time ago, the focus in Flex 4.5 is on developing for mobile apps. This means a new wave of components optimized for mobile platforms. That alone might sound &#8220;kind of cool&#8221;, but this release is much, much bigger than that.</p><p>Instead of using Flex to write Flash content that runs in a Web browser in a mobile device (i.e., non-Apple devices), thanks to Adobe AIR 2.6, <em>you&#8217;ll be able to write true mobile apps in Flex</em>. When the first release comes out in May, you&#8217;ll be able to create apps for the Google Android platform (the largest platform, in terms of sales of mobile devices today). In June, an update to Flash Builder and Flex are expected that will add support for iOS (iPod Touch, iPhone, and iPad) devices and the Blackberry Tablet OS. To summarize:</p><blockquote><p><strong>If you know Flex today (or in three months), you&#8217;ll be able to create mobile applications that run on all major mobile platforms in no time at all!</strong></p></blockquote><p>This could not come at a better time for me. I have a couple of mobile app ideas that I want to develop and was planning on learning how to do so later this year (yes, yes, I&#8217;m totally on the cutting edge of the mobile app craze, eh?). I was still hemming and hawing over whether to pursue the iOS route, which would be natural for me (I primarily use Macs and am comfortable with the C family of languages), or go the Google Android route, which would be harder (Java is the default language there), but technically has a broader market. And now, thanks to Flex 4.5 and Adobe AIR, I won&#8217;t have to choose between them.</p><p>To see the development process, and the output, in action, check out <a
href="http://tv.adobe.com/watch/adobe-technology-sneaks-2011/sneak-peek-of-mobile-application-development-with-flex-and-flash-builder/">this sneak peek video at Adobe</a>. It&#8217;s a very impressive concept and, as far as I know, the only &#8220;write once, run everywhere&#8221; development solution for mobile apps. This, of course, is the promise of Adobe AIR itself, which allows you to write one application that can run on multiple operating systems (I still seem to be a bigger fan of AIR than the world at large).</p><p>That&#8217;s the big news, Flash Builder 4.5 and Flex 4.5 also add performance improvements, new Spark components (in particular, finally creating a Spark version of the <strong>Datagrid</strong>), and multiple ActionScript coding tools. See <a
href="http://www.adobe.com/devnet/flash-builder/articles/whatsnew-flashbuilder-45.html">this article at Adobe Developer Connection</a> for more on what&#8217;s new in Flash Builder 4.5. There&#8217;s also <a
href="http://www.adobe.com/devnet/flex/articles/mobile-development-flex-flashbuilder.html">this pretty good article</a> on mobile development using Flex and Flash Builder.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/04/24/flashbuilder-4-5flex-4-5-for-mobile-apps/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Flash Builder 4.5 for PHP</title><link>http://www.larryullman.com/2011/04/22/flash-builder-4-5-for-php/</link> <comments>http://www.larryullman.com/2011/04/22/flash-builder-4-5-for-php/#comments</comments> <pubDate>Fri, 22 Apr 2011 02:12:33 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[actionscript]]></category> <category><![CDATA[flash builder]]></category> <category><![CDATA[zend]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2497</guid> <description><![CDATA[Version 4.5 of the Flex framework makes it easier to develop applications destined for mobile devices (and there are some crazy-exciting developments along those lines, which I&#8217;ll post about separately), but version 4.5 of the corresponding Flash Builder IDE also comes with a nice bonus: even better integration with PHP. PHP is my Web programming [...]]]></description> <content:encoded><![CDATA[<p>Version 4.5 of the <a
href="http://www.adobe.com/go/flex/">Flex framework</a> makes it easier to develop applications destined for mobile devices (and there are some crazy-exciting developments along those lines, which I&#8217;ll post about separately), but version 4.5 of the corresponding <a
href="http://www.adobe.com/go/flashbuilder">Flash Builder IDE</a> also comes with a nice bonus: even better integration with <a
href="http://www.php.net">PHP</a>.</p><p>PHP is my Web programming language of choice, and in version 4 of the Flex framework and the Flash Builder IDE, <a
href="http://www.adobe.com">Adobe</a> made a purposeful attempt to increase usage of Flex among the PHP community (this is also when I really began embracing Flex). For example, Flash Builder 4 comes with a wizard for connecting to PHP scripts, including creation of boilerplate PHP code. The new Flash Builder 4.5 IDE, due out May 11, comes in a couple of versions: <em>Standard</em>, <em>Premium</em> (with extra wizards, debugging tools, and profiling utilities), <em>Flash Builder 4.5 for PHP Standard</em>, and <em>Flash Builder 4.5 for PHP Premium</em>. The Flash Builder 4.5 for PHP versions were created in conjunction with <a
href="http://www.zend.com">Zend</a>, and include an integrated version of <a
href="http://www.zend.com/en/products/studio/">Zend Studio 8</a>. As both Flash Builder and Zend Studio are built upon <a
href="http://www.eclipse.org/">Eclipse</a>, this is a natural fit. And Flash Builder 4 started using <a
href="http://framework.zend.com/download/amf">Zend AMF</a> to transmit data in Action Message Format between Flash applications and PHP scripts; the two companies have been working together for a while.</p><p>Needless to say, if you&#8217;re already doing Flex and PHP development (like I am), Flash Builder 4.5 for PHP is the perfect tool. The ability to do all the programming, both server-side PHP and client-side Flex, in one application, will save a lot of time. Just the debugging alone&#8230;Flash Builder 4.5 for PHP will let you debug both the PHP script and the Flash application without changing programs!</p><p>In terms of pricing Flash Builder 4.5 Standard is $249.00, if purchased new, and Zend Studio is $299.00 (all prices are in US dollars and accurate as I write this). Flash Builder 4.5 for PHP Standard is $399.00, so there&#8217;s a decent price break compared to having the applications individually.</p><p>For a good, quick introduction to Flash Builder 4.5 for PHP, see <a
href="http://www.adobe.com/devnet/flash-builder/articles/introducing-flashbuilder45-php.html">this article at the Adobe Developer Connection</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/04/22/flash-builder-4-5-for-php/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Fun Tools at Adobe Labs</title><link>http://www.larryullman.com/2011/03/26/fun-tools-at-adobe-labs/</link> <comments>http://www.larryullman.com/2011/03/26/fun-tools-at-adobe-labs/#comments</comments> <pubDate>Sat, 26 Mar 2011 20:31:45 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Adobe AIR]]></category> <category><![CDATA[Flex]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2429</guid> <description><![CDATA[As I&#8217;ve written before, I&#8217;m a fan of Adobe AIR, although it hasn&#8217;t yet caught on as much as I would have thought. You may also know that Adobe develops a ton of cool things in their Adobe Labs. Many things go from the Labs to a full-scale release, others never do. In any case, [...]]]></description> <content:encoded><![CDATA[<p>As I&#8217;ve written before, I&#8217;m a fan of <a
href="http://www.adobe.com/go/air">Adobe AIR</a>, although it hasn&#8217;t yet caught on as much as I would have thought. You may also know that Adobe develops a ton of cool things in their <a
href="http://labs.adobe.com">Adobe Labs</a>. Many things go from the Labs to a full-scale release, others never do. In any case, it&#8217;s often worth while scrolling through the Labs to see what Adobe&#8217;s up to lately (the same goes for <a
href="http://www.googlelabs.com/">Google labs</a>).</p><p>I recently came across two interesting things at Adobe Labs:</p><ul><li><a
href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/">Adobe AIR and Adobe Flash Player Incubator</a>, a technology preview program for experimenting with &#8220;bleeding-edge&#8221; capabilities of the Flash platform.</li><li><a
href="http://labs.adobe.com/technologies/airlaunchpad/">Adobe AIR Launchpad</a>, a desktop tool that helps to create Flex-based applications to be run through Adobe AIR. Run the tool, select a destination (desktop or mobile device), establish some base settings, select the features the application will want to use, and the Launchpad will generate a ready-to-compile AIR application with those features and settings. Or you can use the generated ZIP to open and edit the project in Flash Builder. It&#8217;s just a nice little automated tool to further expedite an already fast process.</li></ul><p>I haven&#8217;t played with these others yet, but plan on doing so (they look useful):</p><ul><li><a
href="http://labs.adobe.com/technologies/ascode_coverage/">ActionScript Code Coverage Plug-in for Flash Builder</a></li><li><a
href="http://labs.adobe.com/technologies/squiggly/">Squiggly</a> (a spell check engine for Flash and AIR)</li></ul><p>And, of course, you can check out the beta versions of Flex (&#8220;Hero&#8221;), Flash Builder (&#8220;Burrito&#8221;), and other more common software. You may have also caught wind of <a
href="http://labs.adobe.com/technologies/wallaby/">Wallaby</a>, which converts Flash to HTML.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/03/26/fun-tools-at-adobe-labs/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>What is Larry Thinking? #37 =&gt; Becoming a Better Programmer, Part 2</title><link>http://www.larryullman.com/2011/02/25/what-is-larry-thinking-37-becoming-a-better-programmer-part-2/</link> <comments>http://www.larryullman.com/2011/02/25/what-is-larry-thinking-37-becoming-a-better-programmer-part-2/#comments</comments> <pubDate>Fri, 25 Feb 2011 01:27:06 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[cdn]]></category> <category><![CDATA[cloudfront]]></category> <category><![CDATA[ecom]]></category> <category><![CDATA[newsletter]]></category> <category><![CDATA[yii]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=2350</guid> <description><![CDATA[In this edition… About This Newsletter What are You Thinking? =&#62; &#8220;PHP and MySQL for Dynamic Web Sites&#8221; On the Web =&#62; Two E-Commerce Articles Published Online On the Web =&#62; Several Excerpts from &#8220;Effortless Flex 4 Development&#8221; On the Web =&#62; Toad for MySQL On the Blog =&#62; Rendering View Files in Yii On [...]]]></description> <content:encoded><![CDATA[<p>In this edition…</p><ul><li><a
href="#about">About This Newsletter</a></li><li><a
href="#you">What are You Thinking? =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221;</a></li><li><a
href="#web1">On the Web =&gt; Two E-Commerce Articles Published Online</a></li><li><a
href="#web2">On the Web =&gt; Several Excerpts from &#8220;Effortless Flex 4 Development&#8221;</a></li><li><a
href="#web3">On the Web =&gt; Toad for MySQL</a></li><li><a
href="#blog1">On the Blog =&gt; Rendering View Files in Yii</a></li><li><a
href="#blog2">On the Blog =&gt; Using Amazon&#8217;s CloudFront as a CDN</a></li><li><a
href="#qa">Q&amp;A =&gt; How Can One Become a &#8220;Real&#8221; Programmer?</a></li><li><a
href="#thinking">What is Larry Thinking =&gt; Becoming a Better Programmer, Part 2</a></li><li><a
href="#news">Larry Ullman’s Book News =&gt; “PHP for the Web”, “PHP and MySQL for Dynamic Web Sites”, and More!</a></li></ul><h2 id="about"><span
id="more-2350"></span>About This Newsletter</h2><p>I managed to come up with a theme for this newsletter: how to become a &#8220;real programmer&#8221;. I&#8217;ve received a couple of questions along these lines, and had begun the conversation <a
href="http://www.larryullman.com/2011/02/01/what-is-larry-thinking-36-becoming-a-better-programmer-and-more/#thinking">in the previous newsletter</a>, so I thought I&#8217;d write about the subject even more. In my next newsletter, I <em>think</em> I&#8217;m going to write about the other side of the equation: for those of you trying to build up a career, what it may be like when you get there. I don&#8217;t know: maybe not. Anyway, I&#8217;m likely to include a book giveaway in the next issue, regardless.</p><p>As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!</p><p>Also, for those of you that would like to create an &#8220;official&#8221; connection with me, you can do so via <a
href="http://www.linkedin.com/pub/larry-ullman/0/354/a32">LinkedIn</a> (I don&#8217;t use Twitter, Facebook, or other social media).</p><h2 id="you">What are You Thinking? =&gt; &#8220;PHP and MySQL for Dynamic Web Sites&#8221;</h2><p>In this newsletter I&#8217;m starting a new subsection, titled &#8220;What are You Thinking?&#8221;. In such sections, I&#8217;ll directly ask you, the beloved reader, for your input on a given subject. As always, you&#8217;re not obligated to reply, but if you have any thoughts, brief or long, I would really love to hear them. The purpose of such sections is so that I might better cater what I do to what you really want.</p><p>In this newsletter, I&#8217;m wondering what, if anything, you&#8217;d like to see in the next edition of my &#8220;PHP and MySQL for Dynamic Web Sites&#8221; book. This will be the fourth edition, which I&#8217;m going to start writing soon. The immediate plan is to update all the code for the latest version of PHP, remove references to PHP 6 (PHP 6 died since I started writing the last edition of the book), and add a &#8220;Review and Pursue&#8221; section to the end of each chapter, as I did with the fourth edition of my &#8220;PHP for the Web: Visual QuickStart Guide&#8221;. The good news is that I should have room for a new chapter, so I&#8217;m wondering what you might like to see. Ideas off the top of my head include (in no particular order):</p><ul><li>Another example chapter</li><li>An introduction to a framework</li><li>A quick (very quick) introduction to object-oriented programming</li><li>A JavaScript primer</li><li>More information about Web servers (such as .htaccess files)</li><li>More about databases</li></ul><p>So what would be meaningful to you? What have I missed in other editions of this book or my other work? What haven&#8217;t I covered enough?</p><p>As an added incentive, I&#8217;ll give away 10 copies of the book to those in the pool of respondents.</p><h2 id="web1">On the Web =&gt; Two E-Commerce Articles Published Online</h2><p><a
href="http://www.peachpit.com">Peachpit Press</a> has published online two of four articles I&#8217;ve recently written for them. Both articles are in support of my &#8220;<a
href="http://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/">Effortless E-Commerce with PHP and MySQL</a>&#8221; book, although the ideas explained are applicable to any e-commerce project.</p><p>The first article is &#8220;<a
href="http://www.peachpit.com/articles/article.aspx?p=1677579">Creating a Customer Review System in PHP and MySQL</a>&#8220;. The second article is &#8220;<a
href="http://www.peachpit.com/articles/article.aspx?p=1678915">Building an E-Commerce Site with PHP: Making Product Recommendations</a>&#8220;. Two more articles, and a series of blog postings, are forthcoming, probably over the next two weeks.</p><h2 id="web2">On the Web =&gt; Several Excerpts from &#8220;Effortless Flex 4 Development&#8221;</h2><p><a
href="http://www.peachpit.com">Peachpit Press</a>, the publisher of my book &#8220;<a
href="http://www.larryullman.com/books/effortless-flex-4-development/">Effortless Flex 4 Development</a>&#8221; (technically, Peachpit&#8217;s sister company New Riders is the publisher), has posted excerpts from the book available for reading—for free—online. You can read about the following subjects:</p><ul><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676704">Datagroup</a></li><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676705">Item Renderers</a></li><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676707">Four Data Formats</a></li><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676708">Flash Security Model</a></li><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676709">Using the Network Monitor</a></li><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676710">Data Paging</a></li><li><a
href="http://www.peachpit.com/articles/article.aspx?p=1676711">Adding Authentication</a></li></ul><p>You can see all the articles and blog posts that I&#8217;ve written for Peachpit Press by viewing <a
href="http://www.peachpit.com/authors/bio.aspx?a=2a14d669-06f6-48cf-a5b8-907169808b9f">my writer&#8217;s page there</a>.</p><h2 id="web3">On the Web =&gt; Toad for MySQL</h2><p>The technical editor on my past two books is a big advocate of <a
href="http://www.quest.com/toad-for-mysql/">Toad for MySQL</a>, a free MySQL tool for Windows. I don&#8217;t regularly use Windows, so I haven&#8217;t tried it myself, but I take Jay (the technical editor) at his word on such things. Plus, it&#8217;s free!</p><h2 id="blog1">On the Blog =&gt; Rendering View Files in Yii</h2><p>On my blog, I recently wrote up a quick guide to <a
href="http://www.larryullman.com/2011/02/15/rendering-view-files-in-yii/">rendering view files using the Yii framework</a>. If you&#8217;re using <a
href="http://www.yiiframework.com">Yii</a>, the article should help you understand these fundamentals, but even if you&#8217;re not using Yii, I hope the article helps convey how frameworks and the MVC design pattern generate the output seen by the user in the Web browser.</p><h2 id="blog2">On the Blog =&gt; Using Amazon&#8217;s CloudFront as a CDN</h2><p>I just published, on my blog, a post explaining <a
href="http://www.larryullman.com/2011/02/20/using-amazons-cloudfront-as-a-cdn/">how I choose and setup Amazon&#8217;s CloudFront as a Content Delivery Network</a>. I decided to finally utilize a CDN in order to improve my site&#8217;s sluggish performance. So far, the experience has been remarkably simple and even more remarkably affordable.</p><h2 id="qa">Q&amp;A =&gt; How Can One Become a &#8220;Real&#8221; Programmer?</h2><p>Celia had sent in this question:</p><blockquote><p>Can a person become a &#8220;real&#8221; web programmer from studying books and online resources, or is it necessary to take college classes and study programming languages such as C++?</p></blockquote><p>I expect many people have wondered this same thing, as you hear about C++ and Java and formal training and certification and can easily believe those things are required to be &#8220;real.&#8221; Well, as a counterpoint, there&#8217;s an argument to be made that I&#8217;m a &#8220;real&#8221; programmer, and my entire body of formal training consists of…one high school Pascal class (twenty years ago). In fact, I expect that a good percentage of people who read my work have more formal computer training than I have. I&#8217;m not saying that to be dismissive of my abilities but rather to say that many paths will get you where you want to go.</p><p>There are really two issues to this question: becoming an able programmer and being employed as a programmer. You can most assuredly become a &#8220;real&#8221; and capable programmer without formal training and without learning a more advanced language like C or C++. First, whatever training you have, formal or not, the fact is that you only master a language by using it. It&#8217;s just as possible to take a course on, or become certified in, a language and never truly master it as it is to teach that same language to yourself and become quite skilled.</p><p>As for the type of language, PHP, my favorite language and the one I use the most, is quite approachable, but that doesn&#8217;t mean it&#8217;s inconsequential. I can program in C and C++ (even Java, to a lessor degree), but don&#8217;t regularly have the need to. There is clearly more than enough that you&#8217;ll be able to do by just picking up PHP, or any other language, through books and online resources.</p><p>The second issue that I think is implied by the question involves &#8220;marketability.&#8221; In this regard, formal training and certification is often necessary (sadly). There are many technical jobs that I wouldn&#8217;t qualify for on paper because I don&#8217;t have a college degree in computer science (it&#8217;s in English). However, there are always ways around such things. Bill Gates doesn&#8217;t have a college degree (not a legitimate one, anyway), and he made out okay. This is to say that you can, with enough talent, imagination, and hard work, invent your own success. Or you can get your foot in the door at a company by performing an apprenticeship. Even when it comes to marketability, the fact is that formal training and certification can only, at best, get you over any initial qualification hurdles when you&#8217;re looking for a job.</p><p>At the end of the day, you can only ever become a &#8220;real&#8221; programmer by <em>doing</em>: creating functional, practical, Web sites, scripts, and applications.</p><h2 id="thinking">What is Larry Thinking? =&gt; Becoming a Better Programmer, Part 2</h2><p>In <a
href="http://www.larryullman.com/2011/02/01/what-is-larry-thinking-36-becoming-a-better-programmer-and-more/#thinking">my previous newsletter</a>, I wrote about how one becomes a better programmer. In the article, I came up with a simple mantra: <em>Read. Do. Review.</em> If it&#8217;s simple, it&#8217;s got to be right, right? A second, related question to how one becomes a better programmer is what actual qualities should a good (or better) programmer have? I haven&#8217;t come up with a pithy answer for that one, but here&#8217;s what I do know…</p><p>First, let&#8217;s distinguish between the &#8220;competent&#8221; programmer and the &#8220;incompetent&#8221; one. The primary basis for the quality of any programming task is: does it work? In other words, does the script or application do what it needs to do? For a competent programmer, the answer is &#8220;yes&#8221;. For an incompetent programmer, it&#8217;s &#8220;no&#8221;. For an incompetent programmer to become a competent one, she or he first needs to overcome this hurdle. To be fair, a competent programmer may write code that has bugs (in fact, is likely to) and the program might not be optimal, but basic functionality is always the first criteria. So the rest of this article is intended to differentiate among the strata of competent programmers.</p><blockquote><p>(If &#8220;competent&#8221; and &#8220;incompetent&#8221;  sound too harsh—because every one of us is incompetent when we begin, you could say &#8220;capable&#8221; and &#8220;incapable&#8221; instead.)</p></blockquote><p>I&#8217;ve come up with three criteria for identifying the quality of code (and therefore, the quality of the programmer): <em>security</em>, <em>usability/maintainability</em>, and <em>performance</em>. You may think I&#8217;m missing something with just three items (and I may be), but sub-factors go into them. Let&#8217;s look at the least important of the criteria: performance.</p><p>On the bright side, performance is easily quantified: run tests and compare numbers. If you write two versions of a PHP script, run them both on the same server, and if one is consistently faster than the other, then it performs better. Better programmers, in my opinion, know how to write code that will perform better. This means that better programmers know things like:</p><ul><li>How to properly design a database</li><li>How to use database indexes appropriately</li><li>To avoid using <strong>include_once()</strong> and <strong>require_once()</strong> (when using PHP)</li><li>How to use caches</li><li>And so forth</li></ul><p>The problem with performance is that this knowledge takes effort to learn. You&#8217;ll have to read a lot, run benchmarks, pay attention, etc. But over time better programmers learn these more optimal programming habits. Also, performance is less important as a criteria because it&#8217;s easily overcome. Not an ideal solution, but if code performs poorly, more hardware can always be thrown at the problem. Conversely, no hardware solution can remedy code that&#8217;s difficult to use or maintain.</p><p>A more critical skill for the better programmer is the ability to write code that&#8217;s easier to use, reuse, and maintain. This skill, while more valuable than being able to write code that performs well, is harder to quantify. But I can say what qualities go into such code.</p><p>Most importantly, code that is well documented is easier to use, reuse, and maintain than code that is not. In fact, if you were to ask me what is the most important quality of a better programmer, I would say <em>better programmers write better documentation.</em> I used to teach an online PHP course for the University of California at Berkeley and I expect that &#8220;document your code more!&#8221; was probably the feedback I gave most often. The last time I did a code review for a client, the code was so poorly documented that there was no way I could have told the client that what their in-house programmer was doing was good or valuable. So if you want to become a better programmer today, start doing a better job of documenting your code! Also, do make sure you update your comments as you change your code. It&#8217;d be better to have no comments at all than to have comments that contradict what the code actually does.</p><p>Second, code that is easier to use, reuse, and maintain is <em>organized well</em>, in terms of files, folders, and functions (I love alliteration; like simplicity, it just has to imply truth). The better programmer makes proper use of subdirectories, included files, and user-defined functions. As for a couple of concrete examples, the better programmer writes included files so that they don&#8217;t make assumptions about what has happened previous to their execution. And the better programmer writes good user-defined functions, with appropriate use of arguments, no reliance upon global variables or other external data, and a &#8220;black box&#8221; mentality (i.e., you don&#8217;t have know how the function does what it does in order to use it correctly).</p><p>Third, code that is easier to use, reuse, and maintain handles errors gracefully and reports them only when appropriate. In an ideal world, the best programmer is writing code without errors, but in the real world, applications have external dependencies that can undermine what you&#8217;ve done. Watching for, and handling, such exceptions is a hallmark of the experienced programmer.</p><p>Finally, and probably most importantly, the better programmer is aware of security: common hacks and how to prevent them, protecting the server, protecting the user, etc. This is a life-long pursuit.</p><p>So those are the qualities that I think of when it comes to differentiating between good and better programmers. I&#8217;m sure I forgot something (feel free to send in your thoughts). I will add that some people see a benefit to brevity when it comes to code. This is particularly true in object-oriented languages, such as Ruby and JavaScript, where multiple actions can take place in a single line. I don&#8217;t personally honor brevity as some great goal, at the very least because brevity often comes at a cost of legibility, which is more important to me. But even if you do value brevity, it&#8217;s really just window dressing compared to these other qualities.</p><h2 id="news">Larry Ullman&#8217;s Book News =&gt; &#8220;PHP for the Web&#8221;, &#8220;PHP and MySQL for Dynamic Web Sites&#8221;, and More!</h2><p>As mentioned already, some of the articles I wrote for <a
href="http://www.Peachpit.com">Peachpit Press&#8217;s Web site</a>, supporting my <a
href="http://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/">Effortless E-Commerce with PHP and MySQL</a> book, have been published and more will be soon. I&#8217;ll post links to the new ones on my Web site, and in future newsletters, as they go live.</p><p>The fourth edition of &#8220;PHP for the Web: Visual QuickStart Guide&#8221; has gone to press. I&#8217;ll post updates when it should be available, and give away some copies in the next newsletter. Along with fixing any minor problems, updating the code for the latest version of PHP, and adding a &#8220;Review and Pursue&#8221; section to the end of each chapter, the book includes one new chapter, called &#8220;Putting It All Together.&#8221; The chapter demonstrates how to use everything covered in the book to assemble a mini-Web application, with authentication and full <em>CRUD</em> (Create, Retrieve, Update, and Delete) functionality.</p><p>Either this week or next, I begin writing the fourth edition of my &#8220;PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide.&#8221; Near the beginning of this newsletter I explain my intentions for this edition, and ask for any input you may have. The book should be available come August.</p><p>I have finally begun working on my self-published JavaScript book, although not as regularly as I would like. But starting is a key step. Once I get a decent first draft completed, I&#8217;ll begin looking for volunteer editors and tech reviewers (I&#8217;ll also figure out how to reasonably compensate them!).</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2011/02/25/what-is-larry-thinking-37-becoming-a-better-programmer-part-2/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> </channel> </rss>
<!-- Served from: www.larryullman.com @ 2012-05-21 13:38:32 by W3 Total Cache -->
