Alief’s Update — Week 12
On the previous week, I got error “main class not found” in java and then I planned on changing my IDE (just based on assumption) from eclipse to IntellijIdea. But Fortunately I’m correct, after I changed it to IntellijIdea the “main class not found” problem vanished. If you notice, I changed my language to English this is because I was inspired by Ega and also I want to enchance my Writing skill in English, so if one day I want to study abroad and required to make writings in English, I will be ready.
Anyway, Here are what I’ve done :
- Unit Testing
a. In my testcase, I try to test “construct” method that return void. Because JUnit work based on AssertEqual method which need to compare the expected result and the actual result, So testing a void method would become a problem. So to overcome this condition I change the return type of “construct” method in TreeNode.java from void to TreeNode so then I can verify using JUnit.
b. After that, I Override Equal Method in TreeNode class to compare equality between two object of TreeNode. I do this because Equal method used in AssertEqual
c. Then, because the field of TreeNode objects are private so i need to add setter and getter to accomodate TreeNode instance creation.
d. But, on the process of creating the testcase class, I found bug in construct method. The bug described as follows :
If the input
“(ROOT\n (NP (NNP Privacy) (NNP Policy)))”
the output
Whereas, value for node ROOT should be an empty string. Eventough it doesn’t disturb program flow (because we only need the leaf), it disturb the testcase creation in unit test. So to solve it, I assign value of the current node to empty string if the pointer counter “(“ char.
Learned Lesson : In order to set up unit test, we have to create test class which define the testcase. In test class, we create expected result from particular input, and compare between the actual result and expected result using AssertEquals method.
Proof : in Github
Hence I claim : Unit Test
2. Install MongoDB driver
Here are the step that I do to install MongoDB driver
a. Deactivate Xampp, At the first time I immediately install mongodb above xampp. But it produce incompatible error :
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
Fortunatly, Haryo also encounter same error. So he suggest to install Lampp and re-install mongoDB above it.
b. Install Wamp, Apache2, MongoDB
#Install pecl
sudo apt-get install php-pear
sudo apt-get install php5-dev#Install MongoDB
sudo bin/pecl install mongodb#Install Apache
sudo apt-get install apache2#Install PHP
sudo apt-get install php5 libapache2-mod-php5#Install MySQL
sudo apt-get install mysql-server#Install phpMyAdmin
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
c. Here is the result :
But after using lampp and apache2 as base program, i got 404 error for all page except homepage. This Error could be resolved by enabling rewrite module
sudo a2enmod rewrite
and updating “apache2.conf “
<Directory />
AllowOverride None
</Directory>
to
<Directory />
AllowOverride All
</Directory>
Hence I reclaim : Database
3. Handling main class not found error
I solve this problem just by Installing Intellij Idea
1 sudo add-apt-repository ppa:webupd8team/java &&
2 apt-get update &&
3 apt-get install oracle-java7-installer &&
4 echo oracle-java7-installer shared/accepted-oracle-license-v1–1 select true | sudo /usr/bin/debconf-set-selections &&
5 update-java-alternatives -s java-7-oracle &&
6 wget -O /tmp/intellij.tar.gz http://download.jetbrains.com/idea/ideaIC-12.0.4.tar.gz &&
7 tar xfz /tmp/intellij.tar.gz &&
8 cd idea-IC-123.169/bin &&
9 ./idea.sh
Actually I just execute command from number 6, because previously I have install eclipse and java environtment within my laptop.
4. Handling Laravel Error
- solution is to check .env then execute :
$ php artisan key:generate
source
5. Completing DoD
I participate on adding definition for
Update Quote, Delete Quote, FAQ, Contact
Hence I claim : Living Documentation
6. Updating my Knowladge about V & V
Simply the difference between verification and validation :
Verfication : Are we build the system right?
Validation : Are web build the right system ?
In other words, validation is concerned with checking that the system will meet the customer’s actual needs, while verification is concerned with whether the system is well-engineered, error-free, and so on. Verification will help to determine whether the software is of high quality, but it will not ensure that the system is useful.
In practice, I do verification at the start of the project, gather all the requirement from product owner and validate their requirement to make sure we build the right product. Then, Internaly we brainstorm about the internal system and verify it wether we build the system correctly. Because the product owner (Kak Tirmizi & Kak Salman) also expert in SE, we also ask them to help us verify the requirement.
source
Hence I claim : Verification and Validation
7. Updating my Knowladge about Elicitation, Analysis & Specification
To put it simple, here is the definition :
Elicitation : Requirement Gathering (what is to be done and why)?
Analysis : Analysis the result of Elicitation (Which solution is optimal?)
Specification : Represent the result in Formal ways
From our requirement elicitation we get that :
1. We need to update the Quotes constantly
2. We need to automate quote update
From our analysis we get that :
1. We will build a crawler to automate quote searching
2. We will retrieve quote from other websites
3. The program flow
source
Hence I reclaim : Elicitation, Analysis & Specification
Time Spent : 05:11:02 (2 hour in class)
(from now i use time logger to get more accurate time log)