文字与图形编程语言 [英] Textual versus Graphical Programming Languages

查看:174
本文介绍了文字与图形编程语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是高中机器人团队的一员,关于使用哪种语言对机器人进行编程存在一些争论.我们在C(或C ++)和LabVIEW之间进行选择.每种语言都有优点.

I am part of a high school robotics team, and there is some debate about which language to use to program our robot. We are choosing between C (or maybe C++) and LabVIEW. There are pros for each language.

C(++):

  • 广泛使用
  • 为未来做好准备(大多数编程职位需要基于文本的程序员.)
  • 我们可以从去年开始扩展我们的C代码库
  • 使我们能够更好地了解我们的机器人在做什么.

LabVIEW

  • 更容易可视化程序流程(块和连线,而不是代码行)
  • 更容易教(据说...)
  • 编程的未来是图形化的." (这样吗?)
  • 更接近一些新成员可能拥有的Robolab背景.
  • 不需要密切了解发生了什么.只需告诉模块找到红球,就不需要知道怎么做.

这对我们来说是一个非常困难的决定,而且我们讨论了一段时间.根据每种语言的优点以及您的经验,您认为更好的选择是什么?请记住,我们不一定要追求纯粹的效率.我们也希望为程序员的未来编程做好准备.

This is a very difficult decision for us, and we've been debating for a while. Based on those pros for each language, and on the experience you've got, what do you think the better option is? Keep in mind that we aren't necessarily going for pure efficiency. We also hope to prepare our programmers for a future in programming.

也:

  • 您认为像LabVEIW这样的图形语言是编程的未来吗?
  • 图形语言比文本语言更容易学习吗?我认为它们应该同样具有挑战性.
  • 看到我们全心全意地致力于帮助人们学习,我们应该在多大程度上依赖预先编写的模块,以及我们应该尝试自己编写多少?(好的程序员编写好的代码,优秀的程序员可以复制出色的代码."但是,首先值得成为一名优秀的程序员值得吗?)
  • Do you think that graphical languages such as LabVEIW are the future of programming?
  • Is a graphical language easier to learn than a textual language? I think that they should be about equally challenging to learn.
  • Seeing as we are partailly rooted in helping people learn, how much should we rely on prewritten modules, and how much should we try to write on our own? ("Good programmers write good code, great programmers copy great code." But isn't it worth being a good programmer, first?)

感谢您的建议!

我想进一步强调这个问题: 团队负责人认为LabVIEW由于其易于学习和教学而更好. 是真的吗??我认为可以很容易地教授C,并且C仍将涉及初学者级的任务.我真的很想听听您的意见. 有什么理由比创建一个"while box"更难键入while {}吗? 程序不是逐行地流过,而是仅由ifs修改,这不是很直观吗?

I'd like to emphasize this question more: The team captain thinks that LabVIEW is better for its ease of learning and teaching. Is that true? I think that C could be taught just as easily, and beginner-level tasks would still be around with C. I'd really like to hear your opinions. Is there any reason that typing while{} should be any more difficult than creating a "while box?" Isn't it just as intuitive that program flows line by line, only modified by ifs and loops, as it is intuitive that the program flows through the wire, only modified by ifs and loops!?

再次感谢!

我刚刚意识到这属于语言辩论"的主题.我希望这可以,因为这对于具有特定目标的特定编程分支而言是最合适的.如果不是...对不起...

I just realized that this falls under the topic of "language debate." I hope it's okay, because it's about what's best for a specific branch of programming, with certain goals. If it's not... I'm sorry...

推荐答案

在我到达之前,我们的团队(博士学位的科学家,几乎没有编程背景)已经尝试将LabVIEW应用程序断断续续地实现了将近一年.代码不整洁,太复杂(前端和后端),最重要的是,它不起作用.我是一位敏锐的程序员,但从未使用过LabVIEW.在LabVIEW专家的帮助下,他可以将我所知道的文本编程范例转化为LabVIEW概念,因此可以在一周内对该应用进行编码.这里的重点是仍然需要学习基本的编码概念,即使是像LabVIEW这样的语言,也只是一种不同的表达方式.

Before I arrived, our group (PhD scientists, with little programming background) had been trying to implement a LabVIEW application on-and-off for nearly a year. The code was untidy, too complex (front and back-end) and most importantly, did not work. I am a keen programmer but had never used LabVIEW. With a little help from a LabVIEW guru who could help translate the textual progamming paradigms I knew into LabVIEW concepts it was possible to code the app in a week. The point here is that the basic coding concepts still have to be learnt, the language, even one like LabVIEW, is just a different way of expressing them.

LabVIEW非常适合用于原始设计.即从DAQ卡中获取数据并在中间进行一些较小的操作,然后将其显示在屏幕上.但是,编程算法并不容易,我什至建议它更困难.例如,在大多数程序语言中,执行顺序通常使用伪数学符号(即y = x*x + x + 1)逐行遵循,而LabVIEW会使用一系列不一定相互遵循的VI(即从左到右)来实现这一点. -右)在画布上.

LabVIEW is great to use for what it was originally designed for. i.e. to take data from DAQ cards and display it on-screen perhaps with some minor manipulations in-between. However, programming algorithms is no easier and I would even suggest that it is more difficult. For example, in most procedural languages execution order is generally followed line by line, using pseudo mathematical notation (i.e. y = x*x + x + 1) whereas LabVIEW would implement this using a series of VI's which don't necessarily follow from each other (i.e. left-to-right) on the canvas.

此外,作为一种职业,编程不仅仅是了解编码的技术知识.能够有效地寻求帮助/寻找答案,编写可读代码并使用旧代码都是所有关键技能,而这在诸如LabVIEW之类的图形语言中无疑是更加困难的.

Moreover programming as a career is more than knowing the technicalities of coding. Being able to effectively ask for help/search for answers, write readable code and work with legacy code are all key skills which are undeniably more difficult in a graphical language such as LabVIEW.

我相信图形编程的某些方面可能会成为主流-子VI的使用完全体现了编程的黑匣子"原理,并且还用于其他语言抽象中,例如

I believe some aspects of graphical programming may become mainstream - the use of sub-VIs perfectly embodies the 'black-box' principal of programming and is also used in other language abstractions such as Yahoo Pipes and the Apple Automator - and perhaps some future graphical language will revolutionise the way we program but LabVIEW itself is not a massive paradigm shift in language design, we still have while, for, if flow control, typecasting, event driven programming, even objects. If the future really will be written in LabVIEW, C++ programmer won't have much trouble crossing over.

作为后记,我想说C/C ++更适合于机器人技术,因为毫无疑问,学生将不得不在某个时候处理嵌入式系统和FPGA.底层的编程知识(位,寄存器等)对于这种事情而言非常宝贵.

As a postcript I'd say that C/C++ is more suited to robotics since the students will no doubt have to deal with embedded systems and FPGAs at some point. Low level programming knowledge (bits, registers etc.) would be invaluable for this kind of thing.

@mendicant 实际上,LabVIEW在工业中已被广泛使用,尤其是在控制系统中.授予NASA不太可能将其用于机载卫星系统,但用于太空系统的软件开发是完全不同的球类游戏 ...

@mendicant Actually LabVIEW is used a lot in industry, especially for control systems. Granted NASA unlikely use it for on-board satellite systems but then software developement for space-systems is a whole different ball game...

这篇关于文字与图形编程语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