Episode 2: My Code is Perfect

Writing clean code isn’t something you pick up overnight, nor is it a brand new topic. In this episode Jeff and Matt discuss the characteristics and mechanics of creating clean code and how to approach your project from a clean code perspective.

Download

Notes

In this episode, Jeff and Matt talk about code quality and beautiful code. Beautiful code follows a standard. If you don’t have one, find one and adopt it. For PHP projects you can start with PSR-2, a part of the PHP-FIG Standards, or PSRs (not actually called Phil’s Silly Recommendations.)

Find a project you can admire–or at least one that has the quality level you want to achieve–and study it. One example might be to look at a framework that’s popular, such as Laravel. Study the project and realize that it likely didn’t come to exist exactly how it is now overnight.

Don’t be afraid to throw code away. Your first solution will never be the best solution to the problem. It’s okay to write code to learn more about your problem–perhaps just tests, even–and then get to a reasonably-clean solution eventually.

While Jeff and Matt talk a lot about coding standards, there is much, much more to clean code. The three holy books of clean code are Clean Code: A handbook of Agile Software Craftsmanship and The Clean Coder: A Code of Conduct for Professional Programmers by Robert Martin (a.k.a. Uncle Bob,) and Code Complete: A Practical Handbook of Software Construction by Steve McConnell. Reading these three books won’t necessarily make your code better, but it certainly won’t hurt you to be aware of what they contain.

Learning the process of writing clean code takes an entire career. Matt watched a relevant TED talk about the technique of learning things in 20 hours called Learning Anything in 20 Hours. To become great at doing anything as a programmer, you have to learn the process of breaking your subject up into segments and practice. It’s Matt’s opinion that the idea of taking 10,000 hours to master something is too daunting, so breaking things up into 20-hour segments is more appealing.

On the subject of practicing, one useful tool for practice is a Code Kata). There is a formal definition and lots of resources for code katas. But what if you could just apply the concept of repetitive practice into your tasks? Matt did something like this with an OAuth 1.0 client he was working on to learn about signatures.

There is no substitute for actually writing code. No amount of reading documentation will substitute for experiencing the errors that come about from your misunderstandings. It is part of the process.

Being a sole developer is hard in terms of code quality. You need someone else to look at your code because that exposes the problems with the legibility of the code you’re writing. So if you are a sole developer, find some way to get someone else’s eyes on your project. No one will know if your code is good or bad if they can’t see it. Posting small gists or pastebins is not sufficient.

Ship early, ship often. If your code is only local, no one can help you. Get your code out there as soon as possible. You’ll be a better developer because of it.

Jeff and Matt weigh in on developing libraries for a larger audience. You should start by solving an actual problem in your business, then extract into a library if it’s relevant outside of your business. Don’t start out with the goal of making the new hotness, let that come naturally. Matt mentioned his Snaggle library as something he’s working on right now and Jeff mentioned a project he worked at for his employer called the Gem formerly known as Clerk. Both of these started as libraries which kind of contradicts this advice.

If you’re looking for a HTTP client for your PHP projects, look no further than Guzzle.

The last important point of discussion is to always challenge your expectations and assumptions in your code. When you’re writing code you should be constantly asking yourself, “why am I doing it this way?” Sometimes the answer is, “I don’t know,” which means you need to take a break and seek out the answer to the question.

Go forth and practice writing clean code.

Posted in All Podcasts, Loosely Coupeled | Comments Off

Episode 43: Erotic Art The Right Way

minotaurus

Our latest episode features someone who we’re been trying to get on for a while: Josh Lockhart, the developer of the Slim Framework for PHP and the founder of the PHP The Right Way project. We also have a new sponsor in Nude New Relic!

Listen

Links and Notes

Posted in All Podcasts, Dev Hell | Leave a comment

Episode 23: VirtPHP – Managing your Herd of ElePHPants

This week Ben Edmunds and Phil Sturgeon are joined by Jacques Woodcock and Jordan Kasper to discuss virtPHP.

virtPHP is a tool for managing multiple environments on your development machine. It is similar to Python’s virtualenv or Ruby’s rbenv, but for PHP.

Upcoming Conferences

Phil will be speaking at PHP South Africa in April.

Ben has no idea what he will attend this year.

Jacques will likely be speaking at True North PHP later this year.

Jordan will be speaking at jQuery UK in May and at Dutch PHP in June.

As always, you can subscribe to the channel and follow us on Twitter for announcements about when new live shows will be recorded.

Posted in All Podcasts, PHP Town Hall | Leave a comment

Episode 120: Quick update, rant about PHP, upcoming interview

Upcoming

