Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// #define CLANG_OR_GCC | |
// Compile with -O3 -std=c++11 for Clang version | |
#define VS | |
// Compile with -O3 -fms-compatibility -std=c++11 for VS version | |
#if defined(CLANG_OR_GCC) | |
typedef float float2 __attribute__((ext_vector_type(2))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.hockeyapp.android.demo; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
import org.acra.ACRA; | |
import org.acra.collector.CrashReportData; | |
import org.acra.ReportField; | |
import org.acra.sender.ReportSender; |