1、基礎篇css
1.1 JVMhtml
1.1.1. Java內存模型,Java內存管理,Java堆和棧,垃圾回收html5
http://www.jcp.org/en/jsr/detail?id=133java
http://ifeve.com/jmm-faq/node
1.1.2. 瞭解JVM各類參數及調優react
1.1.3. 學習使用Java工具linux
jps, jstack, jmap, jconsole, jinfo, jhat, javap, …ios
http://kenai.com/projects/btracenginx
http://www.crashub.org/git
https://github.com/taobao/TProfiler
https://github.com/CSUG/HouseMD
http://wiki.cyclopsgroup.org/jmxterm
https://github.com/jlusdy/TBJMap
1.1.4. 學習Java診斷工具
http://www.eclipse.org/mat/
http://visualvm.java.net/oqlhelp.html
1.1.5. 本身編寫各類outofmemory,stackoverflow程序
HeapOutOfMemory
Young OutOfMemory
MethodArea OutOfMemory
ConstantPool OutOfMemory
DirectMemory OutOfMemory
Stack OutOfMemory
Stack OverFlow
1.1.6. 使用工具嘗試解決如下問題,並寫下總結
當一個Java程序響應很慢時如何查找問題
當一個Java程序頻繁FullGC時如何解決問題,如何查看垃圾回收日誌
當一個Java應用發生OutOfMemory時該如何解決,年輕代、年老代、永久代解決辦法不一樣,致使緣由也不一樣
1.1.7. 參考資料
http://docs.oracle.com/javase/specs/jvms/se7/html/
http://www.cs.umd.edu/~pugh/java/memoryModel/
http://gee.cs.oswego.edu/dl/jmm/cookbook.html
1.2. Java基礎知識
1.2.1. 閱讀源代碼
java.lang.String
java.lang.Integer
java.lang.Long
java.lang.Enum
java.math.BigDecimal
java.lang.ThreadLocal
java.lang.ClassLoader & java.net.URLClassLoader
java.util.ArrayList & java.util.LinkedList
java.util.HashMap & java.util.LinkedHashMap & java.util.TreeMap
java.util.HashSet & java.util.LinkedHashSet & java.util.TreeSet
1.2.2. 熟悉Java中各類變量類型
1.2.3. 熟悉Java String的使用,熟悉String的各類函數
1.2.4. 熟悉Java中各類關鍵字
1.2.5. 學會使用List,Map,Stack,Queue,Set
上述數據結構的遍歷
上述數據結構的使用場景
Java實現對Array/List排序
java.uti.Arrays.sort()
java.util.Collections.sort()
Java實現對List去重
Java實現對List去重,而且須要保留數據原始的出現順序
Java實現最近最少使用cache,用LinkedHashMap
1.2.6. Java IO&Java NIO,並學會使用
java.io.*
java.nio.*
nio和reactor設計模式
文件編碼,字符集
1.2.7. Java反射與javassist
反射與工廠模式
java.lang.reflect.*
1.2.8. Java序列化
java.io. Serializable
什麼是序列化,爲何序列化
序列化與單例模式
google序列化protobuf
1.2.9. 虛引用,弱引用,軟引用
java.lang.ref.*
實驗這些引用的回收
1.2.10. 熟悉Java系統屬性
java.util.Properties
1.2.11. 熟悉Annotation用法
java.lang.annotation.*
1.2.12. JMS
javax.jms.*
1.2.13. JMX
java.lang.management.*
javax.management.*
1.2.14. 泛型和繼承,泛型和擦除
1.2.15. 自動拆箱裝箱與字節碼
1.2.16. 實現Callback
1.2.17. java.lang.Void類使用
1.2.18. Java Agent,premain函數
java.lang.instrument
1.2.19. 單元測試
Junit,http://junit.org/
Jmockit,https://code.google.com/p/jmockit/
djUnit,http://works.dgic.co.jp/djunit/
1.2.20. Java實現經過正則表達式提取一段文本中的電子郵件,並將@替換爲#輸出
java.lang.util.regex.*
1.2.21. 學習使用經常使用的Java工具庫
commons.lang, commons.*…
guava-libraries
netty
1.2.22. 什麼是API&SPI
http://en.wikipedia.org/wiki/Application_programming_interface
http://en.wikipedia.org/wiki/Service_provider_interface
1.2.23. 參考資料
JDK src.zip 源代碼
http://openjdk.java.net/
http://commons.apache.org/
https://code.google.com/p/guava-libraries/
http://netty.io/
http://stackoverflow.com/questions/2954372/difference-between-spi-and-api
http://stackoverflow.com/questions/11404230/how-to-implement-the-api-spi-pattern-in-java
1.3. Java併發編程
1.3.1. 閱讀源代碼,並學會使用
java.lang.Thread
java.lang.Runnable
java.util.concurrent.Callable
java.util.concurrent.locks.ReentrantLock
java.util.concurrent.locks.ReentrantReadWriteLock
java.util.concurrent.atomic.Atomic*
java.util.concurrent.Semaphore
java.util.concurrent.CountDownLatch
java.util.concurrent.CyclicBarrier
java.util.concurrent.ConcurrentHashMap
java.util.concurrent.Executors
1.3.2. 學習使用線程池,本身設計線程池須要注意什麼
1.3.3. 鎖
什麼是鎖,鎖的種類有哪些,每種鎖有什麼特色,適用場景是什麼
在併發編程中鎖的意義是什麼
1.3.4. synchronized的做用是什麼,synchronized和lock
1.3.5. sleep和wait
1.3.6. wait和notify
1.3.7. 寫一個死鎖的程序
1.3.8. 什麼是守護線程,守護線程和非守護線程的區別以及用法
1.3.9. volatile關鍵字的理解
C++ volatile關鍵字和Java volatile關鍵字
happens-before語義
編譯器指令重排和CPU指令重排
http://en.wikipedia.org/wiki/Memory_ordering
http://en.wikipedia.org/wiki/Volatile_variable
http://preshing.com/20130702/the-happens-before-relation/
1.3.10. 如下代碼是否是線程安全?爲何?若是爲count加上volatile修飾是否可以作到線程安全?你以爲該怎麼作是線程安全的?
public class Sample {
private static int count = 0;
public static void increment() {
count++;
}
}
1.3.11. 解釋一下下面兩段代碼的差異
// 代碼1
public class Sample {
private static int count = 0;
synchronized public static void increment() {
count++;
}
}
// 代碼2
public class Sample {
private static AtomicInteger count = new AtomicInteger(0);
public static void increment() {
count.getAndIncrement();
}
}
1.3.12. 參考資料
http://book.douban.com/subject/10484692/
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
2、 進階篇
2.1. Java底層知識
2.1.1. 學習瞭解字節碼、class文件格式
http://en.wikipedia.org/wiki/Java_class_file
http://en.wikipedia.org/wiki/Java_bytecode
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/
http://asm.ow2.org/
2.1.2. 寫一個程序要求實現javap的功能(手工完成,不借助ASM等工具)
如Java源代碼:
public static void main(String[] args) {
int i = 0;
i += 1;
i *= 1;
System.out.println(i);
}
編譯後讀取class文件輸出如下代碼:
public static void main(java.lang.String[]);
Code:
Stack=2, Locals=2, Args_size=1
0: iconst_0
1: istore_1
2: iinc 1, 1
5: iload_1
6: iconst_1
7: imul
8: istore_1
9: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
12: iload_1
13: invokevirtual #3; //Method java/io/PrintStream.println:(I)V
16: return
LineNumberTable:
line 4: 0
line 5: 2
line 6: 5
line 7: 9
line 8: 16
2.1.3. CPU緩存,L1,L2,L3和僞共享
http://duartes.org/gustavo/blog/post/intel-cpu-caches/
http://mechanical-sympathy.blogspot.com/2011/07/false-sharing.html
2.1.4. 什麼是尾遞歸
2.1.5. 熟悉位運算
用位運算實現加、減、乘、除、取餘
2.1.6. 參考資料
http://book.douban.com/subject/1138768/
http://book.douban.com/subject/6522893/
http://en.wikipedia.org/wiki/Java_class_file
http://en.wikipedia.org/wiki/Java_bytecode
http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
2.2. 設計模式
2.2.1. 實現AOP
CGLIB和InvocationHandler的區別
http://cglib.sourceforge.net/
動態代理模式
Javassist實現AOP
http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/
ASM實現AOP
http://asm.ow2.org/
2.2.2. 使用模板方法設計模式和策略設計模式實現IOC
2.2.3. 不用synchronized和lock,實現線程安全的單例模式
2.2.4. nio和reactor設計模式
2.2.5. 參考資料
http://asm.ow2.org/
http://cglib.sourceforge.net/
http://www.javassist.org/
2.3. 網絡編程知識
2.3.1. Java RMI,Socket,HttpClient
2.3.2. 用Java寫一個簡單的靜態文件的HTTP服務器
實現客戶端緩存功能,支持返回304
實現可併發下載一個文件
使用線程池處理客戶端請求
使用nio處理客戶端請求
支持簡單的rewrite規則
上述功能在實現的時候須要知足「開閉原則」
2.3.3. 瞭解nginx和apache服務器的特性並搭建一個對應的服務器
http://nginx.org/
http://httpd.apache.org/
2.3.4. 用Java實現FTP、SMTP協議
2.3.5. 什麼是CDN?若是實現?DNS起到什麼做用?
搭建一個DNS服務器
搭建一個 Squid 或 Apache Traffic Server 服務器
http://www.squid-cache.org/
http://trafficserver.apache.org/
http://en.wikipedia.org/wiki/Domain_Name_System
2.3.6. 參考資料
http://www.ietf.org/rfc/rfc2616.txt
http://tools.ietf.org/rfc/rfc5321.txt
http://en.wikipedia.org/wiki/Open/closed_principle
2.4. 框架知識
spring,spring mvc,閱讀主要源碼
ibatis,閱讀主要源碼
用spring和ibatis搭建java server
2.5. 應用服務器知識
熟悉使用jboss,https://www.jboss.org/overview/
熟悉使用tomcat,http://tomcat.apache.org/
熟悉使用jetty,http://www.eclipse.org/jetty/
3、 高級篇
3.1. 編譯原理知識
3.1.1. 用Java實現如下表達式解析並返回結果(語法和Oracle中的select sysdate-1 from dual相似)
sysdate
sysdate - 1
sysdate - 1/24
sysdate - 1/(12*2)
3.1.2. 實現對一個List經過DSL篩選
QList> mapList = new QList>;
mapList.add({"name": "hatter test"});
mapList.add({"id": -1,"name": "hatter test"});
mapList.add({"id": 0, "name": "hatter test"});
mapList.add({"id": 1, "name": "test test"});
mapList.add({"id": 2, "name": "hatter test"});
mapList.add({"id": 3, "name": "test hatter"});
mapList.query("id is not null and id > 0 and name like '%hatter%'");
要求返回列表中匹配的對象,即最後兩個對象;
3.1.3. 用Java實現如下程序(語法和變量做用域處理都和JavaScript相似):
代碼:
var a = 1;
var b = 2;
var c = function() {
var a = 3;
println(a);
println(b);
};
c();
println(a);
println(b);
輸出:
3
2
1
2
3.1.4. 參考資料
http://en.wikipedia.org/wiki/Abstract_syntax_tree
https://javacc.java.net/
http://www.antlr.org/
3.2. 操做系統知識
Ubuntu
Centos
使用linux,熟悉shell腳本
3.3. 數據存儲知識
3.3.1. 關係型數據庫
MySQL
如何看執行計劃
如何搭建MySQL主備
binlog是什麼
Derby,H2,PostgreSQL
SQLite
3.3.2. NoSQL
Cache
Redis
Memcached
Leveldb
Bigtable
HBase
Cassandra
Mongodb
圖數據庫
neo4j
3.3.3. 參考資料
http://db-engines.com/en/ranking
http://redis.io/
https://code.google.com/p/leveldb/
http://hbase.apache.org/
http://cassandra.apache.org/
http://www.mongodb.org/
http://www.neo4j.org/
3.4. 大數據知識
3.4.1. Zookeeper,在linux上部署zk
3.4.2. Solr,Lucene,ElasticSearch
在linux上部署solr,solrcloud,,新增、刪除、查詢索引
3.4.3. Storm,流式計算,瞭解Spark,S4
在linux上部署storm,用zookeeper作協調,運行storm hello world,local和remote模式運行調試storm topology。
3.4.4. Hadoop,離線計算
Hdfs:部署NameNode,SecondaryNameNode,DataNode,上傳文件、打開文件、更改文件、刪除文件
MapReduce:部署JobTracker,TaskTracker,編寫mr job
Hive:部署hive,書寫hive sql,獲得結果
Presto:類hive,不過比hive快,很是值得學習
3.4.5. 分佈式日誌收集flume,kafka,logstash
3.4.6. 數據挖掘,mahout
3.4.7. 參考資料
http://zookeeper.apache.org/
https://lucene.apache.org/solr/
https://github.com/nathanmarz/storm/wiki
http://hadoop.apache.org/
http://prestodb.io/
http://flume.apache.org/,http://logstash.net/,http://kafka.apache.org/
http://mahout.apache.org/
3.5. 網絡安全知識
3.5.1. 什麼是DES、AES
3.5.2. 什麼是RSA、DSA
3.5.3. 什麼是MD5,SHA1
3.5.4. 什麼是SSL、TLS,爲何HTTPS相對比較安全
3.5.5. 什麼是中間人攻擊、若是避免中間人攻擊
3.5.6. 什麼是DOS、DDOS、CC攻擊
3.5.7. 什麼是CSRF攻擊
3.5.8. 什麼是CSS攻擊
3.5.9. 什麼是SQL注入攻擊
3.5.10. 什麼是Hash碰撞拒絕服務攻擊
3.5.11. 瞭解並學習下面幾種加強安全的技術
http://www.openauthentication.org/
HOTP http://www.ietf.org/rfc/rfc4226.txt
TOTP http://tools.ietf.org/rfc/rfc6238.txt
OCRA http://tools.ietf.org/rfc/rfc6287.txt
http://en.wikipedia.org/wiki/Salt_(cryptography)
3.5.12. 用openssl籤一個證書部署到apache或nginx
3.5.13. 參考資料
http://en.wikipedia.org/wiki/Cryptographic_hash_function
http://en.wikipedia.org/wiki/Block_cipher
http://en.wikipedia.org/wiki/Public-key_cryptography
http://en.wikipedia.org/wiki/Transport_Layer_Security
http://www.openssl.org/
https://code.google.com/p/google-authenticator/
4、 擴展篇
4.1. 相關知識
4.1.1. 雲計算,分佈式,高可用,可擴展
4.1.2. 虛擬化
https://linuxcontainers.org/
http://www.linux-kvm.org/page/Main_Page
http://www.xenproject.org/
https://www.docker.io/
4.1.3. 監控
http://www.nagios.org/
http://ganglia.info/
4.1.4. 負載均衡
http://www.linuxvirtualserver.org/
4.1.5. 學習使用git
https://github.com/
https://git.oschina.net/
4.1.6. 學習使用maven
http://maven.apache.org/
4.1.7. 學習使用gradle
http://www.gradle.org/
4.1.8. 學習一個小語種語言
Groovy
Scala
LISP, Common LISP, Schema, Clojure
R
Julia
Lua
Ruby
4.1.9. 嘗試瞭解編碼的本質
瞭解如下概念
ASCII, ISO-8859-1
GB2312, GBK, GB18030
Unicode, UTF-8
不使用 String.getBytes() 等其餘工具類/函數完成下面功能
public static void main(String[] args) throws IOException {
String str = "Hello, 咱們是中國人。";
byte[] utf8Bytes = toUTF8Bytes(str);
FileOutputStream fos = new FileOutputStream("f.txt");
fos.write(utf8Bytes);
fos.close();
}
public static byte[] toUTF8Bytes(String str) {
return null; // TODO
}
想一下上面的程序能不能寫一個轉GBK的?
寫個程序自動判斷一個文件是哪一種編碼
4.1.10. 嘗試瞭解時間的本質
時區 & 冬令時、夏令時
http://en.wikipedia.org/wiki/Time_zone
ftp://ftp.iana.org/tz/data/asia
http://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9C%8B%E6%99%82%E5%8D%80
閏年
http://en.wikipedia.org/wiki/Leap_year
閏秒
ftp://ftp.iana.org/tz/data/leapseconds
System.currentTimeMillis() 返回的時間是什麼
4.1.11. 參考資料
http://git-scm.com/
http://en.wikipedia.org/wiki/UTF-8
http://www.iana.org/time-zones
4.2. 擴展學習
4.2.1. JavaScript知識
4.2.1.1. 什麼是prototype
修改代碼,使程序輸出「1 3 5」:
http://jsfiddle.net/Ts7Fk/
4.2.1.2. 什麼是閉包
看一下這段代碼,並解釋一下爲何按Button1時沒有alert出「This is button: 1」,如何修改:
http://jsfiddle.net/FDPj3/1/
4.2.1.3. 瞭解並學習一個JS框架
jQuery
ExtJS
ArgularJS
4.2.1.4. 寫一個Greasemonkey插件
http://en.wikipedia.org/wiki/Greasemonkey
4.2.1.5. 學習node.js
http://nodejs.org/
4.2.2. 學習html5
ArgularJS,https://docs.angularjs.org/api
4.2.3. 參考資料
http://www.ecmascript.org/
http://jsfiddle.net/
http://jsbin.com/
http://runjs.cn/
http://userscripts.org/
5、 推薦書籍
《深刻Java虛擬機》
《深刻理解Java虛擬機》
《Effective Java》
《七週七語言》
《七週七數據》
《Hadoop技術內幕》
《Hbase In Action》
《Mahout In Action》
《這就是搜索引擎》
《Solr In Action》
《深刻分析Java Web技術內幕》
《大型網站技術架構》
《高性能MySQL》
《算法導論》
《計算機程序設計藝術》
《代碼大全》
《JavaScript權威指南》