How to learn Fortran. Problems? [closed] - fortran

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have just got a job, starting in a months time which requires me to use fortran.
I have brought a couple of books, but they seem to lack any questions or problems and that is how i learn best.
I would like to know if you could recommend and books or websites that offer problems that i could practise with.
Thanks

I can recommend several, depending on your previous programming in general knowledge and Fortran specific knowledge.
For an absolute beginner (and don't take this in a negative context; it just means you're starting anew, and unlike someone who has a habit of some bad Fortran77 practices, you'll start with a clean mindset) I would definitely go with Chapman's Fortran 95/2003 for Scientists & Engineers. It is an excellent learning book, and although it has some drawbacks they're not important at this stage. It also has a plethora of examples useful in real life. It also emphasises good modern Fortran concepts and ideas (Fortran 90 and newer).
After it, or maybe instead of it, if you're looking for more of a reference book one cannot recommend enough one of the following:
- Metcalf, Reid and Cohen's Fortran 95/2003 Explained (btw, a new edition covering the latest Fortran standard is coming up in a few days) - a classical reference book. Some swear by it instead of Chapman's.
- The Fortran 2003 Handbook: The Complete Syntax, Features and Procedures by several authors; a standard reference book, dealing with the finer aspects of the language. Not important at this stage but just so you know it's there.
Apart from these, which I like to call "the big three", there are numerous tutorials, scriptas and handbooks all over the web (free) and on Amazon. Some links were given in here as well, so I won't repeat those. Also, your compiler is bound to have a good reference manual I don't know about the free g* ones, but all commercial ones do.)
Apart from that, you know you can always ask any question that comes to your mind in here, and on comp.lang.fortran (usenet group; google for a "Usenet client" or "newsclient" and check it out.). Some very(!) knowledgeable people lurk in there.

If you haven't already, install Linux and gcc on a home computer and begin to play with FORTRAN or Fortran. The command prompt syntax is gfortran filename.f which produces an executable file named a.out.
As for hints of what to experiment with, use previous answers to Stack Overflow questions, from simple to not-so-simple:
Hello world
the CONTINUE statement
variable scope
integer to string
procedures and functions
F90+ KIND explanation
i/o units
file reading
file writing and implied do loop
formatted output
passing variable array parameters
Legacy FORTRANisms

Back in the day, I had the book "Structured Fortran 77 for Engineers and Scientists". There are updated versions of this book that cover the newer Fortran standards.

My Vote goes for the classic McCracken Book
http://www.amazon.com/Guide-Fortran-Programming-Daniel-McCracken/dp/0471582816

Related

Websites rich with exercices or explanation for SML? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I know that I need to pass through google to search etc, I did but they don't offer what I need 90% of this sites give the same example and even sometimes the same explanation, If there someone who have for example links from university or school or may be in his dropbox, I will be very thankfull.
Unfortunately it seems that the best resources for learning Standard ML are various paper books (e.g. Introduction to Programming using SML by Hansen & Rischel, ML for the Working Programmer by Larry C. Paulson, or Programming in Standard ML by Robert Harper (the last one is available for free online), as well as resource material from various university courses of which none I have encountered excels.
Here is a number of exam assignments from one course using Standard ML:
I took the Programming Languages Course at Coursera and it was superb. Most of the course is based on SML.
The first first four weeks are entirely about SML. The material distributed in the course is great and every week there are plenty of interesting exercises to solve.
The good news is that this course is about to start in October 3, 2013 again. So this is your opportunity.
I own the list of books mentioned in the other answer. They all are very good. But I also own another one not mentioned above and that I considered great for initial ML learning: Elements of ML Programming by Jeffrey Ulman. In fact I preferred this to the others mentioned above because I found its explanations simpler and the exercises more progressively challenging.
I am using the book Programming in Standard ML by Colin Meyers,Chris Clark,Ellen Poon
and ML for the working Programmer by L C Paulson.The former is really a great book as it always puts types in function declarations..this way you will master the underlying types in sml

simple C++ project samples [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last month.
Improve this question
Im trying to learn OOP but I need to see some real case scenarios of using C++. For me, as a beginner in programming internet is too big and the book is too few examples. All I find on the source repositories are large projects or too few details.
Can you give me a link to some c++ projects which are good for beginners? It will be great if the samples have some details about good practices.
maybe some universities are hosting such projects or maybe you know a webpage with samples and contests about how to program in C++ and it is good for beginners.
I'd recommend starting at the C++ Language Tutorial. There are lots of good examples there, including a section on OOP.
If you want to learn OOP try looking at these lecture videos, they are fantastic for beginners its in Java but you shouldnt limit yourself to C++ as a learning platform.
http://www.youtube.com/watch?v=KkMDCCdjyW8
You can take a look at this C++ book: C++ Primer which has good practice exercises and there is also a Answer book for the exercise problems.
In addition to all the fabulous lectures / books, I'd encourage you to practice a few times. I enjoy using the bowling kata exercise for this. Technically, this is a refactoring exercise but it is quite fun and I believe effective.
I did a screencast of the bowling game in C++ earlier this week. You can watch it here:
http://www.cheezyworld.com/2011/01/12/bowling-game-in-c/
I've found such a sample project.
The problem is that it is documented well, but the documentation-language is German. There additionally are some classnames which are German etc. There also is no documentation like a class diagram included.
I've written that project some months ago to show a new apprentice some C++ and some object-oriented tasks. Hope its not too complex for your purposes.
This example is not perfect, but perhaps it is what you're searching or other users could get a better idea of what is questioned.
Download (Rapidshare.com)
PS: How should someone upload such things in the future? There are several source-files included (pastebin wouldn't be good for something like that). I wouldn't use Sourceforge for such a project. Is there something like a stackoverflow-attachment feature?

A Better Boost reference? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
The thing that really turns me off about Boost is their documentation. What I need is a good reference, and instead of explaining what a good reference is to me I would give example:
java.sun.com/javase/6/docs/api/
Yes I love it. It is also this:
cppreference.com/wiki/stl/vector/start
On the other hand what I find about boost is something like this:
http://www.boost.org/doc/libs/1_40_0/libs/smart_ptr/shared_ptr.htm
Basically some long page of text. Almost no formatting, some bold text here and there and hopefully some links between elements. Not to mention that smart_ptr is one of the better documented libraries.
If you do not find the difference between this and the above examples please stop reading and ignore this post. Do not get me wrong, I write C++ and I use Boost. At my firm we use at least 4 of their libraries, still each and every time I need to check a method prototype for instance it gets me out of my nerves scrolling through their essays. And yes I know that Boost is a collaborative project and that different libraries are developed by different teams.
So does any of you share my disappointment with Boost's reference and do you know some better site documenting the Boost libraries?
In general, I don't find the documentation is that bad. In general again, the information is "somewhere" in there. The main problem I see is a lack of uniformity, making it difficult to find that "somewhere". As you write in your question, the docs were written by different people, and a different times, and that's probably the cause for this lack of a common structure.
From the java and cppreference links you cite in example, I infer that you are more interested in the synopsis of the interface than in "tutorial" or "motivation" stuff. For shared_ptr, does http://www.boost.org/doc/libs/1_40_0/libs/smart_ptr/shared_ptr.htm#Synopsis provide what you're after?
For some libs, the "test" and "example" directories under libs/<library_name> are useful.
You may post your questions, comments and suggestions on the boost users and/or documentation mailing lists. From what I see there, specific documentation improvement suggestions are normally welcomed by the library maintainers.
If you are looking for an introductory text I found the Bjorn Karlsson book very good. It was a while ago when I read it so there may be more up to date texts available now. Find it here.
I most definitely agree. Javadoc is nasty, nasty stuff. But it is thorough and consistent across nearly every project. Compare the browsability of a random Jakarta project's documentation with that of a random Boost project.
Looking at the Java link provided, well more than half of it is obsolete for quite some time now :)
You have PDF tools and PDF format of the docs now.. There are tools and more on its way, from boostbook for lib writers ages ago to synopsis and more.. Build your own or parse existing majority of markup cost to an already overblown project :)

Is there a C++ decompiler? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a program in which I've lost the C++ source code. Are there any good C++ decompilers out there?
I've already ran across Boomerang.
You can use IDA Pro by Hex-Rays. You will usually not get good C++ out of a binary unless you compiled in debugging information. Prepare to spend a lot of manual labor reversing the code.
If you didn't strip the binaries there is some hope as IDA Pro can produce C-alike code for you to work with. Usually it is very rough though, at least when I used it a couple of years ago.
information is discarded in the compiling process. Even if a decompiler could produce the logical equivalent code with classes and everything (it probably can't), the self-documenting part is gone in optimized release code. No variable names, no routine names, no class names - just addresses.
Yes, but none of them will manage to produce readable enough code to worth the effort. You will spend more time trying to read the decompiled source with assembler blocks inside, than rewriting your old app from scratch.
I haven't seen any decompilers that generate C++ code. I've seen a few experimental ones that make a reasonable attempt at generating C code, but they tended to be dependent on matching the code-generation patterns of a particular compiler (that may have changed, it's been awhile since I last looked into this). Of course any symbolic information will be gone. Google for "decompiler".
Depending on how large and how well-written the original code was, it might be worth starting again in your favourite language (which might still be C++) and learning from any mistakes made in the last version. Didn't someone once say about writing one to throw away?
n.b. Clearly if this is a huge product, then it may not be worth the time.

Any good advice on using emacs for C++ project? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for a good article on using emacs as C/C++ IDE.
Something like Steve Yegge's "Effective emacs".
No specific article, really, but I've found EmacsWiki to be full of useful information. Consider checking out these entries:
CPlusPlus as a starting point for many C++-related articles, and
CppTemplate to define a template that can give you a good skeleton when you start new files
I've recently stumbled upon this article which is quite good.
EDIT: Yep the link is no longer valid. It seems like they've changed their url recently and it doesn't redirect properly. Hopefully it will be back soon. Anyway the article was called "Benjamin Rutt's Emacs C development tips". I managed to find a copy here.
I'm planning to write such article in near future, but you can now take my configuration of Cedet + Emacs, that helps me to effectively edit C++ sources.
If you'll have questions, you could ask me directly
Be aware that Emacs' C++ mode is based on only regular expressions, not a grammar. Hence, the syntax highlighting is not based strictly on the syntax of the language itself, but rather is largely based on commonplace formatting. The Emacs syntax highlighting of C++ often makes mistakes.
The problem is not limited to syntax hightlighting. The same defective design applies to the automatic formatting. All this said, I have been using only Emacs for all of my editing of C++ source code for over 20 years, since the cfront days. (I usually turn off electric key bindings, because of Emacs' defective regex-based design. Regexes do not have enough expressive power to describe the C++ syntax accurately.
I recommend ggtags and irony-mode. Other then that you may want to use helm-ag to search ("grep") for strings in your codebase.