Top "Code-structure" questions

Code Structure regards the way that code is written to allow it to be best read, maintained and organized for efficiency.

Order of items in classes: Fields, Properties, Constructors, Methods

Is there an official C# guideline for the order of items in terms of class structure? Does it go: Public …

c# .net coding-style code-cleanup code-structure
How to deal with Pylint's "too-many-instance-attributes" message?

I have just tried to lint some code with Pylint, and the last remaining error is R0902: too-many-instance-attributes (8/7) I understand …

python instance-variables pylint code-readability code-structure
How should I visualize the structure of my code?

I have an application written in Java. In is stored in several files. It uses different classes with different methods. …

java schema uml code-structure code-visualization
jQuery/JavaScript: Detecting scroll direction - code structure issue

I need to detect the direction in that a user scrolls - "up" or "down". Based on the code found …

javascript jquery scroll return code-structure
React Native: How to split a file up into multiple files and import them?

I am writing my first app in react native and my js file is getting pretty big. What is the …

javascript react-native libraries code-reuse code-structure
Should I define functions inside or outside of main()?

After reading the following, I think I understand the value of wrapping even the simplest of scripts in a main() …

python main code-structure
merge multiple annotations with parameters

I have a problem with using multiple annotations that all say more or less the same thing but to different …

java frameworks annotations code-structure
module_load_include() vs require_once

I was wondering when you need to use module_load_include() or require_once to include files which are located …

php drupal code-structure
When should one prefer Kotlin extension functions?

In Kotlin, a function with at least one argument can be defined either as a regular non-member function or as …

kotlin code-structure
What is an acceptable way to format a long method call in Java?

Is it good style to write: objectName.methodWithManyParameters(someLongParameter1, someLongParameter2, someLongParameter3, someLongParameter4, someLongParameter5); (which is obviously far to long for …

java coding-style code-structure