Getting started with programmers

Source: Internet
Author: User
Tags python sqlite
Preface

Do you think you have only done the same procedure as a small toy when you graduated from school? After entering the workplace, even if you have no experience, you can go through the following extracurricular exercises (complaints from friends: school courses are always based on theory, and homework projects do not show any practical effect, it is better to start from work needs)

Suggestion: Do not buy books or catch up with new technical terms. Basic things have been accumulated for a long time and will be used for at least 10 years in the future.

Let's review the history and look at the development of time online technology in history so that you can understand what tomorrow will look like.

Make sure you do it. No matter how simple the example is, we suggest you at least try it and check whether you understand the details.

You must learn to think and think about why, not that. We also need to think differently.

 

Note: You may wonder why the following things are very Unix/Linux. This is because I think programming in Windows may not be promising in the future, for the following reasons: the current user interface is dominated by almost two things: 1) web, 2) mobile devices iOS or android. The GUI of Windows is no longer delicious.

More and more enterprises are constructing their systems using low-performance Linux and various open-source technologies. The cost of Windows is too high. Microsoft's things have become too fast and not long-lasting. They are completely playing with programmers. For details, see Windows Programming revolution

Therefore, I personally think the trend in the future is that the frontend is Web + mobile, and the backend is Linux + open source. Basically, there is nothing to do with windows on the development side.

Start 1. Learn a scripting language

For example, Python/Ruby can free you from the fear of the underlying language, and the scripting language can quickly develop small programs that can be used.

Practice Project:

Process a text file, or read a local file in CSV (Python CSV, Python open, Python sys), and process it row by row (such as Word count or log)

Traverse the local file system (sys, OS, PATH). For example, write a program to count the size of all files in a directory, sort the files by various conditions, and save the results.

Dealing with databases (Python SQLite), writing a small script to calculate the number of entries in the database

Learn to debug with various simple and crude methods such as print

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

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

 

2. Familiar with a programmer's editor (not IDE) and some basic tools

Vim/Emacs/notepad ++, learn how to configure Code Completion, appearance, external commands, etc.

Source insight (or CTAG)

Instead of using cool, these editors can view and modify code, configure articles, and logs faster and more efficiently.

3. Familiar with Unix/Linux Shell and common command lines

If you use Windows, at least learn to use Linux in a virtual machine. VMWare Player is free of charge. Install ubuntu.

You must use less graphic interfaces.

Learn to use man to view help

File System Structure and basic operations ls/chmod/chown/RM/find/ln/CAT/Mount/mkdir/tar/gzip...

Learn to use some text operation commands SED/awk/grep/tail/less/more...

Learn to use some management commands PS/top/lsof/netstat/kill/tcpdump/iptables/DD...

Learn about various configuration articles in the/etc directory and view system logs under/var/log and system running information under/proc.

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

For programmers, Unix/Linux is much simpler than Windows. If you learn to use Unix/Linux, you will find that the graphic interface is too difficult to use in some cases, greatly reducing work efficiency.

4. Learning Web BASICS (HTML, CSS, and JS) + server-side Technology (LAMP)

The future will inevitably be the world of web, and the best website for Learning Web basics is w3school.

Learn the basic HTML syntax

Learn how CSS selects HTML elements and applies some basic styles (Key Words: Box Model)

Learn to use Firefox + firebug or chrome to view and dynamically modify the webpage structure that you think is amazing.

Learn how to manipulate HTML elements using JavaScript. Understanding Dom and dynamic web pages (http://oreilly.com/catalog/9780596527402) online with free chapters, enough to use. Or see Dom.

Learn to use Firefox + firebug or chrome to debug JavaScript code (set breakpoints, view variables, performance, console, etc)

Configure Apache or nginx on a machine to learn PHP, so that the backend PHP can interact with the front-end HTML to form a preliminary understanding of the server's browser requests. Implements a form submission and reverse display function.

Connect PHP to the local or remote database MySQL (MySQL and SQL are used up now)

Follow a prestigious Network Programming Course (such as: http://www.stanford.edu /~ Ouster/cgi-bin/cs142-fall10/index. php) Don't think it takes more than one semester, college students are full-time one semester to choose 3-5 courses, you can certainly catch up

Learn a javascript Library (such as jquery or extjs) + Ajax (asynchronously reading a server image or database content) + JSON data format.

HTTP: the definitive guide after reading the first four chapters, you will understand what happened when you access the Web browser every day (proxy, gateway, browsers)

Create a small website (for example, a small message board that supports user login, Cookie/session, addition, deletion, modification, and query, upload image attachments, and display on pages)

Buy a domain name, rent a space, and create your own website.

Advanced enhancement 1. C language and operating system calls

Re-learn the C language, understand the pointer and memory model, and use the C language to implement various classic algorithms and data structures. We recommend "computer programming art", "Introduction to algorithms", and "programming Pearl".

Learning (MIT free course) Introduction to computer science and Programming

Learning (MIT free course) C language memory management

Learn about Unix/Linux system calls (advanced UNIX environment programming) and system-level things.

Use this system knowledge to operate the file system. (implement a small program that can copy the directory tree)

Use fork, wait, and waitpid to write a multi-process program,

Use pthread to write a multi-threaded program with synchronization or mutex. Multi-process, multi-process ticket buying procedure.

Use signal/kill/raise/alarm/pause/sigprocmask to implement semaphore communication between multiple processes.

Learn to use GCC and GDB to program and Debug Programs (refer to my "debug program with GDB")

Learn to use makefile to compile programs. (Refer to my "Write makefile with me")

IPC and socket can be put into advanced practice.

Learning windows SDK programming (Windows programming, MFC programming)

Write a window to learn about winmain/winprocedure and Windows message mechanism.

Write programs to operate windows SDK resource files or various graphical controls, as well as graph programming.

Learn how to use msdn to view related SDK functions, various WM _ messages, and some routines.

There are many routines in this book. Please do not copy them in practice, and try to write your own routines. Don't be too familiar with these things, because the GUI is being replaced by the web, mainly to understand the programming of the Windows GUI.

2. Learning Java

Java learning mainly refers to the classic core Java "Java core technology programming" and "Java programming ideas" (there are two volumes, I only chain the first volume, enough, because you can understand the Java graphical interface)

Learn JDK, learn to view Java API Doc
Http://download.oracle.com/javase/6/docs/api/

Let's take a look at the differences in compilation and execution between Java and C and python. Think about cross-platform technology from C, Java, and python.

Learn how to use ide eclipse, compile, debug, and develop Java programs using eclipse.

Create a tomcat website and try JSP/servlet/jdbc/MySQL web development. Use JSP and servlet to implement the small PHP project mentioned above.

3. Web security and architecture

I have learned many HTML5 tutorials on the internet, and I have introduced many tutorials in the past. I will not list them here.

Learn about web development security issues (refer to Sina Weibo's attack and Ruby's article)

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

Learn about the static page caching technology of the web.

Learn about the architecture of asynchronous Web workflow processing, data cache, data partitioning, Server Load balancer, and horizontal scaling. Practical Task: Use HTML5 canvas to make some Web animations. Try to perform SQL injection, JS injection, and XSS attacks in the Web application developed earlier. Change the web application developed earlier to construct the website in nginx + PHP-FPM + static page cache 4. Learn relational database you can install MSSQLServer or MySQL to learn the database. Learn the paradigm of Database Design in textbooks, such as 1nf, 2nf, 3nf ,......
Learn about database storage, triggers, views, indexes, and cursors. Learn SQL statements and understand the concepts of table join (see the SQL join graph). Learn how to optimize database queries (see MySQL optimization: design a forum database that must satisfy at least 3nf. use SQL statements to query the latest articles of this week, the most comments, and the most active users. 5. Some development tools learn to use SVN or git to manage program versions. Learn how to use JUnit to perform unit tests on java. Learn coding standard or coding guideline in C and Java. (I wrote a very simple article about C language N years ago-programming cultivation. You can check this on the Internet ).
We recommend that you read "code Daquan", "refactoring", and "clean code". Advanced Introduction: 1. c ++/Java and object-oriented. I personally think that learning C ++ well, Java is just a breeze. However, the learning curve of C ++ is steep. However, I think C ++ is the most important language to learn. Refer to the two interesting articles "C ++ learning confidence map" and "learning C ++ in 21 days" (MIT free course) c ++ Object-Oriented Programming reads the books recommended in my "how to learn C ++ well" at least twice (If your understanding of C ++ is as deep as what I wrote c ++ virtual function table parsing or C ++ object memory storage Board (I) (ii), or the trap of returning internal static members in C/C ++)
Then I want to reflect on why C ++ is doing this, but Java is not? You must learn to compare the differences between C ++ and Java. For example, Java initialization, garbage collection, interfaces, exceptions, virtual functions, and so on. Practical Task: use C ++ to implement a bigint that supports 128-bit integer addition, subtraction, multiplication, and Division operations. Uses C ++ to encapsulate the capacity of a data structure, such as hash table. Encapsulate and implement a smart pointer in C ++ (you must use a template ). The design pattern must be read for more than two times. Think about the application scenarios of these 23 patterns. There are two main points: 1) Love combination rather than inheritance; 2) Love interface rather than implementation. (We also recommend "in-depth introduction to design patterns") practical tasks:
Implement a memory pool in factory mode. You can use the policy mode to create a class that can align the text file left, right, and center. Use command mode to implement a command line calculator and support undo and redo. The modification mode is used to implement a hotel room price pricing strategy-peak season, service, VIP, tour group, and other factors that affect the price. Learn STL usage and design concepts-containers, algorithms, iterators, and functions. If possible, read the source code. Practical tasks: Try to use object-oriented, STL, design patterns, and windowssdk graphics programming skills to make a snake or Russian box game. Different Levels and difficulty are supported. As a file browser, you can browse the files in the directory and perform different operations on different files. You can open and edit a text file and execute the file, MP3 or AVI files can be played, and image files can be used to display images.
Learn the design of some class libraries in C ++, such as: MFC (let's take a look at Mr Hou Jie's "Let's get started with MFC"), boost, Ace, cppunit, STL (STL may be too difficult, but it would be great if you could understand the design patterns and designs, if you can go deep into my "STL string-type copy-at-time writing technology", it will be very good. Ace requires strong system knowledge, see "enhanced understanding of the system") Java is a real object-oriented language, and there are no more java design patterns, it is also the best language for Learning Object-oriented Design Patterns (see the design patterns in Java ). We recommend that you read objective Java.
And "Java" learns from the Java framework. There are also many Java frameworks, such as spring, hibernate, struts, and so on, mainly learning Java design, such as IOC. Java is also a poor technology, focusing on J2EE architecture and JMS, RMI, and other messaging and remote call technologies. Learn how to use Java for Web Service (the official tutorial is here) practice tasks: try to build a Web Service Remote Call program with a network in the spring or Hibernate framework, messages can be transmitted through JMS in two services. Both C ++ and Java can not be learned in a short time. c ++ is very familiar with Java and Java is widely used. I suggest you select either of them. My personal learning experience is: go deep into C ++ (I have been exploring C/C ++ for more than ten years)
Learn various Java design patterns. 2. strengthen understanding of the system. Read the following books: Unix programming Art: Understand the design and development philosophy, ideological and cultural system, principles, and experience in the Unix system field. You will have a feeling of being overwhelmed. UNIX Network Programming Volume 1, socket this is a book that you will understand network programming after reading it. Pay attention to the differences between TCP, UDP, and select/poll/epoll for multiplexing system calls. Details of TCP/IP 1: Protocol-this is a book that allows you to become a web hacker after reading it. Measure the test taker's understanding about the working principle of Ethernet, the TCP/IP protocol, the operating principle, and how to optimize TCP. Practical tasks: Understand what is blocking (synchronous Io), non-blocking (asynchronous Io), multiplexing (select,
Poll, epoll) Io technology. Write an online chat program that has a chat server and multiple chat clients (the server uses UDP to add some or all of the chat clients to multicast or broadcast ). Write a simple HTTP server. UNIX Network Programming volume 2, inter-process communication semaphores, pipelines, shared memory, messages, and other IPC ...... These technologies seem to be a bit old, but they are worth learning. Practical tasks: mainly implements various methods for communication between IPC programs. Try to write an MPS queue. The Parent and Child processes exchange data through the MPs queue. Try to write a program with shared memory. The two processes exchange a C struct array through the shared memory. Learn the book windows core programming. Synchronize CreateProcess, Windows Thread, thread scheduling, and thread (event,
Semaphores, mutex), asynchronous I/O, memory management, DLL. Practice task: Use CreateProcess to start a notepad or IE and monitor the running of the program. Implement the simple HTTP service previously written in the thread pool. Write a DLL hook program to monitor the closing events of a specified window, or record the keys of a window. With multithreading, multi-process communication, TCP/IP, socket, C ++ and the basic design mode, you can study ace. Use ace to rewrite the preceding chat program and HTTP server (with thread pool) practice tasks: use all the above knowledge to try to write a service terminal to send large files to the client, 80% M bandwidth is required to be used over. (Note: disk I/O and network I/O may be very problematic. Think about how to solve it. In addition, pay attention to the maximum unit MTU for network transmission)
Measure the test taker's knowledge about how BT downloads work and use multi-process methods to simulate the principles of Bt downloads. 3. Server Load balancer of the system architecture. Hash type, pure dynamic type. (You can search for some articles about Server Load balancer in Google) Multi-Layer Distributed System-Client Service Node layer, computing node layer, data cache layer, and data layer. J2EE is a classic multi-layer structure. CDN system-access to the nearest node, and content is marginalized. A P2P system is used to study the algorithms of Bt and 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? Back up the master node of the cluster. Virtualization technology. With this technology, you can switch the operating system as an application, or reconfigure and deploy it.
Thrift is a binary high-performance communication middleware that supports data (object) serialization and multiple types of RPC services. Learn hadoop. The core designs in the hadoop framework are mapreduce and HDFS. The idea of mapreduce is widely circulated as mentioned in a Google paper. A simple sentence explains mapreduce as a "Summary of task decomposition and results ". HDFS is short for hadoop Distributed File System, which provides underlying support for Distributed Computing and storage. Understanding nosql databases (some people say it may be a transitional hype technology), but because ultra-large scale and high concurrency pure dynamic websites are becoming mainstream, SNS websites have rigid requirements such as real-time data access, which has gradually become the focus of nosql databases, it has become a trend in replacing relational databases with mainstream data storage models in the future. Currently, there are many nosql databases, most of which are open-source, among which memcachedb, redis, and Tokyo are well-known.
Cabinet (upgraded to Kyoto Cabinet), flare, MongoDB, couchdb, Cassandra, Voldemort, etc. After writing so much, I think I have a sense of accomplishment. I hope you will not be scared. I have been learning for the past 10 years. Today I am also studying. My life is a process of continuous learning and training. However, there must be something missing or wrong. I hope you can add and correct it. (I will update this article at any time based on your feedback.) You are welcome to communicate with me through my weibo (@ left ear mouse) and Twitter (@ haoel. -- Update 2011/07/19 -- 1) Some friends wondered why I mentioned Web + mobile at the beginning of this article, but did not mention IOS/Android front-end development later. I have a feeling in my mind that the UI on mobile devices will eventually be replaced by JavaScript. You can use the iPhone or android to check Google + and you will understand it. 2) A friend said that I have too many things to learn. I agree very much. I also mentioned before the article that I want to think about. In addition, do not think that I am talking about these things as some new technologies. more than 95% of this strategy is the foundation. They are also proven basic technologies. That is, the technology that allows you to get a better job. 3) Some friends say that they have finished learning all these things, so it's better to think about how to earn money. I want to tell you, first, I am not 40 years old this year, and second, I have no end to learning. Third, I don't think how hard it is to make money, but how can I make you worth so much money? Whether working or starting a business, what makes your own value and the value of your company more valuable? I dare not say anything else. For Internet or IT companies, technical strength is definitely one of them. 4) Some people say that technology is a tool, so we should not be so obsessed with this sentence. Sometimes we need to look up more to see things other than technology, or when we are doing technology, we don't have to think about why this technology exists. The question is not about technology. The problem is that we read dead books, read dead books, and become technical geeks. 5)
Nosql is very popular recently, but I am a little conservative about it, so I just want to know about it. For hadoop, I think it has great potential in distributed systems, so we need to learn. For relational databases, it is indeed very important. This is my negligence and I will add it in the original article. (The full text is complete. Please indicate the author and source when reprinting)

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.