Why I Love C

Why I Love C

  Note! I am not saying that other programing languages are not as good as C. Every Programming languages has its meaning and value, otherwise it is already dead or never born.

  C Programming Language was originally developed by Dennis Ritchie between 1969 and 1973 at Bell Labs, and used to re-implement the Unix operating system. This is a brief intruduction to C on Wikipedia. And C is my first computer language to learn. At winter holiday in 2014, I bored at home and browse the website. And the link Computer Language caused my attention, I clicked and I saw it, the C programming language. That's started of the story of me & C.

  At that time, I am just a high school student and I have no computer. So I install an app called c4droid for complie the C code and I print the first "Hello World!" in my life on my 500 RMB smart phone. I was happy at the time. I bought a book like "C xxx 0 to 1" to learn C and I find a lot of bugs in the book, haha ∩_∩. Everything is ok at the beginning, but as I learned, I became confused that I just can wrote console application and just implement some numeric problems (Yeah, I know, it's my fault, C is powerful -_-!). So I decide to learn other computer languages and I actually did it in the next two years (But not completely put down C) like C++, Python, Java, Html, Css, Js and so on. After learning these I found some advantages of C, simple, effective, powerful and flexible.

  • Simple doesn't mean easy to coding by C, but means the knowledge you need to know is a bit less about C itself.

  • Effective means C complied code is very efficient.

  • Powerful means C can operate directly on the hardware.

  • Flexible - C pointer (Ok, This will be a nightmare for many beginners @_@).

  And C has disadvantages too, like manually manage memory, null pointer and so on. But this all can be solved (you only need to be serious and serious =_=).

  Let the story continue. When I was learning Java, I saw, solve the array sorting problems using sort () just like:

        Array.sort (a);

  C has sorting function too, but I don't know at that time =_=.

        void qsort (void *base, size_t nmemb, size_t size,
            int (*compar)(const void *, const void *, void *));

  Ok, fine. I was very hard to write sorting algorithm (like shell sort, quick sort, etc) at that time is solved simpley O_O!.

  Oh, Sort, I knew it \ ∩_∩ /. This is first time I want to explore the function librarys. I have been using the C functions like printf, scanf, etc, and I don't know how it is implemented. So I read the source code and found a lot of C pointer. I don't know much about it. Then I learned assembly language (The first one to learn is 8086 asm) and knew pointer is just an address of memory and it is flexible (Now I like to use it ∩_∩ ).

                ---------
pointer --> 0x00|0x1122 |   Then:
                ---------       pointer = 0x00
            0x02|0x3344 |       *pointer = 0x2211
                ---------   Note:
            0x04|0x5566 |       This is little-endian
                ---------

  During this time, I found a lot of products written by C. And what attracts me the most is Linux a totally free operating system wirtten entirely by asm (bootloader and some optimization) and C (most of the system). Yeah, C is powerful system programming language (There is now a new system programming language called Rust, more safer than C. I don't know much about it. So, I won't discuss it here). And now I learning how to design an operating system and reading Linux 0.11 source code.

  The story is done. And I will list bellow who is more suitable to learning C even using C (just what I think):

  • The beginners. Learning C is not only learning how to programming but also learning the underlying knowledge of computer. And it will make you have a diffrent view of programming. This will be a good experience for beginners.

  • People who want to learn computer low level knowlage by programming.

  • People Who want to use Simple, Effective and powerful language for coding.

  • People who want to be a system programmer.

  • Someone like me (Ok, stop it -_-!).

  There is some resources about Programming, Linux, OS develop and some Binary hacks in my github. And welcome to visit and download.

  At last, attach a sentence that Linus said: Read the Fucking Source Code!!!

  All done. That's why I love C so much.

PS: 又又又,又要考英语四级了,写篇文章压压惊 o_o! (有任何语法错误,或者拼写错误,还请指出,谢谢!)

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 202,905评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,140评论 2 379
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 149,791评论 0 335
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,483评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,476评论 5 364
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,516评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,905评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,560评论 0 256
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,778评论 1 296
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,557评论 2 319
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,635评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,338评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,925评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,898评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,142评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,818评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,347评论 2 342

推荐阅读更多精彩内容