跳到主要內容


程式語言學習概論(1)

程式語言

介紹

      程式語言是一種跟電腦溝通的語言,就跟人與人之間的溝通一樣(人的語言也被稱為自然語言),跟人類的語言一樣電腦程式語言也是有很多種類的,種類不同強項不同,因此在學習的時候必須確認自己學習的目的,來確立自己應該學哪種程式語言,而本blogger給的建議都是給新手,也就是完全沒學過或是學過卻完全不知道在學什麼的人。

歷史

電腦發展史

名稱說明
1642計算尺可以計算八進位的尺
1801雅卡爾織布機可以用卡孔編輯圖案的織布機
1820第一部完全可程式化計算機用來自動化處理數據
1930-1940模擬計算機針對機械或電子進行模擬分析使用
1941第一部電子計算機可程式化,二進制運算
1959-1964第二代計算機使用微處理器
1960第三代計算機可商業化生產
1970第四代計算機降低成本後,大量生產的電腦


程式語言發展史

名稱
1940之前打孔卡
1940年代組合語言
1954Fortran
1958Lisp
1959COBOL
1972C語言
1978SQL
1983C++
1987Perl
1991Python
1995Java
1995JavaScript
1995PHP
2001C#
2014Swift

      表格內容沒有非常詳細,但可以看到隨者電腦的進步,也帶動程式語言發展,尤其是第四代電腦發表後,各種程式語言更是如雨後春筍般冒出。

學習方法

      我認為的好的學習方式為從基本於法開始,中間學習各種檔案開啟以及內容處理,再來與資料庫連線跟其他種類的函式庫使用,進而研究設計模式以便大型軟體開發,再有時間之餘研究如何優化程式等議題。

  • 變數定義
  • 條件敘述
  • 回圈
  • 函數
  • 類別或結構
  • 開起檔案
  • 與資料庫連結
  • 資料結構與演算法
  • 函式庫的應用
  • 設計模式
  • 其他

一開始學習建議學習的語言

       這些建議選項不是依照難易度排序,只是單純以照在排行榜上常見的程度選出來的,又再依照使用領域選出,一開始並不建議從C開始學習,因為學習難度最高,而本人建議先學Python,再去學C#,可以縮短撞牆期,也較不會喪失信心。


  • C
  • C++
  • C#
  • Java
  • Javascript
  • Python
  • Swift
下圖為2018-IEEE上的排行,Web意思為與網路相關,Mobile意思為與行動裝置有關,Enterprise意思為商用軟體(通常為桌機),Embedded意思為嵌入式系統,而Swift為Apple系統的必要學習程式,故也特別列出,當然也排出個人比較不喜歡的程式語言。


排行參考網站:



教學目前不包含對各種語言最佳化的內容,主要是針對如何快速學會程式語言。


投影片-slideshare:程式語言學習概論(1)
影片-youtube:程式語言學習概論(1)
程式碼-Github:程式語言學習概論(1)

留言

這個網誌中的熱門文章

Python-資料庫-mongodb-pymongo

Python 資料庫 mongodb-pymongo 安裝: linux、mac:pip3 install pymongo windows: import pymongo client = pymongo.MongoClient("mongodb://localhost:27017/") db = client['demo_db'] col = db['demo_col'] dict1 = { "name": "ab123ab456g", "day": "1890-04-05" } result = col.insert_one(dict1)  dict2 = [   { "name": "ki", "day": "1666-1-1"},   { "name": "aa", "day": "1222-11-11"},   { "name": "gg-gg", "day": "1333-02-22"},   { "name": "T-T", "day": "1444-03-02"},   { "name": "f-f", "day": "1555-01-01"} ] result = col.insert_many(dict2) result = col.find_one() print(result) results = col.find() for result in col.find(): print(result) results = col.find() query = {'...

語言學習-English-Lights

Song Lyric Title : Lights Singer :Ellie Goulding Album :  Bright Lights Release Date :  2011 I had a way then losing it all on my own I had a heart then but the queen has been overthrown And I'm not sleeping now the dark is too hard to beat And I'm not keeping up the strength I need to push me You show the lights that stop me turn to stone You shine it when I'm alone And so I tell myself that I'll be strong And dreaming when they're gone 'Cause they're calling, calling, calling me home Calling, calling, calling home You show the lights that stop me turn to stone You shine them when I'm alone Noises, I play within my head Touch my own skin and hope they'll still be there And I think back to when my brother and my sister slept In and on my place the only time I feel safe You show the lights that stop me turn to stone You shine it when I'm alone And so I tell myself that I'...

Python-開啟檔案-excel

Python 開啟檔案 excel 安裝: linux、mac :pip3 install openpyxl、pip3 install xlwt、pip3 install xlrd windows    :之後補上 程式碼說明 2007年版後 寫入 from openpyxl import Workbook,load_workbook wb = Workbook() ws = wb.active ws1 = wb.create_sheet('Mysheet') ws2 = wb.create_sheet('Mysheet', 0) ws1.title = 'New Title' print(wb.sheetnames) ws['A4'] = 4 ws.cell(row=4, column=2, value=10) wb.save('demo.xlsx')  讀取 wb_load = load_workbook('demo.xlsx')  sheet_ranges = wb_load['Sheet'] print(sheet_ranges['A4'].value) 2007年版前 寫入 import xlwt from datetime import datetime style0 = xlwt.easyxf('font: name Times New Roman, \ color-index red, bold on',num_format_str='#,##0.00') style1 = xlwt.easyxf(num_format_str='D-MMM-YY') wb = xlwt.Workbook() ws = wb.add_sheet('A Test Sheet') ws.write(0, 0, 124, style0) ws.write(1, 0, datetime.now(), sty...