Qualification > University

My first contribution: Introduction to computing

<< < (3/5) > >>

Dasith:

--- Quote from: 0kelvin on October 28, 2011, 03:10:47 am ---Everything it's in C because the course is done with C programming language. But you are right, for some problems such as counting numbers or sequences of numbers, better ommit the #include int main() thing and leave the essential algorithm itself.

I've seen a different method of teaching which is to use Java and object orientation programming right from the beginning, but that wasn't my case.

By the way, I'm writing some annotations (in portuguese version first), because there are things that need to be improved. For ex: I'm thinking about adding a chapter with ~20 example problems with commented code (make the union of two arrays, calculate Taylor Series for cos function, do the sum of a sequence of factorials, cash machine program to count notes, etc).

--- End quote ---

An algorithm should be simple enough to understand without annotations , & should not limit it self to one single programming language (in fact it shouldn't be a programming language @ all ) Anybody should be able to develop a program by understanding the logic of an algorithm & not the syntax.

benk:
I agree with Dasith  ;)

0kelvin:
Critics welcomed!

Revised almost everything:

- Removed all comments about C syntax, those are in a separated chapter now
- Solved confusion between programs x algorithms. Replaced ready to compile programs with short algorithms
- Better indentation and variable names in some algorithms
- Rethinked a bad practice: explaining programs in plain words. It's now documented code, or algorithms with short comments
- More examples were needed
- Rewriten some chapters from ground up
- New chapter: search and sort
- New chapter: solved exercises
- New chapter: pointer arithmetic, replaces the chapter about pointers and arrays. It's a placeholder chapter, it's pretty much empty by now.

[edit] Corrected one mistake:

We call a function like this function(array); or like this function(&array[0]); despite both have the same effect, it's wrong to say "array is a pointer". Not quite, but to fully understand that I have to write the chapter about pointer arithmetic.

benk:
thanks 0kelvin! it really helps!

0kelvin:
It's been two years since I first published this... wow!

Some corrections:

Tracking algorithms with pencil and paper: addicted -> spoiled. Under that context, the word "spoiled" fits better.

Introduction to recursive functions: rewrote the description about recursion vs iteration in finbonacci's example.

Additions:

Ternary operator: translating "if else" into expressions using the conditional operator (question mark)

Future additions:

Linked lists, stack, queue, binary tree, more examples of recursive functions, pointer arithmetic, structs.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version