视频链接:How to Learn to Code - YouTube
there you go
there is the code that you will need to get past your first technical interview
by the way,don't ever write code like this
it is absolutely terrible
so i got a question today from Sabrina widely known as the nerdiest and quickest person on YouTube
(give me that promo)
i went there
and she asked good resources to teach myself coatings
and i got really excited because this is a question i should be able to answer
i've been coding since i was a little kid
i've been working professionally as a software for the past eight years
i completed a computer science major though never actually wrapped up my undergraduate degree but i've given a whole bunch of talks on software I've checked,reviewed 20-some odd books and written and read a whole bunch of tutorials as well
i am credentialed for this
but surprisingly this is actually a really difficult question to answer and it's one that developers get asked a lot by people who are looking to break into the field
how on earth do i get started
now there are two sort stock replies that developers have to just kind of fire off
i want to talk about these briefly and discuss why maybe they're not the best idea
the first one is that you have to have an academic understanding to build software
go to school
if you want to build games,make sure you learn vector calculus
if you want to build systems,study boolean algebra and math
make sure that you'velearned your traveling sales....
huhuhu....sorry
what now the problem with the suggestion is that most developers are inherently lazy
that's the reason that we write software to make computers do things for us.
and it's very difficult to learn things when you're not building something that you're excited about
the second suggestion that you'll get which i think is a lot more common is you'll have people say learn C or learn JavaScript or learn Ruby on Rails or some other toolkit or framework or language
and what's interesting about this is that they usually recommend tools and languages that they personally enjoy using to solve their own problems which may not match you
programming languages are a bit similar to human languages just because you can read and write French doesn't make you a French novelist
in the same way,just because you konw the syntax of a particular programming language,it doesn't mea you can solve problems with them
there are a ton of different programming languages
out there all designed to need particular needs
but unlike human languages,most programming langusges are designed to be accessible to people who may not already be familiar with the language
let's use hello world as an example
hello world is a very simple program and it's usually the firse one you'll write when you're exploring a new programming language
all you're trying to do is make sure that your program runs and that the system will output the text "hello world"
so let's take a look
here's an example of hello world written in aprogramming language called C
next we have hallo world written in Java
then we've got hello world written in JavaScript and Ruby and Python and a cool functional programming language called elixir
now even if you have no experience with programming at all,i think you'll agree these bears some remarkable similarity what alot of developers may forget to mention when you're asking for advice is that the vast majority probably 80 or 90% of the skills that you learn in one programming language will be transferable to another one
we all have our favorites
i'm a fan of Ruby and JavaScript and elixir but don't listen to people why say you have to learn this or you have to learn that beacuse those suggestions usually come from personal preferences based on the particular problems that those individuals are trying to solve
so i've argued that you shouldn't start with programming theory or by soliciting advice on what language to start with
but the how do we get started
i want to suggest to you that you don't actually want to learn program but Kevin i told you that i want to learn,i know ,i know,but you don't want to learn to program
what you want to do is solve a problem
maybe there's an app on your phone that you don't like and you think it could be done a better way or maybe you've decided that you really want to have website or maybe you've got a game that you really want to make
learning programming is like practicing scales,it's going to make you a great musician but if you never get to play s song it's going to be very frustrating
it's really hardtolearn things when you're not doing something cool with it
for me,my firse real programming problem was high school math tests
i'd be using my graphing calculator and i'd show on my work and i'd forget to carry a one somewhere and i'd end up with the wrong answer
it was really frustraing because i knew the stuff but i just made a small mistake and didn't realize that i had done it so
i went in and l looked an ti-basic which is the programming language that you can use on your graphing calculator and i set things up so it would foil stuff and factored stuff and it would check my answer would go ahead and verify that for me
i could still go through and do my work but then i had the cinfidence of knowing that i had gotten the right thing at the end or that i needed to go back and check for a small mistake
not,GI basic is not a great language but it was super easy to learn
because i was really excited about the stuff i was making
so rather than learning to program,go ahead and find some problems that you're really excited about trying to solve
this is going to be the sort of thing that gives you the excitement to actually learn the skills that you need
by the end of it,you'll have made a really cool thing and you'll have accidentally learned abunch of useful skills along the way
so don't learn to program,that's like learning how to saw or how to glue or how to hammer
solve cool problems and make cool things
and if you're not sure the right tools to use for your particular problem,that's something we can certainly help with
if you appreciated this video or think that other people might find it useful,i really appreciate you sharing it out
otherwise have a great day
Cheers
There you go. Here’s the code that will get you past your first technical interview.
By the way, don’t ever write things like that.
So today, I got a question on Twitter, from Sabrina, widely known as the Nerdiest and Quirkiest person on YouTube
And I got really excited, because this is a question I should be qualified to answer! I’ve been coding since I was a little kid; I’ve been working as a developer for the past eight years. I completed a computer science major (though I didn’t wrap up the degree), and I’ve given talks, tech reviewed many books, read and written tutorials.
This is a question I should be qualified to answer.
Surprisingly though, this is a really difficult question. And it’s one that developers get asked a lot by people who are looking to break into the field. "How on earth do I get started?"
And there are two sort of stock replies, that I don’t think work very well. I want to talk quickly about both of them.
The first one is: get a degree! Study the fundamentals of computer science. If you want to develop game engines, you have to learn vector calculus. If you want to work on systems engineering, you have to learn boolean algebra. Study your algorithms!
The problem with this approach is that most developers are inherently lazy. That’s why they program computers to do things for them. It’s very hard to get invested in software when you’re not actually making something you’re excited about.
A lot of people will say "Learn C" or "Learn JavaScript", or learn some other language or toolset. And usually that’s because it’s a tool that they use, to solve problems that they are excited about.
Programming languages are a lot like human languages. Just because you can read and write in French doesn’t make you a French novelist. And in the same way, just because you know the syntax of a programming language does’t mean you can solve problems with it.
There are a lot of languages out there, and they’re all designed around solving particular problems. But unlike human languages, most of them are designed to be somewhat friendly to people who don’t already speak the language.
Let’s use "Hello, World!" as an example. "Hello, World!" is usually the first program you’re going to write when you look at a new language. All you want is for the program to output "Hello, World!", and that’s kindof the basic test to know you’ve got something that runs. So let’s pull up some examples.
What I want you to notice is that even if you don’t know anything about programming, you can tell that these are all pretty darned similar.
And what I think a lot of developers forget to tell you is that eighty to ninety percent of what you learn programming in one language, is going to be transferrable to another language.
We all tend to have our favorites — I tend to like Ruby, JavaScript, and Elixir — but don’t listen to people who say "You have to learn this or that", because those preferences are based on personal preference, and the problems those people are trying to solve.
So I’ve argued that it’s not a great idea to try and force people into studying a particular academic field, or prodding them toward our favorite languages. But then where do we start? There’s a lot of information out there, and it can be very overwhelming.
I’m here to tell you that you don’t actually want to learn to program. What you want to do is solve a problem. Maybe there’s an app on your phone that you don’t like, and you want to come up with a better solution. Maybe you’ve decided that you want to have a website. Or maybe you want to build a game.
Learning "programming" is like practicing scales. It’s going to make you a very strong musician, but if you do that for years without ever playing a song, you’re going to get very frustrated. It’s a lot easier to learn something when you have a reason to want to know it.
For me, the first problem was high school math tests. I’d be using my TI calculator; I’d show my work; I’d make a little tiny mistake, and I’d get the wrong answer. That was a problem I wanted to solve. So I learned TI-BASIC, and I wrote some programs that would factor and foil and all that stuff. That way, when I found my answer, I could go ahead and check that it was right.
It was so much easier to learn that language, because I was using these tools to solve an actual problem that I had. I was excited to figure out ways to make it better and faster.
So before you look at programming at all, figure out a problem that you’re excited about. Something that’s going to motivate you to learn about the languages and tools available. And once you’ve built that really cool thing, you’re going to discover that you accidentally picked up a lot of skills along the way.