Programmer's Guide to Practice--guide you to become a true programmer

Source: Internet
Author: User
Tags epoll python sqlite

@ Programmer's Guide to Practice--guide you to be a true programmer, this is a guide, not necessarily your own goals, but if you have done it, then what else can not be done?

Preface

Do you feel like you've only had a little toy program when you graduated from school? After entering the workplace, even if you have no experience, you can go through the following extracurricular exercises (friends complain: The school curriculum always from the theory, the work project can not see any practical role, rather than from the work of demand)

recommendation :

Do not buy books, do not chase new technologies, the foundation of things after a long time to accumulate and will be at least 10 years in the future GM.

If you look back on history and see the evolution of the technology on the timeline of history, you can see what tomorrow will be like.

Be sure to do it, no matter how simple it may be, suggest at least one hand to see if you understand the details.

Be sure to learn to think and think about why, not that. and extrapolate to think.

Note : You may be wondering why the following things are very biased, because I feel that programming under Windows may be unix/linux in the future for the following reasons:

Now the user interface is almost dominated by two things, 1) web,2 mobile device iOS or Android. The graphical interface of Windows is not popular.

More and more companies are using low-cost, high-performance Linux and a variety of open source technology to frame their systems, Windows is too expensive.

Microsoft's stuff is getting too fast, it's not going to last, and they're totally playing with programmers.

So, I personally think the trend is the front end is web+ Mobile, back end is linux+ open source. The development side basically does not have windows what matter.

Introduction to Enlightenment

1. Learn a scripting language, such as Python/ruby

Allows you to get rid of the fear of the underlying language, and the scripting language allows you to quickly develop a small program that you can use. Practical projects:

Work with text files, or CSV (keyword python csv, python open, Python sys) to read a local file, row by line (for example, Word count, or process log)

Traverse the local file system (SYS, OS, path), e.g. write a program to count all the file sizes in a directory and sort them by various criteria and save the results

Dealing with the database (Python sqlite), writing a small script statistics the number of entries in the library

Learn to debug in a simple, rough way with all kinds of print

Learn to use Google (phrase, domain, using reader to follow tech blogs)

Why learn scripting language, because they are so convenient, many times we need to write some gadgets or scripts to help us solve the problem, you will find that the formal programming language is too difficult to use.

2. Use a programmer's editor (not the IDE) and some basic tools

vim/emacs/notepad++, learn how to configure code completion, appearance, external commands, etc.

Source Insight (or Ctag)

The use of these things is not for cool, but these editors in view, modify code/configuration article/log will be faster and more efficient.

3, familiar with unix/linux shell and common command line

If you use Windows, or at least learn to use Linux in a virtual machine, VMware Player is free to install Ubuntu.

Be sure to use less graphical interfaces.

Learn to use man to see Help

File system architecture and basic Operation Ls/chmod/chown/rm/find/ln/cat/mount/mkdir/tar/gzip ...

Learn to use some text manipulation commands Sed/awk/grep/tail/less/more ...

Learn to use some management commands ps/top/lsof/netstat/kill/tcpdump/iptables/dd ...

Learn about the various configuration articles in/etc directory, learn to view the system log under/var/log, and the system operation information under/proc

Learn about regular expressions and use regular expressions to find files.

For programmers, Unix/linux is much simpler than Windows. Learn to use Unix/linux and you'll find that the graphical interface is really hard to use at some point, and considerably reduces productivity.

4, Learning Web Foundation (HTML/CSS/JS) + Server-side technology (LAMP)

The future is bound to be the world of Web, the best website to learn Web Foundation is w3school.

Learn HTML basic syntax

Learn how CSS selects HTML elements and applies some basic styles (keywords: box model)

Learn to use Firefox + Firebug or Chrome to view the structure of your Web page that you feel is awesome and change it dynamically.

