|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Starting programming...
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.
|
|
#2
|
|||
|
|||
|
Re: Starting programming...
Quote:
![]() |
|
#3
|
||||
|
||||
|
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.
|
|
#4
|
|||
|
|||
|
Re: Starting programming...
Quote:
Makes 0% sense to me... Its like getting a Lambo then trading it for a Civic in my view... If you understand, why restrict yourself while you have almost full control with C++ then putting on training wheels? |
|
#5
|
||||
|
||||
|
Re: Starting programming...
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: Starting programming...
Quote:
If you're comparing programming languages to vehicles, with C++ as a high-speed sports car, LabVIEW might be more like a helicopter. It's an entirely different kind of programming from a procedural language like C++ or Java, but it's just as powerful. Actually, I'm inclined to liken C to a 1940's-era Jeep, designed to be small and nimble and capable of going off-road...but completely devoid of niceties like airbags and anti-lock brakes. :-P Last edited by Alan Anderson : 20-05-2010 at 22:41. |
|
#7
|
|||
|
|||
|
Re: Starting programming...
Quote:
Like the ones used by the marines in WW2, I like that analogy![]() |
|
#8
|
|||
|
|||
|
Re: Starting programming...
If you're just getting started with C(++), I'd reccommend learning C first. I personally think it is much simpler than C++ in terms of language constructs (not as much when you get into actual implementation) and I personally think it's better in getting you to "think like a programmer" as other people have said in this thread. Last week I was helping a friend learn Objective-C and because of the way the APIs are written (this was for iPhone) you can't really do anything without jumping directly into the object system in the language. The parts he was really having trouble with were the ones that OO languages make more complex (pointers, typecasting, objects (as opposed to structs), etc.), and would have been much easier for me to explain in plain C.
On the topic of LabVIEW, again I feel like it is a "programmer mindset" thing. With the closest thing to LV experience being NXT-G (which for those of you who haven't used it is MUCH more procedural than real LV), I was able to pick up the classmate and mess with the dashboard within 2 days, the majority of that time being the rewrite of the robot side dashboard sender (C++). Again, Having that prior experience programming really helps in switching out languages. Oh and no matter what language you are learning, books and tutorials can only go so far. Real understanding of the language comes from looking at examples and analyzing every single line (or block) of code in it, knowing exactly how it works and what is happening in that line. That's where the "programmer's mindset" comes from. Not knowing to type in this line here, but knowing why typing this line here does what it does. |
|
#9
|
||||
|
||||
|
Re: Starting programming...
While finding prime numbers isn't particularly useful for driving robots, it is coding experience! As Greg mentioned, Project Euler gets you writing code to solve problems, and rewards your effort with little check marks.
![]() Once you've solved them once, it's fun to go back and solve them in other ways too (MATLAB, Excel, Python, C, using an Arduino, etc.)! |
|
#10
|
||||
|
||||
|
Re: Starting programming...
Quote:
I learned C and C++ long before I started looking into LabView. I was pretty much forced into learning LabView (up until this point I thought that graphical programming was for people who couldn't handle learning real languages) when the "LabView Guy" in our lab graduated. I inherited his projects and started learning LV, after a couple of weeks I was capable of trouble shooting his software, by the end of the summer I was fairly proficient using LV. I can write code in a fraction the time it would take me in your choice of text based languages. I don't have to worry about a lot of things like parsing serial data because the tools are there for you. My favorite thing about LabView is that after the code is working with a few clicks I can create a pretty good looking GUI with graphs and charts that clearly show what is going on (try explaining to marketers and sales people that numbers in a terminal window are proof everything works. In my current job I don't get to use LabView very often (4 bit micro controllers that cost <$.02 don't really run LabView code). I spend my day writing in C and Assembly (and all sorts of proprietary interpretations of C). I have all the control in the world over my micro controllers, however I would not equate the experience of going from LabView Back to C to going from a Civic back to a Sports Car. C (or C++) may be fast and efficient but it is not a Lamborghini, it is more like a stripped down race car, built for performance, it may perform better but it is uncomfortable to drive, labview on the other hand would be your Luxury performance car, it might not be as efficient as a sports car but it is much faster than 99% of drivers will ever need it to be, and all of the luxuries and conveniences greatly out weigh the marginal performance increases. I am still waiting for the day I find a problem that requires me to use Haskell, I had to learn it for a class and am yet to find a situation to apply that knowledge (ProLog falls into this category too). Last edited by JamesBrown : 21-05-2010 at 11:17. |
|
#11
|
||||
|
||||
|
Re: Starting programming...
Learning a particular programming language is no where near as important as learning the basics of programming.
For example, learn some of the basic programming structures like:
Learn how to define a problem through reiterative decomposition, a fancy way of saying: break down a problem into smaller components until you can solve it Learn good programming practices like code reuse, code refactoring, encapsulation. There is a lot of good practices in the object oriented realm to help you write good reusable code. Know your problem domain. If you are writing code for robots, you need to know different things than if you are writing code for an accounting system. I have yet to use the concept of debits and credits when writing for our robot, and never once needed to filter the noise out of a potentiometer for a AR Aging report ;> So focus more on the fundamentals of programming, after that, picking a language is usually driven by the environment you are working in, or what you have available at the time. But if you know the fundamentals, it doesn't really matter much which language you end up in. |
|
#12
|
|||||
|
|||||
|
Re: Starting programming...
Quote:
Quote:
Quote:
Just a quick question: What is the difference between high-level and low-level languages? Thanks! |
|
#13
|
|||
|
|||
|
Re: Starting programming...
In general, a high-level language abstracts you from the hardware and how it actually works. LabVIEW is a big one, Java too, C++ is somewhat up to this level. low-level languages are ones that expose all of the power of the machine to you, but a side effect of that is making the programming much, much harder (assembly for example)
|
|
#14
|
|||
|
|||
|
Re: Starting programming...
Don't use that.
|
|
#15
|
||||
|
||||
|
Re: Starting programming...
I agree you shouldn't have a need for a GoTo, but it is a fundamental programming structure and you should know it.
Most of the times a jump is needed is already dealt with by the compiler, such as in Try/Catch blocks, subroutine returns, jump tables, etc. In these cases, the compiler will generate a jump instruction in the low level language to perform a high level function. Using a GoTo in your code tends to indicate poor coding and sloppiness. If you find you need one, review your code and try to find a better way to code it. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |