JavaScript Best Practices: Strings

Use single quotes ” for strings.

 

Public APIs

A collective list of JSON APIs for use in web development. Animals API Description Auth HTTPS Link IUCN IUCN Red List of Threatened Species token No Go! Petfinder Adoption No Yes Go! RescueGroups Adoption No Yes Go! Anime API Description Auth HTTPS Link AniList AniList Anime OAuth No Go! Kitsu Kitsu Anime OAuth No Go! … 

 

Ruby – Methods

Methods provide a way to collect and organize programs statements and expressions into one place so that you can use them in an easy way and repeatedly when you want. The majority of Ruby’s operators are Methods. Here is an example of a definition of a method name hello def hello puts “Hellow, world!” end … 

 

Ruby Variables

Local Variables A local variable has a local scope or context. If defined within a method, its scope is kept within that method. Local variables must begin with either a lowercase letter or an underscore (_) Must not be prefixed with @, @@, or $ because they are reserved for other types of variables Instance … 

 

JavaScript Best Practices: Arrays

Use the literal syntax for array creation. Use Array#push instead of direct assignment to add items to an array. When you need to copy an array use Array#slice. jsPerf To convert an array-like object to an array, use Array#slice.

 

Fat Model, Skinny Controller

“Fat Model, Skinny Controller” refers to how the M and C parts of MVC ideally work together. Namely, any non-response-related logic should go in the model, ideally in a nice, testable method. Meanwhile, the “skinny” controller is simply a nice interface between the view and model. In practice, this can require a range of different … 

 

JavaScript Best Practices: Objects

Use the literal syntax for object creation. Don’t use reserved words as keys. Use readable synonyms in place of reserved words.

 

JavaScript Best Practices: Types

Types Primitives: When you access a primitive type you work directly on its value. string number boolean null undefined Complex: When you access a complex type you work on a reference to its value. object array function

 

Node Best Practices

Node Style Guide Style Example Testing Version Switching Style Use four spaces for indenting your code (do not use tabs) Use \n for a newline character (yes this is unix specifc, do not use the Window format \r\n) No trailing white space (you should be able to configure your editor to do this automatically) Use … 

 

How to Install Rails 5 API

How To Setup Rails 5 API on Ubuntu Introduction This Rails layer will do nothing but provide an API which serves JSON, and process background jobs. Here are some of the things we will be setting up: Token based authentication with the devise_token_auth gem. A namespaced API Serialization with Active Model Serializers Testing with rspec …