Тёмный

Lecture 5 | Programming Methodology (Stanford) 

Stanford
Подписаться 2 млн
Просмотров 377 тыс.
50% 1

Lecture by Professor Mehran Sahami for the Stanford Computer Science Department (CS106A). Professor Sahami lectures on graphics, objects, classes, variables, and values pertaining to Java.
CS106A is an Introduction to the engineering of computer applications emphasizing modern software engineering principles: object-oriented design, decomposition, encapsulation, abstraction, and testing. Uses the Java programming language. Emphasis is on good programming style and the built-in facilities of the Java language.
Complete Playlist for the Course:
www.youtube.com...
CS106A at Stanford Unversity:
www.stanford.ed...
Stanford Center for Professional Development:
scpd.stanford.edu/
Stanford University:
www.stanford.edu
Stanford University Channel on RU-vid:
/ stanford

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 255   
@katarinazivkovic3102
@katarinazivkovic3102 8 лет назад
World needs more people like Mehran Sahami... such an interesting and charismatic guy :)
@plaguedoct0r
@plaguedoct0r 6 лет назад
He's way too timid to ever teach high school, despite how good a teacher he is for adults. That's actually one of the biggest problems with high school teachers, they don't put stock in hiring teachers that are confident enough to tell teenagers what to do, so all the teenagers act up because there aren't any - biologically speaking - "authorities" or "alphas".
@craigwalker2359
@craigwalker2359 11 лет назад
I'm using the latest version of Eclipse, not their 'Stanford' version. How can I import acm and work with graphics?
@iyadajeeb1986
@iyadajeeb1986 9 лет назад
Just a quick question boys ... So this remainder thingy .. I pretty much understood the idea of it .. I just didn't get why 7%20 = 7 ... so 20 doesn't go even once in 7 ... so it should be 0 right ? why is 7 the remainder ? thanx in advance
@m4mukulgarg
@m4mukulgarg 9 лет назад
***** 7=(20*0)+7 We're concerned about the remainder only
@AMITKUMARSINGH796
@AMITKUMARSINGH796 8 лет назад
Suppose you divide 7 by 2, you will find a number when multiplied by 2 should be less than 7 and that number is 3. Hence remainder is 7-(2*3)=1 So in case of 7 divided by 20, what non-negative number should be multiplied by 20 that gives a value less than 7? Obviously its 0 not 1 or 2 etc. So remainder here is 7-(20*0)=7.
@iyadajeeb1986
@iyadajeeb1986 8 лет назад
+AMIT KUMAR SINGH thanx a lot that was perfect explanation !!
@davemadethis5568
@davemadethis5568 9 лет назад
I like how the first video had over 1 mil views, on lecture 5, there are 250k.... THE DROP OUTS!
@IgorSwxy
@IgorSwxy 8 лет назад
+David X The last video (26) is 52k views ^))
@stojantashurov5773
@stojantashurov5773 7 лет назад
SEO did that :D
@geomax2010
@geomax2010 2 года назад
Everybody wants it fast... Nobody wants to pay the price...
@Guylovesleep6802
@Guylovesleep6802 6 месяцев назад
I mean that happens in almost every video series
@peterbruno657
@peterbruno657 10 лет назад
And this instructor is amazing. Makes me want to go to Stanford.
@dg-hughes
@dg-hughes 7 лет назад
For only $70,000/year but you get what you pay for.
@sauranzhusupov3434
@sauranzhusupov3434 Год назад
00:36 Variables 04:02 Types (Primitive) 09:19 Declaration (Syntax) 12:56 Assigment statement 15:40 Example 19:07 new (creating Object of Class) 24:35 Reciever and Message (Sending Messages) 26:16 Graphic Coordinates 28:17 GObjects class operations 31:57 GLabel class operations 34:28 Drawing Geometrical Objects 45:28 Expressions
@LunaPriscilla
@LunaPriscilla 10 лет назад
What an amazing instructor!
@BLOBBERNATOR
@BLOBBERNATOR 9 лет назад
The only problem I see with this is that the students asking questions don't speak into the mic. They don't deserve that candy >:[
@BoundMusic
@BoundMusic 10 лет назад
This is amazing! I can't express how grateful I am for these free tutorials. They are easy to follow, good on noobs and just a joy to watch. Thank you!
@MrAnujchopra
@MrAnujchopra 9 лет назад
His face resembles with the person from half-life 2
@iyadajeeb1986
@iyadajeeb1986 9 лет назад
Anuj Chopra hahahahahahah oh my god that's so true !
@rickl9437
@rickl9437 8 лет назад
+Anuj Chopra lol ye :D
@workingtitledayschool938
@workingtitledayschool938 8 лет назад
Wait... Mehran Sahami has 12 letters. There were 4 lessons before this one. 12/4=3. HALF-LIFE 3 CONFERMEED!!!
@paulpatel9657
@paulpatel9657 8 лет назад
You are awesome! There are relatively few individuals in this world who can explain subject matter with such clarity.
@musicwalt
@musicwalt 10 лет назад
Wow, you have a lot of energy! Thank you for providing your time and expertise on a necessary subject for our time.
@xJohnnys
@xJohnnys 14 лет назад
He talks fast, teaches fast, make you learn fast, and makes sense all at once. What better professor can you ask for?
@Thegamer-yp7qq
@Thegamer-yp7qq 8 лет назад
beat tutorial and best teacher. love u Mehran. .... why there is dislikes?
@J8517381
@J8517381 13 лет назад
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.
@RamboRepublican
@RamboRepublican 12 лет назад
This guy is great. I wish my professors were this good at explaining things. 99% of professors are average people who throw around unnecessary jargon just to make themselves feel like they have a job. Here you have the opposite, an intelligent person who uses their intelligence to make complicated concepts seem casual and effortless for the benefit of their students.
@priyankandatta5644
@priyankandatta5644 8 лет назад
I just wanna ask is this graphic thing still working in ecllipse, java in 2016
@saddambinladen3031
@saddambinladen3031 9 лет назад
Please, can anyone find the specific course materials that correspond to the specific videos?
@brasilandre05
@brasilandre05 9 лет назад
see.stanford.edu/materials/icspmcs106a/02-syllabus.pdf
@phartatmisassa5035
@phartatmisassa5035 11 лет назад
Google has a crash course style python bootcamp thing. Also "Kahn Academy" has into to programming with python. MIT open course-ware does as well. This set up is good for me , Java then C/C++. I am developing my own Android Rom that will have Linux running side-by-side each using their own set of clib's, glibc for the Linux in '/lib', and Bionic for the Android in '/system/lib'. Instead of just dalvik vm and mksh; python, ruby, perl, java, gcc/g++ etc will be available.
@KraziAzian
@KraziAzian 10 лет назад
Wow, this guy is such a good teacher compared to my current CS professor... We started our first class where this class was at lecture 4, so there is so much stuff I would have liked to have known but was never told until I started watching these.
@DKyousai
@DKyousai 11 лет назад
If you're not using "Stanford-Eclipse" and your karel application returns the "Karel is not living in a world" error: run->run configurations->dbl click Java Application (to make a new config), fill the Main class name (to match the main class), and hit run in that window. Optional: rename the configuration and delete the Java Applet configuration. You can then rerun it with the dropdown menu next to the run button.
@solomonpierce2676
@solomonpierce2676 3 года назад
I checked out the MIT and Harvard recorded CS lectures and this professor beats those lecturers by far.
@leot7
@leot7 11 лет назад
So I found out the name of the book. It is called "The Art and Science of Java"
@RemixEdits0
@RemixEdits0 7 лет назад
I want to have the teachers babies, and tattoo and everything, he's awesome cries i want candy too.
@SuperRedpineapple
@SuperRedpineapple 12 лет назад
How do I freaking DO this stuff? How do I follow along writing my own programs?
@lucidity910
@lucidity910 12 лет назад
I wish I ever had a teacher half as good as Mehran.
@Yaromiah
@Yaromiah 7 лет назад
Lmaoo this professor have me rolling on the ground! He funny as hell
@vypress5
@vypress5 16 лет назад
"There are multiple methods to his madness."
@beingme2345
@beingme2345 10 лет назад
Where do I find the reader he's talking about?
@rayez6565
@rayez6565 9 лет назад
please let me know when you find these readers... and I'll do the same :)
@beingme2345
@beingme2345 9 лет назад
people.reed.edu/~jerry/121/materials/artsciencejava.pdf
@rayez6565
@rayez6565 9 лет назад
beingme2345 you my dear are a fucking G.... thanx a lot. sending positive vibes your way :)
@unknownknown360
@unknownknown360 8 лет назад
+beingme2345 em standford cs106a the webpage with all the info off handouts and lectures and assignements too
@timurguochen6290
@timurguochen6290 5 лет назад
@@beingme2345 There are still faint glimmers of civilization left in this barbaric slaughterhouse that was once known as RU-vid
@vespidaestudios
@vespidaestudios 12 лет назад
30:01 operations on Gobject 33:50 operations on Glabel
@Nigel-Webb
@Nigel-Webb 11 лет назад
main() is actually there! It's hidden within the acm.program library which you import at the beginning of your program. This library and others were actually specifically written to support the use of java at the introductory level. It's all explained in the book "The Art & Science of Java".
@ThisFrickinSite
@ThisFrickinSite 12 лет назад
:O They give you candy in college for knowing stuff early? I haven't gotten that kind of stuff since first grade.
@Vivacior
@Vivacior 12 лет назад
Glad you were able to work it out - this acm stuff seems a bit old/odd - the latest entry on their homepage was in 2006. And, for the record, I never did get Karel to work. Still, I'm working the exercises - as they are very helpful in working "that side of the brain" for coding fitness. Cheers!
@miopmiop
@miopmiop 10 лет назад
obyou77 for what I could underestand (Im also learning from this, not an expert) and Obejct is an instance of a class, For example lets take you, you are a Human so you lets call you" Jhon" are an object of the Human race (wich is a class). So in short "Jhon" is and object of the class "Humans". You inherit all the features of a Human but you are Unique in your class.no other Human is like you and underestand everything you have learned in your life, unless you make all that you have learned a public method (lets not go there hahaha). Hope it helps!
@anthonyaustralia955
@anthonyaustralia955 9 лет назад
this is the best teacher i ever know.. mr Tehran, do u have any online course about iOS 8 or 9, swift? please if you do place the link here.. if not, why don't u try to make an online course on udemy, or iTunes U shapeaux bas for ur effort and teaching talent..
@arbelaeza972
@arbelaeza972 12 лет назад
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!!
@OverG88
@OverG88 12 лет назад
Homer Simpson to Lisa: "You go to Stanford, you go to Stanford!". Me: "I would kill to go to Stanford..."
@TamNguyen-wd4op
@TamNguyen-wd4op 9 лет назад
May the Remainder be with you.
@sonnypowsey
@sonnypowsey 14 лет назад
I found a facebook group called: Stanford Engineering Everywhere Discussions
@CRBarchager
@CRBarchager 12 лет назад
47:40 'I just loved the remainder and when the remainder was zero I got pissed" - I love this guy. Laughed my ass off :)
@Patrickthe1st
@Patrickthe1st 12 лет назад
"When the remainder was zero i got pissed" I don't think i've laughed in a programing lecture/lesson ever but this topped it off :)
@tiaelmi
@tiaelmi 12 лет назад
Mehran Sahami is the definition of the word "teacher"...then put Awesome, Brilliant, Funny, and Patient in front of this word and you got my definition.. I really wish i had a teacher like him in school. Loving these lectures!
@yvettetracy
@yvettetracy 12 лет назад
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!!
@Elamindd
@Elamindd 13 лет назад
@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.
@gekko505505505
@gekko505505505 15 лет назад
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 ^^
@qwertyfshag
@qwertyfshag 14 лет назад
how did this guy become a teacher. I though they had a pre-req that you have to be very boring?
@Colstonewall
@Colstonewall 12 лет назад
He seems like such a cool guy, that is upbeat and loves what he does. Teachers like that are the best because they make the subject interesting & fun.
@Inokiulus
@Inokiulus 11 лет назад
I want a Snickers
@debit256
@debit256 13 лет назад
@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).
@suffixable
@suffixable 11 лет назад
Bcuz he is just giving us an example. Without main function(or method as americans say) . Compiler would never work as main is the start line for the compiler.if he had written full code, he would surely have written main function after the run function.
@reverend900
@reverend900 12 лет назад
Lot of comments of people getting impatient ... run on google what problem you are facing and just try not to panic when stuck somewhere especially putting this Stanford's code into Eclipse ..
@bonkeykong3965
@bonkeykong3965 Год назад
1.1 is the following number because 1.0 only has 1 decimal spot
@dragonballzgt1989
@dragonballzgt1989 15 лет назад
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"
@yoman258
@yoman258 16 лет назад
"And when the remainder was 0 I was pissed" I about lost it when he said that.
@Phl3xable
@Phl3xable 12 лет назад
I feel so smart because I know all this :)
@rellsw02
@rellsw02 11 лет назад
I am wondering why he uses a run() method instead of main(). Im just saying because it gets a little confusing when your taught one thing and he teaches it in some other way.
@SuperRedpineapple
@SuperRedpineapple 12 лет назад
I load Eclipse, input code, SELECTION DOES NOT CONTAIN MAIN TYPE. WTH IS THIS? I followed instructions to install Stanford eclipse, load it up, put IN THE CODE, ERROR
@noahshines
@noahshines 12 лет назад
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....
@TheAllStarZone1
@TheAllStarZone1 Год назад
Applet is deprecated. Replace everything said in this video with Swing.
@keshinko
@keshinko 13 лет назад
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?
@alkhatraz
@alkhatraz 11 лет назад
a good way not to confused = for equals and assignment is mentally say x (gets) 3. so x gets the value 3 not x equals 3
@hattoosh
@hattoosh 13 лет назад
in 43:50 it said "setColor(red)" not "setFillColor(red)" was it a mistake or is it supposed to be setColor??
@BeyondTheRecords
@BeyondTheRecords Месяц назад
How relevant is GLabel in Java today?
@SuperRedpineapple
@SuperRedpineapple 12 лет назад
HOW DO YOU USE ECLIPSE? PUTTING HIS CODE INTO ECLIPSE ALWAYS GIVES ME AN ERROR LIKE NO MAIN....
@fredx21x
@fredx21x 11 лет назад
he said like two times to use the microphones in older lectures but they seem to be deaf!!!
@mangru8
@mangru8 12 лет назад
public void run () { Yo! GLabel! Label = new GLabel ("hello, world", 100, 75);
@dg-hughes
@dg-hughes 7 лет назад
32:03 Prof. Mehran said a Constructor has the same name as the class. I thought the Constructor was a method with the same name as the class? So in "new GLabel (parameters)" is GLabel (parameters) the method/constructor?
@midnightcarsintokyo
@midnightcarsintokyo 13 лет назад
I wish I could go to an American University, but my parents say no... :(
@pulancheck
@pulancheck 15 лет назад
awesome teaching. throwing snikers and kitkat at the students... nice
@StevanLHarrington
@StevanLHarrington 12 лет назад
YOU HAVE TO IMPORT THE ACM.JAR IN YOUR CLASS PATH TO WORK ON ECLIPSE
@Love-nx9cz
@Love-nx9cz 3 года назад
How can I join Stanford university, I'm from Kenya and I like to gain knowledge in Computer science over there, it looks so nice...🥰
@joecal42o
@joecal42o 10 лет назад
Does this class "Programming Methodology" ever switch to using the basic standard Eclipse program?? Or does it use this "Stanford" version the entire time?
@bogdanpanici5010
@bogdanpanici5010 9 лет назад
Hello guys! When I am importing Assignement2, to have acm.jar file, i don't know what to do to be able to write code in Eclipse! Can somebody help me? Step by step please! PS: If i chose java.policy.aplet , when i write code and start the program, he ask me to choose a type to run, and there wherever option I take, it shows a blank page!
@dr_ned_flanders
@dr_ned_flanders 12 лет назад
What are the chocolate bars he is throwing? Looks like Snickers.
@levelxgamescom
@levelxgamescom 12 лет назад
Please don't use numbers and underscores in your variable names.
@XCEfiles
@XCEfiles 12 лет назад
Does anyone know what the book name is that he is talking about?
@rayez6565
@rayez6565 9 лет назад
I keep getting an error message for the "GRect1" in the example the Proff provides, the error message says The constructor GRect(int, int, int, int) is undefined anyone know how to resolve this? for some reason this error doesn't occur with the Goval or Glabel classes
@Campusanis
@Campusanis 15 лет назад
One universal phenomenon in computer science courses is that 90% of results in examples are "42". :P
@kickass3058
@kickass3058 8 лет назад
Can any one tell me what was the book name that he referred.
@yadwindersingh628
@yadwindersingh628 7 лет назад
people.reed.edu/~jerry/121/materials/artsciencejava.pdf
@RemixEdits0
@RemixEdits0 7 лет назад
I came here for the top down design concepts of Oop, something that's very hard to grasp outside of programming. Down the rabbit hole, 20 levels but where oh where do you go, up or down. Long live c++
@sheldongoerge9086
@sheldongoerge9086 10 лет назад
Hi you guys i am finding problems getting acm.graphic.*; I am only seeing acm.program.*;
@drory25
@drory25 6 лет назад
Thanks to you I studied so much of this ! you are amazing dude .
@iyadajeeb1986
@iyadajeeb1986 9 лет назад
Another question that pops into my mind ... Let's say for example int x = 3;
@Jkfgjfgjfkjg
@Jkfgjfgjfkjg 6 лет назад
What did he say after "tearing their hair out"? Beating what? I couldn't decipher it. Great instructor, rock on!
@Sintaxx2
@Sintaxx2 12 лет назад
Why don't these students use the fuking microphones ...?
@peterbruno657
@peterbruno657 10 лет назад
Im a beginner and this is a great resource. It helped me because the ACM stuff didn't work natively on my version of eclipse so i had to figure out how to get the ACM libraries loaded and that led me to find all sorts of libraires and pre made classes and stuff. The tutorials where they show you how to do stuff in eclipse without importing anything were great to get me rolling but through these videos im starting to see how it all comes together and how real programs are written. Thumbs Up!!!!
@thesilentkiller3882
@thesilentkiller3882 3 года назад
I wish I could attend standford
@SuperRedpineapple
@SuperRedpineapple 12 лет назад
Eclipse does not work...this code isn't even recognized
@imorio
@imorio 14 лет назад
@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.
@mihaelacostea5783
@mihaelacostea5783 7 лет назад
anyone knows if the acm files/libraries can be found anywhere so that we can also import them?
@htc148
@htc148 11 лет назад
did you download their project files? all of the code they show is from the project files they have already made. i downloaded them from the cs106a site and then imported like this . "import > general > file system > "nameofunzippedfolder". they have alll those files you need to properly do this. I had the same problem before i did it that way. hope it helps
@sonnypowsey
@sonnypowsey 14 лет назад
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
@Thewiredmechanic
@Thewiredmechanic 12 лет назад
You need to load the assignment. I load the assignment by importing them. Did you do the Karel assignments? If so do the same processes to get assignment 2 loaded. Otherwise you need to import the classes into Eclipse. Then you have to make sure it is assined correctly. check out (Eclipse and Java for Total Beginners)
@trucorky
@trucorky 12 лет назад
How do I center the position of any Gobject in java?
@Vivacior
@Vivacior 12 лет назад
Here's a solution (as I had the same issue, since I already have the latest and greatest version of Eclipse already installed): First, you need to download the acm.jar file onto your computer (do a search - it's fairly easy to find). Next, you need to import the acm.jar file into your Eclipse project. Go to Project->Properties->Java Build Path->Libraries tab, and click on the 'Add External JARs' button. Select the acm.jar file you downloaded, and you should be good to go. Cheers!
@parexellans1128
@parexellans1128 4 года назад
Please does somebody have a guide to connecting these files that he is using to the ide. Thank you in advance
@aellisnola
@aellisnola 7 лет назад
"And when the remainder was zero, I got pissed" at 47:45 actually made me laugh out loud.
@christopherellis9297
@christopherellis9297 11 лет назад
this is answered in the lecture. basically you need a IF statment to find your occurance. and if n=0 then to count. . . n+1 =1 . . .n+1=2 . . . n+1=3. . . n+1=4 wont give you the syntx but thats the basic idea just use the syntax of your language.
@SuperRedpineapple
@SuperRedpineapple 12 лет назад
Thanks for replying...I figured out a fix for anyone else who's having problems. Click Stanford Menu then Import Project. Import a file like Section 2 Solutions. Then do Stanford Menu and Run Selection. I think the problem was that I never got to load acm.jar directly into Eclipse, I only copied it into the workspace and stuff.
@warnexus
@warnexus 11 лет назад
you need to import acm.jar to your project folder. right click your project and click import. doing it this way is not java par-se but it does make understanding standard java conceptually easier.
Далее
Lecture 6 | Programming Methodology (Stanford)
45:58
Просмотров 279 тыс.
Lecture 8 | Programming Methodology (Stanford)
48:44
Просмотров 220 тыс.
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32
titan tvman's plan (skibidi toilet 77)
01:00
Просмотров 6 млн
The Tragedy of systemd
47:18
Просмотров 1,1 млн
Is Computer Science still worth it?
20:08
Просмотров 343 тыс.
The mind behind Linux | Linus Torvalds | TED
21:31
Bjarne Stroustrup: C++ | Lex Fridman Podcast #48
1:47:13
Object-Oriented Programming is Bad
44:35
Просмотров 2,3 млн
Errichto Stream, POI 22/1
3:55:08
Просмотров 157 тыс.
Lecture 9 | Programming Methodology (Stanford)
52:26
Просмотров 222 тыс.
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32