- Joined
- 6/19/12
- Messages
- 37
- Points
- 268
I just finished the course, the forum has given me much help, I thought I'd like to return the favor. Let me talk about using mac to do the course since I used xcode to do almost all my homework on a mountain lion ios mac.. without further ado...
//First of all, if you have a choice, do use Visual Studio because that will save you tons of time and patience to focus more on the coding part but compiling; However if you don't have a computer that supports Visual Studio, don't panic, you could still accomplish the mission with extra effort...err... make sure you are physically and mentally ready for this journey.
//I assume people who are taking this course are not expert on programming in C/C++ environment, let alone acquainted with how compilers work. That may be why Dr. Duffy gives some pre-written projects for us to just USE instead of concocting the whole Monte Carlo projects at the end.
For C and C++ parts I don't think I encountered some problems when I did homework or taking quiz, for STL, there might be some very trivial differences on the class definition like adding <typename> where not needed for VS, but GCC will tell you where and even how to do it, let him lead. Boost... check out this link: GENERAL - Tips for "C++ Programming for Financial Engineering" course the instruction is quite straightforward and i made some adjustment regarding the mountain lion and new xcode 4. Your header path by default should be "/opt/local/include/" Macports is not the only solution, there are some other ways to install boost on your mac but i think Macports is quite easy to seal the deal.
//In level 9, there are 6 projects, each project needs to include some of Dr. Duffy's codes, that means trouble for mac users, but don't panic, let's get the party started:
1.If you meet some Semantic Issue, like Use of undeclared identifier 'cout' and stuff, just add std:: to cout, or simply #include <iostream> using namespace std;
2.For generic class, gcc always ask you to add typename, like typename T::const_iterator i; while VS not necessarily;
3.To include Dr. Duffy's codes, I think you can also manually put the path that links to your code in xcode or copy codes to your boost folder;
4.If you see Parse Issue like 'Unknown type name size_t' try to #include <cstring>
5.If you encounter Semantic Issue, like 'Declaration of "V" shadows template parameter' try comment out the template title 'template <class V, class I, class S>'
6.If your compiler can't recognize some of your functions, like, "Use of undeclared identifier 'Size' 'MinIndex' 'MaxIndex', try adjust those to (*this).Size, (*this).MinIndex, (*this).MaxIndex. all of them!
7.If you can't visualize your results to excel... well... that's the only part I caved... it maybe the problem of my mac version of office 2011, some people say you can't export to excel because blah blah blah, the fact is you wouldn't believe it until you try. I still can't figure out how to do it to be honest. Dr Duffy's code is very easy to use in VS because he wrote out all the corresponding codes to different versions of Office, of course window's office version, this link GENERAL - Tips for "C++ Programming for Financial Engineering" course is a bit outdated in term of linking excel, Dr. Duffy has already done the 2010 office codes, all you need to do is uncomment your office version script in his ExcelImport code and comment out all other parts that you don't need, easy as my eyes. Again, I did NOT excel out my results from xcode 4 to mac_office_2010. but it works on VS perfectly fine.
At last, I highly suggest you use Visual Studio to do this course, as a matter a fact, it doesn't matter what environment you are coding in in the future, but professor is teaching in VS, it's just much easier if you and him are on the same page... Good Luck and Have Fun!
Shout out to my TA APalley also professor Daniel Duffy Andy Nguyen they respond fast and help me a lot, thank you!
//First of all, if you have a choice, do use Visual Studio because that will save you tons of time and patience to focus more on the coding part but compiling; However if you don't have a computer that supports Visual Studio, don't panic, you could still accomplish the mission with extra effort...err... make sure you are physically and mentally ready for this journey.
//I assume people who are taking this course are not expert on programming in C/C++ environment, let alone acquainted with how compilers work. That may be why Dr. Duffy gives some pre-written projects for us to just USE instead of concocting the whole Monte Carlo projects at the end.
For C and C++ parts I don't think I encountered some problems when I did homework or taking quiz, for STL, there might be some very trivial differences on the class definition like adding <typename> where not needed for VS, but GCC will tell you where and even how to do it, let him lead. Boost... check out this link: GENERAL - Tips for "C++ Programming for Financial Engineering" course the instruction is quite straightforward and i made some adjustment regarding the mountain lion and new xcode 4. Your header path by default should be "/opt/local/include/" Macports is not the only solution, there are some other ways to install boost on your mac but i think Macports is quite easy to seal the deal.
//In level 9, there are 6 projects, each project needs to include some of Dr. Duffy's codes, that means trouble for mac users, but don't panic, let's get the party started:
1.If you meet some Semantic Issue, like Use of undeclared identifier 'cout' and stuff, just add std:: to cout, or simply #include <iostream> using namespace std;
2.For generic class, gcc always ask you to add typename, like typename T::const_iterator i; while VS not necessarily;
3.To include Dr. Duffy's codes, I think you can also manually put the path that links to your code in xcode or copy codes to your boost folder;
4.If you see Parse Issue like 'Unknown type name size_t' try to #include <cstring>
5.If you encounter Semantic Issue, like 'Declaration of "V" shadows template parameter' try comment out the template title 'template <class V, class I, class S>'
6.If your compiler can't recognize some of your functions, like, "Use of undeclared identifier 'Size' 'MinIndex' 'MaxIndex', try adjust those to (*this).Size, (*this).MinIndex, (*this).MaxIndex. all of them!
7.If you can't visualize your results to excel... well... that's the only part I caved... it maybe the problem of my mac version of office 2011, some people say you can't export to excel because blah blah blah, the fact is you wouldn't believe it until you try. I still can't figure out how to do it to be honest. Dr Duffy's code is very easy to use in VS because he wrote out all the corresponding codes to different versions of Office, of course window's office version, this link GENERAL - Tips for "C++ Programming for Financial Engineering" course is a bit outdated in term of linking excel, Dr. Duffy has already done the 2010 office codes, all you need to do is uncomment your office version script in his ExcelImport code and comment out all other parts that you don't need, easy as my eyes. Again, I did NOT excel out my results from xcode 4 to mac_office_2010. but it works on VS perfectly fine.
At last, I highly suggest you use Visual Studio to do this course, as a matter a fact, it doesn't matter what environment you are coding in in the future, but professor is teaching in VS, it's just much easier if you and him are on the same page... Good Luck and Have Fun!
Shout out to my TA APalley also professor Daniel Duffy Andy Nguyen they respond fast and help me a lot, thank you!