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

StackOverflow:
A Tale of Two Industries: How Programming Languages Differ Between Wealthy and Develo
Sep 01, 2017 @ 17:44:03

On the StackOverflow blog there's an interesting post that looks at the differences in programming languages between countries based on their current state, either a developing country or a wealthy one (or somewhere in between).

Here at Stack Overflow, we’re interested in using our data to share insights about the worldwide software development community. [...] This leads us to wonder how else programming technologies may differ between rich and poor countries, and how that affects our picture of the global software development industry. In this post, we’ll explore these differences, and show that’s it’s useful to segment the software development industry into high-income countries and the rest of the world.

All the analyses explored here were performed on 2017 so far (January-August), on the 250 tags that had the most traffic during that time.

They investigated some of the major programming languages and platforms (including PHP) and found some interesting negative and positive correlation results. The post then covers how they split the list of countries in two (wealthy vs developing) and show results of the technologies they use. They include graphs for each of the points they make and link over to their StackOverflow Insights site where you can gather statistics for evaluation of your own.

tagged: stackoverflow programming language country difference statistics

Link: https://stackoverflow.blog/2017/08/29/tale-two-industries-programming-languages-differ-wealthy-developing-countries/

StackOverflow:
Developer Survey Results 2017
Mar 28, 2017 @ 14:46:14

Each year the StackOverflow site posts a survey for developers to record their current feelings, thoughts and background. They've posted the results for this year's survey with the results from over 64,000 developers worldwide.

Each year since 2011, Stack Overflow has asked developers about their favorite technologies, coding habits, and work preferences, as well as how they learn, share, and level up. This year represents the largest group of respondents in our history: 64,000 developers took our annual survey in January.

As the world’s largest and most trusted community of software developers, we run this survey and share these results to improve developers’ lives: We want to empower developers by providing them with rich information about themselves, their industry, and their peers. And we want to use this information to educate employers about who developers are and what they need.

They start by share some high level points they learned from this year's results. The remainder of the post is the results presented in a more easily consumable graph/chart form. You can, of course, download the data yourself if you're interested in running reports of your own.

tagged: stackoverflow developer survey results 2017

Link: https://stackoverflow.com/insights/survey/2017/

Tim Cotten:
How to Screw Up Singletons (in PHP)
Nov 08, 2016 @ 18:58:05

In a recent post to his site Tim Cotten talks about how it's possible to screw up singletons in PHP. Singletons are a design pattern that returns the same object once it is created each time the method is called.

“Echo chambers” are an oft-encountered downfall of developers when learning new skills or implementing unfamiliar systems. What begins as a simple question leads to a collection of up-voted knowledge perfectly ready to be copied into your project?—?a great thing for productivity (if you don’t mind getting it wrong).

[...] With that example of echo chambers in mind let’s follow the path of a developer deciding to implement the Singleton pattern in PHP.

He goes through the mindset of a PHP developer wanting to use a singleton in their application, finding an example on the web for their need (making a PDO instance). He gives a sample implementation based on the web examples and tries to execute a test script....with a less than helpful error message. He points out that he's not picking on the source of the example itself, but using it as an example of the "echo chamber" idea perpetuating an example without understanding the logic.

He continues along this same path of thinking with an example from another source - StackOverflow. He cites a specific example, points out the issue and the code it contains. He ends the post with some helpful suggestions on how to "break" this echo chamber and improve the resources in various places on the web.

tagged: singleton echochamber examples stackoverflow phptherightway bestpractices

Link: https://blog.cotten.io/how-to-screw-up-singletons-in-php-3e8c83b63189#.8n7u746sw

StackOverflow:
Developer Survey Results 2016
Mar 21, 2016 @ 14:16:15

Each year the StackOverflow site asks the developers that use its services to participate in a survey with a wide range of questions. They've just posted the results of their latest round - the 2016 edition.

This year, over fifty thousand developers shared where they work, what they build, and who they are. You are about to read the results of the most comprehensive developer survey ever conducted. We asked them 45 questions. Key highlights include the following:

For the first time, more developers are using Mac than Linux as their primary OS. Only 7% of developers identify as "rockstars". Most developers prefer dogs to cats. (But not developers in Germany.)

The results of the survey are broken up into several main sections, each with their own statistics (and graphs for some) showing the results:

  • Developer Profile (including Geography, Age, Experience and Education)
  • Technology (includes Most Loved/Dreaded/Wanted, Top Paying Tech and Development Environments)
  • Work (including Job Priorities, Salary, Teams and Remote/In-office)
  • Community (Visit Frequency, Motivation and Asking/Answering)

You can check out the details these results in the full page output.

tagged: developer survey results 2016 stackoverflow

Link: http://stackoverflow.com/research/developer-survey-2016

Drupal Motion:
PHP is not dead
Mar 27, 2013 @ 16:12:42

In this new post to his Drupal Motion site, David Corbacho shares some statistics about why PHP "isn't dead yet" and that despite the slow adoption of the latest versions of the language, it's still as popular as it ever was.

This is a follow-up on the article Dries Buytaert wrote in 2007 PHP is dead... long live PHP!. In the article he shared same concern that Nick Lewis for the slow adoption rate of PHP 5, less than 20% at that time. And he encouraged to upgrade to PHP 5. [...] Well, PHP 5 adoption rate is 96.9%, and PHP 4 is quite dead. Mission accomplished. Let's have a look to the overall PHP health.

He shares data from a few sources about the popularity and adoption of PHP in applications/sites all across the web. Sources include Netcraft survey results, W3Tech usage summaries and Stack Overflow tagging matches (complete with graphs of each set of data).

tagged: statistics popularity language netcraft w3tech stackoverflow

Link:

Christian Weiske's Blog:
How to integrate PHP_CodeSniffer with Git repositories?
May 27, 2011 @ 16:16:48

Christian Weiske has a problem he hopes you can help with - he's trying to get the PHP_Codesniffer tool integrated into his git workflow (well, the workflow of his team) as an automatic process that runs on commit. Unfortunately he's having some issues.

At work, we used a SVN server and enforced our project coding standard with a pre-commit hook on the server that ran PHP_CodeSniffer. Whenever a developer tried to commit some code that does not match the standard, he got it rejected. [...] The only way to enforce the standard is a pre-receive hook on our central Git repository server that all devs push to. Just installing the SVN hook on it isn't the solution, though.

Because of how git handles commits (possibly multiple in one push) the usual methods won't work. Other tricky things like file renaming and allowing for legacy code check-ins are also needed. He's posted the question on StackOverflow too, but no one's come up with a good answer yet (at the time of this post).

tagged: git phpcodesniffer codesniffer commit hook stackoverflow

Link:

Zend Developer Zone:
Using the Stack Exchange API with PHP (part 2)
Jan 21, 2011 @ 17:12:22

The Zend Developer Zone has posted the second part of a series from Vikram Vaswani about using the Stack Exchange API to pull questions and comments users have posted to the site. In this second part of the series he shows how to get more information about those users and their activities.

The thing to remember about questions, answers and comments, though, is that they don't exist in a vacuum. They're created by users, and it's the users that make the site tick. That's why the Stack Exchange API includes a large number of methods designed to let developers access user profiles and timelines, and unearth the relationships between users and their posts. This article will focus primarily on this dimension of the Stack Exchange API, illustrating how to search for users, obtain user profiles and timelines, and retrieve information on a user's questions, answers, comments, badges and tags.

You'll need to get the StackPHP PEAR package to follow along with the code examples (it does some of the hard work for you). He shows how to:

  • Grab a list of users ordered by reputation
  • Search for usernames matching a string
  • Get badge information (in general and for a user)
  • Finding a user's activity timeline

Near the end he also includes an example of using the Zend_Paginator component of the Zend Framework to filter down the results to a more manageable size.

tagged: stackoverflow api tutorial pear stackphp

Link:


Trending Topics: