Advice on How to Become a Programmer

Advice on How to Become a Programmer

An SbR reader writes:

"I want to learn to program computers:

  • What is your advice on becoming a good programmer?
  • How do you acquire the knowledge?
  • Is it necessary to know mathematics, specifically algebra, to be a good programmer?"

I receive one or two emails per month along these lines, so I've decided to share some advice on how to become a computer programmer. Notice I said "my advice" and not "the one and only way"; there are too many paths for one person to know them all. Here are some thoughts based on my experience:

Q: What is your advice on becoming a good programmer?

Everyone I've talked to has taken a different path. Programming is different from other engineering disciplines; if you want to become an electrical engineer you go to school, graduate, work for an engineering firm, and one day take a test and get licensed. Programming is different because people do it as a hobby; no one designs electrical subsystems for fun. This creates more possibilities for learning how to code.

Here are the elements I think are key:

  • Learn, learn, learn. You must have an insatiable appetite for knowledge. This usually means reading a programming book every few weeks in the early days, and moving on to more conceptual books like The Pragmatic Programmer , Code Complete , and Facts and Fallacies after 6-12 months of full-time coding. I can't stress the value of reading enough, nor the value of immersing yourself in code early in the process.
  • Transition into Concepts. Learning how to be a good programmer begins with learning logic concepts and language syntax; they are much easier to understand when taken together. But good developers quickly desire knowledge that transcends language syntax. Perl, PHP, Java, ColdFusion, ASP...all languages I used in my first 18 months as a professional programmer. What made me a good programmer was not my knowledge of each language, but my desire to understand and refine concepts like D.R.Y., the broken window theory, and code re-use.
  • Hang Out With Programmers Who Are Better Than You . As a guitar player, the most I ever learned about the craft of songwriting was when I was hanging out with people who were much better than I. The same goes for writing software. And due to this new-fangled internet thingy you don't even have to be physically present to be a part of the community: read programming blogs from the heavy hitters (Scott Guthrie , Rocky Lhotka , Dino Esposito , Scott Mitchell , etc...), check out programming forums, and look at other peoples' code. Reading source code can be a pain, but the more you see the more you will be able to identiy code that's easy to understand, and code that takes a PhD to figure out how they output "Hello World" to the screen.

Q: How do you acquire the necessary knowledge?

There are a number of possibilities:

  • A Software Apprenticeship . If you haven't ready my article on Software Apprenticeships , I recommend you do. The best (and I would argue the quickest) way to become a good programmer is to write code under the wing of an experienced developer who will teach you not only the basics, but the in-depth knowledge that takes years of experience to learn. I consider this option leaps and bounds above all others.
  • Learning while Doing. Want to learn to code? Get a job writing code. I don't care if you make $5 an hour; you will progress more in 1 month as a full-time developer than you will in a year of hobby programming. There's no better way to learn to program than to write code.
  • Books & Mags. Books and magazines have been key in my quest for programming knowledge. When I've apprenticed developers in the past, I use books as their primary source of basic knowledge, having them read 1-2 programming books per month, while teaching them more advanced techniques in person.
  • College. Having gone this route myself I am well aware of the limitations of the U.S. College system in preparing students for a career in computer programming. Preparing them for a career in determining little-o and big-O notation, sure, but actually writing code from the get go? Nope. College is great for high-level theory, but work experience trounces it when it comes to learning software development.
  • Tech school. I've only worked with one programmer who went to a technical school and she had good knowledge of language and coding concepts, but not a ton of theory or design knowledge. As a result, her code was utilitarian and used a lot of brute-force, but was often not well-designed or easily maintainable. There's obviously a balance between not enough practical knowledge (college) and not enough theoretical knowledge (tech school). I am using a very narrow sample, so don't take this as a blanket judgment of tech schools. Perhaps an SbR reader with more experience in this area can enlighten us. As an aside, the network administrators I've worked with from tech school have been well-trained and great to work with. Perhaps the nuts and bolts of networking are better suited for such a practical teaching approach.

Q: Is it necessary to know mathematics, specifically algebra, to be a good programmer?

Quite simply, no; it's not necessary to know math in order to be a programmer.

If you're developing games, then mathematics and physics play a large part, but building an invoicing application does not require much beyond basic addition and subtraction.

However, from personal experience, people who have an easy time learning mathematics and enjoy solving logic problems (be they algebra or how to move Mount Fuji ), tend to learn code quicker and enjoy it more in the long run. It takes a twisted mind, my friends.

For more information on becoming a good programmer, check out the books I mentioned above, as well as my article Personality Traits of the Best Software Developers , and my series on Becoming a Better Developer (links located in the right navigation).

Feel free to chime in with your experience of becoming a programmer.
About Me: My name is Rob Walling and I'm a software developer living and working in Los Angeles. I write about hiring, managing, and motivating software developers, in addition to random outbursts on improving development skills and software startups. My consulting firm, The Numa Group , provides .NET development for clients throughout the United States. If you are in need of a .NET developer or architect, drop me a line .


原文:
http://www.softwarebyrob.com/archive/2007/03/20/Advice_on_How_to_Become_a_Programmer.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
由于 MP4 是一种多媒体格式,因此在 C 语言中播放它需要使用第三方库。其中一种常用的库是 FFmpeg。下面是一个简单的 C 程序示例,使用 FFmpeg 库播放 MP4 视频: ``` #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libswscale/swscale.h> int main(int argc, char *argv[]) { AVFormatContext *pFormatCtx = NULL; AVCodecContext *pCodecCtx = NULL; AVCodec *pCodec = NULL; AVFrame *pFrame = NULL; AVPacket packet; int videoStream, i, numBytes; uint8_t *buffer = NULL; struct SwsContext *sws_ctx = NULL; av_register_all(); if(avformat_open_input(&pFormatCtx, argv[1], NULL, NULL) != 0) return -1; if(avformat_find_stream_info(pFormatCtx, NULL) < 0) return -1; av_dump_format(pFormatCtx, 0, argv[1], 0); videoStream = -1; for(i = 0; i < pFormatCtx->nb_streams; i++) if(pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { videoStream = i; break; } if(videoStream == -1) return -1; pCodecCtx = pFormatCtx->streams[videoStream]->codec; pCodec = avcodec_find_decoder(pCodecCtx->codec_id); if(pCodec == NULL) { fprintf(stderr, "Unsupported codec!\n"); return -1; } if(avcodec_open2(pCodecCtx, pCodec, NULL) < 0) return -1; pFrame = av_frame_alloc(); numBytes = avpicture_get_size(AV_PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height); buffer = (uint8_t *)av_malloc(numBytes * sizeof(uint8_t)); sws_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height, AV_PIX_FMT_RGB24, SWS_BILINEAR, NULL, NULL, NULL); avpicture

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值