I downloaded ubuntu strictly to learn C, and apparently the default is set to either C89 or C90 (I just realized this when I initialized a declaration in a for loop--I was under the impression that it was C99). Is there a valid reason why the default isn't set to C99? I'm like a third way through with this book, and there doesn't seem to be a lot of differences. But who knows, maybe the difference widens later on?
The Big Programming Thread - Page 143
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
billy5000
United States865 Posts
I downloaded ubuntu strictly to learn C, and apparently the default is set to either C89 or C90 (I just realized this when I initialized a declaration in a for loop--I was under the impression that it was C99). Is there a valid reason why the default isn't set to C99? I'm like a third way through with this book, and there doesn't seem to be a lot of differences. But who knows, maybe the difference widens later on? | ||
![]()
tofucake
Hyrule18980 Posts
o/ Yeahhhhh~ I haven't worked with Pascal, but I know from personal experience QBASIC is just fine for starting off (or at least it was in 1997). In Ubuntu you can use C90 because GCC is awesome. Just pass -std=c90 to the compiler. | ||
MisterD
Germany1338 Posts
On June 13 2012 01:07 tofucake wrote: Raise your hand if your first language was QBASIC o/ Yeahhhhh~ I haven't worked with Pascal, but I know from personal experience QBASIC is just fine for starting off (or at least it was in 1997). In Ubuntu you can use C90 because GCC is awesome. Just pass -std=c90 to the compiler. o/ /cowers in shame there's actually a os independent freebasic now, which is based off of qbasic (although the syntax evolved away a little bit). It's nice for writing something quickly, but if you try to make something a bit bigger, you very quickly hit the boundaries of natively supported features, which is a huge problem with it. But still, probably the better alternative than trying to get qbasic to run well on modern machines ^^ | ||
Esoterikk
Canada1256 Posts
| ||
KaiserJohan
Sweden1808 Posts
On June 12 2012 21:22 mcc wrote: C is not the best first language really. I think the old way of Pascal->C->C++->whatever is still the best. You can replace Pascal with similarly clear not OOP language and you can replace C++ with Java/C# as they have better designed OOP aspects. Reason is that before learning OOP you should learn proper structural programming and OOP aspects of Java/C# just get in the way of achieving this goal. C is bad at this as it has a lot of "unnatural" quirks. So after you master basics of structural programming , you move to C to learn the whole pointer and memory management thing. After that OOP. C# may be more natural choice due to the previous step being C, but it does not really matter. I agree completely, well said. I started with functional language Moscow ML and then C and then Java at university, and that is really good. | ||
ForgottenOne
Romania236 Posts
On June 13 2012 01:07 tofucake wrote: Raise your hand if your first language was QBASIC o/ Yeahhhhh~ I haven't worked with Pascal, but I know from personal experience QBASIC is just fine for starting off (or at least it was in 1997). In Ubuntu you can use C90 because GCC is awesome. Just pass -std=c90 to the compiler. My father tought me some QBASIC in the fifth grade (~98). Then I learned some more by myself. I remember the first class in Computer Science in school, the teacher didn't knew what to teach so she tought us a game to play with each other. And by the end of the class I had implemented it in QBASIC. After that I learned Pascal and Visual Basic 6.0 and made a lot of awesome things with those. Those were the times... | ||
Defury
Germany206 Posts
On June 13 2012 06:01 KaiserJohan wrote: I agree completely, well said. I started with functional language Moscow ML and then C and then Java at university, and that is really good. Would Pascal -> C# -> Java -> VB.net work? Isn't pascal severely out dated and not worth learning? Would I be better off starting with something like python? | ||
mcc
Czech Republic4646 Posts
On June 13 2012 07:57 Defury wrote: Would Pascal -> C# -> Java -> VB.net work? Isn't pascal severely out dated and not worth learning? Depends what you mean by not worth learning. Basically no language is worth learning in the long run just because of itself. Languages change and new ones emerge, the point of that succession was to hypothesize what is the best way to become a well rounded programmer. The point is not to learn the language, but to gain more general skills. Languages can be learned very quickly and in the process of learning are only as importnant as far as they help you to achieve that goal. Pascal is clear enough language, without too many quirks, so it fits the role of good language to teach basics of structural programming. Actually any modern practical language is probably bad for that role as they all need to support too many features that are not useful in learning process, but are crucial in practice. As for your progression, I think the lack of C/C++ is kind of a weakness. But more importantly why would you move from C# to Java (joking ![]() ![]() | ||
RoyGBiv_13
United States1275 Posts
On June 13 2012 08:10 mcc wrote: Depends what you mean by not worth learning. Basically no language is worth learning in the long run just because of itself. Languages change and new ones emerge, the point of that succession was to hypothesize what is the best way to become a well rounded programmer. The point is not to learn the language, but to gain more general skills. Languages can be learned very quickly and in the process of learning are only as importnant as far as they help you to achieve that goal. Pascal is clear enough language, without too many quirks, so it fits the role of good language to teach basics of structural programming. Actually any modern practical language is probably bad for that role as they all need to support too many features that are not useful in learning process, but are crucial in practice. As for your progression, I think the lack of C/C++ is kind of a weakness. But more importantly why would you move from C# to Java (joking ![]() ![]() Agree with this guy ^ Its been said a million times before, but worth repeating that there is no linear progression to these things, and there is no right way to learn programming. I learned off Pascal when I was 13, before I even know what a real program was or that there ever were other languages. It worked, because then when I saw C and Java, I at least knew how to run my own program. (Best skill to learn from C/Pascal is the ability to just run the damn thing, which is an often overlooked skill) I'd say that you should start with Python or Java though, because being able to do something out the gate is the best feeling. If you enjoy writing your own data structures, and coming up with awesome solutions, you'll end up picking up C/C++, whereas if you like the OOP parts of those languages, you'll move towards even higher level languages. Also, VB is the work of the devil. | ||
Esoterikk
Canada1256 Posts
| ||
Ilikestarcraft
Korea (South)17726 Posts
| ||
Tobberoth
Sweden6375 Posts
On June 13 2012 07:57 Defury wrote: Would Pascal -> C# -> Java -> VB.net work? Isn't pascal severely out dated and not worth learning? Would I be better off starting with something like python? Whats your reasoning for that progression? Why not start with C# and then not learn the others? Do you have any need for any of those languages? I'd say that out of those languages, C# is probably the most useful one in a professional context, with Java in close second (but it depends on your area, java is used a lot more in many contexts) while the other two languages are not all that useful. VB.net is used by a lot of corporations but 1. It's extremely easy to learn if you know C# and 2. nowadays, .NET languages are interchanagble, so you could technically write your code in C# and then convert it to VB.net automagically. | ||
FreeZEternal
Korea (South)3396 Posts
| ||
billy5000
United States865 Posts
Am I missing out on much by learning C just for "understanding how computer systems work" rather than learning C to "understand computer systems AND be a proficient C programmer?" | ||
KurtistheTurtle
United States1966 Posts
| ||
![]()
tofucake
Hyrule18980 Posts
| ||
GaiaCaT
35 Posts
| ||
KurtistheTurtle
United States1966 Posts
**fixed!** | ||
ahr28
6 Posts
On June 13 2012 05:54 Esoterikk wrote: Alright just gonna dive into C++ and go from there, probably go into java right after. This should be an interesting year trying to learn enough to not be a complete shit in Uni. Ditto my friend. Hope youre not forced to actually completely rely on outside sources like the internet and books to learn about complex algorithms and programming the first year in college just because the teachers are inadequate and the courses/syllabi are utter sh**. Really mad while i'm typing this because I flunked my first year because of this and I have to redo most of my exams in august... FML! | ||
sluggaslamoo
Australia4494 Posts
On June 13 2012 08:23 RoyGBiv_13 wrote: Agree with this guy ^ Its been said a million times before, but worth repeating that there is no linear progression to these things, and there is no right way to learn programming. I learned off Pascal when I was 13, before I even know what a real program was or that there ever were other languages. It worked, because then when I saw C and Java, I at least knew how to run my own program. (Best skill to learn from C/Pascal is the ability to just run the damn thing, which is an often overlooked skill) I'd say that you should start with Python or Java though, because being able to do something out the gate is the best feeling. If you enjoy writing your own data structures, and coming up with awesome solutions, you'll end up picking up C/C++, whereas if you like the OOP parts of those languages, you'll move towards even higher level languages. Also, VB is the work of the devil. On June 13 2012 22:44 Tobberoth wrote: Whats your reasoning for that progression? Why not start with C# and then not learn the others? Do you have any need for any of those languages? I'd say that out of those languages, C# is probably the most useful one in a professional context, with Java in close second (but it depends on your area, java is used a lot more in many contexts) while the other two languages are not all that useful. VB.net is used by a lot of corporations but 1. It's extremely easy to learn if you know C# and 2. nowadays, .NET languages are interchanagble, so you could technically write your code in C# and then convert it to VB.net automagically. I agree, but there is an order in which you should learn paradigms which is why Pascal/C should be learned first, followed by Java/C#, followed by Javascript/Ruby/Lisp, followed by Haskell, etc. You should learn the paradigms in this order. Structured -> Object Oriented -> Imperative Functional -> Declarative Functional. Going backwards is far more difficult and you will learn a lot slower and develop bad habits. Learning them in the order mentioned above will ensure that you have the best chance of having stronger fundamentals when learning programming. For example, you need to know functional decomposition to do any language, but you only need to know object decomposition in OOP/FP. Learning Pascal first teaches functional decomposition because that's the primary skill required in structured programming. Functional decomposition can be (and should be) applied to Java, but with Java there is a bigger focus on object decomposition, which can't be applied to Pascal. The catch is that object decomposition is a lot harder when you don't understand functional decomposition and you end up coming up with some really awkward designs. There is nothing more frustrating than seeing objects decomposed without a second thought applied to functional decomposition, because the developer who coded it started with Java. So if you want to progress in the a way that ensures the best chance of being a solid programmer, you should follow the order mentioned above. Not everybody learned it this way, and I'm sure there's some experts out there that started with Haskell. But just from my own experience I think this is the best way. | ||
| ||