Learn to manipulate HTML components using JavaScript. Understanding DOM and Dynamic Web pages (http://oreilly.com/catalog/9780596527402) has free chapters that are sufficient. or see DOM.

Learn to debug JavaScript code with Firefox + Firebug or chrome (set breakpoints, view variables, performance, console, etc.)

Configure Apache or Nginx on a single machine

Learn PHP, let the background PHP and foreground HTML data interaction, the server corresponding browser request form a preliminary understanding. Implements the ability to submit and reverse a form.

Connect PHP to a local or remote database mysql (MySQL and SQL are now enough)

Following a prestigious network programming course (ex: http://www.stanford.edu/~ouster/cgi-bin/cs142-fall10/index.php) do not feel that it takes more than a semester, college students are full-time one semester to choose 3-5 Courses, You can always keep up with your spare time.

Learn a JavaScript library (such as jquery or ExtJS) + Ajax (asynchronously reads a server-side picture or database content) in +json data format.

Http:the Definitive Guide Read the first 4 chapters and you'll see what happens when you surf the Web every day (proxy, gateway, browsers)

Make a small website (for example: a small message board, support user login, cookie/session, add, delete, change, check, upload image attachment, pagination display)

Buy a domain name, rent a space, make a website of your own.

Advanced Deepening

1. C Language and operating system call

Learn the C language, understand pointers and memory models, and implement a variety of classical algorithms and data structures in C. Recommended "computer Programming Art", "Introduction to Algorithms" and "Programming Zhu Ji Nanxiong".

Study (MIT free Course) Introduction to Computer science and programming

Learning (mit free course) C Language memory management

Learn Unix/linux system calls (Unix advanced environment Programming), to understand what is at the system level.

Use these system knowledge to manipulate the file system, the user (implementing a small program that can copy the directory tree)

Write a multi-process program with Fork/wait/waitpid, and write a program with pthread that is synchronous or mutually exclusive. Multi-process multi-process ticketing procedures.

Using Signal/kill/raise/alarm/pause/sigprocmask to achieve a multi-process signal Volume communication program.

Learn to use GCC and GDB to program and debug programs.

Learn to use makefile to compile programs.

IPC and socket things can be put into the advanced to practice.

Learn Windows SDK programming (Windows Programming, MFC programming)

Write a window to learn about Winmain/winprocedure, as well as the message mechanism of Windows.

Write programs to manipulate the resource files in the Windows SDK or various graphical controls, as well as the programming of the drawing.

Learn how to use MSDN to view relevant SDK functions, various WM_ messages, and some routines.

There are many routines in this book, please don't copy it in practice, try to write your own routine.

Not much more than mastering these things, because the GUI is being replaced by the web, mainly to understand the programming of the Windows graphical interface. @virushuo said: "I think the GUI is really not that hot, but it's important to understand how the GUI works." including mobile device development, if there is no basic knowledge is still very laborious. or mobile device development must understand the GUI work, or learn at win, or go to school in Mac/ios.

2. Learn Java

Java learning is mainly to look at the classic core Java "Java Core technology programming" and "Java Programming ideas" (there are two volumes, I only chain the first volume, enough, because the Java graphical interface to understand it)

Learn the JDK, learn about Java API Doc http://download.oracle.com/javase/6/docs/api/

Learn about the differences between Java and the C and Python languages in the compilation and execution of this virtual machine language. Think of the "cross-platform" technology from C, Java, and Python.

Learn to use IDE eclipse to compile, debug, and develop Java programs using Eclipse.

Build a Tomcat website and try out Jsp/servlet/jdbc/mysql Web development. Try to use JSP and servlet to implement the small PHP project that was mentioned earlier.

3. Web Security and Architecture

Learning HTML5, there are many tutorials on the Internet, not listed here.

Learn about security issues with web development.

Learn the rewrite mechanism of HTTP server, the reverse proxy mechanism of nginx, fast-cgi (such as: PHP-FPM).

Learn the web's static page caching technology.

Learn the Web's asynchronous workflow processing, data caching, data partitioning, load balancing, and horizontally expanding architectures.

Practical Tasks :

Make some Web animations using HTML5 's canvas.

Try SQL injection, JS injection, and XSS attacks in the Web app that you developed earlier.

Change the Web app you developed earlier into a Web site that's built on Nginx + php-fpm + static page caching

4. Learning relational database

You can install MSSQLSERVER or MySQL to learn the database.

Learn the paradigm of database design in textbooks, 1NF,2NF,3NF, ...

Learn about database storage, triggers, views, indexes, cursors, and more.

Learn SQL statements and understand the various concepts of table joins.

Learn how to optimize database queries.

Practical Task: Design a forum database that satisfies at least 3NF, using SQL statements to query this week, this month's latest articles, the most commented articles, the most active users.

5. Some development tools

Learn to use SVN or git to manage the program version.

Learn to use JUnit to unit test java.

Learn coding standard or coding guideline for C and Java languages.

Recommended reading "Code Encyclopedia" "Refactoring" "Code Clean Road"

Advanced in-depth

1. C + +/Java and object-oriented

I personally think that learning C++,java is a lift. But the learning curve of C + + is quite steep. However, I think C + + is the most need to learn the language.

Learning (mit free Course) C + + object-oriented programming

Read "How to learn C + +" in the recommended books at least two times.

Then reflect on why C + + is doing this, Java is not? You must learn to compare the differences between C + + and Java. For example, initialization in Java, garbage collection, interfaces, exceptions, virtual functions, and so on.

Practical Tasks :

A bigint is implemented in C + +, which supports the operation of 128-bit shaped subtraction.

Encapsulates the capacity of a data structure in C + +, such as hash table.

Encapsulates and implements a smart pointer in C + + (be sure to use a template).

"Design mode" must read, more than two times, think about, these 23 patterns of application scenarios. Mainly two points: 1) Love combinations rather than inheritance, 2) love interfaces rather than implementations. (also recommended "in the design mode")

