5 ms·
LabView is the classic example of graphical programming used in professional practice. It works well, but has a large learning curve. My first paid programming
by aabajian 9y ago
LabView is the classic example of graphical programming used in professional practice. It works well, but has a large learning curve. My first paid programming job was an undergraduate summer research project. I was tasked with re-writing a LabView function, a simple coefficient of variation - mean divided by standard deviation, in C++. LabView can call C++ DLLs. The resulting function was 5x faster and meant that our imaging of blood flow could be done in real-time vs. recorded and post-processed.
FWIW, it took 10x as long to get the DLL call to work as it did to drag-and-drop the coefficient of variation box into the GUI. There are certainly rapid prototyping benefits to be had with higher-level languages. Nowadays I prototype in Python and rewrite line-by-line in C++ if I really need the speed. I think GUI programming languages might serve a similar purpose.
- mlevental 9y ago>line-by-line in c++ I don't understand how/why people do this? the languages are so different I can't imagine doing it - libraries, control structures, types! what exactly are you prototyping then? just the shape of the code?
- aabajian 9y agoYou use black-box unit tests developed against the Python code. You then write identical code in C++ that produces the same output (i.e. passes the unit tests). Then you apply optimizations/refactoring specific to C++. It is the latter - premature optimization - that is a pain in lower-level languages like C++, and which stops you from getting the correct result.
- mlevental 9y ago>You use black-box unit tests developed against the Python code. man that makes even less sense to me. do you have an example of code produced this way?
- dbcurtis 9y agoHave you considered Cython?