Upcoming interview with former Twitpiccer about scaling service up to billions of requests – get your questions in ASAP.

Sass 3.3 released

http://blog.sass-lang.com/posts/184094-sass-33-is-released

Free python screencasts from neckbeard republic

https://www.neckbeardrepublic.com/

New free font : Clear Sans

https://01.org/clear-sans

 

PHP/HipHop/HHVM/Hack/Zephir/etc

Lots of movement happening in the PHP world recently, and I barely scratch the surface of even beginning to make a dent in making sense of it all, but hopefully some of this will be of interest nonetheless ;)

http://www.sitepoint.com/look-hack-php-replacement-hhvm/

http://hacklang.org

https://code.facebook.com/posts/264544830379293/hack-a-new-programming-language-for-hhvm/

http://zephir-lang.com/intro.html

http://www.php-cpp.com

http://hippyvm.com

 

 

Posted in All Podcasts, WebDev Radio | Leave a comment

Episode 1: We’re Passionate, Confident Developers, Right?

In this episode Jeff and Matt discuss passion and confidence within the context of development and how to deal with internal and external influence on your passion. They cover caring about what you’re doing, motivation level, dealing with criticism and feedback, Imposter Syndrome, and the Dunning-Kruger man. Key takeaways are to remember that everyone experiences highs and lows in their confidence; coping with what seems like a lack of passion can be as simple as doing something else for a while; and it is important to be aware of your situation and to talk about it.

Links:

Download

Posted in All Podcasts, Loosely Coupeled | Comments Off

Episode 22: The Great Joomla! License Battle of 2014

This week Ben Edmunds is joined by new guest David Stanley and recurring guest Don Gilbert to discuss the latest Joomla! framework licensing drama. Phil was too busy having a real world life to join us this week, boo!

Don does a great job of articulating why switching the Joomla! Framework to an LGPL license would be best for everyone and just might cure cancer. Ben tries to play devil’s advocate but eventually can’t even maintain the ruse. David talks now and then, mostly about his new found love of the AeroPress.

Cool things of the week

Don recommends you check out Gitter.IM and PageKit.

David says you should start using AngularJS and Foundation if you want to be one of the cool kids.

Ben promotes DivShot and hasn’t received any sponsorship money yet hint hint.

As always, you can subscribe to the channel and follow us on Twitter for announcements about when new live shows will be recorded.

Posted in All Podcasts, PHP Town Hall | Leave a comment

Episode 42: Hacking Difficult People

1991ish - Clint - Wooodbridge High - Mr. Linz's physics class - funny face - look at all the preppy people - 0454

For episode 42 we are blessed by the wonderful and talented Laura Thomson, Senior Engineering Manager at Mozilla. Laura drops science on managing engineers, Minimum Viable Bureaucracy, HHVM and Hack, and her mid-Atlantic coast accent. This is a must-listen for folks who manage tech teams.

Listen

Links and Notes

Posted in All Podcasts, Dev Hell | Leave a comment

Episode 119: Toran Billups interview

I had a chance to chat with Toran Billups about EmberJS, PyTenn and other stuff.  Take a listen :)

toranbillups.com

emberjs.com

Posted in All Podcasts, WebDev Radio | Leave a comment

Episode 21: Attack of the Brazilians

This week author of ”Vagrant CookBookÉrika Heidi and serial usergroup creator Rafael Dohms join the show to
talk about… well, all of that. Two Brazilian PHP developers now living in Amsterdam, tell their stories and talk
about what they do.

We cover a lot of conversation connected to Vagrant and some of its upcoming features and functionality. We also talk
about provisioning, comparing Chef, Puppet and Ansible.

This weeks questions from the audience:

What are your thoughts on using Bash as a provisioner? Why or why not use it?
– Edmund Zynda

Thoughts on the new github Atom editor
– Matthew Reschke

As always, you can subscribe to the channel and follow us on Twitter for announcements about when new live shows will be recorded.

Posted in All Podcasts, PHP Town Hall | Leave a comment

The Security of Future PHP Versions – Lately in PHP podcast episode 45

By Manuel Lemos
As the plans for the upcoming PHP 5.6 and PHP 6 versions are being finalized, some of the proposals are about improving the security of these future PHP versions.

That has been one of the main topics discussed by Manuel Lemos and César Rodas on the episode 45 of the Lately in PHP podcast.

They also have talked about several other types of proposals and ideas for PHP 6, as well a tutorial on How to Use a Webcam to take Pictures in PHP Application.

Now listen to the podcast, or watch the hangout video or read the transcript text to learn more about these interesting PHP topics that were discussed.

Posted in All Podcasts, php classes | Leave a comment