$h: Links

$h: Hero Section $show=home

Welcome to RANGSEYhome!

RANGSEYhome is a multifaceted site created by Rangsey P. HENG, a Freelancer, B/Vlogger, and Advocate with a passion for discovering life's wisdom. Through his experiences and insights, Rangsey shares his passions and knowledge through writing and multimedia content, helping others live better and more meaningful lives.

This site serves as a personal blog, portfolio, diary, and supportive space, offering a diverse collection of articles.

Learn More
Student reading a book

$h: About Section $show=home

About Me

Greetings from Cambodia! My name is Rangsey HENG, delighted to share my journey of learning, inspiration, and growth alongside you.

Adding value to people's lives is the heart of my mission in life. I am a dedicated learner, empathetic listener, passionate advocate, writer, blogger, vlogger, freelancer, and more. I am deeply in love with exploring life's wisdom, sharing it to make a positive impact, and inspiring others to achieve their full potential.

My goal is to inspire and guide individuals towards living better and more meaningful lives, helping them discover their true selves and unlock their inner potential. I believe that everyone has the capacity to live a life filled with joy, purpose, and fulfillment. Through my work, I aim to provide the tools, resources, and inspiration needed to help people transform their lives and achieve their goals, ultimately leading to a more meaningful and authentic existence.

Read more

$h: Books 2025 $show=home

$h: What People Say! $show=home

$h: Gs Data

Coding Convention

SHARE:

My Coding Convention Comment Tag HTML Comment Tag [<!-- Write your comments here -->] CSS Comment Tag [/* Write your comments here *...

My Coding Convention

Comment Tag

HTML Comment Tag
[<!-- Write your comments here -->]
CSS Comment Tag
[/* Write your comments here */]
JavaScript Comment Tag
[// Write your single comments here]

[/* Write your multiple-line comments here */]

Naming Convention

Follow S-I-D Rule:
  • Short: a name must not take long to type and, therefore, remember;
  • Intuitive: a name must read naturally, as close to the common speech as possible;
  • Descriptive: a name must reflect what it does/possesses in the most efficient way.

File Naming Convention

Use lower case url slug (most web servers are case-sensitive when it comes to handling files).
rangseyhome-log.jpg

HTML Naming Convention

HTML tag and HTML style attribute
HTML tags are not case sensitive: <P> means the same as <p>.
The HTML standard does not require lowercase tags, but use lowercase (stricter document types like XHTML demands lowercase).
The HTML style attribute has the following syntax:
<tagname style="property:value;">
Use space to separate each combination of property and value.
For color hex code, use lower case.
<div style="color: #0000cd; background-color:#ffffff;"></div>

HTML class attribute and HTML id attribute
Follow as style attribute, use lower case and separate each word of class or id by hyphen.
<div style="color:blue; background-color:#ffffff;" class="message-box" id="message-box"></div>

JavaScript Naming Convention

A/HC/LC Pattern
prefix? + action (A) + high context (HC) + low context? (LC)
Actions: get, set, reset, remove, delete, compose, handle
Prefixes: is, has, should, min, max, prev, next
Singular and Plurals
const friend = 'Bob';
const friends = ['Bob', 'Tony', 'Tanya'];

Naming Convention for Variables
Use camel case.
For booleans, use prefix is or has.
var dogName = 'Droopy';
var hasOwner = true;

Naming Convention for Functions
Use lower snake case
function get_name(dogName, ownerName) {
    return '${dogName} ${ownerName}';
}

Naming Convention for Classes
Use pascal case.
class DogCartoon {
    constructor(dogName, ownerName) {
        this.dogName = dogName;
        this.ownerName = ownerName;
    }
}

var cartoon = new DogCartoon('Scooby-Doo', 'Shaggy');

Naming Convention for Components
Use pascal case.
function DogCartoon(roles) {
    return (
        < div >
        < span > Dog Name: { roles.dogName } < /span>
        < span > Owner Name: { roles.ownerName } < /span>
        < /div>
    );
}

<div
<DogCartoon
    roles={{ dogName: 'Scooby-Doo', ownerName: 'Shaggy' }}
/>
</div>

Naming Convention for Methods
Use camel case.
class DogCartoon {
    constructor(dogName, ownerName) {
    this.dogName = dogName;
    this.ownerName = ownerName;
    }
    getName() {
        return '${this.dogName} ${this.ownerName}';
    }
}

var cartoon = new DogCartoon('Scooby-Doo', 'Shaggy');
console.log(cartoon.getName());
// "Scooby-Doo Shaggy"

The above conventions are just my prefer style. You can also learn and consider your own style:

COMMENTS

$0: Reminder

Loaded All Posts Not found any posts VIEW ALL Read more Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU Show posts in ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Codes or Texts Select All Codes or Texts All codes or texts were copied to your clipboard Can not copy the codes or texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Contents