Which language to learn next...

Started by
33 comments, last by PlayGGY 20 years, 3 months ago
quote:Original post by PlayGGY
Sorru Fruny, I didn't see your reply. Actually, I just thought of something in C++ that I don't really understand... the v-table. Crap. Oh well, that something I really need to learn.


Get "Inside the C++ Object Model". It will most certainly satisfy your interest in the innards of C++.

quote:And Fruny, how on earth do you know all of that!?


I learned . Honestly, I bought (quite) a few books ("The C++ programming language", "The C++ Standard Library" ... I have thousands of dollars worths of computer books covering a variety of topics) and tried to figure out *why* the language was done that way, instead of simply memorizing how things were. Being a computer science graduate student also probably helped a lot - I'm *meant* to be interested in that kind of crap.

And you know, what I was getting at is, since all languages are built on the same bricks, there are not that many ways you can do, say, a loop or a function call, at the metal level. You can make it easier for the programmer to express complex ideas, but the more (high-level) languages you learn, the more you start to see the similarities - and it helps you understanding how to use them.

quote:And by the way, I know I haven't come close to learning "how to write" in C++, I was more reffereing to "whenever I see any code, I can tell what it is doing".


You should try to look at "Template Metaprogramming". It's strictly C++ code, and yet, it will completely blow your mind, especially if you've not been exposed to functional programming.

Or go have a look at Lisp macros, which let you do outrageous things, and then cry at how inadequate C macros are.

Once you understand that, you can come back with your bold claims

edit: What Xai and Zahlman say.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan (C programming language co-inventor)

[edited by - Fruny on January 15, 2004 2:01:25 AM]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
Xai. thanks for taking your time to respond. Just today after seeing the article on GameDev I wrote a template container that was "hiding" a linked list (the data was stored in a linked list). I have practiced little things like that a lot, and while there still are things I don't completely understand, like how v-tables work (again mastered wasn't the right word for me, see my last reply), I think that I know enough now to learn a new language. I have read some stuff from AMD about their 64-but processors, and I really want to learn more about CPUs, but I really don't want to learn assembly for a specific processor, considering I may never use it. I think that if I do learn how CPUs work, it will be easier to learn assembly for anyone one processor. So tommorow (I... need... sleep...) I will start learning C#, and reading up on CPU architecture. Thanks for your replies , I will come back tommorow... sleep........

Fruny, I saw your reply, but I am too tired to respond right now...

[edited by - PlayGGY on January 15, 2004 2:03:23 AM]
And the rockets' red glare, the bombs bursting in air,gave proof through the fight that our flag was still there.Oh say, does that star-spangled banner yet waveover the land of the free and the home of the brave?
Try writing a compiler.

Seriously. If you are interested in figuring out how programming languages work, and have an interest in learning ASM, look into creating your own simple language and compiler, or writing a complier for a simple language.

Don't try to build a C compiler that creates a full-on executable file for a Windows system yet. Start with something that compiles a simple language with limited features (maybe arrays and structs, but don't worry about dynamic memory allocation) that emits code you can run on a simulator, like the DLX or a MIPS simulator.

You'll learn a whole lot about how programming languages work under the hood, and you'll also learn a lot about how computers work at the ISA level. At this point don't get too worried about becoming the master of a specific implementation of a specific ISA, assembly languages have a lot in common, and you'll learn a lot about how they work.

[Edited by - The_Incubator on June 14, 2006 2:53:07 PM]
I wouldn't have thought that you could have mastered the whole of c++ after 2 years. I've been at it for 7 years and don't think I'm anywhere near mastering it (and I'm no slouch). You can however be a master of as much as you know (e.g. you may never have to look up the syntax for pointers but know nothing about templates or using the standard library)

I've read Bjarne Stroustrup's the 'C++ programming Language 3rd Edition', Herb Sutter's 'Exceptional C++' and 'More Exceptional C++', Scott Meyer's 'Effective C++' and 'More Effective C++' (available combined on CD-ROM) and 'Effective STL', Andrei Alexandrescu's 'Modern C++ Design'. These authors are considered the masters of C++ and some of the things they are writing about, discussing and still trying to get right in C++ shows that they are still growing in their mastery.

I also subscribe to C/C++ User's Journal and pick up Doctor Dobb's Journal when it looks interesting. They keep me informed of real life applications of C++ and the problems that arise in trying to use C++ and the way of finding solutions. I have also read 'Design Patterns' which is often refered to in articles in said magazines (and the above books too). It isn't C++ specific although all examples are in C++ or SmallTalk. I believe that mastery of C++ programming cannot be detached from an understanding of Patterns, although that would be true of other languages too such as Python, Ruby, Java etc. (maybe that can be opened up in another thread)

edit: added bit about python, ruby, java

[edited by - petewood on January 15, 2004 6:14:42 AM]
Although you may not have "mastered" C++ (and no matter what anyone tells you, no one... well, maybe no one but savants focused on programming... has mastered it outright), you should be proud that you understand, interpret, and write C++ at an advanced level at your age. That''s a very, very good head start. You get my kudos. =) So though you may not be a master yet, don''t let it get you down. You''re at least "advanced", and that''s good enough for anyone who doesn''t want to spend most of their lives in padded rooms. =)

Speaking of related issues... I wonder if there ever has been a savant with an affinity for programming... you know, as opposed to counting objects with frightening speed, or writing cryptic poetry that no one can understand. Have any of you ever heard of an autistic programmer? I''d be interested to see what kinds of crazy stuff they could produce. =)
-Vendal Thornheart=) Programming for a better tomorrow... well,for a better simulated tomorrow. ;)
quote:Original post by VThornheart
Have any of you ever heard of an autistic programmer?


quote:
autism

n : (psychiatry ) an abnormal absorption with the self; marked by communication disorders and short attention span and inability to treat others as people


Sounds like me
I think I must agree with peetwood. If you haven''t read the books that he mentioned, I would recommend you to try them out and especially the "Modern c++ design" and the "Design Patterns".

Especially the latter one is good, since if you want to become a successfull programmer you shouldn''t focus on just one language - Since when you will get older and getting into the business, there will probabilly be dozens of other languages

But the algorithms and idioms will be usefull in almost any language you will use. So I would say, stay with c++ for some time and read about Design patterns and apply them to c++. If you do that then you will have it easy applying the techniques to other languages.

And If you really want to move on to a new language, I would say - choose a functional programming language. Since you already know the object oriented technique from c++, but you have no knowledge in functional programming which can be really good in specific cases

The above is not from my experience, but just what people have told me, heh.
you absolutely MUST own "Design Patterns" IF JUST FOR THE DAMN INSIDE COVER

I too am a true and complete geek, owning most of the timeless gems including: The Mythical Man-Month, Code Complete, Writing Solid Code, Dynamics of Software Development, The C++ Programming Language, The C++ Standard Library, Design Patterns, Modern C++ Design, Inside COM, Be Developer''s Guide, The Pragmatic Programmer, Programming Ruby, ... and those are just the books I consider actuall good AND important ...

Even the COM book should be partially read by everyone, because the basic REASON BEHIND COM should be understood by all programmers, and if you only read the first half of that book, you''ll get it.

The Modern C++ Design Book is AMAZING, but is very very advanced, complicated, and dense ... and in fact i only really get half of it (and I am a MAJOR template user all the time) ... be prepared to read a little at a time, and just take what you can from it ... you don''t have to adopt his entire system to benifit from it.

The Be Developer''s Guide documents the programming API for the dead Be Operating System (BeOS) ... this was the first, and ONLY Native C++ Operating System API that I know of, and it is also so absolutely wonderfull to behold and work with. BeOS was so amazing in some ways that it''s hard to believe that what was done before 1998 has still not been equalled yet in another OS.

C# is definately worlds better than a langauge like VB, and .NET is so many worlds beyond MFC it is amazing ... and yet it is still anoiying to work with on a daily basis - particularly without templates. I is amazing how much rich OS / Control functionality you can use so easily (DataSets, XML features, Visual Components) and yet how much harder it is to write great classes / data structures and reusable algorithms ... oh well ... The Book "Beginning Visual C#" is the abolute BEST beginners guide I''ve seen for them, BECAUSE the MSDN is already the best class reference on the market, and this book points you to the right classes to get work done, with decent examples AND walk-throughs of using the actual Visual C# wizards as part of the process ... very nice ... NOT the best reference ... so buy it first, then something else in 2 months.

Writing Solid Cosde will explain why you should NOT silently correct the mistakes of your clients, and The Pragmatic Programmer (BUY THIS) will give you many little gems of thought about being a productive software developer.

I liked "Dynamics of Software Development" mainly as a great read, and for some of the interesting points of view, but it has some real gems too "#3 Create a Multi-Release Technology Plan, #9 Be an Authority, not an authority figure, and #29 Don''t know what you don''t know" spring to mind. There may be 10 irrelevant ideas out of his 54 points, but that''s a damn good ratio.

Best of luck to you, now and in the future.
quote:Original post by petewood
Herb Sutter's 'Exceptional C++' and 'More Exceptional C++',


oh for the love of god i knew i'd forgotten about 2 books... aside from the first C++ book mentioned I've either got, or have coming the others...

ah well, off to Amazon i go... (they must love me, since getting my job just over a year ago i've thrown ALOT of money at them, hehe)

[edited by - _the_phantom_ on January 15, 2004 12:32:08 AM]
'Modern C++ Design' is a freaky book which is showing the direction things are going with templates. It has inspired a lot of people to take an interest in policy based design. There has been plenty of work on this already but this book has brought it into the mainstream. Really it's making use of C++ templates as a sort of Lisp-like language at compile time. There is recursion over lists of types and all kinds of tricks. Andrei Alexandrescu writes some really good articles for CUJ too. Have a search there for '"andrei alexandrescu" experts' (The search feature could do with some work on that site!).

A simple article which uses some of the techniques that he has promoted is this one Unfinished Business. Its the guy's last article for them so he's having a bit of fun with the techniques. That's the kind of stuff you'll get into in the book. For people who haven't thought in terms of Lisp it can be a bit overwhelming.

I don't think this book is necessary for people to be masters of the kind of C++ that is in common use. The majority of C++ programmers are not using these techniques in production code. But it gives an indication of where things are going and what there is still left to master. This article(pdf) from the designers of the Boost.MetaProgrammingLibrary shows some of the techniques they're using. It can help understand a lot of what is going on generally in the boost library. As more people use boost, and as more of it gets accepted into the c++ standard library, people will start using these techniques in general production code, it will be taught at colleges and everyone will understand it. Much like the special theory of relativity is taught to undergraduates now

[edited by - petewood on January 16, 2004 5:52:41 AM]

This topic is closed to new replies.

Advertisement