You are not logged in.

#1 2010-04-14 01:14:43

Kiwi
Member
Registered: 2008-02-24
Posts: 153

Binary trees, linked lists, stacks, reverse polish notation, etc.

Are they not all just oh so lovely?

I have to implement/use all of these with Fortran.

...

fmylife.

Offline

#2 2010-04-14 01:58:35

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Why do you need to use Fortran? Seriously, that stuff's ancient.

Offline

#3 2010-04-14 02:21:44

Kiwi
Member
Registered: 2008-02-24
Posts: 153

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Fortran has 90, 95, 2003 (and a 2008 is in the works) standards now, it is pretty modern. (I use the 95 standard, as that is what I was taught and it is pretty well supported by modern compilers, only like 1? compiler supports all of 2003 features, and it is not gfortran ;p)

And because it is for school. I am a mechanical engineering student and every person in the college of engineering has to take either Fortran or MATLAB, I picked Fortran.

Offline

#4 2010-04-14 03:30:51

kourosh
Member
From: England
Registered: 2009-03-10
Posts: 241
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Bad enough having to learn these never mind implementing them...

Offline

#5 2010-04-14 04:10:37

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

kourosh wrote:

Bad enough having to learn these never mind implementing them...

I don't know about that, everything in that list except RPN is fairly integral to most things in CS.  Especially stacks smile  And RPN is way more fun to parse than infix notation.

Offline

#6 2010-04-14 11:43:23

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

I just googled for 'fortran 95 RPN calc' and, well...

*points and laughs at kiwi*

edit:

tavianator wrote:
kourosh wrote:

Bad enough having to learn these never mind implementing them...

I don't know about that, everything in that list except RPN is fairly integral to most things in CS.

At most, an RPN is a cheap excuse to see a real application. If you're a CS student and learning how data structures work doesn't interest you, you should consider changing majors.

Last edited by falconindy (2010-04-14 11:45:57)

Offline

#7 2010-04-14 14:59:56

kourosh
Member
From: England
Registered: 2009-03-10
Posts: 241
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

I should make it clear I dislike the process of learning many things, I quite like the idea of knowing them in the end though. smile
That and I've never really tried to implement any yet...

Offline

#8 2010-04-14 15:55:20

dptkby
Member
Registered: 2009-07-02
Posts: 64

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Is implementing these (and related things) generally covered in CS classes?

Offline

#9 2010-04-14 16:10:12

Kiwi
Member
Registered: 2008-02-24
Posts: 153

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

I am not sure about generally but it was not until my third C++ class that they were first taught to me, and it was specifically a data structures course and not some generic CS course. That was when I was a CS major and not mechanical engineering.

And this is not a CS course. For most people this is the one and only programming course they have or will ever take, and people in the CS department do not take this course. >.>

The average grade is like a 67 or something, so the instructor is curving the grades. I am pretty much guaranteed an A+ (I think I have one anyway, or near to, but with the curve... big_smile)

Offline

#10 2010-04-14 19:33:57

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Kiwi wrote:

Fortran has 90, 95, 2003 (and a 2008 is in the works) standards now, it is pretty modern. (I use the 95 standard, as that is what I was taught and it is pretty well supported by modern compilers, only like 1? compiler supports all of 2003 features, and it is not gfortran ;p)

Hrm, I stand corrected. What I know about Fortran could be printed in its entirety on one of those punch cards, so... yeah.

Offline

#11 2010-04-14 19:53:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,294

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Hey, I love RPN.  As a practicing engineer who went to college in the early 80s, I know that all real calculators are made by HP.

As to the choice of Fortran over Matlab may have been shortsighted.  I am a Systems engineer with an EE background.  There is a lot of numerical processing done daily by EEs and MEs in Matlab and Octave by our design guys.  The last guy I know still using Fortran is a seismologist, and only because he is still using decades old simulations.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#12 2010-04-14 22:00:06

Spacenick
Member
From: Germany
Registered: 2010-04-02
Posts: 168

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Over here in Germany, I'm a first semester CS student and yeah we already implemented linked lists+stacks in Ada vor university. i've been programming for fun for quite a while so don't know whether it's hard for first timers, i noted though that many seemed to have problems understanding the concepts of pointers for example.

Offline

#13 2010-04-14 22:19:11

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Haha at UW we did lists, BSTs, Braun trees (which are cool but not very popular), Patricia tries, and some other stuff in first year, first term.  I guess it depends on the program; some are really theoretical, and some try to be more practical.  UW's on the theoretical end of the spectrum -- we haven't covered OOP yet, but we have written an optimizing compiler.

Offline

#14 2010-04-15 14:46:14

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

dptkby wrote:

Is implementing these (and related things) generally covered in CS classes?

I'm studying CS at a German university and implementing stuff wasn't really covered at all.
There is a reason that it is called computer science and not programming ;-)

Offline

#15 2010-04-15 15:25:32

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

Peasantoid wrote:

Why do you need to use Fortran? Seriously, that stuff's ancient.

Fortran may be ancient, but it still has it's uses.  I mean, C is ancient, ASM is ancient in a manner of speaking.

plus it shouldn't be overtly difficult.  these are all basic data structures.  if you learn the concepts in one language, it shouldn't be too challenging to
apply them to any language.


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#16 2010-04-17 08:17:43

Kiwi
Member
Registered: 2008-02-24
Posts: 153

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

ewaller wrote:

Hey, I love RPN.  As a practicing engineer who went to college in the early 80s, I know that all real calculators are made by HP.

As to the choice of Fortran over Matlab may have been shortsighted.  I am a Systems engineer with an EE background.  There is a lot of numerical processing done daily by EEs and MEs in Matlab and Octave by our design guys.  The last guy I know still using Fortran is a seismologist, and only because he is still using decades old simulations.

I am interested in aerospace engineering. I know an aerospace engineer and one of the languages he said he used daily was Fortran, so I figured it would not hurt to know it. I could still learn MATLAB I suppose if I need to.

Lol, so the final got canceled due to student requests, instead the final program is worth 300 points. (normally they are 100, it was already worth 200 though due to us only getting in 4). It also means I have until like May 6th or something to finish it, and am already a good portion of the way there, though still a ways from being complete.

I have a working stack and linked list and binary tree creating and traversal! big_smile

Offline

#17 2010-04-25 20:49:34

Kiwi
Member
Registered: 2008-02-24
Posts: 153

Re: Binary trees, linked lists, stacks, reverse polish notation, etc.

I am finally almost done with the program, after like 15-20 hours already this weekend on it. mad

I would say 'kill me now,' but then it would have all been for naught. neutral

The assignment
Professors' "Pseudocode"

See if you can spot what is wrong with the "pseudocode," and you will find some reasons it is taking so long....

So as I said before? I am one of Very few people who have ever programmed before or will ever again. And I usually get to know my professors or at least try to. So I talked to him after class on Thursday and since he knows I am a programmer and most of the other people are not he asked if I would work on it this weekend and let him know what I think the TA needs to go over in the help session we are having Tuesday. big_smile

Offline

Board footer

Powered by FluxBB