Elysia Tools
Navigation
Code Quality
Invalid Variable Names Code Samples
Sample code files demonstrating invalid variable naming conventions across different programming languages
Samples
Entries inside this sample collection
JavaScript Invalid Variable Names
JavaScript code demonstrating invalid variable names including numbers at start, special characters, and reserved keywords
Difficulty
3/10
Estimated time
2 min
Tags
javascript, invalid-names, reserved-keywords, special-characters, syntax-errors
javascript-invalid.js
JS · 2.2 KB
- fileSize
- 2.2 KB
- lineCount
- 52
- characterCount
- 2244
- errorTypes
- ["Starts with number","Contains special characters","Reserved keywords","Empty names"]
Python Invalid Variable Names
Python code demonstrating invalid variable names including numbers at start, special characters, and Python keywords
Difficulty
3/10
Estimated time
2 min
Tags
python, invalid-names, keywords, special-characters, syntax-errors
python-invalid.py
PY · 1.8 KB
- fileSize
- 1.8 KB
- lineCount
- 50
- characterCount
- 1836
- errorTypes
- ["Starts with number","Contains special characters","Python keywords","Magic methods"]
Java Invalid Variable Names
Java code demonstrating invalid variable names including numbers at start, special characters, and Java keywords
Difficulty
3/10
Estimated time
2 min
Tags
java, invalid-names, keywords, literals, syntax-errors
java-invalid.java
JAVA · 1.5 KB
- fileSize
- 1.5 KB
- lineCount
- 45
- characterCount
- 1536
- errorTypes
- ["Starts with number","Contains special characters","Java keywords","Literals"]
Mixed Style Naming Mistakes
TypeScript code showing common naming mistakes including mixed camelCase and snake_case, inconsistent capitalization, and meaningless abbreviations
Difficulty
4/10
Estimated time
3 min
Tags
typescript, naming-mistakes, inconsistent-style, bad-practices, code-smell
mixed-style-mistakes.ts
TS · 3.2 KB
- fileSize
- 3.2 KB
- lineCount
- 95
- characterCount
- 3268
- errorTypes
- ["Mixed conventions","Inconsistent capitalization","Meaningless abbreviations","Poor naming"]
Real World Refactoring Cases
JavaScript code with real-world refactoring examples showing beginner mistakes, naming issues, and before/after comparisons
Difficulty
5/10
Estimated time
5 min
Tags
javascript, refactoring, best-practices, code-improvement, before-after
real-world-refactoring-cases.js
JS · 5.8 KB
- fileSize
- 5.8 KB
- lineCount
- 185
- characterCount
- 5920
- errorTypes
- ["Poor naming","Lack of clarity","Abbreviations","Real scenarios"]
Tools
Tools frequently paired with this sample
Related