Home Backend Development PHP Tutorial PHP软件工程师突破成长瓶颈-续(转载)

PHP软件工程师突破成长瓶颈-续(转载)

Jun 13, 2016 pm 01:13 PM
html memcache php

PHP程序员突破成长瓶颈-续(转载)

from:http://hi.baidu.com/%D3%E3%BA%CD%C3%A8/blog/item/835a6722adeb4e5d9922ed48.html

?

如何有效的学习是一个大问题。 自己有些实践但很零散,不好总结。昨天晚上睡觉前,突然想到了RUP的核心,“以架构为中心,用例驱动,迭代开发”,借用这个思想,关于有效的学习的方法,可以这样来表述:

?

以原理、模型或机制为中心,任务驱动,迭代学习

?

有点抽象, 举个例子来说明如何学习。

?

目的: 学习如何提高处理性能。

?

可迭代驱动的任务: 通过IP找到所在地域。

?

这是WEB应用常见的任务,IP数据库是10左右万行的记录。

?

第一次迭代: 不考虑性能的情况下实现功能(通过PHP来实现)

?

因为无法直接通过KEY(IP)进行查找地域,所以直接放到数据或通过关联数组这种简单的方法都是不行的。思路还是先把数据进行排序,然后再进行查找

?

如何通过IP查找? 已序的数据,二分查找是最快的。

?

如何排序?用库函数sort当然 是可以,但是即然是学习,那还是自己实现快速排序吧。

?

?

?

学习目标: 排序算法,查找算法

?

PHPer 数据结构和算法基础比较差,平时也没有这方面的任务,自己也不学习,因此这方面的知识很缺乏。但是,编程解决的问题,最终都会归结到数据结构和对这种数据 结构操作的算法。如果数据结构算法常在心中,那遇到问题就能清晰认识到它内在的结构,解决方法就会自然产生。

?

第二次迭代:优化数据的加载与排序

?

如果做到第一步,那基本上还是不可用,因为数据每次都需要的加载和排序,这样太耗时间。 解决的思路是,数据一次加载排序后,放到每个PHP进程能访问到的地方。

?

放到memcache 这是大家容易想到问题。其实放到共享内存(EA等加速器都支持)中是更快的方式,因为memcache还多了网络操作。 数据是整体放入到共享内存,还是分块放入,如何测试性能? 如何分析瓶颈所在(xdebug)? 在这些问题的驱动下你会学习到

?

学习目标: 检测、定位、优化PHP性能的方法; PHP实现结构对性能的影响。

?

第三次迭代: 编写PHP的扩展

?

性能还是上不去,不得不进入C/C++的世界了,不过从此你将不只是PHPer 而服务端的全能型工程师,当然这对没有做过C/C++的同学挑战是巨大的。 我这里无法再简单来说如何学习C/C++ ,可以参看 《PHP程序员学习C++》

?

学习目标:C/C++的学习,PHP扩展的编写

?

?

?

?

怎么确定需要学习的机制和原理呢? 怎么找到驱动学习任务呢?

?

我对需要学习的东西,都没有什么概念,怎么回答以上的两个问题?

?

从这个技术的定位来找出需要学习的重点,即它怎么做到(机制)的和它为什么能这样做到 (模型或原理)

?

列出这个技术最常见的应用,做为学习的任务,从简到难进行实践。

?

?

?

假如我需要学习Javascript ,我对于HTML,CSS有点感性认识

?

首要我了解到,JS 是WEB领域的动态语言,主要解决网页的动态交互的。

?

那我要学习的要点如下:

?

JS如何与HTML 进行交互 (机制)

?

JS的动态特性在那里,与其它动态语言有何区别?(语言模型)

?

?

?

如果完全自学,找到需要学习的要点(机制、模型、原理) 设定学习任务的确不是那么容易把握。如果找到一个有经验的人来指导你或加一个学习型的团队,那学习的速度的确会大大提高。

?

最后,我想说的是: PHP因为简单而使用,但不能因为它的简单而限制我们成长!

?

?

from:http://hi.baidu.com/%D3%E3%BA%CD%C3%A8/blog/item/835a6722adeb4e5d9922ed48.html

?

?

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

See all articles