PLEASE NOTE: the upgrades to this server, secure.csse.uwa.edu.au, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying the 4 articles in this topic
Showing 4 of 919 articles.
Currently 5 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
9:09pm Sat 3rd Sep, ANONYMOUS

Hello, I wanted to ask what is better for readability and naming: using underscores to separate words, or using capital letters. or does it not matter? example: readCrontab or read_crontab ? estimatesFile or estimates_file


SVG not supported

Login to reply

👍?
helpful
10:10pm Sat 3rd Sep, ANONYMOUS

I also wanted to ask if this is how you would like us to comment our functions? I looked up C guidelines online and this is what I found for commenting functions: /* * Function: square_the_biggest * ---------------------------- * Returns the square of the largest of its two input values * * n1: one real value * n2: the other real value * * returns: the square of the larger of n1 and n2 */ double square_the_biggest(float n1, float n2) { ... thank you for your time


SVG not supported

Login to reply

👍?
helpful
5:38am Sun 4th Sep, Christopher M.

ANONYMOUS wrote:
> Hello, I wanted to ask what is better for readability and naming: using underscores to separate words, or using capital letters. or does it not matter?
There are undoubtably published studies on this (and https://en.wikipedia.org/wiki/Naming_convention_(programming) ), but I believe the more important issue is simply to be consistent within a single program. Consistency is important in helping *other* programmers read your code.


SVG not supported

Login to reply

👍?
helpful
5:49am Sun 4th Sep, Christopher M.

ANONYMOUS wrote:
> I also wanted to ask if this is how you would like us to comment our functions? > I looked up C guidelines online and this is what I found for commenting functions:
Similarly, consistency is more important, and the primary reason that many companies will have their own commenting conventions is to assist multiple programmers working on the same project/code, or even across multiple projects. But, notably (and as seen through a web-search) there's no simple agreement of what's the best, and the first version of a commenting convention is heavily influenced the first author's personal preference. There's also the thought that comments are rarely, if ever, needed if the identifier names are carefully chosen. (Personally) I don't like the large block comment in your example, and would just name the function square_of_larger_parameter(). And end-of-line comments // can add just as much value.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy