2006年12月26日 星期二

How Do I Learn Programming(C/C++ as example)

最近為了幫助學弟們學習C++,我整理了一些東西在這
現在已經要2007了,雖然說書還是要K,不過網路可以變成一種方便補助學習
根據C++的學習路徑,而分類幾個主題來列出相關網路資源

學習程式設計


必要條件:

  • 自我學習

  • 記住正確的詞彙

  • 善用搜尋

  • 分享及討論

  • 學好英文


學習程式設計大概會遵照這個流程,從12開始之後因為所有的語言都一樣,所以只要學一次。接著你就會從1~11學習各種不同的語言:

2006年12月22日 星期五

Trac - 與Subversion整合


Trac


Trac是一個Project Management System,他整合了Wiki,並且使用Wiki的方式,以輕量化,快速的角度來建立專案的issue item(他稱做ticket)。你可以管理Milestone(軟體分支或主線),事項(ticket)。而狀態管理項目有priority, severity, ticket type, version。可以從timeline來觀察專案事項的處理時間,也可以從roadmap來觀察專案的進度。並且整合了subversion的web介面。

2006年12月19日 星期二

Ten reasons why every web programmer should learn Perl


  1. Perl is the oldest Web Programming Language, and then influences PHP, Python and Ruby. If you want to get those language started very fast, you better learn Perl first.

  2. Perl Compatible Regular Expression(PCRE) has many instances on utilitites and editors, and also on many Web Programming Languages. If you wish to match your text quickly, learn PCRE first.

  3. Perl provides programmers more than one way to write with flexible syntax, this also has effects on later Web Programming Languages such as Ruby.

  4. The main data structures of Perl are scalar, list, associative array. However string, regular expressions are also important. These are all essentials of later Web Programming Languages, through Perl that you will understand how to manipulate them with your code.

  5. Using Perl to wirte CGI code looks somehow inefficient, but helps you integrate other Client Side languages to it. Generating code with Perl's string processing, reference or OOP also helps you get well to differences between Server Side and Client Side programming, and how to coordinate them.

  6. In those old years with Perl, we use CGI program to show HTML and process HTML forms. If you practice this now, you can know the structure of HTTP and the actual data a web server gets. When debugging in HTTP level, you will resolve the bug in a very short time. Most Web Programming Languages

  7. Perl can combine C libraries effectively, that's how later Web Programming Languages make stable. Once your code needs acceleration, you can write C libraries to be used in your web application. Most Web Programming Languages for now support this way.

  8. Load mod_perl into your apache web server, this makes you realize how mod_php and modules for other language work. Use CGI wrappers to run your code if you find it hard to do so, and you will notice some security problems with your code.

  9. When reading Perl docs, or writing code with POD(perl's documentation format) on it, you can use perldoc to generate API documentation. You will learn that writing code is writing beautiful documents.

  10. There is a huge software library called CPAN, you can use it to install libraries, or join software projects. You may learn how an opensource project works. CPAN has been running for 10 years, with 280 mirror sites, more than 5000 authors and 10000 libraries. This is a goal of most Web Programming Languages.


The purpose I write this article isn't telling everyone to write your applicaiton with Perl. My previous article has talked about, I don't even really want to write for now because Perl spend me a lot more time.
Many of Web Programmers depend on Framework and ignore essential of web technology.
Obviously, after learning a language like Perl (and resolve hard problems), they will understand what HTTP, Apache, CGI is. Myabe read some documents of it such as PCRE will help.

2006年12月15日 星期五

Ten reasons why every programmer should learn C

http://www.jubling.com/ten-reasons-why-every-programmer-should-learn-c.html

我應該去寫個Ten reasons why web programmers should learn perl ...

為什麼Script Language可以這樣彈性?
Script Language一定就慢嗎?他又是怎樣才能寫的快?
為什麼只需要幾種基本型態如Array,Hash就足夠?
結構化且直線的Perl CGI程式如何撰寫?跟Ruby的View又有啥關係?
Perl如何促成了Web Programming?
我認為答案都在Advanced Perl Programming裡(已經絕版 ...)

我記得兩年前我讀這本書的時候,也正是PHP,Python在熱門的時候。而Perl雖然快要成灰燼了,卻在某些系統管理的角度還是很有用。

我並不是Perl的死忠支持者,但我相信在Web Programming越來越簡單的今天,設計師們不應該只是用簡單的物件堆疊,元件拖拉放,做出固定的視窗表單風格,或是犧牲效能完成程式。應該更注重Web的本質,多善用各種特校,ajax及排版來增強使用者經驗及改善效能。Web之所以能夠造成與視窗程式截然不同的發展方向與高人氣,也是因為這原因。

目前我已經將發展方向移往Ruby,我確實在我的學弟身上發現學習Perl對他們後來學習Php及Ruby有相當大的幫助。

2006年12月8日 星期五

WOGTA 2006 (12/7-8)

看起來今天的演講都很不錯

Reconfigrable Hardware

演講的是印度人,聽說也是花上一些力氣請來的,可是我怎樣也想不懂
為啥會請到一個講硬體的
又因為印度人的口音,所以理論上大家都聽不懂

主要介紹說為了要進行高效能運算,硬體的設計必須針對特定的運算如矩陣,字串比對做最佳化。
但是以現今CPU的架構,因為指令及已經固定,很難再花費這樣複雜的設計去實做這些東西。所以現在就有類似運算加速卡的東西,在超級電腦上,以DSP的角色,或是附加卡的角色,搭配CPU進行運算。而現在這樣的運算加速用DSP,還加上可以即時地去組合在FPGA裡的1bit ALU,來達到最佳化的指令集。

當然這樣的東西一定造價驚人,目前也應該沒有很好的應用及Compiler可以處理。

Tsubame Grid Cluster

http://ganglia.cc.titech.ac.jp/

基本上我認為這個主題根本是日本的國力展示。國高的研究助理與我推算一下,大約是台灣一個Grid計畫預算的40倍以上預算。光電力就要1.2MW,更別說耗掉這樣多電力的硬體是要多少錢。

Tsubame Grid Cluster 在2006/6的時候,以38TFLOPS到達了Top 500的9位,說起來Earth Emluator已經過變成過去式。
http://china5.nikkeibp.co.jp/china/news/news/elec200611160123.html

http://www.gsic.titech.ac.jp/~ccwww/tgc/bm/

http://www.top500.org/list/2006/11/100

後來看一下,國高的電腦,從本來有進top 500到已經不知道掉到哪去...結果現在進榜的是智冠科技

http://www.sciscape.org/news_detail.php?news_id=2082

Integrate P2P and Grid

就我學到的Service Oriented Programming/Contract Based Design,可以想像Grid的大方向。終究Grid是要讓人或程式使用,所以便站在服務的觀點進行很多規劃。但是Grid的實做沒有人不能規定是P2P。

這個結論大家或許心裡都有數,因為Service是一種設計,但沒有可以限定其實做。 也就是說,在Grid內部有關訊息傳遞,資料交換都可以應用。

結論有些實驗數據,還有這計畫作了兩年。

2006年12月6日 星期三

WiMAX ?

http://cpro.com.tw/channel/news/content/?news_id=52839
最近看了不少文章,有許多wimax的建置好像雨後春筍一樣

但實際上會不會有所謂的「無線ADSL」呢?

我想還是得好好期待了