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
Dear software engineers:
I am currently teaching a procedural programming unit (using the C language) to a group of Level 3 students in the UK. Here is the Unit 16 Procedural Programming specification document.
For a Distinction (higher level) task, the students must "evaluate the suitability of procedural programs for graphical applications".
It is possible to implement graphical applications using GTK and Qt, but it's also possible to create blinking text on a webpage (just because you can, it doesn't mean you should).
Many games and desktop applications are written in C++, so I suspect that object-oriented code is better for building graphical applications.
To reiterate, I need to "evaluate the suitability of procedural programs for graphical applications".
As a software engineer, how would you answer this question?
[Edit] For what it's worth, I received an excellent response to this question on Quora.
I don't think that object-oriented or procedural programs are "better", any more than writing algorithms in recursive or iterative style are "better".
Lots of wonderful code was written before object-orientation came along.
I think the styles have more to do with managing complexity. Objects are state and behavior together in a single software component. When you system maps well to objects, that style can be a good way to manage complexity. It's worked well for GUI components like windows, buttons, etc.
But it need not be the only way.
I took an intro programming class in C at Stanford University in 1996, when C++ was just starting to take hold and neither Java nor C# existed. They had students doing graphical programming using a very disciplined style that used well designed libraries and rigorous decomposition. I would defy you to find better code.
Even with object oriented programming, normally functions will eventually get called to perform some operations, and the code in those functions would be considered procedural. The main difference is how the code ended up calling those functions along with the parameters used by those functions.
Related
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 want to learn how to use Arduino, but it needs some code and there are 2 different options are c and c++. I am confusing that which one to learn "c or c++" at first (I mean for beginner)? are those both same? Actually, it's really really my first time to learn code for Arduino. also, can you tell me where can I learn from? Thank you :)
You mentioned two key words, Beginner and Arduino.
Decision on learning C++ first versus learning C first might
be a matter of opinion for the key word Beginner since many
who start with one can easily adopt for the other.
learning C++ first however has some advantages versus learning C first
for the key word Arduino which I explain.
Arduino programing is mainly targeted toward bare-metal programming, which includes dealing with many environmental options/variables which are usually known at the compiling time.
Programming methodologies which exists in C++ that address processing known factors at compiling time outnumber those of which exist in C by a large number!
Although I must add that these features rarely appear in user programming interface, if any! But still these features would be available for one to implement individually regardless of using Arduino or other bare-metal programming toolkits.
Further more multiplicity of the environmental options/variables demands a well established hierarchical ordering and management which is also more addressed in C++.
You can always try the Arduino website itself as an easy source either for learning or for tutorials/examples!
But to learn the language correctly and completely always keep an eye on authentic sources like cppreference.com and/or cplusplus.com.
Finally you can always ask/lookup your questions and seek guidance here!
Good luck!
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 4 years ago.
Improve this question
as title says, i want to know what is logic behind visual programming and how is it being converted into code?
Use for example unreal engine 4 blueprints, how it all works behind scenes?
I somehow think everything is made using linked structures with pointers... For example:" if " statement needs link of statement and to output links, wether that statement is true or false... But if we do all like that, programming every keyword seperatly, i think it would take too much time.
I hope you understand what im thinking.
I would from the point of view of c++ explaination if possible..
Usually data flow graphs are not converted into C, C++ or similar before being compiled. A visual representation of a data flow graph is much closer to an Abstract Syntax Tree (AST) than written programming language code.
In fact, for most programming language compilers among the first steps carried out is the translation of a the written code into an AST, and it's a trivial task to feed such a AST into a program like graphviz to generate a call graph or similar from it.
So in a sense, that data flow graph of Unreal, or LabVIEW or similar programming environments is already one step closer to the executable code. Hence regarding your questions it's better suited to reformulate it as "how is written programming language parsed and translated into a data flow graph – like you can draw in Unreal engine – or an AST?".
Unfortunately the answer to this would go vastly beyond the scope of StackOverflow, and I'll simply refer you to the standard literature on compiler development.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I'm very new to software development and really loving it.
Currently, my work involves C++ programming in an OOP implementation (basically, the guys who started the framework for the software used OOP approach in everything). I jumped in and inherited what's already there.
Hobby-wise, I would like to develop a framework also for an embedded application.
Basically programming Embedded C on a microcontroller.
Is it wise to do the framework in OOP approach also?
I was thinking it is more organized.
Thanks in advance for the answers!
I would say that it depends on your microcontroller specifications (and how many resources you have).
In my experience (as Olaf says it's a subjective opinion):
OOP approach is usually clearer, avoids some mistakes for common variables and allows other person to use the framework without a painful learning process.
However... it usually require more resources as you need to encapsulate everything and that leads into more functions.
So... it depends...
It depends on your Embedded applicaton.
In some scenarios some c++ features costlier.
for e.g. run time polymorphism. .
Hope this link helps.!
http://www.embedded.com/design/programming-languages-and-tools/4424383/A-guide-to-C--for-C-programmers
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
I have read on some blogs that Go is a better system programming language and is going to replace C/C++. I am currently learning C++. So, I was wondering whether I should continue learning C++ or move to Go?
Go is designed for reliable, fast online services. It's the recommended language of Google App Engine. It does have general feature parity with C, plus additional scalability features. Perhaps, one day, it will be adopted for embedded programming and client-side applications, but that has yet to happen.
C is used in many, many application domains. No other language approaches its breadth of use. As a first language, though, it won't help you develop good habits.
C++ is a multi-paradigm language. It supports deep, generic metaprogramming. Many users of C++ are really using "embedded domain-specific languages" (EDSLs) where a library provides functionality defined within the C++ grammar. Go does not attempt to provide this depth, which is a Pandora's box of complexity.
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
What are applications of Objective-Z?
I have read about Objective-Z, but I cannot imagine to what it would be applied.
This question may be too broad, but I do not think that there are too many answers.
Objective-Z is an object-oriented extension to Z.
From here, you can get an overview of Objective-Z:
Object-Z extends Z by the addition of language constructs resembling the object-oriented paradigm, most notably, classes. Other object-oriented notions such as polymorphism and inheritance are also supported.
While not as popular as its base language Z, Object-Z has still received significant attention in the formal methods community, and research on aspects of the language are ongoing, including hybrid languages using Object-Z, tool support (e.g., through the Community Z Tools project) and refinement calculi.
For more information about the language and its uses, I would recommend visiting the Objective-Z homepage.
Its applications are similar to that of Z-notation - it is just an extension to a specification language.
If you really want to know about applications of Objective-Z, you can read this book.
I hope this helps, and good luck with Z.
Z is a specification language, meaning it is used to describe a system.
A quote from the Wikipedia article about Specification Languages states:
A specification language is a formal language in computer science used during systems analysis, requirements analysis and systems design to describe a system at a much higher level than a programming language, which is used to produce the executable code for a system.
The Z language is, according to this source,
a formal specification language used for describing and modelling computing systems. It is targeted at the clear specification of computer programs and computer-based systems in general.
So, that is the application of Z.
I see that your question is not about Z, but about Objective-Z, but I hope that this answer can still be useful.