My sister and my girlfriend learn programming like this: Stick to five principles

Source: Internet
Author: User

As I mentioned in the previous log, Eva and Fang came to San Francisco to learn programming. In this blog, I will introduce how I teach them, why I build a way to teach them, and how this method works. Listing what they have learned and what they have done in chronological order is very easy, but it does not help, and you are easy to miss the key points. It is important to understand the details and why it works, so I will start with the basic principles. Be prepared and keep the article long.

In your entire programming process, remember the following principles:

1) Dissemination:

Before Eva and Fang started, I created a blog for them. I told them to record their programming journey and what they learned. It was very difficult at the beginning. You can ask them. It took me a week to get a blog. But now, if you don't write about the projects they spent a lot of time doing, it would be wrong.

If you use APIs (application programming interfaces) in your project, send a microblog or email to the company, and tell them what you think about their APIs. When you get a reward in your programming marathon, write a good microblog @ them to show thanks or send a log. Let this log be better than ever, and then we recommend it to Hacker News, just as it will be posted on the home page (although most won't ).

The biggest benefit of a healthy propagation process for your programming journey is that it allows you to be your project owner, which introduces my next principle.

2) completed:

Both Fang and Eva know that it is difficult to complete a project, but it is also very important. I made it very clear that unless they write a log, @ the API company on twitter, or send the project completion message on the Hacker News edition, we will not start a new project. Although the first project was just a game of play, it was their best game of play. You never want to write a lame program, so how simple or irrelevant is not important. If you want to write a project, it must be the best program you can write. I have seen too many Programmers spend time and effort on informal projects that don't see Dawn. If you are learning programming, you must learn from the very beginning, cherish your time and energy, and complete your project to prove it.

The final 20% requires 80% effort. Developers can turn "ideas" into executable ones in a day or two. To release a "perfect" product, it takes two times to complete the test in each case to solve each critical problem. Spending 80% of your energy on the last 20% of your project will be a legend in many visits. The final 20% requires 80% effort. Developers can turn "ideas" into executable ones in a day or two. To release a "perfect" product, it takes two times to complete the test in each case to solve each critical problem. Spending 80% of your energy on the last 20% of your project will be a legend in many visits.

3) thinking:

If you get stuck, do not look straight into your code. Go out for a walk, breathe fresh air, and think about it. You are stuck because your logic is not correct. The best solution is to make it clear in your mind or on paper. Programmers get a high reward because they are thinking. The solution to the problem relies on your thinking. Writing code is such a terrible task. A good project manager usually has a rich background and is well trained in thinking and solving problems.

According to this statement, if you have been stuck for more than 20 minutes and you cannot make a breakthrough, ask someone else. If you don't get any clue in 20 minutes, you won't make any progress in the next hour. Trust EVA. One day, she wasted five hours. It was just a silly mistake and a practical lesson. Let's take another step. Then, let's get it back. Being able to break away from your own problems is a skill to divert attention.

4) Think again:

Now you may have figured out that thinking is important in a programmer's life. Be sure not to -- especially if you are learning how to write code -- copy and paste the code. If you want to learn how to write code, copy and paste the -- "You see, it becomes !" -- Won't let you make any breakthroughs. On the contrary, when you see the code, you must understand what it is doing and then try to debug it. When you get familiar with others' code, you can simplify it to meet your needs and then write it out. If you are used to doing so from the beginning, you can become an extraordinary developer in a few months.

5) Google:

Learn how to solve problems by yourself. Unless you get stuck for at least 20 minutes, do not ask questions about code writing. Programmers must be independent. They are great thinkers and great disseminators. To become a member, you must think logically and find out the cause of the problem. One problem that many young developers face is that it is difficult for them to write what they really need. Many of us have experienced this process. You know what the problem is, but you don't know how to find it. You must learn how to develop programs correctly from the beginner stage. This is a skill and it offers a good reward for the Promotion mentioned in the first point.

Now, remember these five points and take a look at Eva and his learning schedule:

Day 1-3: learn the basics of programming through Ruby.

