I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue)
-
@J.Hilk said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
What me really got into Qt was actually the IDE QtCreator. I attended a programming extra class and the profrosser used and told us to use QtCreator and I was totally smitten with it. A much better IDE than anything I used before.
Before that I used some bad basic IDE's for Pascal and Pyton that were just slightly better than windows notepad.For the record. Have used several IDEs. I have to do my Qt work for a Python project (not my choice, but life). So I picked PyCharm (free) for my IDE. Which I have to say is great, for Python, and you would have had a better experience if you had used that. I find it much more comprehensive than Qt Creator, for the non-Qt aspects of coding/debugging.
However, that means no Qt Creator for me, so no Qt help at design-time. All code creates its widgets through explicit statements at run-time, no design-time visualization.
So.... when can we have Qt Creator for Python/PyQt, please... ? ;-)
-
@JKSH said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
That's a very interesting observation. Different brains are skilled at different things, so perhaps yours is better at processing text while your colleagues are better at processing diagrams?
May I ask, what's your preferred way of designing a piece of software? Do you find flowcharts, UML sequence diagrams, UML activity diagrams, etc. helpful?From time to time I write some kind of flowchart on a white board, but that's becoming increasingly rare. Usualy I map things out in my mind and add short comments to the class header to remind myself whats supposed to happen.
I usually start with making a short bullet point list with major steps/functions the software has to do/have
Than I start with the first point and a very basic implementation.
Once thats done, I start expanding the implementation. It's not uncomon, that I rewrite whole junks of my code over and over again. In the beginning this slows down the process a bit, but later this relativise itself when I have to change/tweak things and I usually end up with a well documented and understandable/readable code.You might find TestStand easier to use than LabVIEW. The structure of a TestStand sequence is very much like C, very unlike LabVIEW's dataflow.
as far as I know, we do own a TestStand licence, to work with.
For the record. Have used several IDEs. I have to do my Qt work for a Python project (not my choice, but life). So I picked PyCharm (free) for my IDE. Which I have to say is great, for Python, and you would have had a better experience if you had used that. I find it much more comprehensive than Qt Creator, for the non-Qt aspects of coding/debugging.
I may complain about my time with python, but I'm greatful for it. It taught me the virtue the proper indentation
-
@JonB said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
So.... when can we have Qt Creator for Python/PyQt, please... ? ;-)
Rumors have it that Creator could get a language server protocol implementation (the idea comes from Visual Studio Code), to have better Python support.
That may be related to the ongoing PySide2 effort.
-
@JKSH said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
Before Qt, I tried Visual Studio 2008 Express as my C IDE, but it was way too complex and it intimidated my newbie self.
That reminded me how very old I am ... :|
I started my coding on VC++ '95 (it wasn't even called "Visual Studio" back then in the antiquity) but it was pretty much the only decent IDE. I was a windows user then too - young and stupid and full of hopes and dreams ... ;) -
- I see no "VC++ '95 " in https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B ? And I think I've pretty much used them all!
- If you started your coding in C++ (or Windows) at all, you are so not old it's ridiculous! :)
-
About IDEs and Python
@aha_1980 said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
Rumors have it that Creator could get a language server protocol implementation (the idea comes from Visual Studio Code), to have better Python support.
That may be related to the ongoing PySide2 effort.
Now that Qt for Python is official, it makes sense to have tighter integration with Qt Creator.
@JonB said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
I picked PyCharm (free) for my IDE. Which I have to say is great, for Python, and you would have had a better experience if you had used that. I find it much more comprehensive than Qt Creator, for the non-Qt aspects of coding/debugging.
However, that means no Qt Creator for me, so no Qt help at design-time. All code creates its widgets through explicit statements at run-time, no design-time visualization.
I downloaded PyCharm for a quick peek, and it does look nice. The official repository for community plugins is impressive! Perhaps Qt Creator could get something like that too.
As for design-time visualization, it should be feasible to write a code generator that converts Qt Designer .ui files (XML) into Python code. A programmer could open both Qt Designer (standalone) and their Python IDE. Qt Quick Designer is more tightly integrated into Qt Creator though; I don't know how feasible it is to integrate .ui.qml files into a Python-based workflow.
About programming talents and preferences
@J.Hilk said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
From time to time I write some kind of flowchart on a white board, but that's becoming increasingly rare. Usualy I map things out in my mind and add short comments to the class header to remind myself whats supposed to happen.
I usually start with making a short bullet point list with major steps/functions the software has to do/have.... and I usually end up with a well documented and understandable/readable code.
Sounds like you handle verbal/textual information best. I'm more visual -- I can "contain" small apps in my mind completely but I need diagrams or structured labels for anything mildly complex.
Have a look at section #3.1.2. at https://forum.qt.io/topic/90276/showdown-qt-vs-labview -- would you say the Qt code is easier to digest than the LabVIEW code?
@JonB said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
I may complain about my time with python, but I'm greatful for it. It taught me the virtue the proper indentation
I still much prefer
{ }
s. :)I like {} plus proper indentation, but I probably like {} because they are familiar things from C. I can see the benefit of not having to manage {}s in Python.
When I started writing JavaScript though, it took me a while to get used to the idea that {} doesn't create a local scope.
for (var i = 0; i < 10; ++i) {...}
makesi
accessible outside the loop, which is weird coming from C/C++.About the world and the future
@kshegunov said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
I was a windows user then too - young and stupid and full of hopes and dreams ... ;)
I'd say you saw the good and the potential in the world around you ;-) (not everything came to fruition, but that's a different story)
@JonB said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
- If you started your coding in C++ (or Windows) at all, you are so not old it's ridiculous! :)
I can only wonder what my (future) kids will start coding in. I'll probably start them off at a young age, so C++ won't be appropriate. Maybe something bright and colourful like https://www.google.com/doodles/celebrating-50-years-of-kids-coding
-
@JKSH said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
I can only wonder what my (future) kids will start coding in. I'll probably start them off at a young age, so C++ won't be appropriate
IMHO, your kids won't be coding at all :(
I am fortunate enough to have lived in the Golden Age of computer programming, while people could do it. But it won't last long. We don't think or work anything like a suitable way for computer programs, specifications, algorithms. The computers of tomorrow will be doing their own "programming", not us.
BTW, take a look at a Neural Net programming and see if you can understand how the "program" works!
-
@JKSH said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
Sounds like you handle verbal/textual information best. I'm more visual -- I can "contain" small apps in my mind completely but I need diagrams or structured labels for anything mildly complex.
Have a look at section #3.1.2. at https://forum.qt.io/topic/90276/showdown-qt-vs-labview -- would you say the Qt code is easier to digest than the LabVIEW code?Defenitly.
In the case you showed in that topic, I can acutally say exactly why.
It's the way one reads it.
In the Qt version, you start at the top, and make your way downwards. Thats pretty straight forwards. Create an Object, defines what it does via Signal &Slots and move on. I prefere this structure. It is also the reason, why I structure my QML-files from top to bottom and define property alias' in the root item to bind against, instead of refering/binding individual Items/properties crossways , even so the order of creation and binding does not matter at all in qml.The Labview code starts simple enough, from the left to the right. But as soon as I hit the reader block I'm lost, and I find myself applying A* search like method method to understand, what is going on :-)
I can only wonder what my (future) kids will start coding in. I'll probably start them off at a young age, so C++ won't be appropriate. Maybe something bright and colourful like
I've only looked briefly into it, but Swift seems like an interesting option
@kshegunov said in [I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):]
I was a windows user then too - young and stupid and full of hopes and dreams ... ;)
I'd say you saw the good and the potential in the world around you ;-) (not everything came to fruition, but that's a different story)
Thankfully Steve Jobs came back to Apple and brought MacOS back into the UNIX-family, am I right ? :-)
-
@JonB said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
your kids won't be coding at all
Honestly, I'm against engineering kids ;)
We don't think or work anything like a suitable way for computer programs, specifications, algorithms.
It's strange you say that. We (people) invented the very concept of algorithm - a sequence of atomic steps to be taken to achieve a goal. How does this not translate to everyday life, or regular thinking?
[EDIT: This branch of conversation forked to https://forum.qt.io/topic/90724/the-nature-of-algorithms-and-mathematics --JKSH]
The computers of tomorrow will be doing their own "programming", not us.
The media and people constantly talk about that nonsense, hasn't happened yet. And to be completely blunt it probably won't happen in the current century ...
We didn't have C++-anything in the '80s, though! :)
Oh, back then even my father was young (and stupid and full of dreams). ;)
@JKSH said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
I can only wonder what my (future) kids will start coding in. I'll probably start them off at a young age, so C++ won't be appropriate.
Why do you think they'll code at all? They may decide to become painters, or gardeners, or even the dreaded administration ... :)
@J.Hilk said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
Thankfully Steve Jobs came back to Apple and brought MacOS back into the UNIX-family, am I right ? :-)
Honestly I have no idea. For me apple is just a fruit I'd eat with gusto. ;)
I don't think they ever departed from their original UNIX fork though. As for Steve Jobs, I can't say he's the computer genius every article about him makes it look, but we could agree he used to be one hell of a salesman, by far ... -
@J.Hilk said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
It's the way one reads it.
In the Qt version, you start at the top, and make your way downwards. Thats pretty straight forwards. Create an Object, defines what it does via Signal &Slots and move on. I prefere this structure. It is also the reason, why I structure my QML-files from top to bottom and define property alias' in the root item to bind against, instead of refering/binding individual Items/properties crossways , even so the order of creation and binding does not matter at all in qml.The Labview code starts simple enough, from the left to the right. But as soon as I hit the reader block I'm lost, and I find myself applying A* search like method method to understand, what is going on :-)
Fascinating. Do you find the LabVIEW code any easier to read if you are already familiar with the "core"/"trunk" of the code?:
When I'm focussing on this trunk, my "peripheral vision" sees the surrounding bits simultaneously; the Read portion is in a loop, the loop period is 500 ms, and the loop has a stop/break condition (Stop Button OR Error):
I can only wonder what my (future) kids will start coding in. I'll probably start them off at a young age, so C++ won't be appropriate. Maybe something bright and colourful like
I've only looked briefly into it, but Swift seems like an interesting option
From a quick glance, Swift seems similar to JavaScript and C++. Thanks for the recommendation, but I think I'll use something else that's more accessible to kids.
@kshegunov said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
Why do you think they'll code at all? They may decide to become painters, or gardeners, or even the dreaded administration ... :)
Because long before they reach the age where they can decide with certainty that they want to become painters/gardeners/admin, I will have exposed them to coding as a potential hobby (Note: I'm not saying that they will be coding in their main job)
@JonB said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
IMHO, your kids won't be coding at all :(
I am fortunate enough to have lived in the Golden Age of computer programming, while people could do it. But it won't last long. We don't think or work anything like a suitable way for computer programs, specifications, algorithms. The computers of tomorrow will be doing their own "programming", not us.
The purpose of computer programs has always been to help humans to get things done.
Regardless of how advanced computers get, humans still need to communicate their desires/requirements to the computers. This aspect of programming cannot be automated so it won't disappear (at least I hope not; I don't want machines to make all my decisions for me without consulting me!). I expect that programming of the future will look different from today, but there will and there must always be human input into the process. Perhaps our role will be more like the supervisor/architect while computers act as the code monkeys. Even then, I'd imagine that supervising computers is very different from managing employees, so these supervisors will need specialized technical training.
Some people lament that this is no longer "programming". I don't mind as long as the core principle remains: That we are telling/guiding computers to help us get things done, we ensure that the process is efficient and effective, and we verify that the end product is reliable. If it means that I get to produce functional software more efficiently and reliably, I'm happy to change my role.
BTW, take a look at a Neural Net programming and see if you can understand how the "program" works!
Here's the ironic thing: A neural network behaves like an incomprehensible "black box" because it attempts to mimic the human brain! The "traditional" programs which are "different to how we think" are actually easier to follow.
Anyway, while a neural network's decision-making process itself (i.e. the use of history/training to convert inputs into outputs) is incomprehensible, the core rules that we program into the neural network are still systematic, logical, and understandable.
-
@JKSH said in I have >5 years of active experience in both Qt and LabVIEW. AMA. (featuring a lengthy prologue):
Fascinating. Do you find the LabVIEW code any easier to read if you are already familiar with the "core"/"trunk" of the code?:
To be honest, it took me embarrassingly long to realize, that the 2 pictures posted have the same code in it, one just has a loop wraped around it.
But once that was clear, it was indeed easier to read. 😊