Z-notation ?

camelCase

The Case of the Mysterious Camel.
Reaction score
362
Introduction (Feel free to skip to the question):
My first post should be an introduction, no?
I'm a year one on my diploma for Game and Entertainment Technology and I'll be learning lots of programming (C++, actually).
I'm not a complete greenhorn, though. I know Javascript, PHP and C++ (self taught).
I haven't made anything useful with C++ but I do know how polymorphism, virtual methods, pure virtual methods, abstract classes, pointers, references, etc. work.

However, I believe I will still be needing a lot of help for when my course starts requiring me to do something with my knowledge.

Question:
I was having a conversation with my lecturer recently and he mentioned something (real quick) about Z-notation. I googled and borrowed a book (The way of Z) to try and learn it.
I mean, Z-notation promises error-free software O_O
However, I feel that the book is too fast for me.

I haven't found any tutorials on Z-notation (I think it isn't really used by the general public) but I really want to learn it.

Does anyone know of a good book or two for me to try out?
Preferably something more centered on examples.

PS: I am not completely ignorant of set notation if that helps =)
 

JerseyFoo

1/g = g-1
Reaction score
40
I'm not a complete greenhorn, though. I know Javascript,
Do you know JavaScript or are you somewhat of a greenhorn?

After a minute of googling...

Z appears to be a language used for formulating programs, a discipline for humans to follow. Where as Z-notation is the format/style of it, a slang of a syntax.

It is in a way; ancient Java and the name is likely a play on C.
 

camelCase

The Case of the Mysterious Camel.
Reaction score
362
I'm not a complete greenhorn, though. <-- Period.
*New sentence follows explaining why*

Yes..
Like how strongly typed C++ is compared PL/I..
Z-notation is like the strongly typed version of diagram and flowchart methods (UML, anyone?)

I can't seem to get any good tutorials on how Z-notation works in creating complete and concise descriptions of a program.

I mean, this stuff is used in planning the software of nuclear powerplants, medical equipment, databases, artificial intelligence and games amongst other stuff ._.

And the promise of 'error free software' which is impossible (to me) kinda' has my interests piqued.
I'm really just asking around if anyone here has any recommendations.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Honestly, if there are no classes at University on this language it might be because it's not used enough. Here in Quebec, we're taught Java, C#, C/C++ mostly and thats because it's what our market offers. Might want to ask your lecturer why you should learn it.

And btw, shouldn't your name be CamelCase ? :D
 

camelCase

The Case of the Mysterious Camel.
Reaction score
362
@JerseyFoo
I apologize if I came on too strongly.
I am very comfortable with javascript.
C++, not so much as I haven't made anything useful, you could say I have the tools and I know how to use them but I have yet to make anything.
(That will hopefully change as I progress through my course)

The site is, from what I've read, almost a direct copy + paste of the book 'The way of Z' but it seems to be laid out differently..
I think I'll try it.
Thanks.

Again, I'm sorry if I've offended you.


@GTU
It's not a programming language, it's, like, a technique of modeling your software and its behaviour..
But instead of using flowcharts and other diagrams, you're doing it with set notation and this method is supposedly very good at eliminating bugs before they ever appear.

My lecturer didn't say I should learn it (he might have hinted at the opposite by saying it was boring) but he did lament on how he should have paid more attention when he was being taught Z-notation as it would have saved him a lot of trouble before he became a lecturer (I cannot remember the companies he worked for but the gaming addicts at my class were all shouting and screaming like lil' fangirls when they heard of the names, har har).

His quick lament on it kinda' got me interested =x
(Impulse; bad, I know)

Also, I called myself 'camelCase' because I always start my variables with lower case letters =x
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Oh, I misunderstood what it is. But anyways, my statement still makes sense, if it's not taught, it's not popular nor required.

On an other hand, commenting your code and making it clean is a good way of avoiding errors. If you commented your functions behaviour, you should be able to find errors rapidly and even faster if you used Javadoc style:
Code:
/**
 * This function adds 3 to the given value.
 * @param x The value
 * @return The result
 */
function foo(x) {
    return x + 3;
}
and an IDE.
 

saw792

Is known to say things. That is all.
Reaction score
280
It's never a modest statement to claim you know a language. Either you're somewhat of a greenhorn, or you know javascript/C++, not both.

...

Languages are tools. You don't know a language the same way you don't know a hammer. You might know how to use a language, but overall it is just a tool you are using to perform some task. Courses that claim to teach you programming languages are misguided; they often teach you very little about how to get real world programs to function or actually specify, design and develop a program.

People who say they "know" a programming language generally mean that they understand the syntax and know how to set out basic programming tasks within the language. So as far as that goes camelCase's statement is perfectly valid.

But anyways, my statement still makes sense, if it's not taught, it's not popular nor required.
Good courses teach you how to discover things yourself. Some things aren't taught because there aren't any teachers available. Maybe the "teachers" are already working in their own proprietary software environment and making shitloads of money using these techniques. If it is not in their interest to share these things then nobody would teach them. Anyway, it's completely counter-productive and counter-developmental to suggest that because you aren't being spoon fed some piece of information that it isn't valuable or can't be used to improve your problem solving and development techniques. Open your mind a bit.

I get a bit disappointed on these forums sometimes because so many people miss the entire point of the thread. The whole point of using software development techniques like Z (although I haven't used it myself) is to avoid specification and design errors, not programming errors. That's what bug testing is for.
 

UnknowVector

I come from the net ... My format, Vector.
Reaction score
144
> But anyways, my statement still makes sense, if it's not taught, it's not popular nor required.

I think that's the wrong philosophy. If all you're taught is Java, C#, and C++, will you ignore everything else? What about APL flavored languages, or declarative paradigms like functional and logical? Does the fact that it isn't taught imply that Python isn't widely used?

> Does anyone know of a good book or two for me to try out?

Unfortunately, I've never heard of Z myself so I can't recommend anything :(.

Maybe you should find a different book to learn from or at least supplement the way of Z, the wiki page (http://en.wikipedia.org/wiki/Z_notation) has a couple in the references section? The professor you talked to might be able to recommend something else to study first (e.g. first order logic) that would make Z a little easier to learn?
 

SerraAvenger

Cuz I can
Reaction score
234
Z Notation, as explained above, is a way to describe software - not to implement it. It can be seen as additional documentation overhead to your program development cycle.
Set theory will only help you so much, as Z uses type theory (which is stricter than set theory). Set notation will definetely help you understand the syntax.
Z Notation is slightly outdated. If you want to use Z Notation together with OOP, use Object-Z or Z++.
I personally don't recommend it. I think it is a very unagile method and will only cripple your development. You should read up on agile development instead.
Some languages will force you to write down the semantics anyway, just with a different notation, and even that I consider unagile (although better than doing the work twice).

Good luck,
Serra
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top