bring back C/C++. thats what I started with. also every other yahoo news article is saying you should get a CS degree if you want money so we need to scare off some of these noobs anyway
Well they also teach Java because it easier to learn too.
Also, my teacher for this class using C++ is making us deal with pointers. Sort of like learn or GTFO.
Thanks Pimp Wily for the help with my program. I was able to somehow stumble through that program with some help form the lab we have set up.
Ok, Iāll go ahead and link it:
[INDENT=1] [/INDENT]
[INDENT=1]"ā¦What Iād like to claim is that Java is not, generally, a hard enough programming language that it can be used to discriminate between great programmers and mediocre programmers. It may be a fine language to work in, but thatās not todayās topic. I would even go so far as to say that the fact that Java is not hard enough is a feature, not a bug, but it does have this one problem."[/INDENT]
[INDENT=1][RIGHT]-Joel Spolsky, The Perils of JavaSchools[/RIGHT][/INDENT]
When I was getting into programming I got a book on assembly from a friend, and although I only got a few chapters into it I think it really helped out. It makes me think that computer architecture should be way earlier in the curriculum than it usually is.
I had 2 classes of Java, and then a computer org class, then a OS class, then a prog lang and AI course, and now Iām in a data and file class.
Only class i have this semester and Iām hoping to graduate in few months woot.
I kinda see your point, but truthfully knowing the architecture wouldnāt have helped as much as simply being of a sound logical mind. Whatās the point of knowing the hardware part if you canāt put together good if statements, or make good loops? Iāve helped people who were lost on just those concepts.
assembly is gross, I did a gameboy color game in assembly, it was quite an experience, makes me appreciate a lot of the stuff even C has a lot more.
Understanding arrays, references, pointers, the stack, the compiler, and the linear progression of code is more important if you ask me. Thatās not to say you canāt program without those things, but that programming becomes a lot more mechanical and visual when you do.
I tutor students in Java and C++ for the commuter college in my area. An assignment one of the āMIT levelā professor gives is to return a counter variable in a method that already returns a boolean. There was one student under my tutelage who set up conditional cases where the method was called and removed the boolean variable from the equation. His code worked, it was efficient, and it followed the rules.
The teacher called him a cheater. This student was on the verge of tears, exclaiming to me that he had spent hours trying to wrap his head around the idea. He had a general understanding of conditionals which seemed plausible, and he understood return values in methods which further gave him merit. I had him explain the code and loā and behold, it made sense.
We looked into the teacherās method just to give him some light of mind. The teacher told students to pass an int array and increment the value at index 0. While this method works, none of the students understood why. My student in particular spent a good portion of his time trying to grasp the concept. I gave him a rundown of pointers and arrays and he proved his understanding by implementing it right there in front of me.
To be fair, this is mostly the teacherās fault. However, it just goes to show how much we are limiting our students here by holding back computer architecture from them.
The way our csc dept does there upper classes though is with pogramming in order to understand what the compiler and hardware are doing. Though our OS class had pretty much no coding.
They taught us java first so that we had the basics down before trying to understand something how static or dynamic scoping works, or OS trapping, system stack, symbol table, etc.
If we had started with the upper stuff first, I doubt weād have anyone still doing it except for the genius types.
But thatās why this class is in C++ too. It is one of those languages you should know.
Sent from my SPH-D700 using Tapatalk 2
Correction:
Genius types should obsessive types, because thatās what most engineers are. I know
X_X
Random story time:
One of my best friends went to another school in CS. One of his classmates was in the lab working out some programā¦ fucking around with the OS system calls or some shit. He someone managed to write random data to random memory addresses on any machine in the network.
About 1 second after pressing enter, all the machines in the lab had crashed.
Another time, my best friend was hanging out at a friendās house. This friend had his computer setup and was working on school work, when my buddy comes in, says ābangā and points his fingers like a gun at the computer screen.
It crashed immediately.
Turns out the hard drive was done.
Turns out his friend is superstitious now, or at least a lot more careful about having multiple hard drives on RAID, especially when my best friend is around.
All I keep seeing here is Computer Architecture is what pushes you over the hump. Just like a lot of math homework, some of it is legitimately difficult, can be very tedious, and one appears to only be able to learn through hard work.
If you have a determined student on your hands, odds are they look into things a bit deeper themselves. Theyāre not doing it purely out of interest; theyāre doing it because they genuinely want to understand what Circle circle = new Circle(); does so they can use that knowledge later on.
My CS department actually started with Python since one of our professors was apparently a big proponent for it being an introductory programming language. Transitioned to data structures with C++, OS with C, and OO Design with Java. Did a little bit of Haskell too for Programming Languages which was pretty fun.
My CS department did 101 and 111 in Python for like 2 semesters and my professors think they might be done with it after this year. Iāve sat in on 211 courses and the professor has to keep pointing out all the syntax differences between Python and Java.
All I have to do is learn pointers . I think we are going to start using C in our graphics class to write a game engine, Iām really excited for that.
C? Thatās awesome. I started with DX9 back in the day and dabbled a bit in OpenGL. Now Iām too lazy to leave XNA. Please almighty programming gods, take pity on my soul.
Iām pretty sure the first 2 or 3 projects are going to be in OpenGL but my prof sent an email out mentioning for us to look up C syntaxā¦ aaaand its for security not graphics!! Whoops reading comprehension :shake:
Our graphics course was C/C++. Unfortunately I read through the book and I didnāt see anything I was going to learn that much from, so I didnāt take it.
Pointers are just an address in memory.
Your class/struct/variable/function/everything is stored in memory at a discrete memory address.
Pointers just deal with handling memory address of where things are, rather than the actual values they are storing.
An Int is a value. Int A = 32 is stored somewhere in memory. If you type āAā in the context it returns 32.
In C, if you type &A you get the memory address of A, as opposed to the value.
Then, you could make an Int pointer to store the memory address of A, int* memoryAddressOfA = &A.
So now you have something very powerful.
Within the context you can type āAā and get 32.
You can type memoryAddressOfA and get where it is in your programs memory, which means
You can ādereferenceā it and change the value of A, by typing *memoryAddressOfA = 64
Now A is 64 because the value was over-written. The memory address is static, but the value is dynamic.
Example usage from some random stack overflow article I found:
void rets(int *px, int *py)
{
*px = 3;
*py = 5;
}
int main()
{
int x, y;
x=0;
y=0;
rets(&x, &y);
printf("First is %d, second is %d", x, y);
}
Does the above program print out x and y are Zeros or does it print X is 3 and Y is 5?
3 and 5 of course.
That is pointers 1.
Everything is at a memory address and a memory address is a very efficient way to pass around data.
If āAā wasnāt an Int but a huge class with lots of ints, doubles, Strings, you donāt want to make a copy of it every time you call a function, just pass the teeny tiny memory address and change it by ādereferencingā the pointer. Memory addresses are either 32 or 64 bits versus potentially passing the class which may contain KBs or even MBs of data.
Thanks, Iām not having trouble with it, I understand difference between the memory address versus the value of (though we did just start a couple weeks ago, and we havenāt gotten to programming a project with pointers). I just know that they are the main issue that people have while learning C/C++ after learning strictly Java.
Thatās weird because Java uses references all the time.
Itās a fact, this is the best explanation of pointers in existence:
[media=youtube]6pmWojisM_E[/media]
Now I feel dumb AND confused
my understanding of pointers is that they let you write more efficient programs, but they arenāt necessary.
saying they arenāt necessary is a cop out imo. you can certainly get things working without them but they are a fundamental concept. its like saying shoryu isnāt necessary with ryu cause c.hp is a pretty good anti air too.
but dont fret. just become a web programmer, and you can anti air every jump in with c.hp. thats what i did