All Projects → darekkay → best-practices

darekkay / best-practices

Licence: other
A guide for building better applications

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to best-practices

neo-csharpcoe
.NET Blockchain C# Developers Center of Excellence
Stars: ✭ 13 (-50%)
Mutual labels:  best-practices
best-practices
Unosquare Labs Best Practices
Stars: ✭ 19 (-26.92%)
Mutual labels:  best-practices
into-docker
Never write another Dockerfile
Stars: ✭ 82 (+215.38%)
Mutual labels:  best-practices
common-coding-conventions
A concise and universal guide to clear software design.
Stars: ✭ 306 (+1076.92%)
Mutual labels:  best-practices
dx-scanner
CLI tool that allows you to measure quality of a team work and an app based on your source code.
Stars: ✭ 79 (+203.85%)
Mutual labels:  best-practices
android-oss-best-practices
Best practices on creating Android OSS library projects [JA]
Stars: ✭ 32 (+23.08%)
Mutual labels:  best-practices
accessibility-guide
Client friendly accessibility guide
Stars: ✭ 15 (-42.31%)
Mutual labels:  best-practices
a star on grids
Best practices for implementing A* with a focus on four- and eight-connected grid worlds.
Stars: ✭ 23 (-11.54%)
Mutual labels:  best-practices
gof design patterns
GoF Design Patterns implemented in modern C++.
Stars: ✭ 21 (-19.23%)
Mutual labels:  best-practices
script-best-practices
Best practices for writing bash scripts
Stars: ✭ 15 (-42.31%)
Mutual labels:  best-practices
BackportCpp
Library of backported modern C++ types to work with C++11
Stars: ✭ 53 (+103.85%)
Mutual labels:  best-practices
ASP.NET-Core-Web-API-Best-Practices-Guide
ASP.NET Core Web API Best Practices Guide
Stars: ✭ 62 (+138.46%)
Mutual labels:  best-practices
talk-dev-to-me-twitch
This repo is a collection of code samples and links to previous twitch live stream sessions. If you have any ideas or suggestions for future episodes, feel free to open an issue.
Stars: ✭ 118 (+353.85%)
Mutual labels:  best-practices
abap-best-practice
A list of common principles of clean ABAP development
Stars: ✭ 69 (+165.38%)
Mutual labels:  best-practices
best-practices
Random best practice from internet belong here.
Stars: ✭ 883 (+3296.15%)
Mutual labels:  best-practices
enterprise-angular-seed
Angular CLI based seed application incorporating many best practices typically needed in Enterprise apps.
Stars: ✭ 62 (+138.46%)
Mutual labels:  best-practices
a11y-contracting
Building Accessibility Best Practices into Contracting
Stars: ✭ 43 (+65.38%)
Mutual labels:  best-practices
mllint
`mllint` is a command-line utility to evaluate the technical quality of Python Machine Learning (ML) projects by means of static analysis of the project's repository.
Stars: ✭ 67 (+157.69%)
Mutual labels:  best-practices
lightning-hydra-template
PyTorch Lightning + Hydra. A very user-friendly template for rapid and reproducible ML experimentation with best practices. ⚡🔥⚡
Stars: ✭ 1,905 (+7226.92%)
Mutual labels:  best-practices
php-the-right-way
La version française de "PHP: The Right Way" qui est un condensé des meilleures pratiques sur le développement PHP (conventions, liens vers les tutoriels qui font référence, etc)
Stars: ✭ 51 (+96.15%)
Mutual labels:  best-practices

Best Practices and Coding Guidelines

NOTE: This repository is archived. The content is now part of my blog and will be always available under darekkay.com/best-practices.


A guide for building better applications.

Don't follow this guide blindly. Read the references to learn more about certain rules. Some practices become outdated as the web evolves.

Table of Contents

General

  • Provide 404 and 50x error pages.
    • Inline all external resources on error pages (e.g. CSS, images).
  • Test your website with adblockers enabled.
  • Monitor your website's availability, e.g. with Uptime Robot.
  • Offer an RSS feed for any kind of articles. Include the full content instead of snippets.

HTML

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page Title</title>
  • Define favicons:
    • Place a favicon.ico in the root document folder, containing at least 16x16 and 32x32 icons.
    • Consider using SVG favicons.
    • Place a 180x180 apple-touch-icon.png in the root document folder for iOS devices.
    • Create a 192x192 icon for Android devices:
<link rel="icon" sizes="192x192" href="/favicon-192.png">
  • Place paragraphs in a <p> tag. Do not use multiple <br> tags.
  • Do not write closing tag comments, e.g. <!-- end .content -->.
  • Do not set values for boolean attributes, such as disabled, selected or checked.
  • Provide type, inputmode and autocomplete values to input fields if applicable. Test possible values here.
  • Use translate="no" for content that should not be translated.

CSS

JavaScript

ReactJS

Redux

Images

Code quality

Performance

Design

Accessibility

  • Use semantic HTML.
  • Provide an alt text for all images. Use alt="" for decorative images.
  • Provide a label for all form inputs. The placeholder attribute is not a usable alternative.
  • Write descriptive links.
  • The contrast ratio between the background and the foreground should be as high as possible.
  • When using colors to communicate an information (such as states or graphs), use different styles or add a text/icon to distinguish different states. This is important for both colorblind people and for printing a page in grayscale.
  • The tab order should go from top to bottom, from left to right
    • Do not use a tabindex value greater than 0.
    • Do not hide the focus ring without providing an alternative.
  • Be aware of screen reader conflicts with accesskeys, making accesskeys mostly useless for blind users.
  • Make sure zooming in/out doesn't break the page.
  • Avoid using icons without labels
  • Ensure that interactive controls have at least a 44x44px target click size.

View my accessibility notes for more information.

Security

Privacy

  • Include a privacy notice.
  • Comply with the EU Cookie Law.
  • Collect only the bare minimum amount of data needed for its purpose.

SEO

User experience

DevOps

Git

  • Commit early and often. Perfect later.
  • Copy/move a file in a different commit from any changes to it to retain the correct file history.
  • Do not force push public branches which other people are working on.
  • Create a tag for each release using semantic versioning, e.g. v1.4.8.
    • Create a release for each tag on GitHub.

GitHub

Code collaboration

  • Include guidelines for contributors in CONTRIBUTING.MD.
    • Include a humans.txt file to acknowledge project contributors.
  • Use npm scripts so no further build tools have to be installed or used.
  • Consider recording a screencast or a console demo to demonstrate the setup and usage.

Marketing

  • Summarize your core idea in a single sentence (elevator pitch).

Business

Writing

Style

  • Prefer active over passive voice.
  • Avoid ambiguous pronouns:
    • In general, if more than five words separate your noun from your pronoun, consider repeating the noun instead of using the pronoun.
    • If you introduce a second noun between your noun and your pronoun, reuse your noun instead of using a pronoun.
    • it, they, them, their, this, that
  • Pick specific verbs over vague ones. Reduce the usage of:
    • be / is / are / am / was / were
    • occur / happen
    • there is / there are
  • Keep list items parallel.
  • Put conditional clauses before instructions, not after.
  • Avoid unnecessary words:
    • really, pretty much, quite a few, obviously, basically, simply, of course, clearly, just, everyone knows, very, a bit, a little, quite, too, though, sort of, kind of, rather

Grammar

  • that vs. which:
    • use that for defining (= non-optional) clauses (no comma)
    • use which for non-definint (= optional) clauses (comma)
  • help (to) do:

Work methods

Project management

  • Start sprints on Wednesday to reduce the absence in sprint meetings due to days off and remote working.
  • Use appropriate defect severities. Do not misuse them to express a (customer) prioritization.
    • Severity 1 (Critical): System failure. No further processing is possible.
    • Severity 2 (High): Unable to proceed with selected function or dependants.
    • Severity 3 (Medium): Restricted function capability, however, processing can continue.
    • Severity 4 (Low): Minor cosmetic deviances.

Remote work

  • Go remote-first, meaning you build your development team around a workflow that embraces the concepts of remote work, whether or not your employees are remote.
  • Prefer asynchronous communication.
  • Always use a camera in addition to audio during remote meetings.

Communication

  • No well-actually's: Do not correct someone about something that's not relevant to the conversation or tangential to what they're trying to say.
  • No feigning surprise: Do not act surprised when someone doesn't know something.
  • No backseat driving: Do not lob advice from across the room (or across the online chat) without really joining or engaging in a conversation.
  • Avoid oppresive language

Public speaking

  • Plan for the worst-case scenario, e.g. your computer dying.
  • Use a bright color theme on a beamer to improve readability (slides, console, editor/IDE).
  • Be prepared to zoom in your presentation
    • Win + + / Win + - on Windows
  • Prepare good verbal transitions between slides.
    • Keep the things you say and the things you show in sync.

Related work

License

This work is dedicated to the public domain.

Public Domain

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].