Added: 3 years ago
From: StanfordUniversity
Views: 111,155
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (156)

Sign In or Sign Up now to post a comment!
  • I've been watching the first 5 vids and i wish i had a teacher like that in my school.... At my university the said " This is java, Learn to program by yourself....." no examples, no NOTHING!!!

    Well thats the mexican way i guess!!

    

  • Yo Glabel, gimme a new object!

  • MY eclipse simply says syntax error...

  • I am working on a mac...why am i not able to use types like GLabel or any GObject Types...looks like it is not importing from acm.program*...ANY HELP PLEASE....

  • I feel so smart because I know all this :)

  • I am new to computer science; I am trying to learn Java by watching Professor Sahami, my question is for anyone like J8517381 who could guide me in my stupid question: I noticed Professor Sahami builds up from classes that where already created; how can i work on the programs he is working on? I already downloaded the sdk and Eclipse for the IDE; I can't get the Add2Integers example to work, any ideas???? please help!!

  • @yvettetracy You can just write the code you see on the video directly onto a class file in eclipse. There is not much special code on this lecture. On the previous lecture with the robot you can just google it and find the source code.

  • LOLOLOOL

    "...and when it was zero. I got pissed." xD xD

  • Lol, just realised he says "m'kay" all the time xD

  • Whats the difference between JLabel and GLabel?

  • where do i get the acm package !

  • does anyone know where i can get the assignments so i can test my skill ?

  • 150 pounds?? He's pretty thin...

  • community college like a boss

  • 42... nice subliminar message =)

  • 104 000 !!!

  • this guy is worth his weight in gold!

  • @brianrosado Not even gold is worthy for him!

    LOl i'm so happy i'm actually printing graphics!

  • This guy writes super fast.

  • How can someone dislike this??

    Is there any good reason for that??

  • @harirf they just missed Like button

  • Are there any of those codes online?

  • What an awesome professor

  • Having studied programming and computer science at uni, what I think makes Mehran stand out is how intricate his knowledge is. So much so that he is able to put things into leyman's terms for the rest of the world to follow. As I'm sure all of you guys appreciate, particularly in a techy field like coding, that is rare! Thank you Stanford for sharing Mehran with the rest of us.

  • Comment removed

  • @J8517381 also should I attempt to learn what each package contains?

  • @webDes33 Hey Des, imo It's no harm in trying to remember as many as you can. the more programming you do, the more u get to remember what sort of things u can do with the different packages though so just be aware that there will be different libraries you can call on to achieve different stuff. All of this stuff is found in the Java API, which saves ur brain's memory cells and becomes your best friend when trying to see what allll of the classes within a each package will enable you to do!

  • @J8517381 thanks! :)

  • I wish I could go to an American University, but my parents say no... :(

  • @michaeldcurry1 HATERS ???

  • This guy makes me want to pump my fist in the air most definitely more than once

  • - how much children do you have?

    - 2.3. ..well, i had three until that grizzly accident

    hahaha

    i like this guy

  • this is impossible, how do computers even work?

  • in 43:50 it said "setColor(red)" not "setFillColor(red)" was it a mistake or is it supposed to be setColor??

  • @hattoosh

    If you mean

    rect2.setFilled(true)

    rect2.setColor(color.RED)

    Then no its not a mistake.. First he makes sure that the whole rectangle is red, with the boolean method setFilled(true)

    and then he turns this color into red with the setColor method.

  • @ArneSkim I haven't watched the video there but I guess you mean, that first he checks that the rectangle is filled with the boolean function and then turns it red. :-)

  • @ArneSkim hehe yes ofcourse.. isFilled() i guess.

  • @ArneSkim arh i fail isFilled(true)

  • "Stick it back in the box" should be on a shirt.

  • what is the differance between the move and set locatoin function? does it only allow you to use set location for an objects initial location?

  • hello, world

  • I love professor Mehran Sahami, he makes a class like a comedy show!

  • which are nutters who disliked it?

  • thank god this is a video ive been pausing it every min just to take notes

  • Mehran Sahami is a LEGEND! ...

  • isnt the remainder 6? amazing teaching

  • @sambazsonionrings 2 goes into 7 3 times, leaving 1 left over hence the remainder 1, so no the remainder is 1...

  • @redballoon0 the board says the number is 20 and 7 goes into 20 2 times leaving 6

  • @sambazsonionrings That would be the case if it was 20%7. When you do division you find out how many times the bottom (or in this case right) number goes into the top (or in this case left) number.

    For Example: 6%4

    How many times does 4 (the right number) go into 6 (the left number)? 1 time, leaving a remainder of 2.

    In his example it's 7%20

    How many times does 20 (the right number) go into 7 (the left number)? 0 times, since 20 is bigger than 7.

    Which means 7 is the remainder.

  • @sambazsonionrings

    It might also be helpful to view it as a fraction first.

    7/20 = 0 r7

    5/2 = 2 r1

    4/5= 0 r4

    Anytime the numerator is smaller than the denominator, the numerator should be the remainder because a bigger number cannot go into a smaller number.

    or... __

    4%3 becomes... 4|3 ...which ends up as 1 remainder 1

  • @Elamindd actually 4 | 3 is 111, which is 7 :P

  • @Deeharok I actually meant to put 4/3 'cause I was talking about remainders and modulus...

  • @Deeharok I think the spacing just messed up 'cause I was trying to get a fraction bar look.

  • is all this info about java still relevant because this guy is an awesome teacher?

  • Is there a way to make the applet/console window keep its size and position whenever you launch a program? For some reason my window is always tiny and on the top left of my screen, and I have to resize it every single time. Is it some option in Eclipse or something? Thanks!

  • 4 people were mathematicians

  • I don't like online boring lec but Prof. Mehran Sahami makes is very interesting and it helps me alot.

  • 4 ppl can't write java code

  • OMG THOSE ARE SNICKERS!!!!!!!!!!! I'm sooooooo addicted to them....

  • ahhhh I wanted to hear that question

  • hello, world, this is the BEST video series that i have seen in my entire life!!!!!!! omfgggoogle

    btw. i want candy!

  • Thank you!

  • why didnt i have this kind of teacher man

  • for some reason i get an error

    Exception in thread "main" java.lang.NullPointerException at acm.program.Program.main(Progr­am.java:917)

  • For the people asking about the code he is teaching:

    He is teaching from the ACM guide for beginning programming. It helps teach object oriented principles from the start. Download the ACM package and add it to Referenced libraries in Eclipse to follow along.

  • Hello

    I have a question. What type of java he teaches? Because i found some code on the internet, but they were different, they were like the following lines of code:

    "class myfirstjavaprog

    { public static void main(String args[])

     { System.out.println("Hello World!"); }

    }"

    And I tested it, it worked, but I tried his way, but that did not work.

    Thanks for the responses.

  • @cybergerzson You probably don't have the package for eclipse that he has. The reason that worked is because java comes with the package that has the classes that you just wrote. Just like how if you write move(); in the run() method without the Karel package, nothing happens(error).

  • @debit256 Thank you ;)

  • is the jave he teaches outdated? because the "import scm.program" stuff is not needed anymore or doesn't work with the current version of eclipse

  • @SangamEquilibrium Could be, it was from 2008.

  • He is Sooooooo GOOD

  • lol doesnt he ever run out of candy?

  • @detroid89 he works with dentists

  • somebody get this guy a powerpoint remote!

  • Does anyone know what candies he throws?

  • He talks fast, teaches fast, make you learn fast, and makes sense all at once. What better professor can you ask for?

  • @xJohnnys

    Dumbledore.

  • this teacher is the BEST!!!!!!!!!!!

  • Wish I had that kind of a professor at my university ...

  • how did this guy become a teacher. I though they had a pre-req that you have to be very boring?

  • my eclipse doesn't know acm........ so i cant import, how can I fix it?

    (I just started learning programming (coding^)

  • @Manosabacho The only thing I can think of is going to the stanford site (the specific adres mentioned in these videos) and then see if you can download the stanford java library files somewhere. If that doesn't help, try to e-mail (at the computer science e-mail adres), tell them of your problem and see if they can help.

  • He kinda looks like Eugene Levy from the 'American Pie' movies. :P

  • @aydoooo

    lol yea, that's what I was thinking

  • to to todo

  • to to to todo 

  • Thanks for upload is vid

  • mehran is the best computer science teacher i have ever seen

  • variables omg i dont get it!!!

  • @twizy123 I really hope your just kidding..

  • hey can any1 please explain to me how get the acm.graphics? i got acm.program by download the ZIP file from the website but i cant seeem to get graphics.

  • This was very helpful. really appreciative to Stanford......one problem I don't seem to run Karel in eclipse.....

  • @karmaworld248

    strange, it worked fine for me.

  • Is that acm.* package they use the one distributed by the Java Task Force, does anyone know?

  • @geoog1 just download assignment 4 and its in there

  • I found a facebook group called: Stanford Engineering Everywhere Discussions

  • for a complete Noob like me these lectures rock!!

    i have completed assignment 1. whoo hoo!!!

    someone should set up a forum for non-enrolled people to share their answers and questions and get some feedback etc.

    or Maybe there is one already? Does anyone know? If anyone knows or is interested then please reply

  • this lecture is not soo difficult

  • These video's are exactly what I needed. Great teacher very understandable.

  • I love how he gives you candy if you ask questions. It encourages the students to get involved and question things they don't understand so they don't fall behind.

  • me to

  • I'm Diabetic

  • I really love that these videos are free. Not much new here, but i love that there is some expertise on stuff you as a coder never think about. Now i can say with a smug smile on my face "i is not equal to 1 noob, you assigned the value 1 to i... noooob"

  • I'm having problems with the setColor

    I tried this:

    label.setColor(Color.RED);

    The "Color" gets underlined red.

  • Did you import java.awt.* ??

  • :o I didn't! Thanks...

    but now RED is underlined o_o "cannot find symbol"

  • See if you can put all the code up here and i'll have a look.

  • "it's design is honking... it's this big long thing!" LOL

  • awesome teaching. throwing snikers and kitkat at the students... nice

  • awesome teach

  • This guy is the BEST computer science professor i have ever seen. I have watched both stanford and berkley classes, as well as had instructors for my own classes. He keeps it so intresting, and explains it in a way that makes sense to anyone who is intrested. Thanks Mehran, and Stanford for sharing this with us!

  • @motion2000 so true !

  • @motion2000 I can't find the link to berkley classes that you say. Could you pass me the link?

  • @motion2000 Daniel D garcia from berkely is also good

  • One universal phenomenon in computer science courses is that 90% of results in examples are "42". :P

  • Hitchhiker's Guide connection

  • I think he is cool, but he is using super classes first with the acm. stuff, what about just plain old java, why hasn't he introduced public static void main(String[] args) and other basic class and methods, in the real world not everyone has the acm library they wil have to learn how to do more of the basic stuff.

  • He does teach that, from lecture 25 and so forth.

    The acm library is designed for teaching purposes, and it helps those who are new to programming in java and also those who know a bit from before learn faster, basically it makes teaching java a lot easier, so that starting with "actual" java will be very very easy, because it builds on the same essentials and fundamentals. ;)

  • he doesn't show how to use eclipse.

  • I wish I had this guy as a teacher.

  • Part2:

    I can't follow well the power point presentations,

    where the teachers already putted everything they want, without showing us the steps, or telling us the ideas between the lines.

    I hope that Stanford do some sociological/psychological study why some people like me, understand (very well) only from chalk boards?

    Thanks again for Stanford for the videos.

  • Part1:

    I didn't read all comments but I saw people saying "why Stanford still uses chalk boards?"

    Well, first of all these chalk boards are the ones who produced these professors who you are watching them now,

    Secondly I'm one of the persons who can't well understand things that are not explained by chalk boards!

    Many times I asked my self why?

    I think because using chalk boards give us (or at least me) a step by step explanations, with other words the teacher is thinking while he is explaining.

  • does anyone know how to set up eclips for this to work? i typed the exact code that he put up in the last video - the comments but when i try to run it i get "invalid or corrupt jarfile"

  • I love these lectures, but im wondering why Stanford has Chalk boards? why not a white board or maybe a smart board.

  • If the professors prefer chalk boards, they keep chalk boards.

    I've found that really good professors are engaging no matter what they've got to draw on.

  • irrelevant i think

  • i was agreeing with 'ehntoo'...it is irrelevant, just think there are more appropriate questions you could have brought up rather than what medium they write onto..... thats all..

    you are like one of those retards that walks into a prehistoric museum and asks 'wow how did they get that caveman to stay perfectly still for so long' missing the function and concept of its purpose

  • it's interesting how fast youtube comment flame wars start. I'm not saying you started it, though. i think if Sahami wanted a white board / whatever else, he would have one instead. I guess as ehn said it boils down to preference.

  • Look: first i guess those chalk boards hang there at least two decades, and thats basically why they are there.

    Second: Sure one could change to Edding-boards, but guess what: Chalk is totally environement- and writerfriendly.

    No skin-irritations, no harmfull substances, no waterproov dirt on hands and clothes. And almost no environmental pollution when chalk is produced.

    Simple, isnt it ^^

  • "There are multiple methods to this madness" "if you are 6 years old you would make like thousand ovals and If you are 18 you would draw one oval and feel how stupid it was."...

    He is awesome coz he is one heck of an engaging speaker....i dun think i can even get into Stanford with my academics atleast I can listen to great lectures on youtube....Very grateful:)

  • How lucky are these people :)

  • candy bag is starting to get a little empty....j/k these lectures are awesome and I love standford for them.. Mehran rocks

  • Man, this is why Stanford is Stanford and others are, well, the others..

  • well, this is your idea and I respect it, but my idea is different.

    people have different perceptions about univs but they are all the same ( at least the top 1000 are the same!).. its just perceptions.

  • Comment removed

  • Seconded.

    It's really about how much effort you put into learning and practice, than where you go to uni.

    Schools teach you the subjects, but they don't learn you the subjects. You learn the subjects by yourself and friends.

  • In Mother Russia, the subjects learn you.

  • LOL!

  • Professor Mehran has so much personality! This alone makes me want to go to Stanford.

  • can you use hexadecimal color values when setting colors?

    Similar to setting color when writing HTML?

  • ya i think there is some functions to do that, dont know what they are called tho

  • "can you use hexadecimal color values when setting colors?

    Similar to setting color when writing HTML? "

    oval.setColor(new Color(0x12, 0xAA, 0xBB));

    new Color(int, int, int) creates new color object. 0x says that the number is hexadecimal :)

  • "And when the remainder was 0 I was pissed" I about lost it when he said that.

  • "There are multiple methods to his madness."

  • Madness? This is Jaaavaaaa!

    Somebody please-please-please make a "300" spoof with Mehran (I'm pressed for time atm ;D).

  • @friemelaar u make pls

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more