Coding Tools

Revision for “Coding Tools” created on May 31, 2017 @ 08:21:50

TitleContentExcerptRevision Note
Coding Tools
To set up the coding environment for a new AlgoQuant project, please follow the following steps.
<h2>JDK</h2>
SuanShu and AlgoQuant are Java based code. Before we can code using the libraries, we need to install the latest <a href="http://www.oracle.com/technetwork/java/javase/downloads">Java Development Kit (JDK)</a>. If you skip this step, you can download it together with NetBeans in the next step.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/jdk_download-1.png"><img class="alignnone size-full wp-image-5754" src="http://numericalmethod.com/wp-content/uploads/2017/05/jdk_download-1.png" alt="" width="1470" height="922" /></a>
<h2>NetBeans</h2>
NetBeans is our preferred IDE for Java programming. You may download and install JDK and then NetBeans. Or you can download "NetBeans with JDK" directly.

&nbsp;

NetBeans can be downloaded from this <a href="http://netbeans.org/downloads/index.html">link</a>. If you have no Java programming experience, choose the one labeled "Java SE".

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/netbeans_download.png"><img class="alignnone size-full wp-image-5753" src="http://numericalmethod.com/wp-content/uploads/2017/05/netbeans_download.png" alt="" width="1276" height="872" /></a>

Run the installer.
<h2>TortoiseSVN</h2>
Download <a href="https://tortoisesvn.net/downloads.html">TortoiseSVN</a>.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/svn_download.png"><img class="alignnone size-full wp-image-5755" src="http://numericalmethod.com/wp-content/uploads/2017/05/svn_download.png" alt="" width="1320" height="897" /></a>

Run the installer. More information on svn can be found in this <a href="http://numericalmethod.com/up/algoquant/svn/">wiki</a>.

After installing TortoiseSVN, right click in Explorer in the empty space in the folder you want to put your project in. Click "SVN checkout" to check out project.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/svn-checkout.png"><img class="alignnone size-full wp-image-5744" src="http://numericalmethod.com/wp-content/uploads/2017/05/svn-checkout.png" alt="" width="801" height="869" /></a>

The following example checks out AlgoQuant. You will use the URL given to you instead. In most cases, you do NOT need to check out AlgoQuant as it will be automatically downloaded by <a href="http://numericalmethod.com/up/algoquant/setup/mavens/">Maven</a> when you build your project.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/checkout-algoquant.png"><img class="alignnone size-full wp-image-5745" src="http://numericalmethod.com/wp-content/uploads/2017/05/checkout-algoquant.png" alt="" width="529" height="469" /></a>
<h2>Coding in NetBeans</h2>
Launch NetBeans. Open your project. You can right click on a package/folder to create a new Java class to start coding. If you are asked to modify AlgoQuant code, copy and paste the code in your project and do the editing there. Do NOT modify source code in AlgoQuant directly.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/Copy-source-code.png"><img class="alignnone size-full wp-image-5750" src="http://numericalmethod.com/wp-content/uploads/2017/05/Copy-source-code.png" alt="" width="808" height="694" /></a>

To build your project, right click on the project and hit "Clean and Build". Alternatively, you can hit this button on the top bar.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/clean-and-build.jpg"><img class="alignnone size-full wp-image-5765" src="http://numericalmethod.com/wp-content/uploads/2017/05/clean-and-build.jpg" alt="" width="399" height="96" /></a>

To run your project, you need to create JUNIT test cases. We run our project by running the test cases. To create a JUNIT test case file, hit "CTRL+SHIRT+U". This will create a test file for you where you will put your test cases. You can right click on the test file and run it – either in normal or debug mode.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/test-file.jpg"><img class="alignnone size-full wp-image-5767" src="http://numericalmethod.com/wp-content/uploads/2017/05/test-file.jpg" alt="" width="535" height="269" /></a>
<h2>Debugger</h2>
<a href="https://netbeans.org/features/java/debugger.html">https://netbeans.org/features/java/debugger.html</a>

<a href="https://netbeans.org/kb/docs/java/debug-visual.html">https://netbeans.org/kb/docs/java/debug-visual.html</a>
<h2>Commit Code</h2>
When you are done with coding a milestone, you can submit your code by committing code. Right click the project folder. Select "SVN Commit".

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/SVN-commit.png"><img class="alignnone size-full wp-image-5748" src="http://numericalmethod.com/wp-content/uploads/2017/05/SVN-commit.png" alt="" width="896" height="788" /></a>

Type in some meaningful message to let people know what changes and files you make and add. Click "OK" to commit.

<a href="http://numericalmethod.com/wp-content/uploads/2017/05/svn_commit_code.png"><img class="alignnone size-full wp-image-5757" src="http://numericalmethod.com/wp-content/uploads/2017/05/svn_commit_code.png" alt="" width="704" height="635" /></a>



Old New Date Created Author Actions
May 31, 2017 @ 08:21:50 Haksun Li
May 31, 2017 @ 08:20:37 Haksun Li
May 31, 2017 @ 08:20:08 [Autosave] Haksun Li
May 31, 2017 @ 08:14:03 Haksun Li
May 31, 2017 @ 08:02:09 Haksun Li
May 31, 2017 @ 02:47:53 zhengxiong
May 31, 2017 @ 02:47:07 zhengxiong
May 31, 2017 @ 02:42:26 zhengxiong
May 26, 2017 @ 02:00:59 zhengxiong
May 26, 2017 @ 01:56:55 zhengxiong
May 26, 2017 @ 01:53:33 zhengxiong
May 26, 2017 @ 01:52:34 zhengxiong
May 26, 2017 @ 01:34:00 zhengxiong