Earlier quoted context omitted.
If you want to learn C, K&R is the right way to do it. C: A Reference Manual is excellent and is probably the only other C book you need, but only if you are already a C programmer, and only for what the title implies: reference.
In addition to K&R I always recommend "C Interfaces and Implementations: Techniques for Creating Reusable Software" to anyone who is picking up a long-term hobby or career in C. Someone on this forum recommended it to me. It's been invaluable assisting me in refactoring major portions of a legacy code base. In a way, it's helped me bring the DRY principle to our C application. I write in C every single day though and…
A Boggling Return to C
41–50 of 88 posts
Re: A Boggling Return to C
#42It's funny, because I recently tackled this exact same problem in Python as well. And guess what my first step was? Writing a prefix tree implementation, in order to use the exact same approach the author took in C. It never seriously occurred to me to do it any other way. It may be because I recently got into C as well after spending years with only Python, but honestly I think I would have done the same thing befor…
from Bio.trie import trieRe: A Boggling Return to C
#43maybe the biggest improvement in c programming over the last decade is valgrind, making purify-like debugging available to everyone. it's completely removed a whole class of annoyingly hard to fix bugs from my code.
Tools only created to solve the lack of safe constructs in C. C made lots of sense in the context it was developed, but the world would be better if we had safer systems programming languages. Valgrind, purify and friends are required to C, the same way Java requires IDEs, to improve language usability. Have said this, the new trend in having static analysis tools integrated in the development process, like Clang, Ec…
We have "safer" languages but our systems and tools remain in C. Given the intense competition in software, there must be solid reasons C remains the foundation of computing.
Re: A Boggling Return to C
#44Oh boy. This looks like the type of C code I write. Could some experienced C programmer please point out what parts are cringe inducing ?
Re: A Boggling Return to C
#45maybe the biggest improvement in c programming over the last decade is valgrind, making purify-like debugging available to everyone. it's completely removed a whole class of annoyingly hard to fix bugs from my code.
Tools only created to solve the lack of safe constructs in C. C made lots of sense in the context it was developed, but the world would be better if we had safer systems programming languages. Valgrind, purify and friends are required to C, the same way Java requires IDEs, to improve language usability. Have said this, the new trend in having static analysis tools integrated in the development process, like Clang, Ec…
Why attack C at all? Why not instead convince us of the merits of another language?
There are great tools around. I agree with that. Which parts of Clang do you like best?
Re: A Boggling Return to C
#46Earlier quoted context omitted.
Tools only created to solve the lack of safe constructs in C. C made lots of sense in the context it was developed, but the world would be better if we had safer systems programming languages. Valgrind, purify and friends are required to C, the same way Java requires IDEs, to improve language usability. Have said this, the new trend in having static analysis tools integrated in the development process, like Clang, Ec…
C is popular, good enough, portable, and fast. Skilled C programmers do not need profilers, bounds checkers and memory leak detectors. They help some people, though, no doubt. When size and speed matters, as in Operating Systems, C has won and continues to win the survival of the fittest competition. Almost all the programs I use are C (and/or C++): bash, linux, perl, firefox, awk, sed, grep, apache, mysql, etc. I as…
"Skilled C programmers do not need profilers, bounds checkers and memory leak detectors."
Skilled programmers use profilers because the alternative (guessing) is a poor strategy for diagnosing poor performance. And no skilled programmer would spurn a useful tool like a bounds checker or memory leak detector, because nobody is perfect and these tools save immense amounts of time by pointing you straight to the problem.
Re: A Boggling Return to C
#47I'm a student who learns C#, Java, Php, javascript... at school. I bought "C: A Refence Manual" to learn this summer... Hope it will make me a better programmer.
If you want to learn C, K&R is the right way to do it. C: A Reference Manual is excellent and is probably the only other C book you need, but only if you are already a C programmer, and only for what the title implies: reference.
Re: A Boggling Return to C
#48"By way of comparison, the Python program takes 1.5 seconds to run, so that's about a 10X speedup." Only tenfold? Interesting. While Python is surely not the slowest interpreted language around, a result like that borders on the performance of Java. That seems unlikely, especially given the fact that Python version uses worse algorithm. I would think about how big is the portion of time eaten by I/O - that is, actual…
I haven't seen the "Java is slow" chestnut in years.
Re: A Boggling Return to C
#49maybe the biggest improvement in c programming over the last decade is valgrind, making purify-like debugging available to everyone. it's completely removed a whole class of annoyingly hard to fix bugs from my code.
Re: A Boggling Return to C
#50Earlier quoted context omitted.
Tools only created to solve the lack of safe constructs in C. C made lots of sense in the context it was developed, but the world would be better if we had safer systems programming languages. Valgrind, purify and friends are required to C, the same way Java requires IDEs, to improve language usability. Have said this, the new trend in having static analysis tools integrated in the development process, like Clang, Ec…
C is popular, good enough, portable, and fast. Skilled C programmers do not need profilers, bounds checkers and memory leak detectors. They help some people, though, no doubt. When size and speed matters, as in Operating Systems, C has won and continues to win the survival of the fittest competition. Almost all the programs I use are C (and/or C++): bash, linux, perl, firefox, awk, sed, grep, apache, mysql, etc. I as…
Programmers who don't use profilers write slow programs (even though they spend many hours "optimizing" them).