What is the gap between being a 10-year windows programmer and a 10-year Linux programmer

Bald brother 2020-11-11 11:47:18
gap 10-year year windows programmer

If a programmer has never been in linux,unix Under the development of the program , Has been windows The following development program , Same job 10 year , Most of the time with in linux,unix The following development 10 The level of programmers in 2000 will be very different .

I didn't write this article to belittle windows The following developers , do windows Developers may not feel comfortable watching it , That's not what I mean , I'm just talking about my own feelings ,

I first started learning programming in windows Below , What I learned is VB, Later, I turned to VC++, It was VC6.0, do windows The following development 5 It will be transferred to linux The following is the development of , Start in linux Now when we do development , I've done a lot of it windows The following items , stay linux The following development is really better than I am in windows I learned a lot from the development below , From the open source code has absorbed the rich nutrition , I'm not saying I'm a master , It's just that linux Let's learn , You're going to improve faster .

But I need to emphasize , What I'm talking about here is “ In most cases ”, That is to say “ In the same diligence , The same level of effort , The same basic knowledge , Same working years , It's also about application development ” Under the circumstances , If it's not right , I hope you can express your opinions below .
Maybe you'll be surprised , Why does this happen ?

Listen to me slowly !

First of all : Closed source and open source


windows The following procedures are basically closed source code , especially 10 Years ago , stay windows It can be said that no open source software is available , It's much better now than before , quite a lot linux The following open source programs are ported to windows The following to ,

however linux The following open source programs add more .
before windows Let's write the application , Need to use MFC,WINSOCK,ODBC,FILE IO etc. , The main places to find information are Microsoft official documents MSDN, There is only a MSDN Is the most complete place , It's a third party website vckbase, CSDN, codeproject These websites .

But the code from these sites , It's all for a specific small function , Code written to demonstrate how to implement this small function , The level of writing code varies , Different styles , It's all some demo Small things of nature , A simple study of the code can be integrated into their own applications .

How to build a complete application , Well structured applications , You won't be taught , It's all up to you to feel for yourself , Get promoted by doing projects in the company , Until the project is commercial , Later maintenance changes code , Looking back at the code I wrote , It's only when you realize that , How unreasonable the code structure I wrote at that time ,

It's so difficult to maintain and modify . If you can't find the information you need on the Internet , You can only think of some implementation methods by yourself , Although the function is completed , Maybe I have a sense of accomplishment when I finish , But that day, you suddenly find that someone has implemented this function , And in a clever way ,

Then you suddenly realize , Why didn't I realize that ? stay windows The following development , It's not easy to find open source projects that can refer to similar functions you want to complete . It's all on your own . But in linux The following is different , When you're developing a new project ,

Think about any open source projects that do the same thing , Can be downloaded to the source code to do a reference , The algorithm of , Do a detailed understanding of architecture design , Then when I develop it, I will be more handy , You can avoid mistakes that others have made , Less detours .

second : The amount of knowledge to learn is different


Study window Under the development of , You need to learn a lot Windows API, By the end of 2009 year 9 month ,Windows total API The number of 2258 individual , also Windows API There are many parameters , Parameter types are complex , It's not easy to remember so many things ,

At least as well as learning a foreign language , CET-4 requires a total vocabulary of 4500 Word . As one can imagine , Learn so much API usage , How hard is it . So learning linux Next , How much to master API Well ? linux Kernel under API,

It's just a matter of counting them all down 335, But these kernels are API You can only use it when writing drivers , You can't use the kernel to develop applications API, Developing applications API Basic it is C Of API, and Linux be-all C Of API The number is 279 individual ,

That is to say, you just have to lose control of 300 One of the API, You can be successful in linux The following is the development of the application , Compared with learning windows The pile below API Come on , Can you save a lot of time to learn other knowledge ?

Let me give you a simple example :

Above these API yes windows The following file operation API, The total is 8 individual , have a look CreateFile The parameters of ,

