Are there any conventions for flowcharting that distinguish a switch from a if-else chain? [closed] - language-agnostic

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I had to do a overview for a customer meeting, and they requested flow charts. It had never occurred to me that there was no switch symbol in any of the flow charting I've seen. I know functionally they are similar, but documentation should represent the code you've written or are planning too. Maybe I'm just being picky, but it seems like a common enough construct that it would have "representation."
Pete

My impression is that diamonds are the correct symbol for switches (multidirectional branches) as well as binary decision points — i.e. the diamond is any conditional. One just gets the idea that diamonds are for either/or because that's their most common use.

The difference between a series of if's and a switch is irrelevant at the flow chart level. Both are a series of conditionals. If you want to document your code down to the if/switch level, just print out the code.

Related

Why multiple HCL languages [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I understand that Chisel is a HDL/HCL language to overcome some of Verilog/SystemVerilog restrictions by using higher abstraction level.
And it is open source as well.
It might be a bit naive and presumptuous, but still I would like to ask.
My question is that why do so many similar efforts are working in parallel, e.g. Blusspec, spinalHDL, Pyha etc?
I mean, is there any reason why the development community may not choose one of these and concentrate efforts on stabilizing or enhancing one of these.
That's exactly what is happening now, it just takes a while to choose.
Although the past does not show that the best technology wins, let us hope it does this time.

Programming: Difference between concept and construct [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
When it comes to programming what is the difference between concept and construct for describing "patterns" used in multiple languages?
e.g. are "immutable data structures" or "pattern matching" concepts or constructs?
To start off, concepts are ways to explain something that we observe and that we try to explain. Construct is a little bit created in the opposite order. We "construct" a concept to be able to work with a situation and explain somethings that are not directly observed or deduced.
Immutable data structures is a concept since it qualifies something that is "tangible" or actually invisible with your eye but have a precise mechanic in the computer. "Pattern matching" is a concept of really specific procedures.
Now I guess that when you think about "construct" you also refer to programming "constructs" like operators (like +, -, *). In this case they are also concepts called "constructs" but shouldn't be considered to be the equivalent to "construct"/"concepts" concepts ;).
Hopefully, this helped you sort those words out.
Dan

Are classes and structures both subsets of "records"? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm writing documentation for my AQA A-level Computing project. The project is a game which takes place in a Console application, which heavily depends on a series of classes and structures in a separate class library I have written. I don't know how to title the section in my documentation where I describe these classes and structures, and I'd like to know if there is a word that encompasses both concepts. Does the word "record" include both classes and structures, or is it tied to a specific implementation?
I'm aware that this is more English Language & Usage, but I thought it was more likely to get a response here where there are more programmers.
Yes, you could use the term record as objects/classes/structures are just differing types of records, or records with functions to handle the data in the record.
However, just to encapsulate all your possibilities, you should probably utilize the term Data Structure. I find that data structure is more common parlance than record.

Automatic bookkeeping for exception retries [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Do any languages that support retry constructs in exception handling track and expose the number of times their catch/rescue (and/or try/begin) blocks have been executed in a particular run?
I find myself counting (and limiting) the number of times a code block is re-executed after an exception often enough that this would be a handy language built-in.
This is a really interesting question. I did a little research and apparently there is a design pattern called the circuit breaker pattern which was developed to handle such things. I have never heard of the pattern before and can't find much information about it.
There is a library which handles retrying an event for .NET available, might be worth a look. Heres a link to an article about it:
http://www.tobinharris.com/past/2009/1/26/net-circuit-breakers/

Story generation [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Upon reading a blog post about a minimalist story-generating python program, I was asking myself - and you - which are the most successful attempts at such programs. I remember seeing something using generating grammars, for instance. And which are the best attempts that, like this one, are extremely compact, either self-contained or able to read, say, the Web or an independent textual corpus (but not simply a file with a large number of story chunks)?
Search for Talespin for some famous ground breaking work. (Example: Micro-Talespin in Common Lisp by Warren Sack.)
I actually like Turner's "Minstrel: A Computer Model of Creativity and Storytelling" better :
ftp://ftp.cs.ucla.edu/tech-report/1992-reports/920057.pdf
Talespin is, in my opinion, blind in it's algorithm to everything but planning. So the author goals are given very little consideration (if at all). Minstrel is better that way.