| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Don't You Think C/c++ Is Annoying?
Started by Ho-oh'sRealm, Nov 05 2009 08:27 AM
18 replies to this topic
#11
Posted 07 November 2009 - 01:11 PM
Most languages have C syntax.A little C is annoying because i don't know it.If your codes are complicated,and long i don't know how much you will love it because there are tons of errors which can come and there are little things you sometime forget,and they are making errors.Only one character can destroy code.Every programming language will give you error,and every code i have written in my live,when it was executed there was error.But it is better to work with solving errors,instead of thinking you are programmer if you use templates (programs which automatic create games/websites/programs for your needs).It is better on the complicated way,C++ which is more customizible then using some free game maker.
#12
Posted 07 November 2009 - 03:50 PM
Hi!
I really love the C programming language because of its simplicity. There are very few language concepts to be learned and you can build anything from extremely complex applications to very simple applications. Depending on your experience with the language, you can also build very efficient software because you have a control over memory allocations through your source code.
As a first-taught language, I believe BASIC does a pretty good job there. If you can't see anything visually execute on the screen, how can you be motivated to learn to write more code?
I really love the C programming language because of its simplicity. There are very few language concepts to be learned and you can build anything from extremely complex applications to very simple applications. Depending on your experience with the language, you can also build very efficient software because you have a control over memory allocations through your source code.
As a first-taught language, I believe BASIC does a pretty good job there. If you can't see anything visually execute on the screen, how can you be motivated to learn to write more code?
#13
Posted 07 November 2009 - 03:57 PM
BASIC was my first language too and I simply loved it. Then came C and it was just kind of okay. I guess real motivation will come when the student learns with some enthusiasm. Back when I was learning C, most of my classmates hated the lab sessions when the instructors poked them to get their programs right! If only they were given some encouragement they would be more motivated to learn the language.
#14
Posted 07 November 2009 - 10:10 PM
weberk, on Nov 6 2009, 12:01 AM, said:
I find C/C++ annoying too especially when time is premium (eg ACM-ICPC). I spend a considerable amount of time deciphering its compilation/ error messages.
Personally, what i like about C and C++ is that you have to keep track of how you manage your memory (though i'm sure some may consider that a con). Many other languages do that for you, but even in those other languages you can still have a memory leak (even if it's a rare thing). The knowledge you gain from C and C++ can be very useful for other languages.
#15
Posted 06 December 2009 - 09:31 AM
Exactly..I couldn't think of some better words than annoying! I mean , i like the logic concepts and all that. I like programming things but as a mere beginner i hate the environment. I have turbo in school and we work on that. The blue screen gives me boring vibes. All that typing in it and the rectangular cursor. Sometimes i wished couldn't it be like frontpage having to write the codes on on tab and instanly seeing the preview on the other tab. Also i wish, again as a mere newcomer that the error messages could have been more creative. I mean where is your IMAGINATION!
#16 Guest_d-man_*
Posted 15 February 2012 - 11:13 AM
Ya I think the standard libc lacks a bunch of functions that would make my life easy, but its not such a hard language once you get use to structures and pointers and pointers to pointers. Though I would never ever ever use this language if I were to try to develop something that didn't require the low level features c has to offer. This is however my language of choice for raw sockets and posix/ipc/threaded programming. Lots of controll over everything.
#17
Posted 22 April 2012 - 05:25 PM
I think coding in C forces you to up your game in programming. The function orientation of the language means you, as the programmer, have to know which function belongs where, instead of object orientation doing it for you. It promotes powerful practices, like memory management, which is done 'for you' with other programming languages. But when we have garbage collectors doing the job for us, we know right off the bat that there will be an overhead. That is to say -- it takes longer for Java to clear our un-linked objects from data than it does for a C program to do it inside of the program itself.
I'm not sure how deep you've gone into C program, but you'll run into commands like malloc() and free(). The former sets aside memory to hold an object such that a pointer to it can be passed in and out of functions, while the latter frees it from memory. In Java, you can pass entire objects back and forth and never worry about it, but that's why i think C gives you a better grasp of what's going on underneath the hood.
Having programmed in C, you will come across powerful tools like valgrind and gdb that really put your code out into the open regarding your algorithmic errors and other such shortcomings. Not to mention, even without the garbage collecting over-head, C is very much faster than programming languages that run on top of VM's. I remember coding in a combination of C and Assembly for a huge Fibonacci Heap problem, and the speed with which is finishd it over its Java counterpart was impressive.
But. If you've ever stared at your terminal wondering why your "Heap" was aborted during a C program, you know that all isn't well in the realm of C xD
I'm not sure how deep you've gone into C program, but you'll run into commands like malloc() and free(). The former sets aside memory to hold an object such that a pointer to it can be passed in and out of functions, while the latter frees it from memory. In Java, you can pass entire objects back and forth and never worry about it, but that's why i think C gives you a better grasp of what's going on underneath the hood.
Having programmed in C, you will come across powerful tools like valgrind and gdb that really put your code out into the open regarding your algorithmic errors and other such shortcomings. Not to mention, even without the garbage collecting over-head, C is very much faster than programming languages that run on top of VM's. I remember coding in a combination of C and Assembly for a huge Fibonacci Heap problem, and the speed with which is finishd it over its Java counterpart was impressive.
But. If you've ever stared at your terminal wondering why your "Heap" was aborted during a C program, you know that all isn't well in the realm of C xD
#18
Posted 23 April 2012 - 11:35 AM
Is C programming really annoying? If you are trying to get your program to fit within a limited space, I would say that the other languages out there are a lot more annoying because for any bit of code that you write, the equivalent in C is much smaller when compiled. You also get to write your code to take advantage of the way that the hardware runs so you can actually optimize your code to run faster. You know when you need to have access to your data so you can allocate a block of memory and retain a pointer to it just long enough to have what you need and you can then get rid of it. If you look at modern languages, they have a garbage collector to reclaim the memory space that is no longer needed and although it sounds like it would work better, garbage collectors are not all that smart and a lot of programmers building software for embedded devices go crazy when they get out of memory errors because of memory that has not yet been claimed by the garbage collector or if the garbage collection operation takes too long because it works as a deferred process - they would much rather want to have the ability to control when the garbage collection takes place and what gets garbage collection, but then again that is pretty much the same as when they want to allocate memory, have a pointer to it, and then have the memoryr freed and when you look at it, they are actually getting the ability to do all of that with C programming so why would they use any other platform when it fits all of their needs?
There is an alternate platform, which is assembly language but then they need to change their code to run on each of the different programming platforms that they are targeting. Imagine writing code once for the Intel line of processors and then having to rewrite it all for running on ARM processors. You don't have to do anything of the sort if you are working with C and stick to the basics. All you would have to do is recompile your code to run on the other development platform and most of your code can be reused.
There is an alternate platform, which is assembly language but then they need to change their code to run on each of the different programming platforms that they are targeting. Imagine writing code once for the Intel line of processors and then having to rewrite it all for running on ARM processors. You don't have to do anything of the sort if you are working with C and stick to the basics. All you would have to do is recompile your code to run on the other development platform and most of your code can be reused.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














