Davey ShafikAs close to my brain as you can safely get...2015-03-01T16:00:01Zhttp://daveyshafik.com/feed/atomDavey Shafikhttp://daveyshafik.com/?p=689122015-03-01T07:24:39Z2015-03-01T16:00:01ZRead more »]]>After many months of work, a couple of weeks ago php[architect] published the 3rd edition of the Zend Certification Study Guide.

I am really proud of this edition, which has been updated completely up to PHP 5.6 (the certification is currently up to 5.5), making it a great desk reference for everything new in PHP.

It includes 3 new chapters, and 2 new appendices, including one on the new debugger added in PHP 5.6, phpdbg — that’s over 80 pages of new content.

All of the new additions indicate which version they were added in, and based on a comprehensive scouring of the NEWS file, I am confident that anything worth mentioning as new in PHP has been included.

It will cover everything from SQL basics, to MySQL Native Driver, making it ideal for all skill levels, and hopefully turning even the most novice user into an accomplished developer.

This book will be published via Leanpub, and I will start making it available as soon as I have some of the beginning chapters completed — currently it’s about 30-35% complete, but the majority of it is intended to end up towards the end of the book.

If you are interested in this book, please show your support by filling out the form — this is crucial for me to gauge interest and pricing.

I’ve been involved in PHP since right before PHP 4.0 went final, which means I never wrote code for PHP 3, and in that time I’ve seen our community grow alongside the language I love, and while other languages have come (and gone in some cases!) PHP has continue to grow, and at a pace that seems to be accelerating rather than slowing down as some seem to think.

Obviously time marches ever forward, and the current question on every bodies mind is: what’s next? It looks like we’ll continue to see major improvements in performance thanks to phpng, and with that meaning a new major version due to internals BC breakage… hopefully we’ll see even more radical changes to the language.

]]>0Davey Shafikhttp://daveyshafik.com/?p=688882014-04-30T04:34:39Z2014-04-30T04:15:28ZRead more »]]>Last weekend at the fantastic Lone Star PHP 2014, I (and 3 other awesome people) presented the inaugural PHPBridge tutorial. You can read more about how that went on the PHPWomen blog.

However, I wanted to take a moment to jot down some more personal thoughts on PHPBridge. Why I pushed for it, why I think it’s important, and my ultimate goals for it.

Before going any further, I do want to take a second to thank the tireless efforts of Michelle Sanver who, for almost a month, stepped up and gave up all of her spare time to work with me remotely on the curriculum. I jokingly say we pair-wrote the curriculum, but that’s pretty much the most accurate description. For about 4hrs every night we would get on a Google Hangout and we would discuss what we wanted to do, I would type it out, she would refresh — complain about Ruby syntax errors I had to fix — and she would read it back and offer suggestions and corrections. Rinse and repeat.

I was very concerned that the curriculum would only represent my view of the world, and having at least one other voice along with the reviews from others like Elizabeth Smith, Matt Frost, Daniel Cousineau and Bob Majdak Jr was essential to making a balanced offering.

I was first exposed to RailsBridge via work where we’ve hosted a number of these events in our San Francisco offices. After learning more about them, and their goals, I decided that they were a perfect role model for our efforts — albeit with the minor exception of not restricting our workshops to just women (and those who identify as women, or are invited by a woman) as this is counter to PHPWomen’s goals — though any given workshop organizer can make that decision for themselves if they feel the need. Thanks to their choice of CC-BY license, we’ve been able to use their fantastic Suggestotron idea and the Sinatra app that runs the documentation site.

It has resulted in a curriculum that I am proud of. Prior to starting on this journey, I wrote out a long document that I sent around to the folks at PHPWomen, members of the community, and the community team at Engine Yard for feedback. In it, I stated my goals, and this is a direct quote:

The primary goal with PHPBridge is to give inexperienced people the opportunity to learn to wield this tool they use probably every day for leisure. To empower and delight them by showing them that they can control this machine, and that they can use it not only to browse the web, but to build it.

However, this is the projects primary goal, my own personal goal is a little simpler:

I love what I do, and I want to share it with people that they might love it too.

One of the things we often talked about when starting out the curriculum was how and why we started programming. The why was easy: we wrote some weird words, and our computer did something. Something we made it do. It was pretty awesome! The how was a little harder. We wanted to jump-start our attendees passed some of the unnecessary things we did, while still making it feel like a natural progression from start to finish. An example of this is only presenting them with prepared queries — this is the only way forward, no miss-step, no security issues. Ultimately, however, we wanted our attendees to have that moment of delight, and ownership, not once, but multiple times.

During the creation of the curriculum we hit upon the idea of “Error Driven Development” — try something, if it explodes, try to fix it. This is how most of us started out, but for a newcomer, it can be scary — by giving it a name, and by intentionally including error scenarios in the curriculum, we teach them that errors are a good thing — an opportunity to learn and fix your issues (and we all know the pain of the dreaded white screen!)

This is why our curriculum starts out by creating an index.php, add.php, edit.php, and delete.php, all in the webroot, with one class, also in the webroot, TopicData.php. Through these, we learn basic HTML, forms, CRUD, and about using objects (though not necessarily the why of OOP, we approached this more like this is just how things are).

To move away from the tedium of having done the same thing (DB interaction) four times, we move on to implementing Bootstrap 3. This step is where most folks ended their time with us — but at the end they had a pretty darn good looking app that worked. That they made.

The remainder of the curriculum focuses on refactoring our app to a more framework-like setup, with configs, a router, controllers, models, and templated views. We use pain points to drive this refactoring — templates so we can easily add Bootstrap to all our pages, autoloaders to stop multiple require statements, routers to have pretty URLs, etc.

We end by implementing a new feature (voting) using all the things we’ve setup — our users seeing how it all comes together at that point.

Going in to the workshop I was nervous, and excited — I remembered the ah-hah moment from 30+ people the year before when I managed to demystify (and un-scarify) SQL for them, and it was one of my primary motivators.

So, PHPBridge 0.1 was a success in many ways, not so much in others, but it was a starting point I am happy with. I have many goals for the progression of PHPBridge:

Revise the curriculum to solve the issues we discovered at Lone Star PHP (and of course, this will be an always evolving document)

Work with user groups, companies, and conferences to host more workshops

Provide daycare for attendees (rather: for their kids!) — this is a major barrier for some

While we know it won’t always be possible to provide, we do want to provide some framework around it, such as requiring that it always be licensed child care professionals, etc. Attendees should know that if it is provided, it meets a certain standard, and if it cannot be free, will have a reasonable cost.

Provide loaner hardware for attendees. Another major barrier, especially for disadvantaged minorities, is lack of access to a laptop.

Provide transportation assistance. Similar to the laptops.

On the curriculum front, I want to review and revise the Frontend curriculum from RailsBridge. I will pursue better ways to collaborate on this as it’s completely backend language agnostic.

I’d also like to move on to an Intermediate Curriculum, and then finally on to a kids curriculum. Currently, there is the amazing Young Coders for Python, and KidsRuby, and I’d like to also bring this to our community too!

Whew… that was a lot of thoughts. I hope that in reading this, you can see why I am passionate about this, and are now excited about the idea of proliferating your love of our craft, and will contribute to the efforts.

]]>0Davey Shafikhttp://daveyshafik.com/?p=688682013-11-02T04:43:30Z2013-12-12T16:08:35ZRead more »]]>I’m pleased to announce I will be speaking at PHP UK in London. PHP UK will be on February 21st and 22nd.

I will be giving two talks, “PHP 5.NEXT: The New Bits”, which will cover PHP 5.6 (or whatever is appropriate come February!) and “PHP Performance: Under The Hood”, which will be a performance talk with an emphasis on what’s going on in internals.

This second talk is intended as a way to get to know more about the engine, how it works, and what’s really going on with your code.

Last time I went to PHP UK in 2012, it was one of the highlights of that year, and I fully expect it’ll be the same for me next year. I hope to see you there, tickets are on sale now!

]]>0Davey Shafikhttp://daveyshafik.com/?p=688702013-11-02T04:49:38Z2013-12-01T20:00:54ZRead more »]]>After being part of the inaugural, and immensely successful Sunshine PHP in 2013, I am so delighted to be invited back to speak at my “home” conference in 2014.

Sunshine PHP takes place in Miami, February 6-8th 2014, and will be speaking on “MySQL HA, Recovery and Load Balancing”.

