Barr Group Principal Engineer Dan Smith discuss coding standards and static analysis and the impact they have on the safety and security of your final product.
Part 1 of video ( ~8 min). This page has many more useful videos too.Have a look :) vimeo.com/202407204 It is programming language Rust. Rust originates from Mozilla research. Its focus is on system programming and it is often used to replace C or C++
Here is podcast from Software Engineering radio: www.se-radio.net/2017/01/se-radio-episode-279-florian-gilcher-on-rust/ *This is not comprehensive rules...but few common(sense) ideas!
1. If -Else statements Any if statements with an else shall end with else clause if (NULL == p_object) { result =ERR_NUL:L_PTR; } else if (p-object = malloc(sizeof(object_t))) { ....... } else { // Normal processing steps ...... } 2. Variables 2.1 The name for all pointers should begin letter "p", For example, *p_led_reg 2.2 Underscore shall be used to seperate words in variable names ex: int array_count [MAX_COUNT]; 2.3 Each variable should be descriptive of its purpose names. char input_strings; 3. Functions -Like Macros Parameterized macros shall not be used if an inline function can be written to accomplish the same task As per C99, C++ keyword inline added to C. Example // Do not do this #define MAX (A,B) ((A) >(B) ? (A) : (B)) // if you can do this instead inline int max (int num1, int num2) 4. Floating Point 1. Use the [C99] type names float32_t, float 64_t and float128_t. 2. Append 'f' to all single-precession constants . Example pi = 3.1415927f 5. Fixed -Width Intergers Whenever the width, in bits or bytes, of an interger value matters in the program, one of the fixed width data types shall be used in the place of char,short,int, long or long long / Integer width Singed type Unsigned type ___________________________________________________ 8 bits int8_t uint8_t 16 bits int16_t uint16_t 32 bits int32_t unit32_t * Keywords short and long shall not be used Happy New Year ! Here is some of photos of events which i attended.
1. Cybertech 2016 2. SCS Industry talk on cybertech -Nov 2016 3. ST Eng - Seminar - Dec 2016 4. IoTSG - Meetup group monthly talk on Sixfox - Jan 2017 5. SCS Career guidance program TESA - October 2016 Factually,my ex-boos and iTrust research director Mr.Yuval's interview on the reseach on cyber security, iTrust lab @SUTD and other views published on OpenGov website.
|
AuthorCheers! I'm Chandra, . Archives
October 2023
Categories |