Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a project I am working on that is written in Python. The variable/class/function/everything names do not adhere to the Python style guide.
example: a variable might be called myRandomVariable instead of the proper: my_random_variable
My question is, is it worth combing through all the code (around 10,000 lines) to fix all the naming convention problems or should I just say, 'the heck with it -- it works'?
Thanks
Edited to give example
Just because there is a Python style guide, it does not mean that all Python code should adhere to it. The most important thing to consider in a code base is that it's consistent with itself, at LEAST on a per-file basis, preferably across the project!
I would vote for your second option. They are just styles. Everyone will have their own style. You don't need to be in compilance with defined styles to say your product is great.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
I wanted to embed an image to my binary and used the "include_bytes" macro. The GUI library I wanted to use only accepts [u32] for input and the said macro produces only [u8].
How do I convert a [u8] to a [u32]? I've seen some in the internet but the explanations are a bit too technical for me (I'm only self-taught). There were several options that I saw like bitwise and a method in "u32" from the standard library. Anyone can give an actual code on how to do it? Like study it from there in case I will need it for other files in the future. Thank you. I almost always just understand things via code coz I'm not aware of many technical terms, algos, etc.
using .map(Into::<u32>::into)
fn main() {
assert_eq!([0_u8, 1_u8].map(Into::<u32>::into), [0_u32, 1_u32]);
}
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I don't know what to search for about this kind of design. I will use it on my app for the empty state, but I'm getting trouble searching. hope you can help me guys. Thank you :)
Well the design type is "minimalist" or "modern" I'd say. If you are looking for a specific file format or something I think you'd be looking for SVGs (Scalable Vector Graphics).
From trial and error, the best search queries are along the lines of "Abstract Minimalist" or "Contemporary Art". Agreed, it is difficult to express to a computer what image you are trying to find.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I have a Go package that declares and uses some constants in file1.go. Now I add a new file to the package, file2.go, which refers to constants in file1.go.
Would you move the shared constants into a new file, like consts.go, since they don't "belong" to one file or the other? Or do you leave them in file1.go and assume that someone looking at file2.go can use their IDE or editor or grep to locate the shared constants?
Using const.go file is an idiomatic way, see Go standard library.
For example see: math/const.go
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Is it best practice to access module methods with a dot (.) or the scope resolution operator (::)?
I know both work and I understand the purpose of ::, I would just like to know which to favour when accessing module methods and why.
Note: There is a related question here which goes into this topic, but not into which is better form.
Both work but the Calling Methods docs suggest that you should use :: for namespaces:
You may also use :: to designate a receiver, but this is
rarely used due to the potential for confusion with ::
for namespaces.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
We are using personas at work. However, is the use of quotes from the imaginary user a good thing to add?
Personas are archetypes intended to model a class of users as a single, specific person. They're intended to communicate user needs clearly, and "engage the empathy of the design and development towards the human target of the design" [Alan Cooper, "About Face"].
You can convey the persona in multiple ways. I've usually seen third-party narrative. Cooper suggests a photographic collage as one way of multiple.
So the question is whether the quotes help convey the persona, and make a team feel driven to meet the needs of this archetype user and the actual users represented. If they do, then yes, using them is a good thing.
For creating a Persona, you can review the web site that SAP UX build for software builders at https://sapcsr.build.me/splashapp/learningDetail/644
There it is explicitely stated to:
Create a short quote - real or pieced together from various real quotes - that illustrates the user's goals or motivations.