Practical Tasks :

Implement a memory pool using Factory mode.

Use the policy mode to make a class that can align text files left, right, and aligned.

Use command mode to implement a command-line calculator and support undo and redo.

Use the decoration mode to achieve a hotel room price pricing strategy-peak season, service, VIP, tour, and other factors affecting the price.

Learn about STL usage and its design concepts – containers, algorithms, iterators, function Sub. If possible, please read the source code.

practical Tasks : Try out various skills for object-oriented, STL, design patterns, and WINDOWSSDK graphics programming

Be a snake or Tetris game. Support for different levels and difficulties.

Do a file browser, you can browse the directory of files, and can have different operations on different files, text files can be opened to edit, the execution of the file is executed, MP3 or AVI files can be played, picture files can display pictures.

Learn some of C + + class library design, such as: MFC (look at the teacher's "easy to understand MFC"), Boost, ACE, Cppunit,stl (STL may be too difficult, but if you can learn the design patterns and design that is very good)

Java is a true object-oriented language, and Java's design pattern is no more, and is the best language for learning object-oriented design patterns.

Recommended reading "Effective Java" and "Java FAQ"

Learning Java Framework, Java Framework is also many, such as spring, hibernate,struts and so on, mainly to learn Java design, such as the IOC.

Java's technology is also rotten, focusing on learning the Java EE architecture as well as the technology of JMS, RMI, and other messaging and remote calls.

Learn to use Java to do Web Service (official tutorial here)

Practice Task : Try to build a remote invoker with a Web service in the spring or hibernate framework and deliver messages through JMS in two service.

C + + and Java are not able to learn in a short time, C + + play is deep, Java play is wide, I suggest a choice between the two. My personal learning experience is:

Dig into C + + (I've been deep down C + + for 10 years)

Learn the various design patterns of java.

2, strengthen the system to understand

Important read the following several books:

The Art of Unix programming understands design and development philosophies, thought-culture systems, principles, and experiences in the field of UNIX systems. You are bound to have a clairvoyant feeling.

"UNIX Network programming Volume 1, Sockets" This is a book that you will understand network programming after reading it. Important note the difference between TCP, UDP, and multiplexed system call Select/poll/epoll.

"TCP/IP Detailed Volume 1: Protocol"-This is a book you can be a cyber hacker after reading it. Understand how Ethernet works, understand TCP/IP protocol, how it works, and how TCP is tuned.

Practical Tasks :

Understand what is blocking (synchronous IO), non-blocking (asynchronous IO), multiplexing (SELECT, poll, epoll) IO technology.

Write a web chat program that has a chat server and multiple chat clients (service side with UDP on some or all of the chat clients into multicast or broadcast).

Write a simple HTTP server.

"UNIX Network Programming Volume 2, interprocess communication" semaphores, pipelines, shared memory, messages and other IPC ... These techniques seem a bit old-fashioned, but they are worth knowing.

Practical Tasks :

The main practice of various IPC in the process of communication methods.

Try to write a pipeline program where the parent-child process exchanges data through a pipeline.

Trying to write a program that shares memory, two processes exchange a C structure array through shared memory.

Learn the book "Windows core Programming". Take createprocess,windows threads, thread scheduling, thread synchronization (Event, Semaphore, mutex), asynchronous I/O, memory management, DLL, these chunks are proficient.

Practice Task : Use CreateProcess to start a Notepad or IE and monitor the program's operation. Use the thread pool to implement the simple HTTP service that was written earlier. Write a DLL's hook program to monitor the closing event of a specified window, or to record a window's key.

With multithreading, multi-process communication, TCP/IP, sockets, C + + and design patterns Basic, you can study ace. Use ACE to rewrite the above Chat program and HTTP server (with thread pool)

Practical Tasks : Through all the above knowledge, try to

Write a server to the client to send large files, the 100M bandwidth required to use more than 80%. (Note that disk I/O and network I/O can be problematic, think about how to fix it, and note that the maximum unit MTU for network transmission)

Learn how BT downloads work and simulate the fundamentals of BT downloads in a multi-process way.

3. System Architecture

Load Balancing. A hash of a purely dynamic type. (You can read some articles about load balancing in Google Scholar.)

Multi-layer Distributed system – Client Service node layer, compute node layer, data cache layer, data layer. The Java EE is a classic multilayer structure.

CDN System – Near access, content is marginalized.

To study the algorithm of BT and E-donkey. For example: DHT algorithm.

Server backup, dual-machine backup system (Live-standby and live-live systems), how do two machines monitor each other through heartbeat? Cluster primary node backup.

Virtualization technology, using this technology, can be the operating system when the application switch or reconfigure and deploy.

Learn thrift, binary high-performance communication middleware, support for data (object) serialization and multiple types of RPC services.

Learn Hadoop. The most central design in the Hadoop framework is mapreduce and HDFs. The idea of MapReduce was widely circulated by a Google paper, and a simple sentence explaining that MapReduce was "the decomposition of tasks and the aggregation of results". HDFS is the abbreviation for the Hadoop Distributed File System (Hadoop distributed), which provides the underlying support for distributed compute storage.

Understanding the NoSQL database (some say it may be a technology of transition hype), but because of ultra-large-scale and high concurrency of pure Dynamic web site increasingly mainstream, and SNS site in the data access process has real-time and other rigid requirements, which makes the current NoSQL database slowly become the focus of attention, It has become a trend to replace relational database and become the mainstream data storage mode in the future. There are many NoSQL databases, most of which are open source, among which the more well-known are: Memcachedb, Redis, Tokyo Cabinet (Kyoto Cabinet), Flare, MongoDB, CouchDB, Cassandra , Voldemort and so on.

Write so much, look back, feel quite a sense of accomplishment. I hope you do not scare, I myself this 10 years is also constantly learning, today I also in the study, life is a continuous learning and practice level process. However, there must be a leak, there is a wrong, but also hope that we can add and correct.

Turn from: Cool shell

Programmer's Guide to Practice--to guide you into being a real programming expert

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.