conventions Questions

2

Solved

I have a type with several constructors wrapping another type; let's use the example below (in practice I have many constructors): data New a = A a | B a Now I need a function fun :: (a -&gt...
Ebsen asked 31/12, 2020 at 18:44

2

Solved

To initialize a GTK application, I must pass along an application id. I've done a bit of Googling and I found the minimum requirements of an application ID, but no guidelines as to how it should be...
Antipodes asked 7/3, 2014 at 20:32

5

I don't understand this part of php's PSR-2 convention: The soft limit on line length MUST be 120 characters; automated style checkers MUST warn but MUST NOT error at the soft limit. Lines SHOULD ...
Macroclimate asked 19/2, 2013 at 16:37

2

Solved

I am adding abstract classes to my python package like this: class AbstractClass(ABC): @abstractmethod def do_something(self): pass There will be multiple subclasses that inherit from Abstract...
Graduated asked 16/9, 2020 at 18:4

3

Solved

I have always thought of header files as a sort of 'public interface' describing a class, in which case it would be better to keep private fields and functions in the .cpp file. I understand that p...
Blandishment asked 5/2, 2015 at 1:1

5

Solved

NetBeans 7.4 beta is currently available for public download, and it introduces a weird warning rule by default: Method length is 16 lines (10 allowed) My question is: Is this an accepte...
Kwangju asked 9/8, 2013 at 12:56

5

Solved

As far as I know, one needs to use double or single quotes for fonts if they contain spaces, like: font-family: "Times New Roman", Times; font-family: 'Times New Roman', Times; But on Google Fo...
Sommers asked 6/12, 2012 at 19:52

2

Solved

I am used to document code in our C# projects in a specific way to enhance team productivity, benefit from Intellisense in Visual Studio etc. Code looks similar to this: /// <summary> /// L...
Linoleum asked 22/3, 2017 at 10:0

10

Solved

PEP 8 says: Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants. On occation, I violate PEP 8. Some times...
Aperiodic asked 21/6, 2009 at 14:41

6

Solved

Does JavaScript support substitution/interpolation? Overview I'm working on a JavaScript project, and as it's getting bigger, keeping strings in good shape is getting a lot harder. I'm wondering w...
Foucquet asked 6/8, 2015 at 2:33

3

Solved

Does anyone know why Stroustrup's style is the placement of pointers as follows? Specifically, what Stroustrup has provided for guidance about this matter? int* p; vs int *p; because declarin...
Faustinafaustine asked 25/5, 2020 at 1:42

1

Solved

I've seen it in a number of JavaScript libraries (eg. transducers-js, routex and redux). I'm supposing it's a form of namespacing, but I couldn't find an explanation or at least a comment about it ...
Oriental asked 6/10, 2015 at 18:53

4

Solved

When I started doing web development, I realized Javascript event names were all in lower case with no separators, i.e. "mousedown", "mouseup", etc. And when working with the jQuery UI library, I n...
Interviewee asked 28/9, 2013 at 20:55

6

Solved

In C the atan2 function has the following signature: double atan2( double y, double x ); Other languages do this as well. This is the only function I know of that takes its arguments in Y,X orde...
Ferreous asked 25/6, 2009 at 18:58

5

Solved

Is there a way to force the use of the this keyword in Visual Studio when referencing current instance members? Example with a bug in the constructor: class MyClass { public object Foo { get; se...
Evangelin asked 18/8, 2011 at 9:3

16

Solved

I very rarely meet any other programmers! My thought when I first saw the token was "implies that" since that's what it would read it as in a mathematical proof but that clearly isn't its...
Expectoration asked 7/11, 2008 at 23:44

4

I've been told that an Eclipse workspace is the equivalent of a Visual Studio solution. But I've also been told that people commonly use a single workspace for all their work. Are these apparently ...
Assessment asked 26/9, 2010 at 6:0

3

What is the naming convention in python community to set names for project folders and subfolders? my-great-python-project my_great_python_project myGreatPythonProject MyGreatPythonProject I ...
Lor asked 16/10, 2018 at 3:51

5

Solved

I was wondering if there is a general convention for the usage of semicolons in Lua, and if so, where/why should I use them? I come from a programming background, so ending statements with a semico...
Perky asked 31/5, 2013 at 17:1

6

Solved

Learning ruby. I'm under the impression that boolean attributes should be named as follows: my_boolean_attribute? However, I get syntax errors when attempting to do the following: class MyClass...
Yancey asked 11/8, 2009 at 21:52

2

Solved

I was using Visual Studio for a long time, but it was becoming too complicated to maintain. Now I tried to move to VS Code, but it throws a number of PyLint error messages that don't make sense to ...
Bicarb asked 25/12, 2018 at 7:37

2

I don't know if there's a recommended or standard approach, but I saw examples like this: my-project package.json src index.js [...] and like this: my-project src package.json index.js ...
Kabyle asked 9/9, 2019 at 4:2

2

Solved

Edited this old question to include an answer from below: Rubocop has it https://github.com/rubocop-hq/rails-style-guide#macro-style-methods Rails is all about 'Convention over Configuration'. How...
Tagmemic asked 6/6, 2013 at 10:11

1

Sometimes a Python module import that appears to be unused, is in fact essential to the proper functioning of the program. Having seemingly unused imports gives rise to spurious messages from tools...
Chlorpromazine asked 23/8, 2019 at 16:17

10

Solved

When I undertake an R project of any complexity, my scripts quickly get long and confusing. What are some practices I can adopt so that my code will always be a pleasure to work with? I'm thinkin...

© 2022 - 2025 — McMap. All rights reserved.