conventions Questions
5
Solved
I am currently teaching students as a tutor programming conventions. I've told them that they can find most conventions in the Oracle Code Conventions.
In my last tutorial a student asked if:
pu...
While asked 1/11, 2012 at 10:31
2
Solved
Most programming languages use ~ to represent a unary bitwise-not operation. Go, by contrast, uses ^:
fmt.Println(^1) // Prints -2
Why did the Go designers decide to break with convention here?
...
Hengist asked 25/3, 2016 at 2:15
4
Solved
What would be an idiomatic directory structure for a TypeScript project?
I would like the following features in such a structure:
Separate directories for TypeScript source code and transpiled ...
Cadi asked 4/3, 2016 at 18:20
11
Solved
I have been reading about Optionals in Swift, and I have seen examples where if let is used to check if an Optional holds a value, and in case it does – do something with the unwrapped value.
Howe...
Oversubscribe asked 27/8, 2015 at 18:23
4
Solved
I'm fairly new to R, and I have been defining some of my own functions in script files. I'm intending for others to re-use them later, and I can't find any guides on R function commenting conventio...
Lynx asked 12/6, 2011 at 20:47
9
Solved
8 bits is called "byte". How is 16 bits called? "Short"? "Word"?
And what about 32 bits? I know "int" is CPU-dependent, I'm interested in universally applicable names.
Epithelium asked 6/1, 2013 at 10:5
17
Solved
Why is it bad practice to declare variables on one line?
e.g.
private String var1, var2, var3
instead of:
private String var1;
private String var2;
private String var3;
Montespan asked 19/9, 2008 at 9:6
2
Solved
I'm maintaining some legacy Java code, and I keep coming across a weird mix of camel case and snake case in the same blocks of code. Some names are entirely camel case, others are entirely snake ca...
Bernhard asked 25/7, 2017 at 21:30
4
Solved
I have been a Python Scientific Programmer for a few years now, and I find myself coming to a sort specific problem as my programs get larger and larger. I am self taught so I have never had any fo...
Coker asked 4/8, 2016 at 4:48
2
Solved
If you don't add any more fields to your subclass is there a need to add the @dataclass decorator to it and would it do anything?
If there is no difference, which is the usual convention?
from data...
Morly asked 24/11, 2022 at 16:6
4
Solved
How do you name a class when it's all caps in Java? For example, if I want to create a class to select certain people to be VIP. Should I name the class "VIPSelector" or "VipSelector...
Incontinent asked 30/6, 2020 at 3:43
4
Solved
In HTML, I was always taught to close self-closing with a "/>". For example "<br />", "<input type='button' value='myButton' />", etc.
In Coldfusion, though, it seems to be standard to...
Crespi asked 25/9, 2011 at 8:20
3
Solved
What is the recommended format for Git commit messages, if there is any?
Fervid asked 8/11, 2010 at 17:45
1
I'm looking for a convention stating how different types of methods (i.e. @staticmethod or @classmethod) inside the Python class definition should be arranged. PEP-8 does not provide any informatio...
Inurn asked 14/12, 2019 at 20:33
22
Solved
There are different ways to log messages, in order of fatality:
FATAL
ERROR
WARN
INFO
DEBUG
TRACE
How do I decide when to use which?
What's a good heuristic to use?
Robomb asked 8/1, 2010 at 22:19
1
Solved
I created a commit with the purpose to unhide a feature, the code change is to only uncomment some lines of code and show the feature, so now the feature will be displayed to the user.
Should...
Glib asked 4/8, 2022 at 19:15
4
Solved
For me, a path was always something that "walks the way to something", but without the "something".
Like a chicken following bread crumbs until it hits the target. But the target is not part of th...
Germann asked 22/1, 2010 at 17:29
1
Solved
I know that it is conventional to capitalize constant values in programming, but would you do the same for their keys? I am trying to make a string based enum in javascript:
const SEASONS = {...
Larousse asked 8/2, 2022 at 6:11
8
Solved
In Python, I've seen two variable values swapped using this syntax:
left, right = right, left
Is this considered the standard way to swap two variable values or is there some other means by whic...
Wheatley asked 12/2, 2013 at 15:43
15
Solved
I looked through some code and noticed that the convention was to turn pointer types like
SomeStruct*
into
typedef SomeStruct* pSomeStruct;
Is there any merit to this?
Urge asked 15/4, 2009 at 3:14
3
Solved
I am designing a new YAML file, and I want to use the most standard style of naming. Which is it?
kebab-case?
- job-name:
...
snake_case?
- job_name:
...
CamelCase?
- jobName:
...
Completion asked 31/3, 2014 at 20:9
3
According to the PEP standards, indents should come before binary operators. Furthermore, multiline conditions should be enclosed within parentheses to avoid using backslashes before newlines. Thes...
Monthly asked 19/6, 2017 at 19:12
1
On pylint 1.4.1, Im trying to set the configurations according to my desired python conventions.
with that, I encountered several issues:
when using old-style class I get C1001 Warning ("Old-sty...
Advise asked 2/3, 2015 at 15:16
3
Solved
I have seen people save Forth source code files with the extensions .4th, .fth, .frt and .f. Which is the most common filename extension of Forth source code files?
Spelling asked 15/8, 2013 at 5:18
6
Solved
Is there some one-liner bridge method to dump a given Enumeration to java.util.List or java.util.Set?
Something built-in like Arrays.asList() or Collection.toArray() should exist somewhere, but I'm...
Counterblast asked 10/4, 2011 at 9:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.