学了七年多的本专业,但却从没开发过一个实际的应用,我指的是那种可以release。一直以来都是写在命令行下运行的小程序,学的也不是应用层的东西,都是系统层的编程,总觉得少些什么。我要改变这一现状,利用些时间做些实际的东西出来。最开始想用Qt开发Linux上的应用程序,正好练练我学的Unix编程,但同学说Qt已经被Nokia遗弃了,不会有什么前途。的确,还是学些有用的东西,以后说不定能用上。之前有段时间看了些Android编程,后来被我扔了。Android和iOS上的应用已经多如牛毛了,现在追赶估计不怎么有利可图了。打算试试Windows Phone,ms去年才开始发力移动市场,wp的机会应该比较多。没学过C#,不过现学应该不难。已经入了两本书,一般C#,一本Windows Phone。已经开始看MS提供的教学视频和文档,so far so good。先构思一些想做的app,把应用程序的界面框架搭好,剩下的功能就边学C#边实现。当然,Unix的东西我不会放,得深入学习,现在写的都是小打小闹的程序,大多数是APUE书上的例子或习题。我比较想往系统层次的编程发展,比如写服务器程序等,需要找些项目来试试,不能再停留在书本上,不然不会有多少长进。
When I was trying to run the program in Figure 10.23 in APUE2e using Ubuntu command line, after I typed Ctrl+C twice, the program terminated, which meant that the second SIGINT signal generated was not caught by the signal handler (sig_int) installed previously. This was different from the book’s running results. So I added a checking line in sig_int to check whether the signal handler of SIGINT was changed after sig_int was called. The running result revealed that the signal handler of SIGINT has been set to default SIG_DFL, which meant the handler installed previously was called only one time. To make the program catch the SIGINT signal continuously, an additional call to signal had to be called in sig_int: signal(SIGINT, sig_int). I checked the Ubuntu manual for signal function and it said that:
If the disposition is set to a function, then first either the disposition is reset to SIG_DFL, or the signal is blocked (see Portability below), and then handler is called with argument signum. If invocation of the handler caused the signal to be blocked, then the signal is unblocked upon return from the handler.
以前没找过实习,没找过工作,没有任何这方面的准备经验,于是从零开始准备。在网上看了很多帖子,大部分是别人写的面经或实习总结,学习之。为了对付面试,找了本数据结构的书,把各种数据结构和常见算法都复习了一遍。买了本CareerCup出的书《Cracking the Coding Interview》,并把里面比较重要的章节里的题都做了一遍。有关data structure的有arrays and strings,linked lists,stacks and queues, trees and graphs。有关algorithm的有sorting and searching,recursion and dynamic programming。其他的如scalability,memory limits,testing,C,C++,Java,threads and locks。还有一些章节没写没看,随后得补上。Data structure的东西一定要熟悉,并知道如何应用它们解决一些常见问题,数据结构的书一般也会给出一些常用的应用例子,值得好好看看。Algorithm部分了解一些常用的算法,尤其是排序和搜索。此外递归应用和动态规划会经常用到,把问题细化简单化。其他的题是针对特定领域或语言的,一般不需要coding,但比较注重解决问题的思路。