Click here to Skip to main content
15,902,032 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
kalberts9-Jan-18 13:23
kalberts9-Jan-18 13:23 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
PIEBALDconsult9-Jan-18 13:28
mvePIEBALDconsult9-Jan-18 13:28 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
kalberts9-Jan-18 13:32
kalberts9-Jan-18 13:32 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
PIEBALDconsult9-Jan-18 13:36
mvePIEBALDconsult9-Jan-18 13:36 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Chris Maunder9-Jan-18 14:24
cofounderChris Maunder9-Jan-18 14:24 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Jörgen Andersson9-Jan-18 21:59
professionalJörgen Andersson9-Jan-18 21:59 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
den2k889-Jan-18 21:23
professionalden2k889-Jan-18 21:23 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
kalberts10-Jan-18 0:52
kalberts10-Jan-18 0:52 
In such a situation, the constant is badly mis-named.

Calling it a constant, if you intend to vary it, is a small detail.

Setting MILLISECONDS_PER_SEC to 2000? Seriously?
Which time-dependent operations would that affect - those where milliseconds are used, those where other milliseconds are used? Or all? Would it double or half the speed?

A properly named semi-constant value would be something like SLOWDOWN_FACTOR or VIRTUAL_TIME_TO_REAL_TIME.

And while I am at it: I really hate this C style CONSTANTS_IN_ALL_UPPER_CASE rule - much because I have seen too many cases where functional extensions requiring the symbol defintion to be changed to a a variable to adapt to other situations - but the old UC name was used in so many source files and documentation that it cost too much to change it, and the old UC name was retained for the variable.

(I also had my first serious programming training in Pascal, and when switching to C, I really missed the option to replace a semi-const/variable definition with a (parameterless) function call - parentheses were not required in Pascal, but in C you have to go through every use and add () to every use of the symbol.)
GeneralRe: MILLISEC_PER_SEC is never needed Pin
den2k8810-Jan-18 0:58
professionalden2k8810-Jan-18 0:58 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Dar Brett10-Jan-18 3:11
Dar Brett10-Jan-18 3:11 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
ddyer10-Jan-18 5:36
ddyer10-Jan-18 5:36 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Robert Tax10-Jan-18 5:38
Robert Tax10-Jan-18 5:38 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Davyd McColl10-Jan-18 7:20
Davyd McColl10-Jan-18 7:20 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Gerry Schmitz11-Jan-18 6:05
mveGerry Schmitz11-Jan-18 6:05 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Member 1215099311-Jan-18 9:34
Member 1215099311-Jan-18 9:34 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
jschell14-Jan-18 5:52
jschell14-Jan-18 5:52 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Kirill Illenseer15-Jan-18 4:23
Kirill Illenseer15-Jan-18 4:23 
GeneralAPOD Pin
R. Giskard Reventlov9-Jan-18 4:21
R. Giskard Reventlov9-Jan-18 4:21 
GeneralRe: APOD Pin
glennPattonWork39-Jan-18 5:02
professionalglennPattonWork39-Jan-18 5:02 
Generalreading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 2:58
mvaraddevus9-Jan-18 2:58 
GeneralRe: reading the threading chapter C# 7.0 Pin
Cornelius Henning9-Jan-18 3:19
professionalCornelius Henning9-Jan-18 3:19 
GeneralRe: reading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 3:58
mvaraddevus9-Jan-18 3:58 
GeneralRe: reading the threading chapter C# 7.0 Pin
Ehsan Sajjad9-Jan-18 4:19
professionalEhsan Sajjad9-Jan-18 4:19 
GeneralRe: reading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 5:00
mvaraddevus9-Jan-18 5:00 
GeneralRe: reading the threading chapter C# 7.0 Pin
RickZeeland9-Jan-18 4:01
mveRickZeeland9-Jan-18 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.