Added: 2 years ago
From: MIT
Views: 83,771
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (123)

Sign In or Sign Up now to post a comment!
  • recursion at 39:33

  • its funny but after trying out the solve1 with barnyard1 it doesnt work with 3 heads and 14 legs tho it should

  • @mclaarson the solve2 it does work with 3 and 14 odd

  • Nobody knew what fibbonaci nubmers were in an MIT classroom?? wow I just felt a little smarter lol

  • question i have windows and i cant figure out how he uses two windows, one with the program created and the other activating the typed program using base key words, how do i set up the multi windows?

  • @brassmonkey9871 in a python shell, go to 'file' on the top bar and click 'new'

  • 49:36

    a guy in the corner is on facebook. lolololol

  • Lecture 1: 807 000 views

    Lecture 2: 190 000 views

    Lecture 3: 91 000 views

    Lecture 4: 76 000 views < --- you are here, welcome to the 10%

    Lecture 5: 48 000 views

  • @Geebsee this class is easy.. no supriszing 90% drop out

  • Apachaiii is right.. The idea is to learn the principles of programming. The language should be independent of your algorithm and solution to a problem. Java and javascript are different. javascript is used for web design mainly and java is a stand alone programming language. It uses a virtual machine to run the code.

  • Comment removed

  • troll? Try the truth. You're either off the boat or a bad student.

  • @ThePrivateJoker loool wow damn why people like you allowed to even be alive and breathe my air

  • Legit stuff is Med or Law school. Script kiddy computer crap is for high school drop outs and liars fresh off the boat with fake "degrees". Don't waste your time. Why do you think this old guy is teaching and not working? Because no one in the real world will pay him for this crap.

  • @ThePrivateJoker you're a terrible troll. go back to 4chan

  • @ThePrivateJoker trolololololol

  • @meowmix540 Suit yourself. Don't say I didn't warn you.

  • @ThePrivateJoker Okay you come on saying that this guy does not know anything and that programming languages are for high school drop outs leads me to believe you are a teenager who has a GPA of no more that 3.0 Saying that this is why he is teaching because no one would pay him for this crap dropped any chance you had at proving a credible and valid point. He is teaching at MIT. These high school drop outs as you put it are the future for all things application. Stay in school.

  • @fuzzymuttful lol you missed the point entirely. Let me explain it so even a moron like yourself can follow:

    1. Low skilled work = low pay

    2. Easy languages (such as Python) = low skill = low pay

    Corporations don't want to pay. Therefore they want to use easy languages, which means they can hire lower skilled workers, who they can pay less.

    Younger worker also = low pay.

    So - why hire an old guy (like this 'prof') instead of a kid? - just costs more..

  • Watch out, we got a badass over here @ThePrivateJoker

  • @1346661 Just a provider of the uncensored truth.

  • Psahhh functions

  • The only recursion going on here it the dipping into pocket books of the parents in order for their kids to learn useless and valueless dribble.

  • What's this? Another script "language"? I thought java was going to take over everything!? Why would the world need another script language when we already have java? Isn't java the answer to every problem? Isn't that what Sun was shoveling all those years?...

  • @ThePrivateJoker JAVA and JavaScript are completely different things. Quit being a dick-head or stop trolling .

    The main point of this is to get main idea of what good programming is and develop good habits . The details of ANY language are easy to learn and can be looked up online .

  • @Apachaiii java and javascript are different? wow! you're fuck'n genius.. Obviously a bad student also. If the details of any language are 'soo easy to learn', then why do morons keep using simpler languages like java or javascript? So they can earn less money?

  • @ThePrivateJoker

    You're not making any sense ,you're acting like 5 year old calling people morons because they decide to use a language different from yours?also "wow! you're fuck'n genius"... I can point out holes in your stupidity but #1 i don't feed trolls , #2 i don't feel it's 'worth the effort' . GOOGLE is your friend , if you're actually serious . ignore the troll everyone.

  • LAME

    

  • What?! Where's this professor from? I'm from (in still) Saskatchewan too!!

  • The Fibonacci program is wrong... You must add to 2nd line "or x == 2"

  • Anyone need a partner for assignment #1?

    "Computing prime numbers, product of primes"

    :-)

  • @ybarrarog I put a comment on your wall about the subject.

  • we have to use squirt!!! lolololo

  • They uses the 2.7 version of Python right? I was using the 3.2 and had some problems.

  • 20

  • brilliant professors

  • @nskpsycho He's brilliant because people are paying him to learn garbage. What a scam!

  • @ThePrivateJoker Then where is the legit stuff instead of garbage?Do you know a place i can learn professional stuff??

  • Press the [CC] icon on the player to have subtitles

  • 33:37 Randy Moss makes a cameo

  • MIT and Stanford gives more candies than all the country in halloween haha

  • Eve Online, the popular sci-fi MMO that has been around for a long time and is considered one of the more complicated games out there, is written on stackless python.

  • I think python gets shit because some consider it a learning language, not a practical language. Creating a language that stresses readability is naturally going to receive that designation, however.

  • his jokes may be bad(but at least he has a sense of humor) but it does get you in the right mind frame and provide as excellent examples.

  • For fellow oldtimers: Coding used to be more cumbersome, it's true. But there's something WE had that they don't. We could make a "modern video game" from scratch, and play it the next day.

    Today, there is no language in common use that you could use to quickly create, say, Tetris or similar as a beginner. The opportunity to make games motivated me to code when I was 11 years old. (About 1977). The young future developers of today don't have that.

  • Question regarding the palindrome function:

    def isPalindrome(s): if len(s) <= 1: return True else: return s[0] == s[-1] and isPalindrome(s[1:-1])

    for e.g. isPalindrome('hellolleh")

    when it repeats the func - isPalindrome(s[1:-1]) , why isnt it processing

    'ellolleh' since it is slicing s[1:-1]? in other words the 2nd letter to the last letter.

  • I can see now the difference between an MIT student and someone who ISNT an MIT student... What takes me months (or I should say about a month) to catch on to something takes them weeks. Interesting... If only I grew up with a little bit more discipline.

  • why does he keep saying ''squirt'' i thought it was ""square"

  • @loko95ftp i think he means Square root when he says that

  • @loko95ftp because the code for it is "sqrt" .. almost spells squirt lol... its a lot easier to say too, I guess. =P

  • @JayM616

    what the fuck then why not just say square same shit :)

  • @JayM616

    i know what the fucken code is sqrt is square not squirt i would have just said square :P

  • Comment removed

  • College is for losers!

  • Does anyone use the Visual Logic program?

  • Python?? I've never used python ever. I joked that MIT in 1976 did it's darndest to never actually teach you anything that was actually useful. Back then 6.031 was ALGOL and LISP (which damaged 2 generations of programmers) as opposed to the 3 most popular languages at the time, BASIC, FORTRAN and COBOL. However ALGOL + CLU pretty much covered anything you need to do up to C# version 3.5 (at which time they added a bunch of crazy stuff like lambda expressions) and LISP for other wierd languages.

  • @biukucanoe You sound like a nerdy version of Grandpa Simpson, senor.

    These Opencourse lectures are great. Thanks MIT...

  • @Faffel You young'ns have it SO easy. Multics had 256k memory for 64 terminals. Dec writers 30 cps, and ;you had to wait 5 sec for the head to move out of the way. JCF Interdata computers were punch card batch jobs, with hand written instructions on which instructions to hand-toggle in to enable paper tape boot. We had to hand in hand-written problem sets, NO WORD PROCESSING. NO EMAIL AUGH.

  • WTF, almost nobody knows about Fibonacci ???

  • @MaxRoudriges Almost all in college studying something technical know about Fibonacci I suppose

  • @pithikoulis

    Yeah , I suppose, because this is MIT ... If a simple student from such a poor country as Moldova knows about this, I don't think that the students from best technical university/college do not know about this ... Just was wondering that nobody rose his hand up ...

  • There's going to be another teacher? I'm a little relieved. He said he hates python. No one can hate python.

  • I'm confused about one thing.

    Is None, which is completely new to me (just as Python, I just find this stuff interesting), a boolean value?

  • @mazterarius No, "none" is not a boolean value. Im not sure how you could arrive at this conclusion...there are only two boolean values: "true" and "false". "none" is a special term that indicates that no specific value is being represented. for example, imagine we have "x = none". this essentially makes x a useless value, it specifies that x is not equal to any meaningful value that can be represented by a type (like ints, floats, strings, booleans, etc).

  • @mazterarius in object oriented programming languages, variables can also refer to objects. in java, for example, the value "null" is assigned to a variable to show that the variable doesnt refer to any object. this is essentially the same as "none". it means that the variable or function is not associated with any value.

  • anyone here uses Fortran??

  • @marts1233 FORTRAN YEAH. GRANDADDY TO PASCAL, ALGOL, C, C++, C# JAVA AND VISUAL BASIC. No pointers though, no recursion in the old days. 5 or 6 character names. If you had 4K, it was HEAVEN and it cost $500,000 and you had to punch cards to submit your job. You kids have it SOOOOOO easy.

  • @biukucanoe yea we do... java has become so convenient

  • def isPalindrome(s): if len(s) <= 1: return True else: return s[0]==s[-1] and isPalindrome(s[1:-1])

    print isPalindrome('abcba')

  • def farmcomp(heads,legs): for pigs in range(1,heads+1): chickens = heads-pigs if 4*pigs+2*chickens == legs: return [pigs,chickens] return[None,None]

  • def farmMod(): heads = int(raw_input('heads: ')) legs = int(raw_input('legs: ')) pigs,chickens = farmcomp(heads,legs) if pigs == None: print 'no solution' else: print pigs,'pigs and',chickens,'chickens have',legs,'legs.'

    farmMod()

  • Why does ! = x at line 7? Won't work for me.

  • @Juefawn != it means if its not equal.

  • @Juefawn != means not equal, hope that clears ur doubt, cheers

  • Why does ! = x at line 7?

  • Squirt! hahaha. what is the Squirt of 4

  • i was looking up bless the fall and i got this video? :L

  • The main reason i took to these lecs is to learn python. I know C and Java and have been longing to learn python. I am happy now!!!! Python is a lot easier than C, especially its flexibility. That's probably the reason why we are taught C and Java, so that we find other languages easy!!!!

  • I feel stupid. I can't even remember how to do the barnyard problem with pencil and paper.

  • @fyarflur alright, i got it now, but tell me someone else didn't look at that and say 'oh, that's easy.' XD

  • @fyarflur don't feel bad, neither can i lol

  • this is why i fucking love MIT

  • wha? they dont use C++ but python in mit? that doesn't make sense my school uses python but isn't it useless?

  • @Channypogosticks no. it's named after a snake.

  • @gamersgene

    Python language is not named after a snake, but named after a British com show called Monty Python's Flying Circus..

  • @YouBob12 oh thanks brah. My point was that Python CANT BE useless because it's named after a snake. It was more of a joke than anything.

  • @Channypogosticks the general idea is to teach conceptions of cs / programming style / computational complexity, not a particular realization; in addition c++ has too much low-level details which seem to be out of the scope of this course

  • @Channypogosticks Python useless? Haven't you been listening to the lectures? You can program anything in a turing complete language. Python is turing complete and more.

  • @codygman91 its not useless in respect to being able to do stuff with it, as every program should be able to do what another can... but what i mean is that it is not popular enough,....

  • @codygman91 whats turing complete me i dont understand it thanks

  • @woo216 mean*

  • @codygman91 "These people saying that python is turing complete therefore anything is possible are missing a rather important thing. Being turing complete means that you can compute every turing-computable function, not that you can do everything in the environment you're running in that's possible. You would have to have special runtime support for python built in to the system to allow that." -- StackOverflow

  • @Channypogosticks I think they are only using Python for demonstration purposes since it's close to writing pseudo code because this is an introduction course. There other courses use a much lower level language.

  • @Channypogosticks I don't know what makes you think python is useless. But to me, it makes my life easy. I program with python almost everyday.

  • Somebody is on Facebook at 49:34

  • @schwartzxc13 lmaooo

  • @schwartzxc13 that somebody either already knows the stuff or is going to fail the course

  • @schwartzxc13 who cares?

  • @jsymons1985 Probably nobody, I just thought it was a fun thing to point out. I'm surprised you couldn't figure that out on your own.

  • @schwartzxc13

    Its mark zuckerberg :)

  • @schwartzxc13 what a nerd his gonna fail and end up being a urinal cleaner at your local brothel

  • @schwartzxc13 lolol

  • I'm feeling smart understanding this even if english is not my native language :)

  • The interpreter keeps giving me an error saying, "barnYard() not defined." Anyone know what I'm doing wrong? I tried posting the code here but it removes all the formatting. I typed it in exactly as Prof. Grimson did.

  • @johnfmichael You have to make sure to define the function in the shell before you can use it. If you have done that and saved the file, make sure you run the module, not just a shell.

  • Comment removed

  • I just did the second week's assignment for this course (finding nth prime, product of primes) as a python newb. Whew. Great intro to knocking the cobwebs out about Python.

  • He took fib as example because they will make another with DP and then it will be faster

  • thank u

  • if beginners are following like me, I would suggest you read some of the python documentation on the python site.

    I'm not a great programmer, but some of these future lectures maybe hard to follow if not took seriously.

  • Why professor uses ' instead of " in programs? Is any differences between quotes type used for strings?

  • It's Python, either can be used. Generally personal preference.

  • @labasl In C++ and C. I use ' for a single character, for example.

    string str;

    str[0] = 'A';

    I also use " for string, for example...

    string str;

    str = "Hello world";

    Hope that helps.

  • @0121ryanh117

    is their a big difference between c++ and java?

  • @labasl not generally, but you can make the distinction. For example, say you wanted a string that said: My father said, 'hello son!' (ex. a string quoting somebody ), then you can alternate between the types of quotation marks:

    print "my father said, ' hello son!' "

    also, the triple quoted string ''' allows you to type across more than 1 line. (and is use to indicate a docstring comment when placed at the head of a function, module..et c)

Loading...
Alert icon
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