Lecture 4 | Programming Methodology (Stanford)

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ • 407

  • @MrVarunparmar
    @MrVarunparmar 4 роки тому +71

    1:00 The History of Computing
    06:51 Computer Science vs Programming
    09:41 What Does The Computer Understand?
    10:48 The Compilation Process
    17:13 Java is an Object Oriented language
    20:00 Inheritance
    25:04 Instance of a Class
    28:43 The acm.program Hierarchy
    31:04 Your First Java Program
    35:50 A ConsoleProgram example
    41:14 The Graphics Window
    44:51 The Sending-Messages-to-a-GLabel Example

  • @IvelLeCog
    @IvelLeCog 8 років тому +54

    I really like this guy. Great communicator and very comprehensive.
    Thanks Mehran.

  • @KshitijBajracharya
    @KshitijBajracharya 5 років тому +8

    A Professor that teaches you and teaches you well while making you laugh. You sir are pure gold.

  • @malithavikum3412
    @malithavikum3412 10 років тому +18

    i've been looking in to many of the books and internet sources about the java programming. most of them were not as simple as his explains.the way he explains about the concept of java its simply one of the best i've seen so far. thank you for your effort and bless you sir!! #salute

  • @S2R.MeSh.
    @S2R.MeSh. 2 роки тому +2

    14 years down and I'm watching and loving Mehran from Nairobi Kenya. Thanks Stanfrod and Mehran.

  • @doanhqdo
    @doanhqdo 13 років тому +14

    This is the best introduction to programming that I have seen ever!

  • @mcockney
    @mcockney 13 років тому +2

    In a world where knowledge is the most valuable resource, those giving it away for free are the true kings.
    Thank you Stanford, Sequoia Capital and Mehran for making this excellent material available for the benefit of advancing knowledge for everyone. I commend you and shall hold you in ultimately high regard from now on.
    A home educated software engineer.

  • @longnoseboi
    @longnoseboi 11 років тому +8

    01:00 The History of Computing
    06:51 Computer Science vs Programming
    09:41 What Does The Computer Understand?
    10:48 The Compilation Process
    17:13 Java is an Object Oriented language
    20:00 Inheritance
    25:04 Instance of a Class
    28:43 The acm.program Hierarchy
    31:04 Your First Java Program
    35:50 A ConsoleProgram example
    41:14 The Graphics Window
    44:51 The Sending-Messages-to-a-GLabel Example

  • @surekharaja
    @surekharaja 11 років тому +1

    I'm so obsessed with his lectures. Simply amazing. Truly he is blessed with teaching skill. Thanks SU for sharing this video.

  • @akindad
    @akindad 13 років тому +1

    Prof. Sahami is an excellent instructor and we are so lucky to be able to see his classes worldwide. Fascinating!

  • @filipnicolae9754
    @filipnicolae9754 10 років тому +27

    Awesome teacher!

  • @ro8erwong635
    @ro8erwong635 5 років тому +2

    he is the best lecturer throughout my 24-year-life. Why don’t you @unimelb have professors like this?😔

  • @_blank746
    @_blank746 10 років тому +40

    Do they pass the candy to correct student when it hits an incorrect student?

    • @kiddcode2848
      @kiddcode2848 10 років тому +83

      Finally someones asking the important questions.

    • @dadecountydiego
      @dadecountydiego 6 років тому +1

      yes

    • @陈瀚龙
      @陈瀚龙 6 років тому

      ​@Hetan Thakkar I think Karel will have a lot of candy to pick up at the end of the semester. He's probably depressed like Marvin from Hitchhiker's Guide to the Galaxy.

    • @dewdop
      @dewdop 3 роки тому

      @Hetan Thakkar Yes, The Hitchhikers Guide to the Galaxy, by Douglas Adams.

  • @MyLittleMagneton
    @MyLittleMagneton 9 років тому +34

    The second the class ends people stand up and leave, god damn it, let him finish the friggin sentence even if you "lose" a minute of your time.

    • @andjammor
      @andjammor 7 років тому +6

      Yeah except at american universities they treat you like a little kid and punish you with tardies if you're late for your next class

  • @iamdeancoulstock
    @iamdeancoulstock 12 років тому

    Love these lectures; He has a clear voice; explains all his code to the audience; and is funny.
    I will definitely be spending the next 25 hours watching the rest of your lectures!

  • @Aa11qq
    @Aa11qq 6 років тому +9

    So I switch my major from Computer Engineering to Computer Science and in CpE we took C++, digital Logic, all the engineering maths, etc. but I didn't learn Java like the first year CS students usually do. So I'm taking a class called "Software Engineering Principles" and I really need to learn this language before I start. Thanks standford for the free lessons and sorry at everyone at my uni who had to pay to learn this lmfao

    • @adamlee9347
      @adamlee9347 6 років тому

      lol Java is not bad. Was C++ hard?

  • @poppin3000
    @poppin3000 14 років тому

    if i have seen further, it is by standing on YOUR shoulders professor Mehran. thank you for making your education available and free (and fun) to all.

  • @jaimegarcia9088
    @jaimegarcia9088 10 років тому +2

    I got stuck for hours in the Checkerboard problem of Assignment No.1.
    It was so satisfying to overcome that roadblock and I'm more than ready to venture into this lecture.
    Thank you for your wise words and sense of humor, Professor Mehran! You are a great guide for us newbies.

    • @YoungHoonLeeYOU
      @YoungHoonLeeYOU 10 років тому

      Hey Jaime, do you mind to share your solutions to Checkerboard problem? I am doing it but having a difficulty. :(

    • @jaimegarcia9088
      @jaimegarcia9088 10 років тому

      I sent you an IM, did you get it?

    • @skrudzas1712
      @skrudzas1712 10 років тому +1

      I had a little bit problem with it too, but finnaly I solved it, I don't know is it right, but it works fine for me pastebin.com/Hw12Fz1G

  • @tomaszharabasz
    @tomaszharabasz 11 років тому

    it takes me only 2 evenings to finish 4 lectures. This is the best course I've ever watched! Really, if I visit Stanford University in the future, I will find Proffesor Mehran for sure :)

  • @deiu9999
    @deiu9999 11 років тому

    I never though I will be addicted by this kind of videos, man, it`s so easy to understand from this "golden" professor!

  • @bluenose20
    @bluenose20 14 років тому

    Finally! someone actually teaching java in a way you can understand!

  • @josefcb19
    @josefcb19 11 років тому

    this professor is a good example of how all professors of University might be fantastic!!!!

  • @soroushnajafi348
    @soroushnajafi348 2 роки тому +1

    you are fantastic professor , at this moment Im proud to be an iranian.

  • @xJohnnys
    @xJohnnys 14 років тому +4

    I love this teacher, he talks loud (GOOD THING) and he's funny

  • @AynenMakino
    @AynenMakino 12 років тому

    Just wanted to say: This guy is really good at teaching! Give him a raise or something.

  • @rockinrobin714
    @rockinrobin714 13 років тому

    I have no background in a class like this - my undergrad was in Spanish and Psychology. But I really enjoy this class! Thank you so much for putting this online for free Stanford! and thanks Mehran!

  • @MyNameGoesHere288
    @MyNameGoesHere288 15 років тому

    This is such an excellent set of videos! This professor is very good at what he does!
    Thank you Stanford University for providing these videos!

  • @moz658
    @moz658 8 років тому +1

    I'm currently learning javascript and its libraries like react.js and node.js so basically what interests me is the software engineering methods that Mahren shows in his lectures and i think he is really good at teaching that.

  • @TheAbstractHippo
    @TheAbstractHippo 11 років тому +5

    "Hey, Eduardo, you went through the blastula stage. Good times." Best quote of the video.

  • @imegatrone
    @imegatrone 13 років тому

    I Really Like The Video From Your Professor Sahami moves into the history of computing and introduces the program Java.

  • @ErezElias
    @ErezElias 12 років тому

    what a great way to have such open source for everyone. Outstanding public relations!

  • @forextradingforbeginners7016
    @forextradingforbeginners7016 7 років тому +1

    Great lectures. Thanks Mr Professor and thanks Stanford. You truly are a class

  • @liberty-matrix
    @liberty-matrix 4 роки тому +3

    @ 21:26 *"Let me put in terms that you'll understand. You're a human being right? And if you're not, come talk to me. It wouldn't be the first time!"*

  • @gustavocarvalho2995
    @gustavocarvalho2995 8 років тому

    Another great lesson! You can easily see how much energy this teacher has.

  • @MrBlackspoon
    @MrBlackspoon 11 років тому

    Wow, I like how he used that Heirarchy example of biology. Made it so simple to understand. Wish they did that 4 months ago at my Java classes in the Netherlands.

  • @DenysLazarenko
    @DenysLazarenko 12 років тому

    it's not sad, it's natural. That's what make guys like you so valuable comparing to millions of those who prefer stupid videos

  • @Artilla2012
    @Artilla2012 11 років тому +23

    very usefull stuff.. i tired to get candy by asking questions to my monitor.. but no dice.. anyone?

  • @SpringStingray
    @SpringStingray 12 років тому

    Can we all take a moment to respect how much of a bloke Professor Mehran is?

  • @MVIVN
    @MVIVN 16 років тому

    Brilliant lectures! I'm about to start my Computer Science degree and these lectures are really starting to give me the feel of things. Thanks for uploading!

  • @TeeUniverse
    @TeeUniverse 12 років тому

    Mehran,
    Currently I'm a freshman in college and my professors are knowledgeable but they don't make classes half a interesting a you. I watched all four lectures without yawning. Thank you Mehran and Stanford for doing this.

  • @-DeScruff
    @-DeScruff 14 років тому

    Im really liking these lessons, I can understand everything I do, and I really wanted to learn java programing, not to mention I really like this teacher. Thank you Stanford :D

  • @Polya626
    @Polya626 13 років тому

    Doo-dii-doo-di-doo! We're compiling, life is good.
    Can't put into words how awsome this guy is!

  • @susanfoley8360
    @susanfoley8360 9 років тому +4

    This guy is amazingly good.

  • @mizucami21
    @mizucami21 12 років тому

    Actually the first ever computer humanity retrieved was found at Greece. Search youtube for the Antikethera computer. Again, Many thanks to Stanford and Mr Sahami for their brilliant work.

  • @warnexus
    @warnexus 13 років тому +2

    thanks Stanford. I learned so much! I truly wish I able to attend your college!

  • @windcoder
    @windcoder 15 років тому

    The fact that Stanford is letting us watch this for free is fantastic!!

  • @Dillboy928dfb
    @Dillboy928dfb 14 років тому

    I was actually in the class you can see me in lecture one, believe me professor Sahami taught me very well!

  • @argyleghost
    @argyleghost 10 років тому

    Loving this lecture series. Excellent way of explaining Computer Science and programming.

  • @madmenyo
    @madmenyo 9 років тому +13

    Byebye Karel, I have been programming for many years but you did teach me some important things like refinement.

    • @saidhussain5706
      @saidhussain5706 4 роки тому

      What is this

    • @arvinsloane6715
      @arvinsloane6715 3 роки тому

      @@saidhussain5706 He refers to the term "stepwise refinement" in Lecture 3 (last part with he talks about decomposition, top down design and bottom up design"

  • @brownbear696969
    @brownbear696969 11 років тому +2

    i've learned so much from him!!

  • @0ElectroMad0
    @0ElectroMad0 14 років тому +1

    Great Professor & Great Course .. thanks Stanford

  • @gelliravikumar018
    @gelliravikumar018 13 років тому

    Excellent Teaching on object-oriented programming using Java classes

  • @PrototypePrjs
    @PrototypePrjs 13 років тому

    Amazing the change in computers in about 40 years...

  • @stephenprofullobala5016
    @stephenprofullobala5016 5 років тому +1

    All study of Java starts from this lecture

  • @vidfather
    @vidfather 14 років тому

    This teacher is awesome. I wish I had such an energetic lecturer.

  • @Musa3ad
    @Musa3ad 11 років тому +1

    "Source code" Know it, Learn it, Live it, Love it

  • @TallestFiddle
    @TallestFiddle 11 років тому

    Every lecture should be recorded, its a crime that information is kept secret.

  • @bilal59446
    @bilal59446 13 років тому

    great lectures Mehran Sahami!
    thanx! made programming a lot easier for me!

  • @bddaawwgg
    @bddaawwgg 11 років тому

    I have a Chinese professor who is admittedly very smart, yet very ineffective in teaching the core concepts. She races through each lecture making sure to hit every single point without fail.
    I'm not bashing any foreign speakers, but when your audience speaks a different language than your native tongue, please slow down to ensure everyone is on the same page.

  • @LetsJam2TheMAx
    @LetsJam2TheMAx 12 років тому

    Thank you StandfordUniversity for this lecture.

  • @ramumagar6981
    @ramumagar6981 12 років тому

    he is a best lecturer, dont matter where he from, whether iran, afganistan, pakistan, israiel, india, just listen, his country, his religion is not our concern

  • @kolaolasupo3648
    @kolaolasupo3648 12 років тому

    Thank u Prof Sahami for this video on Java..

  • @MB-ju6yv
    @MB-ju6yv 5 років тому +33

    Who is watching in 2019?

  • @trulysick86
    @trulysick86 12 років тому +1

    Yes thanks for the videos! I wouldnt pay for education from the local community college if i didn't have to

  • @dolphyjazz80
    @dolphyjazz80 12 років тому

    The dude's speech can't keep up with his brain, so he speaks like a tweeker. Brilliant!

  • @ddubs123
    @ddubs123 11 років тому

    If you go to the stanford course website there are starter files for the assignments which have the acm jars. Also helps to use the version of eclipse they provide.

  • @LAGGEDnLOADED
    @LAGGEDnLOADED 9 років тому +6

    At 28:00 I could only pay attention that Professor Sahami didn't give the student candy...haha

    • @lucasjeon9640
      @lucasjeon9640 9 років тому

      Edward Kwak ikr

    • @enisten
      @enisten Рік тому

      ua-cam.com/video/meiU6TxysCg/v-deo.html

  • @rahulchopra404
    @rahulchopra404 12 років тому

    He makes it very easy to understand. I'm thirteen and I 'm able to understand what he's saying.

  • @Max-my6rk
    @Max-my6rk 3 роки тому +1

    11:41 "dududu~ know it, learn it, live it, love it"..

  • @dareko988
    @dareko988 4 роки тому +2

    This course should be remade in a remastered versiom of 4k

  • @coderopes2983
    @coderopes2983 7 років тому

    Amazing pool of knowledge these videos are

  • @BQD_Central
    @BQD_Central 9 років тому +10

    Eclipse is not a compiler -.- Yes I know it's more of a beginners course, but this is misleading. Eclipse is an IDE, which uses the Java-Compiler. And as far as I remember the JVM is written in C.

    • @MrMytubevidmaker
      @MrMytubevidmaker 9 років тому +13

      Bombsquad85 The prerequisite for this course was to be able to recognize whether a computer was on or off. So commenting about terms like IDE, JVM and C isn't helping anyone here.
      (You saying that the JVM is written in C doesn't explain anything.)

    • @Wohly987
      @Wohly987 9 років тому +3

      Soup R. Mann Well said.. That's exactly what's wrong with a majority of "programmers" out there.

    • @nobytes2
      @nobytes2 7 років тому +2

      Technically he said Eclipse is doing the compiling for you. That doesn't necessary mean eclipse is the compiler. Eclipse is assisting you in the compilation process.

  • @Tutoelectro1
    @Tutoelectro1 14 років тому

    Who would give a negative vote to this set of videos????

  • @SuSp3cT666
    @SuSp3cT666 11 років тому

    well Eclipse does the compiling when you press the run button, so as far as the user is concerned you can very well say that eclipse is the compiler, since that is 1 of it's functions

  • @darcshado
    @darcshado 15 років тому

    if you guys are following along on the videos, dont ask questions they arent at yet. Try to treat it like an actual class, and just learn!
    BTW
    Thank you for the videos :D

  • @gcontad
    @gcontad 10 років тому +2

    This Guy is Awesome

  • @pur99strpka
    @pur99strpka 13 років тому

    God, I made it to the 4th Lecture so far.. Its only been one day to. (Trying to watch as many as I can per day.) I must finish them all!

  • @1SeanWalsh1
    @1SeanWalsh1 15 років тому

    Excellent set of Video's,

  • @blahdelablah
    @blahdelablah 15 років тому

    @Uvthenfuv
    The term you're looking for is IDE, which stands for Integrated Development Environment. Eclipse is an IDE because it bundles a number of useful tools for application development into one program.

  • @dacherx
    @dacherx 14 років тому

    @joaomrpereira actually eclipse has its own java compiler, independent of javac. So you can compile java programs using eclipse with only the java runtimes. To prove this to yourself, compile using eclipse compiler from commandline, from eclipse plugin folder copy org.eclipse.jdt.core.XXX.jar to your java code folder. For ease of typing rename eclipse compiler jar to ejc.jar. To compile your .java using eclipse compiler, from cmd.com> java -jar ecj.jar -cp .;acm.jar myprogram.java

  • @Ragemar
    @Ragemar 12 років тому

    Nice powerpoint work with the hello world example

  • @dg-hughes
    @dg-hughes 7 років тому

    6:50 talking about what computers are going to be coming out and the iPhone was released only a month earlier in June 2008. Not a big computer and I'm not an Apple fanboy but it was significant but I can see how at the time it may have been overlooked or not even noticed only the week of its release, literally! iPhone released June 29, 2008 this video July 2, 2008.

  • @noobmartin
    @noobmartin 16 років тому

    These lectures are great.

  • @euriskoo
    @euriskoo 3 роки тому

    5:12 Electronic Numerical Integrator and Computer

  • @darrenallen773
    @darrenallen773 10 років тому +10

    Not sure if any one still reads or follows along here but it would be cool if a group of us could meet every once in a while to discuss and go over problems, just a suggestion, email me or message me if your interested,

    • @DREASAK
      @DREASAK 10 років тому +1

      I'm in! What's next?

    • @markusamuel
      @markusamuel 10 років тому

      Me too

    • @darrenallen773
      @darrenallen773 10 років тому

      hey guys how far along have you made it? right now I am just on lecture 7 and doing assignment 2 and working on the exercises in chapter 4 of the art and science of java. Do either one of you have Skype or something like that?

    • @DREASAK
      @DREASAK 10 років тому

      Darren Allen i'm still on lecture 5, just stuck trying to get first example programs work..technical issues and don't have where to ask so trying to figure it out first..

    • @darrenallen773
      @darrenallen773 10 років тому

      DREASAK
      are you talking about the problems in the book "the art and science of java?
      I have made it to chap4 in the programming exercises and am working on #11.
      If you wanna shoot me an e mail with the problem to see what is happening I would be happy to check it out. My e mail is darren24allen@hotmail.com.

  • @StephenRayner
    @StephenRayner 16 років тому

    I love Stanford I really want to go! I really want to meet Mehran. I love JAVA and he makes it so much fun

  • @qwertyfshag
    @qwertyfshag 14 років тому

    i like the teacher. he is very well spoken

  • @Limbofthelaw
    @Limbofthelaw 6 років тому

    When he shows the console program at 36:00, he says that he imports only acm.program.*, but if were to have a graphics program he would have to import acm.graphics.* also. However, if graphics is a subclass of program (as shown previously in his hierarchy diagram), then shouldn't the importing of program.* be enough for both console programs and graphics programs?

    • @aleksandretskhovrebovi5885
      @aleksandretskhovrebovi5885 6 років тому

      Yes, but it's not a good idea to import classes that you don't need in your program, because it takes some time and resources to import a class, so if you only need acm.graphics from acm, there's no reason to import acm.program too. (In this simple program, that wouldn't be a big resource waste, but still)

  • @MrJohnthedoe
    @MrJohnthedoe 13 років тому +2

    I feel increasingly awesome as the views for each successive video decrease.

  • @darnellsbabygirl
    @darnellsbabygirl 14 років тому

    First of all I would like to say that I cant get enough of these videos. Mehran is an excellant professor, made me wish I had gone to Stanford. I would like to know how to get my created worlds to show up in eclipse. I saved the world in its own folder and restarted eclipse and then tried to import it but all I get is the folder but not the java file to import. what am i doing wrong.

  • @floofy5529
    @floofy5529 8 років тому

    Hm... 29:00
    I don't think this exists anymore. Was this video created before Oracle bought "Java", which I presume was maintained by the ACM before that? I know I can google this but I'm just wondering. Also can someone link me a more up to date diagram of the class hierarchies or are they stil the same as the diagram shown in the video?

    • @elikay2101
      @elikay2101 8 років тому +1

      You have to download and install the libraries from the class website I believe, I'm not fully following the assignments though so I don't know for sure. see.stanford.edu/Course/CS106A

    • @floofy5529
      @floofy5529 8 років тому +1

      So I finished watching the lectures weeks ago and the professor gets into REAL Java at the end of the course (I think 2nd to last lecture).
      I googled the ACM library and apparently the it was made (I think at Stanford) for first time programmers. It omits things like the main function and a much easier graphics library than java.swing.

  • @enisten
    @enisten Рік тому

    31:55 If GraphicsProgram extends (is a subclass of) Program per 30:04, why do we need to import both?

    • @AlperCagriKokcu
      @AlperCagriKokcu Рік тому

      I guess he answers that at 39:33.

    • @enisten
      @enisten Рік тому

      @@AlperCagriKokcu Well, someone asks the same question there, and his "answer" is that we don't have to understand the technical reason for now, just know that we have to import both.

    • @AlperCagriKokcu
      @AlperCagriKokcu Рік тому

      @@enisten Hey, thanks for the feedback. So what you are suggesting is that he should've given more technical details rather than saying "you get everything at that level, not underneath", even in such a beginner level CS course?

  • @j44fff
    @j44fff 12 років тому

    wow! u must be so knowledgeable!

  • @aartje9
    @aartje9 14 років тому

    stanford is an awesome universety! and even if it wasn't, i would go there for the candy :D

  • @Parallelflux
    @Parallelflux 10 років тому

    I'm having trouble with Eclipse constantly crashing. When I created Add2Integers.java (or any other java class), and imported say, acm.program, it crashes within minutes. Does anyone know why?

  • @jjemknox
    @jjemknox 14 років тому

    @Thymonico
    Thank you! I found the "jar" but didn't know what to do with it!

  • @mentalgamer11
    @mentalgamer11 15 років тому

    No he is correct -- the subclasses inherit from the superclasses. You're thinking about abstract classes, where blank methods are given in the superclass then actually defined in the subclasses.

  • @legendinisZ
    @legendinisZ 14 років тому

    this is so awesome thank you stanford

  • @Amitron17
    @Amitron17 12 років тому

    Almost everything provided, but it's tough to not have discussion/lab portion as a non-Stanford student. Where to go when you're stuck on a problem?

  • @MJMaximum
    @MJMaximum 15 років тому

    This guy is really awesome