Questions tagged [notation]
22 questions
80
votes
7 answers
How to write camel case for words like "phonenumber", "motorcycle", "wavelength", etc
I am having a problem in understanding how to apply camelCase syntax to some of my variable names.
For example, how should I correctly write a word like "phonenumber" in camel case? Is it phoneNumber or phonenumber? Similarly with "username", is…

Niklas Rosencrantz
- 8,008
- 17
- 56
- 95
38
votes
13 answers
Do you prefix variable names with an abbreviation of the variable types? (Hungarian Notation)
In my current job, there are no coding guidelines. Everyone pretty much codes the way he wants. Which is fine, since the company is small.
However, one new guy recently proposed to always use Hungarian Notation. Until now, some of us used some sort…

bastibe
- 1,359
- 2
- 12
- 17
36
votes
2 answers
How to represent a set in JSON?
JSON supports the following data structures (Java equivalents): Scalar, Array/List, and Map.
A Set is not supported out-of-the-box in JSON.
I thought about several ways to represent a set in JSON:
[1] - As a list
However, a list has its own…

Ron Klein
- 671
- 2
- 6
- 13
25
votes
2 answers
Why is Big O taught instead of Big Theta?
Big O notation provides an upper bound to a function whereas Big Theta provides a tight bound. However I find that Big O notation is typically (and informally) taught and used when they really mean Big Theta.
e.g. "Quicksort is O(N^2)" can turned…

tskuzzy
- 732
- 1
- 7
- 12
22
votes
8 answers
What is the appeal of Systems Hungarian?
In a now deleted question titled "What naming guidelines do you follow?", the author says:
Also I prefer to code using hungarian notation from Charles Simonyi.
I've run in to several programmers who still prefer to use Hungarian, mostly of the…

AShelly
- 5,793
- 31
- 51
16
votes
6 answers
How do you name your GUI controls?
It's a generally considered a bad practice to use the Hungarian notation, but is common to find GUI controls named userNameTextBox and userNameLabel.
Do you put the control type in it's name? Isn't this a kind of Hungarian notation?

Jader Dias
- 670
- 3
- 12
15
votes
12 answers
Are type and scope prefixes worthwhile naming conventions?
Recently starting my first job as a software developer, I was a little thrown to be told that I did not have to follow any naming conventions in my code. Code written by groups working on other, larger projects followed naming conventions, but since…
f100
10
votes
5 answers
Wrapping my mind around prefix notation?
I'm reading about LISP.
I understand how prefix notation works at a certain level, but I was wondering if there are any tricks to making it intuitive.

Vivian River
- 2,397
- 5
- 21
- 32
8
votes
2 answers
What does pi mean in this BFS algorithm pseudocode?
I have the following pseudocode for breadth-first search algorithm
BFS(G,s)
1 for each vertex u ∈ V(G) \ {s}
2 color[u] = white
3 d[u] = ∞
4 π[u] = nil
5 color[s] = gray
6 d[s] = 0
7 π[s] = nil
8 Q = ∅
9 Enqueue(Q,s)
10 while q…
user145653
8
votes
1 answer
Notation used in 'Pearls of Functional Algorithm Design'
I just purchased the book 'Pearls of Functional Algorithm Design' by Richard Bird. Unfortunately, the book doesn't have any section that describes the notation that is used.
You can view the contents of the book by going to Amazon's page, and…

Philoxopher
- 183
- 5
7
votes
8 answers
Infix vs Prefix Notation - Which do you prefer?
I have been learning Clojure and looking at Scheme and CL which introduced me to the world of prefix notation. At first I didn't like it but it is still starting to grow on me. To be honest though, there are still long calculations that are…

Jetti
- 5,163
- 2
- 26
- 41
5
votes
2 answers
Is there a common mathematical symbology for collections?
I am being asked to define several of my algorithms in mathematical terms to describe my work to a customer. I am trying to determine if anybody knows whether common operators for collections like sequences, lists, tuples, etc have been defined. If…

sesteel
- 75
- 5
3
votes
4 answers
Hungarian Notations/Systems Hungarian Should I?
I was wondering would it be worth using a form of standard such as Hungarian Notation/Systems Hungarian?
Why would I bother if everything I'm doing now is working fine?

MattyD
- 2,285
- 1
- 17
- 18
2
votes
1 answer
Choosing a process modeling notation
It is questionable whether this question really belongs here, but, in any case, it does not fit in Stack Overflow or any other Stack Exchange site. So here I go.
The purpose
My current pet project consists in developing a software tool to generate…

isekaijin
- 508
- 2
- 12
2
votes
1 answer
Best notation to store/read/compute complex relationships
I have created an application in which users and tasks can be entered.
A task should be be assigned to one or more users. If more users can do a task, the task should be assigned in such a way that it can be done by person A OR person B, or that…

BogisW
- 131
- 4