Just Enough C For Open Source Projects

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

10 comments

Comments 1 - 10 of 10 previous next Post a comment

  • guestf100 guestf100 8 months ago
    guest99d57: In C nothing is DWIM, in the sense that you can't declare your intent as much as you have to spell it out very explicitly. For example the simple task of accessing an array element. It won't for example check bounds to make sure you are getting an element (What you mean) it will access what ever is at that offset from the beginning of the array (What you said)!
  • guest4edc3a guest4edc3a 8 months ago
    slide 16: signed integer overflow is undefined and should never be used in real code. It happens to work on most implementations but C allows any result including a program crash.
  • guestd31d guestd31d 8 months ago
    slide 84: backslash-ampersand? In C?



    also, strncat and strncpy would be better intoductory string copying functions.
  • guest88a6 guest88a6 8 months ago
    Slide 13: static variables are initialized to 0.
  • guest0ca3 guest0ca3 8 months ago
    Please check the brackets in slide 8
  • guest99d57 guest99d57 8 months ago
    Nothing is DWIM? I think in C everything is DWIM.
  • guestf09d guestf09d 9 months ago
    guestd766, it looks like you're right. When I compile slide 29 with 'char *p = &buffer'), I get this error: 'initialization from incompatible pointer type'. But when I change it to 'char *p = buffer') it compiles cleanly. (I also wrap the whole thing in a main() function similar to his first 'hello world' example on slide 8, to make the code work, too.) This is on Mac OS X (Tiger) with gcc 4.0.1
  • guest125c7 guest125c7 9 months ago
    Slide 74, I think it should be double-quotes instead.



    char name[] = 'Bob';
  • guestd766 guestd766 9 months ago
    On Slide 29, is that not supposed to be 'char *p = buffer;'? instead of 'char *p = &buffer;'? Or do I vaguely remember that &a and a refer to the same when a is of array type (i.e. a, &a and &a[0] all are one and same)? ...
  • sgwong sgwong 10 months ago
    Thanks for the sharing. It is really a good introduction to c. I learn c in my college but almost forgot all the stuff because long time didn't use it. Thanks a lot!
Post a comment
Embed Video
Edit your comment Cancel

22 Favorites

Just Enough C For Open Source Projects - Presentation Transcript

  1. Just Enough C For Open Source Projects Andy Lester OSCON 2008
  2. Why this session?
  3. It's all for Michael Schwern Schwern is a brilliant programmer. An invaluable asset to the Perl community. He still doesn't know C, even though Perl is written in C.
  4. My assumptions • You're like Schwern. • Already a programmer, but raised on Ruby, Python, Java or PHP. • You don't know what it was like in the bad old days. • You want to work on open source projects.
  5. Goals • As much territory as possible • As fast as possible • Danger zones • Impedance mismatches
  6. Big differences • Nothing is DWIM. • All memory must be explicitly handled. • Nothing automatically does anything. • No strings extending. • No magic

Andy LesterAndy Lester, 11 months ago

custom

15392 views, 22 favs, 10 embeds more stats

More Info

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Go to text version
  • Total Views 15392
    • 15247 on SlideShare
    • 145 from embeds
  • Comments 10
  • Favorites 22
  • Downloads 509
Most viewed embeds
  • 110 views on http://lj-toys.com
  • 17 views on http://moskalyuk.name
  • 5 views on http://www.cheng-fu.com
  • 3 views on http://xss.yandex.net
  • 2 views on http://tumbleblog.ovidiudan.com

more

All embeds
  • 110 views on http://lj-toys.com
  • 17 views on http://moskalyuk.name
  • 5 views on http://www.cheng-fu.com
  • 3 views on http://xss.yandex.net
  • 2 views on http://tumbleblog.ovidiudan.com
  • 2 views on http://www.filescon.com
  • 2 views on http://andrew-dev.sharenow.com
  • 2 views on http://banking09.aloom.de
  • 1 views on http://static.slideshare.net
  • 1 views on http://www.rapidsharego.com

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories