Tuesday, July 26, 2005

Programming advice from John Carmack

I emailed John Carmack (technical director/co-owner of Id software) and asked him for some advice for a beginner programmer (read: me), and he gave a very thorough, thoughtful and helpful response, and I feel that other people should hear what he has to say.

So, without further ado, the email from JC;

When I started, computers couldn't do much more than simple arithmetic and if statements -- my first computer had 4k of memory. How I learned probably isn't very relevant, because there are so much better resources available today.

Don't expect it to be easy, you will have to work at it. Get a few more books from the library that cover beginning programming to go with the ones you have -- sometimes a different author explaining the same thing will help a concept click. Go through all of them at least twice. Try to do every problem and exercise, don't just read them and think you get it. Lots of people that want to program will talk a lot about programming, but not actually write that many programs. You should write hundreds of programs

If you want to get good at something you need to focus on it, which means choosing to exclude some other things from your life. Keep a little journal of what you are working on each day, you may find that you aren't applying yourself all that hard. Learn something new every single day.

Avoid "cookbook programming", where you copy and paste bits of code that you have found to make something work. Make sure you fully understand what everything it actually doing, and that you are comfortable applying the techniques in other situations.

It isn't a bad idea to start in an environment that give you more exciting feedback, like visual basic, flash, or javascript, but you should try and "find the excitement" in even the most simple data processing tasks. There are layers and layers of things going on in just compiling and running the simplest program that are worth investigating.

Pay attention in school to the math classes. It is more important to be able to do basic algebra and trigonometry extremely well than to sort of get by in higher math classes. You should be able to ace all the tests and teach other people if you truly have a complete understanding of the subjects.

John Carmack

7 Comments:

Blogger Unknown said...

His bias towards understanding trig comes from his background in graphics.
For graphics though, trigs value cannot really be overstated.
Know the implications of cross products of matrices. Know angle addition formula.
DO NOT BLINDLY COPY 3D TRANSFORMS CODE LIKE EVERYONE ELSE. It will bite you in the ass. Pretend the answer has never been found and you're the 1500's physicist on the edge of a breakthrough. Try to invent the solution.

If you have calculus under your belt you can derive a lot of the formulas used strictly algebraically within programming, and the intuition goes a long way.
However if you don't, don't worry about it too much.

I am also a beginner, and my addition to his advice is to stay away from libraries. Implement every single algo yourself. Even asinine stuff like parsing an image file into memory, sorting, or vectorized math functions. Libraries are a crutch, and reading documentation is a nightmare for beginners. Over time you will realize you've ended up making your own sets of libraries.

ALSO. an Apple2 emulator is a lot of fun. I highly recommend.

3:17 PM  
Blogger Alan De Smet said...

There is a lot of value to implementing things yourself. It's incredibly educational and it's often a lot of fun. It's hard to overemphasize that. As Carmack says, write hundreds of programs! And attacking fun little problems is an awesome place to start.

Libraries are awesome, and the basis for nearly every large scale software project. Rolling your own is super educational, so totally do that, especially if it sounds fun. But it can occupy all of your time. When you want to do larger projects, using a widely used library with a good history behind it will give you more time to work on the higher level problems and less time figuring out why some dull but incredibly irritating to track down edge case is screwing you over. Also, using existing libraries teaches a lot about API design, both good and bad.

5:18 PM  
Blogger Alan De Smet said...

Oops, just noticed the date on the original post. I'm guessing you don't quite need the advice anymore. :-) Perhaps it will be of use to other people.

5:20 PM  
Blogger Unknown said...

i seem to also have not noticed the date...

1:13 AM  
Blogger تسويق 01016261727 said...

مستودعات تخزين عفش بالرياض

2:57 AM  
Blogger ماليكاا said...

This comment has been removed by the author.

2:12 PM  
Blogger ماليكاا said...

شركة تخزين اثاث بالرياض

شركة تخزين اثاث في الرياض تقوم بتخزين الاثاث شاملا كل
اجزاءه وانواعه سواء الاثاث
الخشبي او المفروشات والاجهزة الكهربائيه وسجاد وادوات مطبخ وزجاج وتحف ونجف وغيره
فالشركة متخصصه في هذا المجال ولديها خبره لسنوات فيه كما ان الشركة دائما تسعى لتطوير نفسها
ومتطلعه لكل جديد في هذا المجال لمعرفة أحدث التقنيات المستخدمه سعيا منها لتوفير الجديد في مجال
تخزين العفش داخل الشركه كي تستطيع تقديم أفضل الخدمات للعملاء وإرضاء

لدي شركتنا جميع الالات والمعدات الحديثه التي تسهل مهمة نقل وتخزين الاثاث منها الونش الهيدروليك وهو الونش الذى من خلاله يتم انزال الاثاث ورفعه لادوار عُليا دون إستخدام السلالم الضيقة أو الخوف من خدش او تلف اى من العفش حيث يتم وضع المنقولات على المنصه الخاصة بالونش دون اللجوء الى استخدام الحبال فى ربط الاثاث حتى لا يتم خدش المنقولات او ترك اى أثر عليها ويتم رفع الاثاث أو إنزاله بنفس الطريقة . مما يؤدى ذلك إلى إتمام عملية النقل بطريقة سريعة جداً ومضمونة فى الحفاظ على سلامة منقولاتكم بأمان وحذر. هدف شركة شركة تخزين اثاث في الرياض السعى دائماً لتحقيق كل ما هو افضل وأسهل لعملائنا الكرام لأن راحتكم هى هدفناا
-عمالة فنية متخصصة فى مجال النجاح
- تغلييف جميع الوحدات بكافة انواع الخامات و الوسائل المتعلقة بعمليات التغلييف و ذلك حسب رغبة العميل
-الحفاظ الكامل على جميع المنقولات من الخدش او التجريح او التكسير
نوفر لجميع عملائنا خدمة فك و تركيب و تغليف الاثاث و المنقولات للحفاظ عليه
من أى خدش او تجريح أو تكسير أثناء عملية نقل الاثاث
شركه نقل اثاث بالرياض
تقوم شركة نقل اثاث بالرياض باستخدام أحدث الأساليب والمعدات التي تساعد
على نقل العفش بدرجة عالية من الجودة وبأسعار تنافسية جدا مقارنة بغيرها من شركات نقل العفش والأثاث الأخرى.

شركة تخزين اثاث بالرياض
https://elsarhgroup.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D8%AE%D8%B2%D9%8A%D9%86-%D8%B9%D9%81%D8%B4-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

2:32 PM  

Post a Comment

<< Home