Learn C in two minutes

Learn C in two minutes.

I still think no one should be writing applications in C these days. Only on devices with limited resources it makes some kind of sense. Otherwise the overwhelming (un)necessary boilerplate, memory management, chasing pointers and other bookkeeping is just distracting. Wouldn’t you rather concentrate on the application logic?

10 comments ↓

#1 ossi1967 on 11.22.06 at 7:48 pm

I dont really agree. Sure its easier to use [put your favourite language here] instead of messing with C. It’s faster. But this is an advantage only for the developer.

On the other hand, users do benefit from C: They don’t need to have an additional language-specific framework installed. And even on modern desktop-PCs the memory/speed factor still counts as soon as several applications run side by side.

As the average project usually has more users than developers, I think that even a small advantage for users multiplies and therefore outweighs any additional comfort another language may have for developers.

Besides, C still stands for a certain kind of portability: Any existing application can be ported to a device with limited resources (mobiles, Nokia 770, …) more easily if written in C; not because C as a language is highly portable (which it isn’t), but because the code will be smaller and more likely to run in this kind of environment. From this perspective you could even say C is more future-proof than other languages.

#2 Anonymous on 11.22.06 at 11:25 pm

> … But this is an advantage only for the developer.

Not true. Company X saves lot of money when code is written in less time with less resources and less bugs.

#3 ossi1967 on 11.23.06 at 2:41 am

if Company X is the developer, that is. – in this case, of course, my statement applies.

#4 tkos number #1 fan on 11.23.06 at 3:55 am

You are weak.

#5 Anonymous on 11.23.06 at 5:14 am

> if Company X is the developer …

sorry, no. nobody in the known universe speaks about company as a developer. developers are developers and companies are companies.

#6 Gustavo Sverzut Barbieri on 11.23.06 at 3:14 pm

I totally agree with Tommi.

Most applications would have much more correct business logic and more useful features or better design if developers could focus on that instead of doing memory bookkeeping, reference count or reimplementing some concepts in C.

Points related to speed, memory or other resources are not really valid, since it would be more sane to put efforts on optimization of higher level languages and libraries and have it good everywhere. Languages/VMs like Python, Perl and Ruby are barely optimized but runs fine on machines as “poor” as the Nokia 770.

Actually, what makes PyGTK bindings slow to start is the dynamic linker (which Red Hat have a patch to fix) and how the C-wrapper is done, not the python language/vm-implementation itself.

Sure, we could use some help on PyPy or Parrot in order to do some optimizations, some as simple as loop unrolling or coalescing to dead code elimination, but also for Just-in-Time compilers. People are working on it, we may see some improvements soon.

#7 ossi1967 on 11.23.06 at 7:07 pm

> nobody in the known universe speaks about
> company as a developer.

Your universe seems to have potential for further expansion.

If a company pays for inhouse development (as the original case suggested), it is the developer. Legally.

#8 Tommi Komulainen on 11.24.06 at 8:08 am

Developers! Developers! Developers! … please don’t quote me on that 🙂

> If a company pays for inhouse development (as the original case suggested), it is the developer. Legally.

Well, no. The company may have paid for the development and own the copyright, but it is not the developer/author. For that you need a real person.

#9 Anonymous on 11.24.06 at 9:24 am

>The company may have paid for the development
>and own the copyright, but it is not the
>developer/author. For that you need a real person.

following this logic, companies wouldnt produce any products or offer services. never.

anyway, this is all pointless. even if we’d agree that the company is not the developer, what i said before is still valid:
it’s one company that saves some ressources, but a lot of end users who need to install mono only to have a desktop search. i’d rather see the companies invest more so users can live comfortably with less.

#10 Tommi Komulainen on 11.26.06 at 12:03 am

@ossi:

And I’d rather companies invest more so that I don’t have to use so much time in cleaning up spam, work to protect from viruses and malware, use so much electricity and gasoline, pay so much for gasoline and bus fares, etc. Yes, it would be very nice.

Which universe was this about again?

You make it sound so simple and straightforward, except that you’re ignoring the time it takes to do the actual development. There’s MenuetOS < http://www.menuetos.net/ > which fits on a single floppy so it’s significantly “less” You are a happy MenuetOS user, right? If not, why not?