Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

TechBeacon:
9 ways to master awful code, fast
Jul 25, 2018 @ 15:24:58

On the TechBeacon site there's a new tutorial posted sharing a list of nine ways to master awful code and make it more efficient, easier to maintain and clearer.

You've been given the task of implementing a new feature on an old codebase, but the code looks awful. How can you understand it as quickly as possible? Here are several shortcuts to help learn the important parts of new code without getting lost in the irrelevant details.

Their suggestions range from technical to non-technical and include:

  • Ask for help
  • Make it easy to reproduce bugs (add version control, build environments)
  • Prepare for automated testing
  • At first, work on a small task

For each item in the list there's an explanation and links (or screenshots) of other resources to help illustrate their point.

tagged: master awful code refactor top9 list suggestion developer

Link: https://techbeacon.com/9-ways-master-awful-code-fast

Joe Ferguson:
How to move a dependency to Composer while requiring an old version
Jan 17, 2018 @ 15:54:24

In a new post to his site Joe Ferguson shows you how to move a dependency over to Composer but still require the older version, possibly one that's already included in the codebase as a checked-in source.

A common problem I run into with older applications are dependencies that have been added and loaded from the application’s repository. You would often see a “libraries” folder with a “className.php” type file. If you’re lucky you’ll have the entire folder of the dependency including the release notes to be able to find out exactly what version you’re using.

[...] What if the author hasn’t tagged our older version? Maybe they converted the repository to git from subversion or some other system? You have to go digging into the commit history to find the commit you want to match your current version.

He includes the Composer configuration required for both examples (loading the older version and loading by commit ID) as well as the addition of the "minimum-stability" option. This option allows you to pull directly from the "master" branch if you need to - just be sure to define exact versions of other dependencies otherwise you'll get dev versions of them too.

tagged: composer dependency version old tutorial commit master

Link: https://www.joeferguson.me/how-to-move-a-dependency-to-composer-while-requiring-an-old-version/

SitePoint PHP Blog:
Mastering Composer – Tips and Tricks
May 26, 2015 @ 16:02:32

The SitePoint PHP blog has a new tutorial today from editor Bruno Skvorc with some tips and tricks to help you master Composer, the widely popular PHP package management tool.

Composer has revolutionized package management in PHP. It upped the reusability game and helped PHP developers all over the world generate framework agnostic, fully shareable code. But few people ever go beyond the basics, so this post will cover some useful tips and tricks.

Tips in his list include:

  • Installing Composer globally
  • Using "composer require" to install packages
  • Committing your composer.lock file
  • Options to provide profiling information
  • Speeding up Composer installations

...and many more. If you're looking to take your Composer usage and knowledge beyond the basics, definitely check out this article.

tagged: master composer tips tricks advanced list

Link: http://www.sitepoint.com/mastering-composer-tips-tricks/

DZone.com:
MongoDB Driver Tips & Tricks: PHP
Jun 04, 2014 @ 15:10:49

On DZone.com there's a new post from Chris Chang that's the third part of the series looking at using various language drivers for working with MongoDB. In this latest article he focuses in on the PHP driver, giving a brief introduction and a few handy tips.

This blog post is the third of a series where we are covering each of the major MongoDB drivers in depth. The driver we’ll be covering here is the PHP driver, developed and maintained by the MongoDB, Inc. team (primarily @derickr, @bjori and @jmikola).

He includes a link to some basic examples and shares a "production-ready connect string" with some MongoLab recommended settings. The tips include topics ranging from working with index builds, the lowering of is_master_interval and configuring the connectionTimeoutMS setting for optimum connection handling.

tagged: mongodb driver tips tricks mongolab index master interval connection timeout

Link: http://java.dzone.com/articles/mongodb-driver-tips-tricks-php

Community News:
PHP Master Series, Volume 1 (One-Day Virtual Conference)
Nov 19, 2012 @ 15:43:42

Cal Evans has officially announced his latest in his series of full-day virtual conferences aimed at PHP developers - the PHP Master Series, Volume 1 (from the Day Camp 4 Developers):

There is a lot of good information shared at conferences and sadly not event 1% of developers who identify themselves as PHP developers, ever get to attend one. This makes me sad. So I’m trying something new. [...] I went through the PHP conferences from the second-half of this year and picked out 6 that really stood out. This was a very difficult task; the PHP community and conferences are blessed with a bounty of great talks and speakers. The criteria I used was topics, joind.in score, and speaker. I tried to find talks that were on topics that are of interest to developers, that others liked, and that were given by speakers I know, and know do a good job.

This one-day virtual event is happening December 21st (a Friday) and is made up of six different talks from six different speakers:

  • Designing Beautiful Software - Matthew Weier O'Phinney
  • Cryptography For The Average Developer - Anthony Ferrara
  • Javascript Best Practices & BackboneJS for the PHP Developer - Ryan Weaver
  • Your code sucks, let's fix it. - Rafael Dohms
  • Building a Firehose - Ian Barber
  • From POX to HATEOAS, A Real Company's Journey Building a RESTful API - Luke Stokes

You can pick up your ticket to attend for just $50 USD as a regular attendee (or voice only for those that just want to listen in). There's also an option for an "Office Party" for $100 USD if you have more than a few folks that would like to attend.

tagged: virtual conference master daycamp4developers december

Link:

Alexey Zakhlestins' Blog:
GObject for PHP (new bindings project)
Feb 24, 2011 @ 14:25:23

In a new post Alexey Zakhlestins talks about a project he's been working on, a part of the split up with PHP-GTK out into separate projects. His part of the group is GObject with has now been moved over to github.

This new PHP extension is called "GObject for PHP", so, my main concern, obviously is building comfortable bridge between GObject objects and PHP's objects. It starts to work, but there's a lot of stuff to be done. Please join the project, if you are interested. We need more hands!

He describes some of the features already in the library - counterparts for parts of the current GObject world in PHP including GType, GSignal and GParamSpec. This is all on the master branch. In his "introspection" branch he's working on the introspection idea the GNOME community has been working towards too.

tagged: phpgtk gobject binding github master introspection

Link:

Listmania:
10 Books To Help You Master PHP Development
Jun 16, 2010 @ 15:31:35

On the Listmania site there's a recent post introducing you to ten PHP books that can help you to master the language and move forward in your development skills.

PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft’s ASP. If you are just starting up trying to learn PHP then this post is just what you’re looking for as it list 10 really good books that will get you started well.

Books included in their list of ten are things like:

  • PHP and MySQL Web Development (4th Edition)
  • PHP Cookbook : Solution and Examples for PHP Programers
  • Head First PHP & MySQL
  • Beginning PHP and MySQL
  • PHP Objects, Patterns, Third Edition

Obviously these books are for developers at different levels in their skillsets, but you can pick out the ones from this list that might suit you best. My personal recommendation is for "PHP Objects, Patterns and Practice" by Matt Zandstra.

tagged: master development book opinion

Link:

Internet Resources Blog:
10 Principles of the PHP Masters
Aug 24, 2009 @ 17:01:08

Earlier in the month the Internet Resources blog posted ten principles from the PHP masters (well-known people connected to PHP and various projects). Tips include:

  • Use PHP Only When You Need it - Rasmus Lerdorf
  • Never, ever trust your users – Dave Child
  • Invest in PHP Caching – Ben Balbo
  • Make Better Use of PHP’s Filter Functions – Joey Sochacki
  • Use Batch Processing – Jack D. Herrington

Check out the rest of the post for helpful hints from other masters in the community such as Josh Sharp, David Cummings and Chad Kieffer.

tagged: master suggestion tip principle

Link:

Rob Allen's Blog:
Retrieving a list of databases from SQL Server
May 20, 2009 @ 13:27:48

Rob Allen (as a part of his work on his WinPHP Challenge entry) has posted a little code snippet to his blog about fetching the list of all databases sitting on a SQL Server instance.

I need to get a list of databases from SQL Server for the currently logged in user. Initially, I found a built in function sp_databases. This looked promising, until I discovered that it didn't work for my user. I'm pretty sure that it's related to permissions. The user just has db_owner on a specific database and nothing else.

He ended up selecting from a sys.database table where the name wasn't in a grouping of standard SQL Server databases (like "master" or "msdb"). He wrapped this in a foreach with a try/catch to catch errors thrown and drops all of the names into a regular array.

tagged: master system list database sqlserver

Link:

Zend Developer Zone:
The ZendCon Sessions Episode 17: SQL Query Tuning: The Legend of Drunken Query
Apr 24, 2009 @ 16:13:13

The Zend Developer Zone has posted their seventeenth episode in the ZendCon Sessions podcast series today. This time it's Jay Pipes' MySQL-centric talk The Legend of Drunken Query Master.

The ZendCon Sessions are live recordings of sessions that have been given at previous Zend Conferences. Combined with the slides, they can be the next best thing to having attended the conference itself. In this series we will be releasing regular sessions from ZendCon 2008 as we lead up to this year's ZendCon.

You can check out his slides as you listen to the episode either through the in-page player, downloading the mp3 directly or subscribing to the podcast's feed.

tagged: jaypipes zendcon session podcast drunken query master tuning sql mysql

Link:


Trending Topics: