Source Code Editor Variable Naming Suggestions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Beginner programmers and those new to a team often struggle to follow established coding conventions, leading to source code that is difficult to understand and review, as there is no quick and practical way to learn these conventions, which impact the readability and maintainability of code.

Innovation Solution

A system and method that recognizes patterns in coding conventions, creates a repository of these patterns, and suggests variable names based on stored mappings, alerting users when they deviate from established conventions, using a database of function-variable name associations and machine learning models to provide recommendations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If beginner programmers write source code without following established conventions, then they can write code quickly without learning team-specific rules, but the source code becomes difficult to understand and review for other programmers

Engineering Contradiction:
Improvecoding speedVSAvoidcode readability
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The system enables self-service by automatically analyzing the programmer's code, detecting deviations from conventions, and providing real-time suggestions for improvement without requiring manual intervention or prior knowledge of team conventions

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system implements feedback by continuously monitoring code input, comparing it against stored conventions, and providing immediate corrective suggestions to guide the programmer toward convention-compliant code while maintaining coding flow

Inventive Principle:
Principle #23Feedback

2Ease of operation

If programmers manually learn and follow team-specific coding conventions, then code readability improves, but it requires significant time and effort to learn and remember all conventions

Engineering Contradiction:
Improvecode readabilityVSAvoidtime to learn conventions
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The system performs preliminary action by pre-loading and storing coding conventions into a structured database before they are needed, organizing them by programming language, data type, and convention category so that conventions are ready for immediate application and reference

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system acts as an intermediary between coding conventions and programmers by providing a user interface that translates complex convention rules into simple, actionable suggestions, mediating the interaction and reducing the cognitive load on programmers

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If the system provides detailed suggestions for every code input, then code convention compliance improves, but the user interface complexity and number of notifications increase

Engineering Contradiction:
Improveconvention complianceVSAvoiduser interface complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The system applies local quality by providing targeted suggestions only for specific code elements that deviate from conventions, such as variable names, function names, or comments, rather than notifying about every aspect of the code, thus reducing unnecessary notifications while maintaining precision where needed

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10817264B1User interface for a source code editor
Publication Date: 2020.10.27 CAPITAL ONE SERVICES LLC
  • US10817264B1 patent drawing
  • US10817264B1 patent drawing
  • US10817264B1 patent drawing

AI summary

A system is described which recognizes patterns or conventions that programmers follow when writing source code and creates a repository for these patterns. The system makes suggestions for variable names based on the stored patterns. The system can suggest variable names that are closest to the convention (e.g., the convention demonstrated by the stored pattern) and alert the programmer when the programmer deviates from the convention.