Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Team with beginner programmers? (http://www.chiefdelphi.com/forums/showthread.php?t=107248)

Joe Ross 12-07-2012 15:02

Re: Team with beginner programmers?
 
Quote:

Originally Posted by ktrobotcreator (Post 1176904)
Personally I hate LabView and would NOT recommend a beginner to use it. It can be very confusing and the logic behind it is much more complicated to understand than that of C++ and Java.

Due to the fact that dataflow programming is a different paradigm then object oriented programming, it can often be harder for someone who already knows a textual language to transition to LabVIEW then for a beginner to pick up LabVIEW from scratch. It sounds like you might have had that issue.

AdamHeard 12-07-2012 15:06

Re: Team with beginner programmers?
 
Quote:

Originally Posted by Joe Ross (Post 1177041)
Due to the fact that dataflow programming is a different paradigm then object oriented programming, it can often be harder for someone who already knows a textual language to transition to LabVIEW then for a beginner to pick up LabVIEW from scratch. It sounds like you might have had that issue.

Agreed.

In my curriculum we use labview for some courses, matlab for some, and then mechatronics is in assembly/C++. My classmates that have never experienced programming before have much, much more trouble with the text based programming in terms of understanding.

Hugh Meyer 12-07-2012 15:23

Re: Team with beginner programmers?
 
This book, C++ for Everyone, is very good if you want to learn C++. Our team did a full 16 week class last year using this book. If you work through this book you will lean a bunch about C++.

http://www.wiley.com/WileyCDA/WileyT...HEP001707.html

-Hugh

JohnGilb 12-07-2012 16:46

Re: Team with beginner programmers?
 
Quote:

Originally Posted by Joe Ross (Post 1177041)
Due to the fact that dataflow programming is a different paradigm then object oriented programming, it can often be harder for someone who already knows a textual language to transition to LabVIEW then for a beginner to pick up LabVIEW from scratch. It sounds like you might have had that issue.

Just a small correction - I think the best comparison to make (and feel free to correct me) is that LabVIEW is a dataflow language, and C++/Java are imperative languages.

All of them can be used to write in an object-oriented fashion, though doing so in a dataflow language may feel extremely different.

Katie_UPS 12-07-2012 20:20

Re: Team with beginner programmers?
 
Quote:

Originally Posted by profamous (Post 1176844)

Can anyone show me where to start programming in Java? Either in general or FRC based. This is my first language ever so I have no clue what an IDE is or anything like that.

I can't link you to any specific websites/tutorials. I would go to your library and find an intro to Java book. Then, to just get used to the language, I would do simple tasks:
-Write your "hello, world" code : This teaches you the very basic structure of how to code in that language.
-Create something that takes user input and manipulates (in a simple manner) it and gives output (ie does addition with two numbers, or capitalizes words) : This will teach you basic variable manipulation*.
-Go to Project Euler and try to solve the problems.
-Create a simple program that does something that you think is cool. My friends and I, to learn languages at school, wrote chose-your-own text adventures. I wrote a game of checkers and a program that solved the "chickens and cows" math problem with any number of heads/legs(I couldn't find a non Q&A example of that problem). These are good because you do something you find interesting while finding ways to use certain programming tools/techniques.

These are basic steps to getting you familiar with how to write code in java without having access to a robot/any other machines. If you can, find a bored Computer Science or Computer Engineering college kid and have them teach you (other majors may know Java as well, but I wouldn't know which) (or a bored Computer Scientist or Computer Engineer)(or anyone who is bored and knows Java).

If you need more help, you can private message (PM) me (and probably anyone else who responded in this thread).



*A lot of programming is taking numbers/data and assigning them to variables (like how in math you have the unknown number that we are calling "x". In programming you can call this number "NumberOfBananas" or "NumberOfMonkeys" and pick what you want that number to be, and change what you want that number to be, and then use that number) and then manipulating your variables (maybe you'll divide NumberOfBananas by NumberOfMonkeys so that you can tell the user how many bananas each monkey gets).

MAldridge 16-07-2012 16:40

Re: Team with beginner programmers?
 
I would say that if you can get ahold of a team that uses java, see if they will send you their code. That way you can see how it is implemented. For me, starting at hello world was frustrating, but then again, my first language was assembly for apple II.

nightpool 16-07-2012 21:15

Re: Team with beginner programmers?
 
Quote:

Originally Posted by JohnGilb (Post 1177049)
Just a small correction - I think the best comparison to make (and feel free to correct me) is that LabVIEW is a dataflow language, and C++/Java are imperative languages.

All of them can be used to write in an object-oriented fashion, though doing so in a dataflow language may feel extremely different.

While C++/Java is definitely imperative, and Labview definitely ISN'T, it might be more useful (and more in line with the terminology of the rest of the programming world) to categorize them such:

Java: Object-oriented, as Java is probably one of the only strongly object oriented languages, EVERYTHING in Java is an object and that is enforced by the compiler.

C++: Imperative (But most of the wpilib is written with OO)

Labview: Functional (As in, everything is functions acting on data that passes between them. While this misses out on some of what Labview is, the difference between dataflow languages and functional ones mainly has to do with execution order, and it's not really THAT big of a difference, as many similar concepts and styles are shared)

Labview can't natively be used in an OO style, by the way, as it has no concept of state. You'd have to pass around the state of the object to each method you want to call.

MAldridge 16-07-2012 21:19

Re: Team with beginner programmers?
 
I agree, although as a happy labview programmer, I like it's stateless nature. Admittedly, if you come from the OO, or for that matter, the text based world, it takes some getting used to.

Once you are used to it though, it works great. It also is great if you haven't ever programmed before, because it is easy to go from stateless to OO, just not the other way round.

Fletch1373 16-07-2012 21:36

Re: Team with beginner programmers?
 
Quote:

Originally Posted by nightpool (Post 1177855)
Java: Object-oriented, as Java is probably one of the only strongly object oriented languages, EVERYTHING in Java is an object and that is enforced by the compiler.

I'd like to pass on something that one of my former Computer Science professors once told me. "Java is not an Object Oriented language."

Okay, some of you are probably going to need a little explanation. He went on to explain how a language as a whole can't be object oriented. Some languages just make it significantly easier to program that way. For example, C++ has special syntax that is needed is order to follow the OOP paradigm, whereas Java requires that syntax no matter what you're writing. Java, however, can be written in a functional way. You could easily write a (simple) program in Java with the full body of it in the main function, potentially using a few other static methods as well.

Sorry to hijack the thread. If anyone cares to continue this, please PM me. I love philosophical discussions of all kinds.

Greg McKaskle 16-07-2012 23:51

Re: Team with beginner programmers?
 
Quote:

Labview can't natively be used in an OO style, by the way, as it has no concept of state. You'd have to pass around the state of the object to each method you want to call.
First off, I wanted to say that you did a good job on the language analysis. Kudos for getting deep into language features.

I thought I'd offer a few clarifications about LV. First off, LV really isn't purely functional, nor is it purely data flow. Pure data flow tends to use fork and join operators in order to make conditions and repetition, and in the end it is tedious and practically like using gotos. The authors intentionally merged the control structures with the more pure data flow expressions to create what they believe to be a more usable hybrid.

As for OO, it is true that initially LV didn't have objects or classes. About fifteen years ago an external Swedish company started adding OO to LV. They called it GOOP. There were a few others, and it was very interesting to see how each approached the extensions.

Ultimately, the LV team felt that in order to do it in a way that was more true to the language, we would need to do it internally. So perhaps 8 or ten years ago, the OO features started being integrated.

One of the more unique things you'll notice is that objects use by-value-semantics -- meaning that wires contain the value, rather than a reference to the value of the object. This is similar to how stack objects are done in C++. Anyway, this matches how LV does arrays, strings, and obviously scalars. It makes some OO algorithms trivial and complicates others a bit where the goal was really to create a topology of objects. In that case the user can define a reference type whose value copy can choose between a deep, shallow, counted, or other copy semantics. At this point, very little of the libraries that ship with LV are OO, but a good number of external professional SW development libs adopt it quite heavily.

Greg McKaskle


All times are GMT -5. The time now is 20:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi