Go to Post Don't trust everything you read on Chief Delphi. - Peter Matteson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-05-2010, 20:15
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Starting programming...

Over the past couple of years, I have really been interested in getting started with programming, but I was usually too busy with some other extracurricular activities or school. Then, this year, I joined my school's FRC team, and I am really into robotics. This year, I was in charge of the layout and execution of the wiring on the robot. Next year, I want to help program.

With this goal in mind, I was wondering: what do you think would be the best way to get started into programming in general? I have had minor, minor experienced with C++* and a little bit more with LabVIEW** (which is what we use). However, I really want to take part of this summer to really get my fingers into programming, with the intent of being a help on the programming side to the team next year.

I don't really know where to start. I've looked through some of the official FRC documentation on LabVIEW, and that's about it. I'm sure you guys get asked this question a lot, so what should I do to start out?

*Wrote a program to randomly generate an integer using randl;, then user guesses the number and the program outputs how close you are (within 5, 10, 20, or outside 20).

**Wrote same program as above except using LEDs and indicators in LabVIEW, plus I hung out with our main programmer as much as possible so I picked up a couple of things.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #2   Spotlight this post!  
Unread 20-05-2010, 20:26
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Starting programming...

I have a suggestion, go learn C++ from books, thats how I did it, and I ended up fine. May be they don't teach you how to program, but they teach you the basics. You just need to practice, practice programming text based games or something. Robots are different, I had trouble in the beginning with robots, since its different mindset, but just learn to program. Programming is how you think, not code on the computer screen. If you understand what I mean. The syntax is not the programming part, but the logic.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #3   Spotlight this post!  
Unread 20-05-2010, 20:36
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Starting programming...

Quote:
Originally Posted by davidthefat View Post
I have a suggestion, go learn C++ from books, thats how I did it, and I ended up fine. May be they don't teach you how to program, but they teach you the basics. You just need to practice, practice programming text based games or something. Robots are different, I had trouble in the beginning with robots, since its different mindset, but just learn to program. Programming is how you think, not code on the computer screen. If you understand what I mean. The syntax is not the programming part, but the logic.
That's what I've heard a lot from our main programmer - it's about the logic behind it. My impression from using LabVIEW is that it is more about the logic then the syntax, while CLI languages you have to focus more on the syntax and the logic is more hidden. I've been looking at a couple of C++ books at my local library - that was what I thought I'd start out with first. Then, I'd like to mess around with a fun little cRIO control-system bot the team is building to really get the logic.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #4   Spotlight this post!  
Unread 20-05-2010, 20:38
kgzak's Avatar
kgzak kgzak is offline
Registered User
AKA: Kris
FRC #4392 (Decievers) FRC #2075 (Enigma)
Team Role: College Student
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Grand Rapids, Michigan
Posts: 418
kgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to behold
Re: Starting programming...

Along with what davidthefat said, maybe your coach/mentor will give you a copy of LabView so you can play with that at home. Thinking like a programer might be the hardest part. I picked up on LabView, and other languages, very easily because I already thought like a programer, I just didn't know it. Have your programer show you some code and explain what it does and soon after you understand how that works try to decode some code without having the programer explain it. I worked with one of you programers at Kettering when we had issues with our watchdog, he knew a lot about LabView and he would be a good person to talk to. How did he pick up LabView?
  #5   Spotlight this post!  
Unread 20-05-2010, 20:48
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Starting programming...

Quote:
Originally Posted by kgzak View Post
Along with what davidthefat said, maybe your coach/mentor will give you a copy of LabView so you can play with that at home. Thinking like a programer might be the hardest part. I picked up on LabView, and other languages, very easily because I already thought like a programer, I just didn't know it. Have your programer show you some code and explain what it does and soon after you understand how that works try to decode some code without having the programer explain it. I worked with one of you programers at Kettering when we had issues with our watchdog, he knew a lot about LabView and he would be a good person to talk to. How did he pick up LabView?
Luckily, I managed to grab a copy of LabVIEW for my laptop at home. You probably talked to another one of our programmers, who knew C++ and Java already if I remember correctly, so he just spent the '09 season messing around with LabVIEW and picking it up.

I'll definitely try trying to figure out code, probably from the examples included with LabVIEW (I can't have access to the competition code we used right away).

The real thing I want to do is learn more about "real" programming - CLI - than transition over to LabVIEW. I also have a question: Would it be better to learn C first, or C++? C is a good basic language, I hear, but C++ is more commonly used.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #6   Spotlight this post!  
Unread 20-05-2010, 20:52
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: Starting programming...

I'd recommend against learning C++ as your first language. You should start with Java as you will encounter much fewer headaches and debugging code is a lot easier.
  #7   Spotlight this post!  
Unread 20-05-2010, 20:54
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Starting programming...

Quote:
Originally Posted by kenavt View Post
Luckily, I managed to grab a copy of LabVIEW for my laptop at home. You probably talked to another one of our programmers, who knew C++ and Java already if I remember correctly, so he just spent the '09 season messing around with LabVIEW and picking it up.

I'll definitely try trying to figure out code, probably from the examples included with LabVIEW (I can't have access to the competition code we used right away).

The real thing I want to do is learn more about "real" programming - CLI - than transition over to LabVIEW. I also have a question: Would it be better to learn C first, or C++? C is a good basic language, I hear, but C++ is more commonly used.
Eh, C is more for Robots since more robots are programmed in C, but I will have to say the mind set is different. C is procedural and C++ is object oriented. I started with C++ like I previously mentioned, its just C with more (hence the ++) so if you learn C++, you basically learn C plus more, but not really, the mind set is different. But surprisingly, when I first started, I started programming procedurally more than object oriented. Eh IDK you might want to start with C++.



edit: LOL at what Chris said, thats why I have an F in my AP Computer Class, it was so easy that I just slacked off... BAD IDEA... well good thing there is a project thats 70% of my grade, and its about the autonomous robot challenge
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #8   Spotlight this post!  
Unread 20-05-2010, 20:55
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Starting programming...

I learned VB a long time ago. Thats why I didn't do any software stuff for a few years afterwards.

Then I learned C++ basics, like functions, variables, and cout/cin.

Then I joined my middle school's FLL team my 8th grade year. I quickly learned Mindstorms and actually hit the maximum potential of the language (that is not hard to do in Mindstorms). It was fun, and prepared me to think like a programmer more then I did previously. Freshman year on the Killer Bees, I learned LabVIEW, and although my code actually looked like spaghetti and had many issues, and was poorly organized, it worked. I wrote the crab steering code on our 09 robot, and it was later integrated into the rest of the code written by Jim (and probably re-written, I don't actually know what the final code looked like).

This year I made a much larger effort to organize my code, I wrote some software in the off-season to simulate arms and crab steering, and was the software lead (well, the only programmer).

Being a fairly high-level programmer, I was more interested in the algorithms, logic, and design of the code then the implementation. I am still good at writing it, but spend some time before writing it on organization and partitioning modules. I actually never used C for anything useful until 2009 OCCRA, on the VEX processor in Microchip C. And I learned a lot more then I want to know about pointers on that little VEX processor.

It depends on if you prefer higher level or lower level programming. If you already think like a programmer and focus on the logic, not the implementation, then LabVIEW is probably for you. If you prefer writing syntax and debugging lines of code, then C++ is probably best (better start with C-like code that dosen't use pointers or classes first, then work up to classes/namespaces and pointers).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #9   Spotlight this post!  
Unread 20-05-2010, 20:58
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Starting programming...

Quote:
Originally Posted by apalrd View Post
(better start with C-like code that dosen't use pointers or classes first, then work up to classes/namespaces and pointers).
Dang it, I need to read up on namespaces more, I think I am missing out on some cool stuff....
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #10   Spotlight this post!  
Unread 20-05-2010, 20:59
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Starting programming...

Perhaps a year ago, someone mentioned the Project Euler site. This is similar to how I learned to program. Pick a language and take a crack at a few problems. Once you have your bearings, may I suggest trying one of the other languages, and perhaps even the third. Given a problem to apply your programming to, try out different tools -- video tutorials, written tutorials, examples, reference books, etc.

If math isn't your thing, obviously there are other good ways to learn how to program, but coming to grips with what is commonly referred to as scientific programming, or numerical programming is, I think, similar to much of what you'll see on the robot. Of course the robot will introduce you to many other concepts as well, but if you are good at the numerical stuff, I think you'll find the rest easy to pick up.

Greg McKaskle
  #11   Spotlight this post!  
Unread 20-05-2010, 21:00
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: Starting programming...

Quote:
Originally Posted by davidthefat View Post
I started with C++ like I previously mentioned, its just C with more (hence the ++) so if you learn C++, you basically learn C plus more, but not really, the mind set is different.
Emphasis should be put on "not really." C++ is not just C with classes. They are completely different beasts.
  #12   Spotlight this post!  
Unread 20-05-2010, 21:03
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Starting programming...

Quote:
Originally Posted by apalrd View Post
I learned VB a long time ago. Thats why I didn't do any software stuff for a few years afterwards.

Then I learned C++ basics, like functions, variables, and cout/cin.

Then I joined my middle school's FLL team my 8th grade year. I quickly learned Mindstorms and actually hit the maximum potential of the language (that is not hard to do in Mindstorms). It was fun, and prepared me to think like a programmer more then I did previously. Freshman year on the Killer Bees, I learned LabVIEW, and although my code actually looked like spaghetti and had many issues, and was poorly organized, it worked. I wrote the crab steering code on our 09 robot, and it was later integrated into the rest of the code written by Jim (and probably re-written, I don't actually know what the final code looked like).

This year I made a much larger effort to organize my code, I wrote some software in the off-season to simulate arms and crab steering, and was the software lead (well, the only programmer).

Being a fairly high-level programmer, I was more interested in the algorithms, logic, and design of the code then the implementation. I am still good at writing it, but spend some time before writing it on organization and partitioning modules. I actually never used C for anything useful until 2009 OCCRA, on the VEX processor in Microchip C. And I learned a lot more then I want to know about pointers on that little VEX processor.

It depends on if you prefer higher level or lower level programming. If you already think like a programmer and focus on the logic, not the implementation, then LabVIEW is probably for you. If you prefer writing syntax and debugging lines of code, then C++ is probably best (better start with C-like code that dosen't use pointers or classes first, then work up to classes/namespaces and pointers).
To be honest, I don't really know what is high level vs. low level programming. And, what I'd like to do, is be able to do CLI languages like C++ or Java in my free time, and then be able to switch over to LabVIEW for robotics. I think I'm going to just go with learning C++ out of a book while experimenting with LabVIEW at the robotics team meetings, and then move on to different languages.
Quote:
I'd recommend against learning C++ as your first language. You should start with Java as you will encounter much fewer headaches and debugging code is a lot easier.
The thing is that I already know some C++ - std::cin and cout and if-then statements, and I feel I already have a grasp of the language. Then, maybe I'll move onto C and Java.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #13   Spotlight this post!  
Unread 20-05-2010, 21:06
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: Starting programming...

Quote:
Originally Posted by kenavt View Post
The thing is that I already know some C++ - std::cin and cout and if-then statements, and I feel I already have a grasp of the language. Then, maybe I'll move onto C and Java.
Which is easily less than 1% of what there is to know about C++. Besides most of what you know now will transfer over to Java as C,C++, and Java share similar syntax. I'm just telling you from experience that C++ can quickly become a world of hurt.
  #14   Spotlight this post!  
Unread 20-05-2010, 21:08
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Starting programming...

Quote:
Originally Posted by Chris27 View Post
Which is easily less than 1% of what there is to know about C++. Besides most of what you know now will transfer over to Java as C,C++, and Java share similar syntax. I'm just telling you from experience that C++ can quickly become a world of hurt.
To be honest with you, I never really understood the "::" until like a year ago
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #15   Spotlight this post!  
Unread 20-05-2010, 21:20
kgzak's Avatar
kgzak kgzak is offline
Registered User
AKA: Kris
FRC #4392 (Decievers) FRC #2075 (Enigma)
Team Role: College Student
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Grand Rapids, Michigan
Posts: 418
kgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to behold
Re: Starting programming...

Last year is when I started programing. I had never done any programing before that and our entire robot was programed by me last year. I learned Visual Basic at school and LabView at robotics that was as much knowledge I knew about programing. I would take all my robotics work home with me. That is how I learned. I think I learned as being a last resort but in the end found out I enjoyed it. So, I don't think it matter what language you learn first as long as you learn the basics of programing. I would suggest learning more about C++ if you feel you have a little knowledge about that. It may lead you into LabView.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming in Python and Explaination of Programming roboxking Programming 22 07-01-2008 16:08
programming motors with programming kit BorisTheBlade FIRST Tech Challenge 4 01-11-2005 19:03
[FVG]: Programming Starting Mike Ciance FIRST-related Organizations 1 11-12-2004 13:22
Starting position? Mark Garver General Forum 4 06-01-2003 07:45


All times are GMT -5. The time now is 03:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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