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

Jason McCreary:
Accepting Adam's TDD Challenge
Mar 16, 2017 @ 10:43:02

Jason McCreary has a post on his site where he's officially accepted a challenge made by Adam Wathan during the Laracon Online conference and how he went about solving it.

Last week at Laracon Online Adam Wathan gave a talk entitled “Lies you’ve been told about testing”. Following the talk, Adam posted a challenge. Amid Adam’s post, he makes a single claim and presents a challenge.

The challenge was to write a unit test for the three provided class implementations in isolation. The claim is that isolated unit testing is incompatible with Test Driven Development (TDD). He talks about the other phases of TDD outside of the "refactor" step ("red" and "green") and how he would apply those to the steps leading to a complete refactor. He also talks briefly about testing styles and what would need to change to complete the process on both the code and the test side.

tagged: tdd testdriven development refactor challenge resolution

Link: https://jason.pureconcepts.net/2017/02/tdd-isolated-unit-test-challenge-adam-wathan/

Leonid Mamchenkov:
Feature Flags in PHP
Dec 20, 2016 @ 09:16:29

In a new post to his site Leonid Mamchenkov talks about feature flags, a handy tool you can use in your application to enable/disable features and or risky changes in your code allowing you more production-level control.

Today edition of the “Four short links” from the O’Reilly Radar, brings a quick overview of the different feature flag implementations. It touches on the following: Command-line flags, with the link to gflags, A/B flags, Dynamic flags [which are more difficult] and more complex systems.

I’ve dealt with feature flags before, but never found an elegant way to scale those. [...] These days, something more robust than that is necessary for some of the projects at work. Gladly, there are plenty of available tools to choose from – no need to reinvent the wheel.

He talks about some of the challenges that he had in his own feature flag implementation including naming of the flags and where the flags should be placed. He then links to the PHP Feature Flags site and various PHP libraries that implement feature flags slightly differently and cover cookie-based, IP-based and URL-based features. He ends the post by pointing out that the lack of feature flags in any complex application is usually considered toxic when it comes to being able to scale an application correctly.

tagged: feature flag example challenge library naming location introduction

Link: http://mamchenkov.net/wordpress/2016/12/20/feature-flags-in-php/

Symfony Blog:
The Symfony 500 + 100 Challenge
Dec 12, 2014 @ 12:48:08

The Symfony blog pas posted something they're calling the Symfony 500 + 100 Challenge, an effort to kickstart some backlog cleanup of the number of issues currently in the project's backlog.

The end of the year is approaching, and we think that this is the best time to do some backlog cleaning before fresh starting the new year. Right now there are 728 pending issues in symfony/symfony repository and 177 issues in symfony/symfony-docs.

Some of those issues were reported a long time ago and they probably refer to Symfony versions that are no longer maintained. Others would have been fixed but not closed and there could also be some duplicates. That's why we ask your help to review all the pending issues in order to close irrelevant issues and achieve much more manageable levels: 500 issues or less for symfony/symfony and 100 issues or less for symfony/symfony-docs.

If you're interested in helping out, they've included a few steps to get you started locating and claiming an issue for you to work on. They also make suggestions on how to report back issues found on bugs, feature requests and general discussion items.

tagged: symfony challenge 500+100 issues bugfix featurerequest discussion

Link: http://symfony.com/blog/the-symfony-500-100-challenge

SitePoint PHP Blog:
Risks and Challenges of Password Hashing
Mar 11, 2014 @ 09:31:45

The SitePoint PHP blog has a new post today about the challenges of password hashing and some of the common risks that can come with it. It's a continuation of a previous article about the actual techniques for hashing in PHP.

The fact that the output of a hash function cannot be reverted back to the input using an efficient algorithm does not mean that it cannot be cracked. Databases containing hashes of common words and short strings are usually within our reach with a simple google search. Also, common strings can be easily and quickly brute-forced or cracked with a dictionary attack.

He points to a video demonstrating a method for getting the password data and why just salted hashes aren't a secure method for storing this information. He mentions a "randomness issue" (and PHP's rand function). Instead, he shows an example with openssl_random_pseudo_bytes o pull a chunk of randomized data. He then talks some about password stretching using the PBKDF2 handling in PHP. Finally, he goes past the hashing and gets into encryption, mentioning "password tweaking" as an alternative to generating a single key for every user.

tagged: password hashing encryption challenge risk tutorial

Link: http://www.sitepoint.com/risks-challenges-password-hashing/

Community News:
Pusher Challenge (Make Your App Realtime)
Oct 11, 2011 @ 13:57:34

The folks over at Pusher (the real-time push notification service) have announced a contest they're holding for developers (not just PHP either) to enter for a shot at a MacBook Air and a ticket to the Keeping it Realtime Conference - the "Pusher Challenge".

We believe you can massively improve the user experience and engagement of your existing applications by making them realtime. Pusher lets you do that quickly and simply with our hosted API. In the Pusher challenge, we want to see the innovative ways you can turbo-charge your apps with a sprinkling of Pusher magic.

Pusher uses Websockets to handle the notifications. You can sign up for a developer account to get the development ball rolling but the deadline is midnight (GMT) on October 16th (just five days away!) so dive in and get realtime quickly for your chance to win!

tagged: pusher challenge contest macbookair krtconf conference ticket

Link:

Dzone.com:
Object Calisthenics
Aug 19, 2011 @ 10:15:10

Giorgio Sironi has a new post on DZone.com today with a look at what he calls "object calisthenics", a sort of ">workout exercise for you to do to flex your object-oriented programming skills.

Calisthenics is a Greek-derived term for exercises, in the gym sense. I have object calisthenics, exercises for object-oriented programming, around for a long time and saw them as fascinating, but never got the time to try.

The challenge he lays out includes rules relating to indentation levels (really complexity levels), wrapping primitives in strings, small entities and using first-class collections. To illustrate, he works through a solution to the prime factors kata and breaks it down into the eight different rules complete with code examples.

tagged: object calisthenics kata challenge

Link:

Ibuildings techPortal's Blog:
Ibuildings Challenge: Results
May 03, 2011 @ 13:36:14

On the Ibuildings techPortal today they've posted the results of their Ibuildings challenge where the developer had to create a script able to play "Four in a Line" based on an abstract Player class provided.

Four in a Line as game has been mathematically solved and the advantage lies with the player taking the first turn. To level the playing field, we allowed each player to fight against all the others; in this way, any player had the chance to begin with the first move advantage playing against all the other opponents at least once, sharing the elements of luck and making it easier to spot skill.

There were three different categories - junior, medium and senior - and one winner for each:

  • Junior: Xavier Van Herpe (won a DPC2011 ticket)
  • Medium: Piotr Mlocek (won a DPC2011 ticket)
  • Senior: Tomas Creemes (won the iPad)

They also include some observations about the code submitted to the competition including adherence to coding standards and overall performance.

tagged: ibuildings challenge results winner

Link:

Project:
phpGolf - Programming Challenge
Oct 06, 2010 @ 13:39:00

Coding for a day job is interesting, but sometimes you just want to flex your development skills in something a bit more fun. phpGolf might be what you're looking for.

The term comes from Perl Golf where the point is to solve programming challenges with as few bytes as possible. Just like in real golf where players aspire to get the ball in the hole with as few strokes as possible.

There's some good challenges posted including several that are just output like "99 Bottles" or "Rot13" as well as some more difficult ones like the "Spiral" or "Blackjack". Judging from the list of submissions and the bytes they used to solve the problem, there's some creative developers out there. Take a look at the challenges and see how you and your code compare.

tagged: phpgolf programming challenge

Link:

Ibuildings techPortal:
The Test Driven Challenge - Winners and Results
Jul 08, 2010 @ 11:37:23

On the Ibuildings techPortal site today Ivo Jansch has announced the winners of their latest programming contest (a class to satisfy a given test case, a sort of TDD challenge).

n May and June we ran another one of our PHP coding contest. We love to play with PHP and offer people a chance to show off their coding skills in exchange for prizes! This time the contest revolved around creating a class that satisfies a given unit test case. The test case contained tests for 7 mathematical operations. The contestants did not only have to guess the actual operation, but also provide a class that implements the operation in as few lines as possible.

The contest this time actually had two mini-contests - one for the smallest solution following coding standards and the other for the smallest code size. There were three winners, one in head of the categories: David Frame, Piotr MŁoeck and Luca Lancioni. Congrats to all three!

tagged: tdd test challenge programming contest

Link:

Ibuildings Blog:
The ElePHPant Challenge - Winners and Results
May 17, 2010 @ 15:56:27

Ibuildings has officially wrapped up their "Elephpant Challenge" contest they were holding to solve a routing problem that involved a globe-trotting PHP ElePHPant. Their latest post (from Ivo Jansch) reveals the results.

Contestants had to write a script that calculated the shortest route for the Elephpant. The contest has several side goals: entries were not not only validated against the given landmarks and a second secret set of landmarks, they also were scored based on their performance, code complexity and code size.

The shorted route, found using the Haversine Formula, involved stops in Mexico City, Cupertino, Hawaii and the Tower of Pisa. The winner for the Medium category was Andy Thompson with an average of 10 landmarks with 38 lines of code (in 333 seconds). The winner in the Senior category was Michiel Brandenburg with coming out on top with a runtime of 50 seconds in 46 lines of code.

The post also includes some interesting observations they found about the event including contestants' general adherence to the specs, how the choices the developers made really made a difference in the outcome and how difficult running a contest like this could really be. Congrats to the winners!

tagged: elephpant challenge ibuildings travel winner

Link: