Best Practices

Best Practices

116 bookmarks
Custom sorting
Workflows of Refactoring
Workflows of Refactoring

"Refactoring has grown into a well-known technique, and most software development teams at least claim to be doing refactoring regularly. Many teams, however, don't appreciate the different workflows that refactoring can be used in, and thus miss opportunities to effectively incorporate refactoring into their development activities. In this deck I explore various different workflows. I hope it will encourage teams to integrate refactoring more deeply into their work, resulting in a better designed code-bases that will make it quicker and easier to add new features."

Workflows of Refactoring
SANS Institute - Top 20 Critical Security Controls
SANS Institute - Top 20 Critical Security Controls
"The Critical Security Controls focuses first on prioritizing security functions that are effective against the latest Advanced Targeted Threats, with a strong emphasis on "What Works" - security controls where products, processes, architectures and services are in use that have demonstrated real world effectiveness. Standardization and automation is another top priority, to gain operational efficiencies while also improving effectiveness. The actions defined by the Controls are demonstrably a subset of the comprehensive catalog defined by the National Institute of Standards and Technology (NIST) SP 800-53. The Controls do not attempt to replace the work of NIST, including the Cybersecurity Framework developed in response to Executive Order 13636. The Controls instead prioritize and focus on a smaller number of actionable controls with high-payoff, aiming for a "must do first" philosophy. Since the Controls were derived from the most common attack patterns and were vetted across a very broad community of government and industry, with very strong consensus on the resulting set of controls, they serve as the basis for immediate high-value action."
SANS Institute - Top 20 Critical Security Controls
Output escaping
Output escaping
"So when you output into an HTML page with PHP, you need to convert , and & in your output into the HTML entities for those characters, otherwise you'll either trip up the parser (breaking your layout), or worse, insert HTML commands where you don't mean to. There's a whole class of attacks that exploit non-escaped output: they're called cross-site scripting attacks (or XSS for short; CSS was already taken!)"
Output escaping
Bien utiliser Git merge et rebase • Git Attitude : formations Git qualitatives et sympathiques
Bien utiliser Git merge et rebase • Git Attitude : formations Git qualitatives et sympathiques

"Les principes suivants résument les réflexes à acquérir ; la suite de cet article explorera le détail des manipulations associées.

Quand je fusionne une branche… Si elle est purement locale et temporaire, je m’assure qu’elle n’apparaît pas dans le graphe final de l’historique en faisant un fast-forward merge, ce qui peut nécessiter un rebase au préalable. Si elle a une sémantique claire et documentée, je m’assure qu’elle apparaîtra clairement dans le graphe de l’historique, du début à la fin, en garantissant un true merge. Quand je m’apprête à pusher mon travail local, je nettoie mon historique local d’abord pour partager un historique propre, au cordeau. Quand je me vois refuser le push parce qu’un travail complémentaire a été pushé entre-temps, je rebase sur la branche distante à jour pour éviter de polluer le graphe par des tas de micro-merges malvenus."

Bien utiliser Git merge et rebase • Git Attitude : formations Git qualitatives et sympathiques
Baseimage-docker: A minimal Ubuntu base image modified for Docker-friendliness
Baseimage-docker: A minimal Ubuntu base image modified for Docker-friendliness

"Cool, it seems to work. Pretty easy, right?

Not so fast.

You just built a container which contains a minimal operating system, and which only runs your app. But the operating system inside the container is not configured correctly. A proper Unix system should run all kinds of important system services. You're not running them, you're only running your app."

Baseimage-docker: A minimal Ubuntu base image modified for Docker-friendliness
Web Fundamentals — Google Developers
Web Fundamentals — Google Developers

"Web Fundamentals is a comprehensive resource for multi-device web development. We're just getting started and want your help, if you see something amiss or have a suggestion file an issue or submit a pull request. You can use Google Web Starter Kit to start creating new sites in minutes that follow all of our best practice guidance."

Web Fundamentals — Google Developers
Ten Docker Tips and Tricks That Will Make You Sing A Whale Song of Joy | Docker Blog
Ten Docker Tips and Tricks That Will Make You Sing A Whale Song of Joy | Docker Blog

"So I’m going to share ten of my favorite tips and tricks with you guys. Ready?

Run Docker on a VPS for extra speed Bind mount the docker socket on docker run Use containers as highly disposable dev environments bash is your friend Insta-nyan Edit /etc/hosts/ with the boot2docker IP address on OSX docker inspect -f voodoo Super easy terminals in-browser with wetty nsenter

docker"