I chose Ruby because it is the easiest way to get started. Ruby has very few syntax restrictions (space, tab, type declaration, etc.). Therefore, Eva and Fang can focus on the ideological process of programming rather than conquer the syntax rules. They learned the if statement, loop, data structure, and solved some programming problems, such as FizzBuzz (Translator's note: Print Fizz, Buzz, or FizzBuzz when certain conditions are met, is a preliminary programming training question), replace the characters in the string, convert an array, and find the maximum value. It is important to understand classes and objects.

* Note * I don't teach them specific Ruby syntax. I told them to always use parentheses for parameters and remember to return them when each function ends. In this way, they can get started faster when learning other languages.

4th days: HTML

HTML and CSS are not exactly a language, so there is no need to spend too much time on it. Eva and Fang spent a day on HTML, played some labels, and studied forms, information pages, and so on. I'm sure they only use HTML tags. This will create the excitement of using CSS. Here, we need to focus on distinguishing between block HTML and inline HTML to distinguish between logo and classification.

Day 5th: CSS

After playing with HTML, "how do you put this here? How do you make this ugly HTML page more beautiful ?" The problem arises. CSS is a perfect answer. Make Your webpage more stylish today (all HTML pages are made the previous day ). Here we will focus on relative/absolute/fixed positioning, HTML floating elements, and how to use absolute and fixed positioning to control normal floating.

Day 6-7: JavaScript with jQuery

JQuery requires a little effort to get used to it, because some programs involve the jQuery framework, which takes a little time. It took several days to make their HTML pages interactive.

Day 8-15

At this point, Fang and Eva learned about HTML, CSS, and Javascript, but they are not well adapted yet. This is the best time to start their first project (the game of player. Although they completed the project within two days, it took several days to optimize it. The final 20% requires 80% of effort, which is a fact. As a beginner, it is important to learn to complete your project.

Day 16-20: Sinatra

Learning new things won't be even more exciting for Fang and Eva after a game that looks like a game that never ends. Learning Service Terminal code is a brand new experience for what they have been doing. I chose sinatra because it is the cleanest and simplest web framework language I have ever used. This simplicity makes interpreting web operations a piece of cake.

Day 20-22: PhotoShop

Photoshop is very important for excellent design. For those who have never used it, it is enough to attract people (at least for me), but with the help of the website created by Photoshop, it is better than traditional front-end framework websites. In fact, you only need to know the mixed options. Any fairly successful developer will need Photoshop, so it is important to learn to use it and use it to serve all your projects.

Day 20-27: The second project-"drag image"

A large number of projects involve the use of JavaScript. This project involves using Ajax requests, Facebook APIs, and cookies. This is a big project linking all of its web programming basics. This project is more involved than the first project. I think this is a huge step towards a more complex project. During this period, they cooperated through GIT (Translator's note: an open source version control software. This is an open-source project!

DAY 28-30: RSpec

So far, Fang and Eva have adapted to build Web applications. At this point, they have realized how easy the code is to break, and how a change can destroy everything. Now, test-driven development is introduced in due time. We spent a few days on RSpec, and Eva and Fang used to write test cases for programming exercises every morning. Did I mention that they had to solve a technical problem every morning? Since the first day, they had to write some RSpec before they started writing code.

Day 30-35: BackboneJS

Start with a project that involves a wide range of projects (such as "drag pictures"), you can learn a lot and encounter problems that you want to better solve. Only in this way can you really appreciate the meaning of the frameworks that have helped you. I have not found a good BackboneJS tutorial. All the tutorials provide too much information at once. I taught this:

First, understand the model. Create a model and use it only for one database entry. Learn how to modify it and save it.

Second, the Learning View. Create a view for the model you have been working on. Add an event listener to understand how the view binds models so appropriately and how they fit each other.

Third, now we can clearly understand the meaning of the set. You cannot manually type each model, especially if you do not know how many models there are.

We have never learned routing courses. I do not think routing is important.

Day 35-40: Android

If you haven't fully noticed yet, we have covered a lot of things in a short time. Good programmers need to adapt to changes at all times, so our last project is to learn about Android. In programming, you cannot ignore mobile terminals. It is too important. I taught them Android programming. This is not very hard. Android programming is very similar to web programming. With the XML (Extensible Markup Language) of the view, you have Java code that matches the network controller. Model-View-control! By using Ruby and JavaScript, Fang and Eva began to look for similarities in programming languages and disassociate them from specific languages. For them, programming languages have different syntaxes and the same way of working (not the truth, but we will make some difference later to avoid confusion ).

Conclusion:

1) Amazing programming talent for girls

2) No degree in computer science is not an excuse.

3) writing code is interesting and everyone can learn it. Go ahead!

If you want to know

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.