Arduino Forum

Forum 2005-2010 (read only) => General => Bar Sport => Topic started by: Schmidtn on Jan 13, 2011, 06:25 am

Title: Programming class
Post by: Schmidtn on Jan 13, 2011, 06:25 am
OK, I know State schools don't have the best funding, but I'm in a college programming class (that the catalog described as C++) where we are learning to program... in VBA in Excel.  It seems very weird to me.  

Any idea why they'd be teaching people to write code in Excel?
Title: Re: Programming class
Post by: westfw on Jan 13, 2011, 07:07 am
Quote
Any idea why they'd be teaching people to write code in Excel?

Immediately useful results in a familiar environment?
Desire to focus on the mathematics?
Ability to check results against built-in functions?
Real Visual Basic software too expensive?

A lot of schools have "weird" ideas about introductory programming languages.  See what happens...
Title: Re: Programming class
Post by: liuzengqiang on Jan 13, 2011, 09:17 am
>:( :(I think shit happens. If it's called C++ the teacher teaches C++, end of the story. Maybe the teacher finds VBA easier for himself but VBA is not object-oriented programming. I also hate teaching propriatary programs as well although I use Excel for intro classes (well I can opt for openoffice calc, everything works the same except for the looks)

I am in an opposite situation where I need to teach some students C/C++ for arduino projects in my electronics class. The class description on the book is so old that it makes the catalog smell old. Can't do nothing about it since state colleges are not having their wonderful days now and changing any course related thing will be a huge headache.
Title: Re: Programming class
Post by: marklar on Jan 13, 2011, 02:17 pm
Quote
If it's called C++ the teacher teaches C++, end of the story.


That is correct - teaching Visual Basic in a class that should teach C++ - is "a bit" off the mark.  

If this is an intro level class, they may have had issues attempting to teach programming basics and C++ specifics like pointers at the same time.  Hopefully they will get to C++ since that is most likely what you signed up to learn.  If early enough to drop the class, you may ask if they are teaching C++ during the course and if not - maybe the same course by another instructor will teach what you desire.  Paying for a course to learn C++ and learning VBA is like signing up for bungee jumping class only to find out you will really only be playing with rubber bands at your desk :).

Title: Re: Programming class
Post by: Schmidtn on Jan 13, 2011, 11:54 pm
westfw:  Yeah, I can see that it's cheap and easy to get started with Visual Basic by using the macro in Excel.  It was the VB instead of C++ that I thought was odd.

It's a mandatory intro to programming class I have to take (and no programming classes after it unless I choose one for a tech elect) but I was kind of excited to get some real training since the only code I know is what I've learned playing with Arduino and on these boards.  So far, VB doesn't seem to be anything like Arduino.

I'll stick with it and ask around the department for a C++ class I can get into for a tech elect spot, I'm just really deflated that it's watered down coding in Excel instead something I can transfer to the hobby.
Title: Re: Programming class
Post by: Imahilus on Jan 14, 2011, 02:56 am
4th (final) year software engineering student here (college level).
As far as I know, I haven't even seen visual basic code, nevermind being taught it.
Though from what I've heard, it is one of the worst languages to start with.
For easy languages you could use to learn coding, PHP and python would probably be the best choices. Though if you want to get straight to the juicy coding parts, C++, C# and/or java make fine choices. These are programming languages (php and python are scripting languages... you can check wiki for specific details on the differences between the two, in short.. PHP/python allow a lot of mucking about with variables, C++/C#/java are a lot more strict).
Title: Re: Programming class
Post by: Jeckson on Jan 14, 2011, 03:32 am
Quote
Any idea why they'd be teaching people to write code in Excel


The excel code with C++ is sometime hardy than VBA.
VBA with excel seems good choice.

Jeckson
Title: Re: Programming class
Post by: liuzengqiang on Jan 14, 2011, 04:46 pm
VBA for Excel is for elites, excuse me, elite business men and women. That is the best they can ever do. I did VBA programming in the past, odd jobs like automate my final letter grades, communicating with my arduino in my very first arduino project (odd!), and teaching optics. It's rather nice that you can use some codes to interact with objects in MS visio or any objects in MS office product. I can draw a ray trace diagram, assign different things to different layers, then use buttons to hide and show them. Very nice indeed but there's no place where I didn't first hit the record macro and then hack the recorded macro. Writing it from ground up is not possible. The language is not, simply not for beginner programming. It's for someone to get some job done. There's little instructional value in teaching it.
Title: Re: Programming class
Post by: graymalkin on Jan 15, 2011, 02:43 am
While I can see the use of learning VBA in Excel it is very important to note, VBA isn't programming, it is scripting,  VB.NET or plain VB is programming

I would argue, also that VB sets the worst precedent for programming, it can easily be messy and unless you tabulate things neatly and comment a lot quite unmanageable.

If you have an arduino play with some of the more crazy things like setting the bits in various registers and similar bitwise operations.  Languages aren't hard to learn, it's the complexities of the libraries built on them, like .NET and the bits you get shown in VBA.
Title: Re: Programming class
Post by: graymalkin on Jan 15, 2011, 02:46 am
Also, as to WHY they would teach you to program in excel, it's because they don't have to put any new software on the machines, as it comes with Office (Alt-F11 I believe)

Yell at your IT dept, if you're lucky you'll have a programmer in there who will possibly (if you're enthusiastic and have a good attitude etc) help you out, and maybe even go over some things regarding C (in some form).
Title: Re: Programming class
Post by: theepdinker on Jan 15, 2011, 03:29 am
Perhaps whichever accreditation service audits that university would be interested in knowing about this
Title: Re: Programming class
Post by: Valalvax on Jan 15, 2011, 04:16 am
Not to mention, I believe the VBasic studio is free... >.>

Though seriously if the class is called Intro to C, or whatever, it should be teaching C
Title: Re: Programming class
Post by: graymalkin on Jan 16, 2011, 04:04 am
There are plenty of free IDEs for use, the .Net express ones are nice (with dreamspark you should get the full version for free) but it still leaves the IT dept to auth and run the installs on potentially hundreds of PCs.

You're in a good place here for learning C, mind.  Because of hardware limitations you quickly learn how to maximise speed and minimise RAM and Flash usage.
Title: Re: Programming class
Post by: liuzengqiang on Jan 16, 2011, 05:03 am
Quote
Because of hardware limitations you quickly learn how to maximise speed and minimise RAM and Flash usage.

;D Good one!
Title: Re: Programming class
Post by: graymalkin on Jan 16, 2011, 05:36 pm
Mm, perhaps not for blink, but when projects get very large you have no choice.
Title: Re: Programming class
Post by: westfw on Jan 17, 2011, 12:56 am
Quote
Any idea why they'd be teaching people to write code in Excel?

Getting back on topic...
Have you asked the teacher what's up?  (perhaps somewhat carefully; it doesn't do to make enemies.)
Do you have an "adviser"?  Have you asked them?
It's early in the term, right?  Perhaps you will progress to real C++ "shortly."  Or something beyond VBA.  Having more than one example of "programming language" is a generally useful thing.
Title: Re: Programming class
Post by: graymalkin on Jan 21, 2011, 08:45 pm
I'm not sure VBA is a good language for anyone to start with, wouldn't it make sense (if you're learning C++) to learn something that is ALSO low level?
Title: Re: Programming class
Post by: Schmidtn on Jan 22, 2011, 03:21 am
Yeah, I went into his office hours and asked about the catalog saying C++ and then we're working in VBA.  He said it's really an intro to programming for non-programming majors and the university told the professors to switch to the cheapest (price wise) language to write code in.  Then the catalog description never got changed.  We will always be working with VBA this quarter.  I'm not against learning VBA, I was just looking forward to learning something that I could apply to my Arduino.  But it is a wonky language and I'm constantly googling how to make certain cells active and things like that.  It seems like it's more complicated than it needs to be.
Title: Re: Programming class
Post by: Valalvax on Jan 22, 2011, 05:33 am
Tell your college that Microsoft gives out licenses for Visual Studio for free for college students at www.dreamspark.com I mean, it's not C++, but it's better than VBA...

Actually, looking at the site again, they offer the C# Studio and C++.... so it's not like it's a cost thing, unless it's the books...
Title: Re: Programming class
Post by: Schmidtn on Jan 22, 2011, 06:08 am
The course doesn't have a textbook, that's why I have to google everything.
Title: Re: Programming class
Post by: pluggy on Jan 22, 2011, 10:44 am
If Excel classes as programming, I guess I needn't feel inferior using BASH.....   :)
Title: Re: Programming class
Post by: Imahilus on Jan 22, 2011, 11:45 am
That excuse is very VERY lame. It just means, in my opinion, that the teachers are lazy ***s. The cheapest language they could switch to... php. Full very detailed documentation, any basic text editor will do (you don't even need an expensive office suite). How about C# or C++, the microsoft visual C++ / C# suite has a free to use (I do believe only for non-commercial use, such as eduction) version called the express edition. How about java, there are two fine high-end IDE's for it (netbeans and eclipse) with full documentation online. If the microsoft thing has a reason not to use, java has similiarly powerful IDE's.. Than there is python, also no costs associated with it.. excellent documentation online, also just needs a text editor...

I see absolutely no excuse why they'd use VBA as opposed to the above mentioned languages. Funny part is, I know there are many more languages that fit into this pattern, though I simply have never been exposed to them. In fact, I can't come up with a programming language that inherently has costs associated with it.


So in short, there has to be something else up with those teachers, because the argument provided holds no ground.
Title: Re: Programming class
Post by: Valalvax on Jan 22, 2011, 08:01 pm
Quote
The course doesn't have a textbook, that's why I have to google everything.


What... the... fuck... I'd drop the course, and get the hell out of that college... are they even accredited? If not, to steal a phrase from a friend, their courses are as good as Chuckie Cheese tokens, only good there.

Imahilus, I'm sure that you could probably change to any language in the world for free, find a free IDE/use a text editor, the only big deal would be documentation

Except for proprietary stuff, that is
Title: Re: Programming class
Post by: Schmidtn on Jan 23, 2011, 02:52 am
Yeah, they actually have the number two college of engineering in the US of A and the number one Industrial Engineering program at a public school.  Normally they're pretty spot on with their classes, but I really think they dropped the ball on this one, and I'm not sure why, but I'm trying to figure it out and maybe get it changed.
Title: Re: Programming class
Post by: Valalvax on Jan 23, 2011, 03:10 am
Hmm, I'd say that sounds like GA Tech, but they have really good programming courses, and you're in Cali, what school is this?

Don't protect the guilty..
Title: Re: Programming class
Post by: Imahilus on Jan 23, 2011, 01:38 pm
Quote
Imahilus, I'm sure that you could probably change to any language in the world for free, find a free IDE/use a text editor, the only big deal would be documentation


Of the examples I gave, all of them (except for C++, I haven't used it yet thus I haven't looked for online documentation) have great online documentation, references, support fora and plenty of tutorials.
Title: Re: Programming class
Post by: westfw on Jan 24, 2011, 01:20 am
Quote
it's really an intro to programming for non-programming majors


Any language can be used to teach the introductory principles of programming, if it's taught that way.

Maybe you need to switch to a programming class that IS for programming majors (too late now, I expect.)

My F-ing prestigious Ivy-league alma mater used to teach APL to the non-engineering majors.  The economics classes actually used it rather significantly; it had some of the advantages I imagine VBA has today - it was very easy to "connect" with datasets of real-looking data (whereas the fortran or PL/1 classes (for engineers) would end up spending a month learning how to do file I/O.)

Quote
I was just looking forward to learning something that I could apply to my Arduino.

In my general experience, "Intro to progamming" classes would rarely apply "directly" to arduino, though of course if it were a C++ class you would at least be learning about C++ syntax.

Goals are good.  Keep a vision of "how would I connect an Arduino to VBA?"  It would be sorta neat to twiddle a dial on your desk and have a spreadsheet update...