如何实践的Unix程序用C? [英] How to Practice Unix Programming in C?

查看:97
本文介绍了如何实践的Unix程序用C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过五年的专业的Java(以及在较小程度上的Python)编程,慢慢地感觉我的CS教育溜走,我决定拓宽了我的视野/一般用途走向世界,做一些事情,感觉更(以我)就像我真的有过的机器产生影响。我选择了学习C和Unix编程,因为我觉得这是许多最有趣的问题。

After five years of professional Java (and to a lesser extent, Python) programming and slowly feeling my CS education slip away, I decided I wanted to broaden my horizons / general usefulness to the world and do something that feels more (to me) like I really have an influence over the machine. I chose to learn C and Unix programming since I feel like that is where many of the most interesting problems are.

我的最终目标是能够做到这一点的专业,如果没有其他原因,而不是事实,我必须每周花40-50小时上支付账单的工作,所以它可能也也算是类型编码的我想要得到进步!当然,你不会聘请做的事情所以现在我对我自己的斜坡了你以前没有不,

My end goal is to be able to do this professionally, if for no other reason than the fact that I have to spend 40-50 hours per week on work that pays the bills, so it may as well also be the type of coding I want to get better at. Of course, you don't get hired to do things you haven't dont before, so for now I am ramping up on my own.

为此,我开始与K&安培; R,这是部分一个很好的资源,由于各地各章的练习小号$ P $垫。从那以后,我转移到计算机系统:一个程序员的角度来看,后面的在UNIX环境的高级编程。当我用这本书做了,我会读 unix网络编程

To this end, I started with K&R, which was a great resource in part due to the exercises spread throughout each chapter. After that I moved on to Computer Systems: A Programmer's Perspective, followed by ten chapters of Advanced Programming in the Unix Environment. When I am done with this book, I will read Unix Network Programming.

什么我错过了史蒂文斯的书是缺乏规划的问题;它们主要是记录功能,并提供实施例,具有以下几个结束章的问题。我觉得我会受益于挑战是要使用阿拉K&功放各章知识得多; R。我可以写为每个功能的一些测试程序,但是这是一个不太理想的方法为:(1)我想可能是动力不足比我都上升到一些外部挑战,以及(2)我自然会只想到用函数在已经发生,我认为的方式。

What I'm missing in the Stevens books is the lack of programming problems; they mainly document functionality and provide examples, with a few end-of-chapter questions following. I feel that I would benefit much more from being challenged to use the knowledge in each chapter ala K&R. I could write some test program for each function, but this is a less desirable method as (1) I would probably be less motivated than if I were rising to some external challenge, and (2) I will naturally only think to use the function in the ways that have already occurred to me.

所以,我想获得关于如何练习一些建议。很显然,我的第一选择是要找到一个具有Unix的编程挑战的一些资源。我也曾考虑寻找并试图促成一些开源的C项目,但是这是一个有点吓人,因为是在学习使用软件,然后学习codeBase的一些开销。唯一的开源的C项目,我能想到的,我经常使用的是Python的,我不知道如何容易,这将是上手的。

So, I'd like to get some recommendations on how to practice. Obviously, my first choice would be to find some resource that has Unix programming challenges. I have also considered finding and attempting to contribute to some open source C project, but this is a bit daunting as there would be some overhead in learning to use the software, then learning the codebase. The only open-source C project I can think of that I use regularly is Python, and I'm not sure how easy that would be to get started on.

这是说,我接受各种建议,有我还没有想到的。

That said, I'm open to all kinds of suggestions as there are likely things I haven't even thought of.

推荐答案

重塑了很多核心的Unix工具。其中大部分是(和现在)用C写的,所以他们要开始学习的好方法。根据你的技能,挑困难或更容易公用事业复制。

Reinvent a lot of the core Unix utilities. Most of these were (and still are) written in C, so they are a good way to start off learning. Depending on your skill, pick harder or easier utilities to copy.

试着写你自己的malloc。你会学到很多关于Unix和大量的C语言编程的为好。

Try writing your own malloc. You'll learn a lot about Unix and a lot of C programming as well.

谷歌为CS操作系统课程和做项目那里。许多学校都在公共网站上这些项目,所以你可以得到你所需要的一切。 这里是普渡大学的网站的链接。给壳牌项目一出手,就很难但真正的教育。

Google for CS operating system courses and do the projects there. Many schools have these projects on public websites so you could get everything you need. Here is a link to Purdue's site. Give the shell project a shot, it was difficult but really educational.

这篇关于如何实践的Unix程序用C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