Relative Content

Tag Archive for language-agnostic

Can you use Pi as a crude random number generator?

I recently saw this question over at math.SE. It got me thinking. Could Pi be used as a crude random number generator? I mean the results are well known(how long has pi been computed to now?) but, Pi does seem to be quite random when taken 1 digit at a time.

Is there an excuse for short variable names?

Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. This has become a large frustration with the codebase I’m currently working in; many of our variable names are short and undescriptive. I’m the only developer left on the […]

What should be allowed inside getters and setters?

I got into an interesting internet argument about getter and setter methods and encapsulation. Someone said that all they should do is an assignment (setters) or a variable access (getters) to keep them “pure” and ensure encapsulation.