Using MySQL Server and Percona XtraDB Cluster we will take a look at several possible replication configurations for MySQL high-availability, disaster recovery and load-balancing. After comparing them for administration ease, scalability of reads and writes, robustness of the system for errors and time for data recovery as well as looking at how they impact your code-layer we will discuss the ins-and-outs of each setup, looking at the pros and cons, and what trade-offs you will need to make depending on your needs.

]]>0Davey Shafikhttp://daveyshafik.com/?p=688752013-11-12T21:29:15Z2013-11-19T16:00:48ZRead more »]]>Three years ago I heard about this awesome conference in Belgium, PHPBenelux, and for the last two years I’ve been kicking myself for missing the CFP.

Well, this year, I didn’t miss it, and I got accepted!

I will be giving my new talk, “PHP Performance: Under The Hood”:

We’ve all experienced performance issues and we would typically turn to a profiler. Whether that’s something in userland, or a tool like xdebug or xhprof, the reason is the same: to figure out why our code is slow.

This talk will take that inspection a step further and look under the hood of PHP, at the C internals, for common performance problems.

If you’ve ever wanted to know exactly what your code is doing, and why ++$i is faster than $i++, this talk is for you.

I hope to see you there!

]]>0Davey Shafikhttp://daveyshafik.com/?p=688612013-11-02T04:43:42Z2013-11-02T19:00:20ZRead more »]]>Hot on the heels of my ZendCon EU Keynote announcement yesterday, I wanted to invite everybody to sign up for Nomad PHP EU. Nomad PHP is an online PHP User Group for people who don’t have a local user group, or who just want to see more quality talks!

For those of you in Europe, or who want to watch the talks during work hours with your team, there is now Nomad EU. Nomad PHP EU meetings take place at 20:00 CET, which is 2pm EST, or 11am PST.

This talk will cover the basics necessary to help you decide what data to store, where, and how.

We will cover PDO — PHP’s Data Object extension, which allows you to talk to a variety of databases, including MySQL.

You will learn how to CRUD — Create, Retrieve, Update and Delete data, database schema, and when to use indexes.

Additionally, we will look at other data storage systems such as memcache, and nosql databases.

I originally gave this talk at Lonestar PHP 2013 back in June and it was my favorite talk I have given to date — if you are new to databases, want to learn JOINs and Foreign Keys, or just want to brush up on your fundamental MySQL skills, this talk will have something for you!

]]>3Davey Shafikhttp://daveyshafik.com/?p=688542013-11-02T02:22:28Z2013-11-02T02:22:28ZRead more »]]>In a little under three weeks I will be giving the closing keynote at ZendCon Europe. This will my first keynote and I’m excited to be talking about The Evolution of DevOps.

THE EVOLUTION OF DEVOPS

With the rapid adoption of new software development methodologies and infrastructure as a service (IaaS), we’ve seen a new role emerge,
DevOps. The DevOp is a master of this new domain: The Cloud. But just as quickly as we’ve seen DevOps emerge, we’re seeing the role evolve as advanced platforms and services enter on to the scene. During this talk, we’ll explore how DevOps is evolving, what that means to you, and your role in the ever changing landscape of development and the cloud.

ZendCon Europe will be in Paris from November 18th – November 20th, I hope to see you there!

]]>0Davey Shafikhttp://daveyshafik.com/?p=688382013-10-11T20:54:49Z2013-10-01T09:32:43ZRead more »]]>Last year I wrote a talk called “Fast, Not Furious: How to Find and Fix Slow Code” — a performance talk covering profiling, memcache and some other stuff.

As I often do — to hedge my bets — I stuck a few slides on the end “just in case” I ran through everything too quickly and needed to fill in time.

These slides were on APC, the Alternative PHP Cache, and went just a little into tokens and how APC works under the hood.

I really enjoyed presenting those 6 slides, and I’ve been wanting to expand on that topic ever since then.

]]>0Davey Shafikhttp://daveyshafik.com/?p=688362013-10-01T06:09:25Z2013-10-01T06:09:25ZNext week I will be attending ZendCon 2013, speaking on MySQL Replication Topologies. I’m looking forward to being back in the bay area (I’ll be in San Francisco and Santa Clara) — if you see me around feel free to stop me and say Hi!
]]>0