readability
Method naming conventions. Should the method be named getX(), if the there's no corresponding setX()?
Say I got an Employee class that has a hire date data member. This member 开发者_如何学运维only get set one time only and it is constant too. So it\'ll get initialised when the object is created.[详细]
2023-01-20 22:40 分类:问答Detecting syllables in a word containing non-alphabetical characters
I\'m implementing readability test and have implemented simple algorithm of detecting sylables. Detecting sequences of vowels I\'m counting them in words, for example word \"shoud\" contains one seque[详细]
2023-01-20 14:54 分类:问答Is K&R teaching bad readability?
It has been a while since I looked at C (still learning) and I just got back into the K&R book. I just had a go to Exercise 5-3 (p107).[详细]
2023-01-20 09:31 分类:问答Formatting of dynamically generated HTML - does no one care?
I have very little experience in web development, so this may be a very basic question. It\'s just, from the limited experience I do have (a little PHP, and a little Ruby on Rails), it seems that the[详细]
2023-01-19 18:19 分类:问答Splitting C++ Strings Onto Multiple Lines (Code Syntax, Not Parsing)
Not to be confused with how to split a string parsing wise, e.g.: Split a string in C++? I am a bit confused as to how to split a string onto multiple lines in c++.[详细]
2023-01-19 03:57 分类:问答Why C# doesn't accept the boolean operators as words ("and", "or", "not" ,..etc) with the current operators?
My if stetement: if (!string.IsNullOrEmpty(Person.Name)) // some code I think the \"!\" operator is less readable when writing imperative code,[详细]
2023-01-14 16:27 分类:问答Immutability and Readability
So I\'ve been reading Effective Java by Joshua Bloch and noticed two points which I actually have encountered in my work.[详细]
2023-01-14 01:25 分类:问答How to return a flag plus an optional message in Java?
I want to write a method in Java that verifies that some conditions hold on some data, and acknowledges that the data is valid or produces an appropriate error message otherwise.[详细]
2023-01-12 21:47 分类:问答Writing unittests for a function that returns a hierarchy of objects
I have a function that performs a hierarchical clustering on a list of input vectors. The return value is the root element of an object hierarchy, where each object represents a cluster. I want to tes[详细]
2023-01-12 03:23 分类:问答Improve readability of a short snippet while keeping StyleCop happy
The code below looked ok to me when I wrote it, but when I came back to it again, it was pretty hard to grasp what is going on. There used to be parenthesis around value == ..., but I had to remove th[详细]
2023-01-08 18:55 分类:问答