Ten Docker Tips and Tricks That Will Make You Sing A Whale Song of Joy | Docker Blog
Understanding OpCache
Understanding OpCache
"Over the web you will easily find a lot of tutorials covering all the OpCache installation and configuration steps (it is enabled by default on 5.5, but can be installed as an extension on older versions). Read the article below to find the answers to some of the typical questions regarding different practical aspects of working with this particular cache engine."
Understanding OpCache
The 5 laws of API dates and times | API UX
The 5 laws of API dates and times | API UX
"Let’s say you’re building your first API. Be it public, private, or some hybrid thereof, don’t be surprised if your first defect is date/time-related. Do not underestimate how much trouble you can get into when it comes to handling date and times. Here are some tips which might keep you out of this potential future."
The 5 laws of API dates and times | API UX
InfoQ eMag: Web APIs: From Start to Finish
InfoQ eMag: Web APIs: From Start to Finish
"Designing, implementing, and maintaining APIs for the Web is more than a challenge; for many companies, it is an imperative. This eMag contains a collection of articles and interviews from late 2014 with some of the leading practictioners and theorists in the Web API field. The material here takes the reader on a journey from determining the business case for APIs to a design methodology, meeting implementation challenges, and taking the long view on maintaining public APIs on the Web over time."
InfoQ eMag: Web APIs: From Start to Finish
ClassManager – You shall not pass | Piotr Pasich
ClassManager – You shall not pass | Piotr Pasich
"The duck technique is called that because one of the best programmer’s friend is a small bathroom duck. If you stuck or do not know what to do next, or do not know why the application behaves in a specific way, then it’s good to explain, step by step everything – the algorithm, proper behavior, meaning and the name purpose to somebody – the duck. I must admit that sometimes I treat my co-workers as ducks accidentally. They do the same with me. Have you ever been in this kind of situation when somebody comes to you, starts the sentence and find out the solution before you talk."
ClassManager – You shall not pass | Piotr Pasich
How To Get a Happier Workforce
How To Get a Happier Workforce

"How can you measure happiness? One way to do it is to ask people how happy they feel. Löffler and Miarka referred to the Happiness Metric that Jeff Sutherland described in Scrum: The Art of Doing Twice the Work in Half the Time.

Löffler and Miarka provided suggestions for what you can do when you want to improve happiness in teams:"

How To Get a Happier Workforce
Alerting Philosophy · Netflix/atlas Wiki
Alerting Philosophy · Netflix/atlas Wiki

"It is recommended for all alerts to adhere to the follow guidelines:

Keep conditions simple. Alerts should be actionable. Check for measured failure on critical paths rather than a lack of success. Alerts should not have special cases for routine maintenance. Consider how the alert check can fail."

Alerting Philosophy · Netflix/atlas Wiki
Ecrire du code propre – Les piliers | OCTO talks !
Ecrire du code propre – Les piliers | OCTO talks !

"Le « Clean Code » regroupe plusieurs règles et principes pour vous aider à construire mais surtout refactorer votre code. En effet, comme le disait Michel dans son article sur les artisans du code, le respect de ces différentes règles énoncées par Bob Martin a pour but d’offrir à votre code, entres autres, simplicité, lisibilité et structuration pour qu’il soit le plus évolutif et maintenable possible sur le long terme.

Ce premier article traite des piliers qui vous soutiendront dans votre pratique de l’amélioration de la qualité de votre code."

Ecrire du code propre – Les piliers | OCTO talks !
Writing Robust Bash Shell Scripts - David Pashley.com
Writing Robust Bash Shell Scripts - David Pashley.com
"Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It’s possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts."
Writing Robust Bash Shell Scripts - David Pashley.com
PHP: The Right Way
PHP: The Right Way

"There’s a lot of outdated information on the Web that leads new PHP users astray, propagating bad practices and insecure code. PHP: The Right Way is an easy-to-read, quick reference for PHP popular coding standards, links to authoritative tutorials around the Web and what the contributors consider to be best practices at the present time.

There is no canonical way to use PHP. This website aims to introduce new PHP developers to some topics which they may not discover until it is too late, and aims to give seasoned pros some fresh ideas on those topics they’ve been doing for years without ever reconsidering. This website will also not tell you which tools to use, but instead offer suggestions for multiple options, when possible explaining the differences in approach and use-case.

This is a living document and will continue to be updated with more helpful information and examples as they become available."

PHP: The Right Way
Distributing a PHP CLI app with ease
Distributing a PHP CLI app with ease

"Something I love with PHP is how easily you can build a CLI application. Some libraries like the Symfony Console Component has greatly improved this process. Also, the ability to package a whole application into a single PHAR container make the distribution and usage even easier.

"

Distributing a PHP CLI app with ease
domnikl/DesignPatternsPHP
domnikl/DesignPatternsPHP

"This is a collection of known design patterns and some sample code how to implement them in PHP. Every pattern has a small list of examples (most of them from Zend Framework, Symfony2 or Doctrine2 as I'm most familiar with this software).

I think the problem with patterns is that often people do know them but don't know when to apply which."

domnikl/DesignPatternsPHP
Sam Newman - Backends For Frontends
Sam Newman - Backends For Frontends
"Backends For Frontends solve a pressing concern for mobile development when using microservices. In addition they provide a compelling alternative to the general-purpose API backend, and many teams make use of them for purposes other than just mobile development. The simple act of limiting the number of consumers they support makes them much easier to work with and change, and helps teams developing customer-facing applications retain more autonomy."
Sam Newman - Backends For Frontends