( __in LPCTSTR lpFileName, __in DWORD dwDesiredAccess, __in DWORD dwShareMode, __in LPSECURITY_ATTRIBUTES lpSecurityAttributes, __in DWORD dwCreationDisposition, __in DWORD dwFlagsAndAttributes, __in HANDLE hTemplateFile);

The meaning and type of these parameters , How long does it take you to master ?
We're looking linux The following file operation C Of API There are several ,
fopen, fwrite, fread, fclose There are four , Let's look at the parameters
FILE fopen( const char filename, const char *mode ); Two parameters , How much time do you need to master .
Maybe some people will give their opinions , Say it C Of API Can also be in windows Next run ? you 're right , Is it possible to be in windows Run below , But you can master the cross platform C Of API Is that enough? ? Is it all in windows The following developers like to use C Of API, Don't use windows Of itself API Do you ? You don't need to learn windows Below API Do you ? Your colleagues used CreateFile This function , Don't you need to understand him ? Don't you need to look at your colleagues' code ? Don't you need to maintain code that someone else has written ? 
If you still think so , I can give you other examples ! Take the example of creating a thread , Here is 2 It's in windows Here is an example of creating a thread , The first is to create safe worker threads , The second is to create interface threads , There's another function that I didn't put down , It's about creating unsafe worker threads , We can refer to the specific principle 《win32 Multithreaded programming 》,
author :( beautiful )Jim Beveridge & Robert Wiener Writing , Hou Jie translate This book .

// Thread safe worker thread functions
uintptr_t _beginthreadex
( void *security, unsigned stack_size, unsigned
( *start_address )( void * ),
void *arglist, unsigned initflag, unsigned *thrdaddr );
// Interface thread function HANDLE WINAPI CreateThread
( __in LPSECURITY_ATTRIBUTES lpThreadAttributes,
lpStartAddress, __in LPVOID lpParameter, __in DWORD
dwCreationFlags, __out LPDWORD lpThreadId );

do windows The following development , We must master the above two functions for creating threads . Yes, of course , You can also just need to know _beginthreadex Come on windows Take it all , But when you see someone else's code using CreateThread When , Don't get used to it ,MFC A lot of people use it CreateThread. Master so much API Tired ? Just as tired as reciting words when you were at school .
Now I'm going to list linux Here's the function to create the thread

int pthread_create( pthread_t *restrict thread,
const pthread_attr_t *restrict attr, void
*(*start_routine)(void*), void *restrict arg);

See? , You just need to know that .
C Of API Most of them can be windows Run below , stay windows Let's learn to develop , Not only do you have to understand C Of API, You need to spend more time learning windows Of the system itself API, You may have to say ,

So it should be windows So much to learn next , What I'm going to say is that you master API A lot , But for a piece of software , The most important thing is the system architecture , data structure , Good architecture design , For later code maintenance , Function modification is crucial ,

This is the code that novices write , In the end, even his own hard to maintain the reason , Let alone let others defend it .
API It's equivalent to basic skills , System architecture , Data structure is an internal skill , The faster you practice basic skills , The more time we have to practice our internal skills . Practice your internal skills , We need to learn from experts .
I'm learning windows The following development and application of the road , We need to master more API, After learning , Let's get narrower and narrower , There is no particularly rich open source code to refer to , The rate of improvement is slow .
Gratifying is that , Now many open source projects have been transplanted to linux below , There are also a lot of open source projects that are cross platform , What is commonly used is wxWidget Interface library , Usage is similar. MFC, also qt This interface library ,

Is also very strong , And open source 3D engine OGRE, The architecture is very good , It's worth learning the architecture model . however linux The following open source libraries are much better than windows The following open source libraries are much richer ,

We can easily learn data structure from the master code , Learning design mode , Learn programming skills , This is the same. linux The following programmers , It might be better than windows The following are the reasons for the higher level of programmers

After all, I'm well-informed , Familiar with 300 tang poems , Can't write poetry can also sing ah !

If you want to turn linux But I don't know where to start , You can join the group 973961276 Study with you linux. Learning through train >>c/c++  linux Server senior architect

本文为[Bald brother]所创,转载请带上原文链接,感谢

  1. 【计算机网络 12(1),尚学堂马士兵Java视频教程
  2. 【程序猿历程,史上最全的Java面试题集锦在这里
  3. 【程序猿历程(1),Javaweb视频教程百度云
  4. Notes on MySQL 45 lectures (1-7)
  5. [computer network 12 (1), Shang Xuetang Ma soldier java video tutorial
  6. The most complete collection of Java interview questions in history is here
  7. [process of program ape (1), JavaWeb video tutorial, baidu cloud
  8. Notes on MySQL 45 lectures (1-7)
  9. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  10. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  11. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  12. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  13. 【递归,Java传智播客笔记
  14. [recursion, Java intelligence podcast notes
  15. [adhere to painting for 386 days] the beginning of spring of 24 solar terms
  16. K8S系列第八篇(Service、EndPoints以及高可用kubeadm部署)
  17. K8s Series Part 8 (service, endpoints and high availability kubeadm deployment)
  18. 【重识 HTML (3),350道Java面试真题分享
  19. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  20. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  21. [re recognize HTML (3) and share 350 real Java interview questions
  22. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  23. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  24. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  25. RPC 1: how to develop RPC framework from scratch
  26. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  27. RPC 1: how to develop RPC framework from scratch
  28. 一次性捋清楚吧,对乱糟糟的,Spring事务扩展机制
  29. 一文彻底弄懂如何选择抽象类还是接口,连续四年百度Java岗必问面试题
  30. Redis常用命令
  31. 一双拖鞋引发的血案,狂神说Java系列笔记
  32. 一、mysql基础安装
  33. 一位程序员的独白:尽管我一生坎坷,Java框架面试基础
  34. Clear it all at once. For the messy, spring transaction extension mechanism
  35. A thorough understanding of how to choose abstract classes or interfaces, baidu Java post must ask interview questions for four consecutive years
  36. Redis common commands
  37. A pair of slippers triggered the murder, crazy God said java series notes
  38. 1、 MySQL basic installation
  39. Monologue of a programmer: despite my ups and downs in my life, Java framework is the foundation of interview
  40. 【大厂面试】三面三问Spring循环依赖,请一定要把这篇看完(建议收藏)
  41. 一线互联网企业中,springboot入门项目
  42. 一篇文带你入门SSM框架Spring开发,帮你快速拿Offer
  43. 【面试资料】Java全集、微服务、大数据、数据结构与算法、机器学习知识最全总结,283页pdf
  44. 【leetcode刷题】24.数组中重复的数字——Java版
  45. 【leetcode刷题】23.对称二叉树——Java版
  46. 【leetcode刷题】22.二叉树的中序遍历——Java版
  47. 【leetcode刷题】21.三数之和——Java版
  48. 【leetcode刷题】20.最长回文子串——Java版
  49. 【leetcode刷题】19.回文链表——Java版
  50. 【leetcode刷题】18.反转链表——Java版
  51. 【leetcode刷题】17.相交链表——Java&python版
  52. 【leetcode刷题】16.环形链表——Java版
  53. 【leetcode刷题】15.汉明距离——Java版
  54. 【leetcode刷题】14.找到所有数组中消失的数字——Java版
  55. 【leetcode刷题】13.比特位计数——Java版
  56. oracle控制用户权限命令
  57. 三年Java开发,继阿里,鲁班二期Java架构师
  58. Oracle必须要启动的服务
  59. 万字长文!深入剖析HashMap,Java基础笔试题大全带答案
  60. 一问Kafka就心慌?我却凭着这份,图灵学院vip课程百度云