SlideShare a Scribd company logo
1 of 32
关于技术的一点扯淡 李辉荣 2011-07-14
没有主题 cdppt-session ls –l cd爬虫,WebCrawler drwxr-xr-x 2 root root  4096        爬虫,Web Crawler drwxr-xr-x 2 root root  4096        Linux drwxr-xr-x 2 root root  4096        Java drwxr-xr-x 2 root root  4096       其他
爬虫 神马玩意? 搜索引擎的信息积累 google/baidu/bing… Googlebot, Baiduspider, bingbot, Yahoo! Slurp,
爬虫 礼貌问题 Robots.txt http://zh.wikipedia.org/wiki/Robots.txt 广度优先,Breadth First Search 深度优先,Depth First Search
不礼貌的行为 几个服务器 Down 蜂拥而上 403
解决方法-1
解决办法-2 几个服务器 乱序访问
广度优先 通常实现 FIFO 边界越来越大
深度优先 LIFO 缺点:不可自拔 优点:遍历小站点时效率好
没有主题 ls –l cdLinux drwxr-xr-x 2 root root  4096        爬虫,Web Crawler drwxr-xr-x 2 root root  4096        Linux drwxr-xr-x 2 root root  4096        Java drwxr-xr-x 2 root root  4096       其他
Linux 学习使用Linux的必要性 发行版:Debian, RPM, … 服务器多用Linux(Red Hat, CentOS, UbuntuServer, openSUSE) 推荐个人安装Ubuntu(烂货RTX!!)
编辑器 Editor nano(^+O, ^+X) geditor(GNome) 编辑器之神——Vi 另外一个不介绍,因为我不会。。。
ViM 英文http://marius.wirelessisfun.com/2010/tutorial-vi-vim/ 中文:http://blog.webshuo.com/2011/02/23/549/ 当前服务器上的VI版本
MM图
键盘图
shell 输入输出重定向,管道 grep tail –f –n  ps –ef/-aux top []/[[]]/for/if/while/do/done/then… sed/awk perl –nle 文档:http://10.0.93.16/abs-3.9.1/
Ubuntu简介 基于Debian,Ubuntu的目标在于为一般用户提供一个最新的、同时又相当稳定的主要由自由软件构建而成的操作系统。 Ubuntu desktop Ubuntu server 软件安装 利用deb包安装 sudodpkg -i vim.deb 利用apt安装 sudo apt-get install vim
没有主题 ls –l cdJava drwxr-xr-x 2 root root  4096        爬虫,Web Crawler drwxr-xr-x 2 root root  4096        Linux drwxr-xr-x 2 root root  4096        Java drwxr-xr-x 2 root root  4096       其他
Java 编码风格,编程习惯,注释,标记 对抽象编程 使用框架 日志
风格 变量、方法命名 格式:Eclipse,Ctrl+Shift+F? 代码即注释! 额外的注释,可以有,但必须精 中文?英文? 标注:TODO,FIXME 线程setName(String threadName) close()
抽象,接口和抽象类 个人理解(不保证完全准确) 接口为类型转化 抽象类为减少重复代码、公用基础功能 优先使用接口 在抽取抽象类的时候尽量考虑Adapter模式
框架 JavaJDK类库 Collection框架 java.util.concurrent框架 Stream体系 使用开源框架: Spring , struts2 iBatis, hibernate  Log4j, Jetty, HtmlCleaner, quartz
日志 ×System.out.println(msg) √   Logger.info(msg) 查看程序运行历史记录。中文?英文? 推荐log4j,功能完善,资料丰富 单行模式,视觉块 行号一定要有 多线程环境下,一定要有%t选项 Log4j.logger.com.xxx=debug,stdout,logfile log4j.additivity.com.xxx=false
没有主题 ls –l cd其他 drwxr-xr-x 2 root root  4096        爬虫,Web Crawler drwxr-xr-x 2 root root  4096        Linux drwxr-xr-x 2 root root  4096        Java drwxr-xr-x 2 root root  4096       其他
其他 方向与速度 问题的本质 懒不是缺点 HTTP一点点 信息获取
方向与速度 SB & NB 实例:爬虫里的Link Extract和Page Analyse
问题的本质 抽象                具体 任务分解,一个大任务                多个小任务 解决任务的途径,不止一种 任何时刻明确大任务是神马,这是本质 实例:下载网页,HtmlCleaner 问题的实质:一个正确的TagNode对象 而非:一个返回正确Charset的方法
懒不是缺点 当然要把事情做好 懒得学习才是缺点 事半功倍的前提:一点学习曲线 例子  一键部署脚本  Vi的使用
HTTP一点点 HTTP URL组成 http://www.google.com:80/search?q=http+url#tag $protocol//$host$pathname$search$hash $host  =>  $hostname:$port Search    queryString 可以用Javascript查看:location.xxx Status codes
信息获取 书籍的选择 开源项目 API Document https://www.google.com/reader/
Qustions?
Thank you~~ 感谢坚持到最后的同学 你们辛苦了~  Blog:  http://blog.blacklee.net/ Twitter:  http://twitter.com/liltos

More Related Content

Viewers also liked

Viewers also liked (9)

Cursantes
CursantesCursantes
Cursantes
 
Projeto minhas raízes
Projeto minhas raízesProjeto minhas raízes
Projeto minhas raízes
 
Claudia tema 2 de mate
Claudia tema 2  de mateClaudia tema 2  de mate
Claudia tema 2 de mate
 
Interne el mon_electronic
Interne el mon_electronicInterne el mon_electronic
Interne el mon_electronic
 
Ocinap
OcinapOcinap
Ocinap
 
Comer
ComerComer
Comer
 
Presentacion slide share
Presentacion slide sharePresentacion slide share
Presentacion slide share
 
El arrebatamiento
El arrebatamientoEl arrebatamiento
El arrebatamiento
 
0 semeadores[1]...(lila)
0 semeadores[1]...(lila)0 semeadores[1]...(lila)
0 semeadores[1]...(lila)
 

Similar to Simple tech-talk

20030623 linuxbasic and-security
20030623 linuxbasic and-security20030623 linuxbasic and-security
20030623 linuxbasic and-security建融 黃
 
COSCUP 2016 - LLVM 由淺入淺
COSCUP 2016 - LLVM 由淺入淺COSCUP 2016 - LLVM 由淺入淺
COSCUP 2016 - LLVM 由淺入淺宗凡 楊
 
COSCUP2016 - LLVM框架、由淺入淺
COSCUP2016 - LLVM框架、由淺入淺COSCUP2016 - LLVM框架、由淺入淺
COSCUP2016 - LLVM框架、由淺入淺hydai
 
为啥别读HotSpot VM的源码(2012-03-03)
为啥别读HotSpot VM的源码(2012-03-03)为啥别读HotSpot VM的源码(2012-03-03)
为啥别读HotSpot VM的源码(2012-03-03)Kris Mok
 
互联网创业服务器运维工具集
互联网创业服务器运维工具集互联网创业服务器运维工具集
互联网创业服务器运维工具集zhen chen
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure National Cheng Kung University
 
Linux 教育訓練
Linux 教育訓練Linux 教育訓練
Linux 教育訓練Bo-Yi Wu
 
Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509
Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509
Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509tidesq
 
全端物聯網探索之旅 - 重點整理版
全端物聯網探索之旅 - 重點整理版全端物聯網探索之旅 - 重點整理版
全端物聯網探索之旅 - 重點整理版Simen Li
 
Linux必备知识与Unix基础文化
Linux必备知识与Unix基础文化Linux必备知识与Unix基础文化
Linux必备知识与Unix基础文化Dahui Feng
 
优酷 Web网站架构案例分析
优酷   Web网站架构案例分析优酷   Web网站架构案例分析
优酷 Web网站架构案例分析George Ang
 
Key value store
Key value storeKey value store
Key value storexuanhan863
 
Youku arch qcon2009_beijing
Youku arch qcon2009_beijingYouku arch qcon2009_beijing
Youku arch qcon2009_beijingdrewz lin
 
Postgre sql intro 0
Postgre sql intro 0Postgre sql intro 0
Postgre sql intro 0March Liu
 
微博实时搜索
微博实时搜索微博实时搜索
微博实时搜索亚军 汪
 
Baidu LSP and DISQL for Log Analysis
Baidu LSP and DISQL for Log AnalysisBaidu LSP and DISQL for Log Analysis
Baidu LSP and DISQL for Log AnalysisXiaoming Chen
 

Similar to Simple tech-talk (20)

20030623 linuxbasic and-security
20030623 linuxbasic and-security20030623 linuxbasic and-security
20030623 linuxbasic and-security
 
COSCUP 2016 - LLVM 由淺入淺
COSCUP 2016 - LLVM 由淺入淺COSCUP 2016 - LLVM 由淺入淺
COSCUP 2016 - LLVM 由淺入淺
 
COSCUP2016 - LLVM框架、由淺入淺
COSCUP2016 - LLVM框架、由淺入淺COSCUP2016 - LLVM框架、由淺入淺
COSCUP2016 - LLVM框架、由淺入淺
 
为啥别读HotSpot VM的源码(2012-03-03)
为啥别读HotSpot VM的源码(2012-03-03)为啥别读HotSpot VM的源码(2012-03-03)
为啥别读HotSpot VM的源码(2012-03-03)
 
A
AA
A
 
互联网创业服务器运维工具集
互联网创业服务器运维工具集互联网创业服务器运维工具集
互联网创业服务器运维工具集
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
 
Linux 教育訓練
Linux 教育訓練Linux 教育訓練
Linux 教育訓練
 
Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509
Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509
Linux c++ 编程之链接与装载 -基础篇--v0.3--20120509
 
全端物聯網探索之旅 - 重點整理版
全端物聯網探索之旅 - 重點整理版全端物聯網探索之旅 - 重點整理版
全端物聯網探索之旅 - 重點整理版
 
Linux必备知识与Unix基础文化
Linux必备知识与Unix基础文化Linux必备知识与Unix基础文化
Linux必备知识与Unix基础文化
 
优酷 Web网站架构案例分析
优酷   Web网站架构案例分析优酷   Web网站架构案例分析
优酷 Web网站架构案例分析
 
Key value store
Key value storeKey value store
Key value store
 
Youku arch qcon2009_beijing
Youku arch qcon2009_beijingYouku arch qcon2009_beijing
Youku arch qcon2009_beijing
 
Jvm内存管理基础
Jvm内存管理基础Jvm内存管理基础
Jvm内存管理基础
 
Postgre sql intro 0
Postgre sql intro 0Postgre sql intro 0
Postgre sql intro 0
 
getPDF.aspx
getPDF.aspxgetPDF.aspx
getPDF.aspx
 
getPDF.aspx
getPDF.aspxgetPDF.aspx
getPDF.aspx
 
微博实时搜索
微博实时搜索微博实时搜索
微博实时搜索
 
Baidu LSP and DISQL for Log Analysis
Baidu LSP and DISQL for Log AnalysisBaidu LSP and DISQL for Log Analysis
Baidu LSP and DISQL for Log Analysis
 

Simple tech-talk