nevet / yourday Goto Github PK
View Code? Open in Web Editor NEWCS2103 project, a to-do list manager with power search.
CS2103 project, a to-do list manager with power search.
Manage to develop a finalized architect for V0.1. The architecture for our
software will consisted of as follows:
-UI
-Logic
*which includes:
- Main handler
- Functionality layers
*which consisted of:
- Language Handler
- Function Class
*which owns
- Storage layer
- Command Processor
Original issue reported on code.google.com by [email protected]
on 12 Oct 2012 at 8:31
Implemented the searchDate and searchTimeFunction. Waiting for the searchText.
Original issue reported on code.google.com by [email protected]
on 6 Nov 2012 at 6:16
a sad news first: i am unable to be there from 8:30 to 10:30 since a
performance in KE7 HALL :(
something to be noted beforehand:
DO NOT try to do others' tasks even you have already finished your current
task! do your distributed task only to avoid unexpected death lock!
expected outcome after tonight:
a program with neat UI, can achieve add, delete, undo, update(edit), power
search without bugs, using mature assertions, logging, exceptions system to
handle unexpected errors.
plus, test automation should be applied in the project and documentation of our
project should be updated to v0.3.
therefore, the task list and distribution:
Note: * for optional;
1. finalize our search design ( me, Nhu Thao Nguyen, Henry Wu Pei, Ignatius
Damai);
2. understand regex library (damai, me)
3. finish (debugged) searchTime() (wupei, damai), searchdate() (dami, wupei),
searchText() (me);
4*. finish (debugged) searchReg() (damai, me);
5. UI finalized and debugged (nhu thao);
6. try and catch for exception must work well (nhu thao);
7. assertion study and apply to our project, at least we should come up with a
conceptual model of using assertion (wupei, nhu thao, me);
8. user input, responses from the program need to be logged in a text file (me,
nhu thao);
9. automated unit test (wupei, damai)
9. documentation
in summary, coding tasks will be:
damai will be involved in:
1. search design discussion;
2. understand regex lib;
3. assist wupei to do searchTime() implementation;
4. main in charge of searchdate() implementation;
5*. finish (debugged) searchReg();
6. automated unit test;
nhu thao will be involved in:
1. search design discussion;
2. UI finalized and debugged;
3. try and catch for exception;
4. assist wupei to design assertion system;
5. assist me to design and implement logging system;
wu pei will be involved in:
1. search design discussion;
2. main in charge of searchTime() implementation;
3. assist damai to do searchdate() implementation;
4. main in charge of designing assertion system;
5. automated unit test;
i will be involved in:
1. search design discussion;
2. assist damai to understand regex lib;
3. searchText() implementation;
4. assist wupei to design assertion system;
5. main in charge of logging system prototyping and implementation.
time line for tonight:
Note: leaving for damai and me have been considered
6:30 - 7:30 assertion system discussion, UI finalized (damai is absent)
7:30 - 8:30 power search discussion, test automation discussion (everybody)
8:30 - 10:30 automated unit test can work and be used to test newly written
functions like searchTime() and searchdate(), searchTime() and searchdate()
function implementation, UI finalized, exception system semi finalized,
assertion system further discussion, regex lib studying (i am absent)
milestone 11:00 (allow 1 hour delay):
searchTime(), searchdate() finished and debugged, UI finalized, exception
system semi finalized, prototyped assertion system.
i.e. task to do from 11:00 on should be:
damai will be involved in:
2. understand regex lib;
5*. finish (debugged) searchReg();
nhu thao will be involved in:
3. try and catch for exception;
5. assist me to design and implement logging system;
wu pei will be involved in:
4. main in charge of designing assertion system;
i will be involved in:
2. assist damai to understand regex lib;
3. searchText() implementation;
5. main in charge of logging system prototyping and implementation.
11:00 - 00:00 buffer time
00:00 - 2:00 searchText() finished and debugged, regex lib futher study and
implementation, try and catch finalized, assertion system implementation,
prototyped logging system
milestone 2:00 (allow 1 hour delay):
power search finished and debugged, try and catch finalized, assertion system
semi-implemented, logging system prototyped.
i.e. task to do from 2:00 on should be:
damai will be involved in:
5*. finish (debugged) searchReg();
6. automated unit test;
nhu thao will be involved in:
5. assist me to design and implement logging system;
wu pei will be involved in:
5. automated unit test;
i will be involved in:
5. main in charge of logging system prototyping and implementation.
2:00 - 3:00 buffer time
3:00 - 5:00 automated unit test implemented, logging system implemented,
searchReg() finished and debugged
5:00 - 7:00 documentation time
milestone 7:00:
expected outcome should be achieved, documentation should be finished.
Original issue reported on code.google.com by [email protected]
on 1 Nov 2012 at 6:17
since its a task scheduler, i think we should have another feature, mark-as
done. would you guys agree to add this function if we have time? it will change
our structure by a big margin
Original issue reported on code.google.com by [email protected]
on 6 Nov 2012 at 6:18
FunctionHandler and LangHandler quite optimized. Sufficient comments are added
inside the code, please check!
Some important changes:
No more decoder in LangHandler! Formatted string now is fully formatted,
details can be checked in codes.
Some future improvement:
1. CommandExcutor needs to be amended to adapt to the new style;
2. Encoding part (LangHandler::encoder())should be implemented ( Henry Wu Pei
can you handle it?)
3. Different field can have different color when output ( Ignatius Damai can
you handle it? )
4. Super class Handler is quite redundant, should get rid of it (? need to be
discussed);
5. Should add in features to make our codes more OO like (will handle it
myself).
Original issue reported on code.google.com by [email protected]
on 25 Oct 2012 at 7:05
the codes for searchTime and searchDate has been finalized. Ready for testing.
Original issue reported on code.google.com by [email protected]
on 9 Nov 2012 at 1:29
THe updated architecture requires updates to the following sections:
- Main
- UI Handler
- Storage Handler
- Language Handler
In addition we need new functions and classes as follows:
- Function Handler
- CommandProcessor
- Function Methods
Original issue reported on code.google.com by [email protected]
on 12 Oct 2012 at 8:41
Finished the Did U know box.
Clarification for Nhu Thao
1. defined value format should be
#define THIS_VALUE_IS 1
not
#define thisValueIs 1
2. Do not mix result list and did u know box
-> could you rename the functions?
Original issue reported on code.google.com by [email protected]
on 3 Nov 2012 at 9:07
I have made a HUGE change on our project:
1. get rid of Handler super class (F.H and L.H have changed and UI.H needs to
be changed tonight);
2. get rid of CommandExecutor class, put in Executor and its derived class to
do the job.
Reasons to do so:
1. I found quite redundant for Handler super class to be there: every handler
can have its own Signal status and get/set status function, OOP cannot be shown
here. So now each handler has its own status and get/set status function (F.H
and L.H have changed, UI.H needs to be changed);
2. To involve OOP in our project, I changed our Logic Flow:
2.1 Function handler call language handler to handler user input processing
2.2 Language handler pack up all the things and return an derived Executor
pointer (such as AddExecutor pointer) to Function handler
2.3 Function handler will catch the pointer by an Executor pointer (base class
pointer) and then call the dynamic bound function virtual void execute() to do
the task
2.4 After execution, function handler will then get status from that executor
2.5 After all things done, the Executor pointer should be deleted
Dependency of this logic flow is not increased but shifted:
Old design: F.H->L.H & C.E
New design: F.H ->L.H->Exe
Some logic bugs still in the program, will get rid of them by tonight
Original issue reported on code.google.com by [email protected]
on 25 Oct 2012 at 7:07
Added few more functionality inside the executor such as the decoder. These
function enables the executor to extract different fields from the encoded
string and use it as outputs. The methods are as follows
extractIndex will return the index of the entry
extractDescription will return the description of the entry
extractLocation will return the location of the entry
extractTime will return the time of the entry
extractDate will return the date of entry
extractPriority will return the priority of the entry
Original issue reported on code.google.com by [email protected]
on 25 Oct 2012 at 7:12
hey guys, i have a suggestion on commit log of mercurial. i found some of your
commit logs were quite unclear, sometimes very blur. e.g. "hg told me to
commit" or "i changed a bit". let's come up with a standard style so that it's
easier for others to understand what you have done in that revision. below is
my suggesting style:
when commit a new version:
1. state the main change in the revision. better to have specific function
names, e.g. "LangHandler::isLogicTime() changed", or "decoder added to
Executors";
2. how does the change benefit the code, better to have examples to illustrate,
e.g. "now can handle logic time error like 24:32";
3. whether it is compilable/ runable/ workable;
4. can others make changes on your code?
5. if changes you made need further explanation and you want to explain it
somewhere else like facebook, state it in the commit.
when merging two versions:
1. merge with whom;
2. whether it is compilable/ runable/ workable.
if you found this one is not good, feel free to change it and post again :D
let's try to adopt the style before NOV.1st :)
Original issue reported on code.google.com by [email protected]
on 27 Oct 2012 at 8:37
Adding a conditional printer to reduce the number of printing.
Further optimization is done inside the did u know printer through a new
tracker variable of did u know box
Original issue reported on code.google.com by [email protected]
on 6 Nov 2012 at 6:14
SD for UI V0.4 uploaded to facebook page
Original issue reported on code.google.com by thaongocnhunguyen
on 8 Nov 2012 at 10:31
Branch name: UI Handler
Purpose of code changes on this branch:
To implement the UI layers and input output in accordance to the new design
When reviewing the code changes, please focus on:
The usability of the code and compatibility with the new API
After the review, the codes will be merge to the trunk
Original issue reported on code.google.com by [email protected]
on 12 Oct 2012 at 8:34
hey guys, i pushed my search function v0.1 in a zip file :) i am using a
modified model of editing distance to implement the search function. now it can
tolerant small misspelling and disorder. i will improve it to make it smarter :D
please not that there are three files in the .zip: .cpp, .exe, and .txt. .txt
file is the entries you want to search from and key words you want to search. a
sample I/O is already given in .txt.
NOTE 1: the last line of the .txt should be your search key words !!!
NOTE 2: I suggest you guys run .exe in cmd so that you can see the results
easier :D
have fun with the search function and please give me your IO which makes the
function stupid :P
Original issue reported on code.google.com by [email protected]
on 6 Nov 2012 at 9:08
hey guys, this post may be HUGE :D please be patient and leave your comment
below :D
the post is about some models of power search i came up and their pros and cons
in some situations, please correct me if i am wrong or leave your creative
ideas below :)
do not worry about the coding complexity, 1 - 3 are under my control and
studying 4 :)
these are some models i came up with to fit our power search feature:
Note: examples below are copied from wikipedia, please google them if these
explanations still confuse you :)
1. editting distance (levenshtein distance)
definition for editting distance is: given two strings (not necessarily with
same length), editting distance is the min number of operations, which include
insertion, deletion and substitution, to make them become identical.
e.g.
a = "kitten"
b = "sitting"
editting_distance(a, b) = 3, since changing "k" -> "s", "e" -> "i", adding "g"
in a will make them identical.
2. sequence alignment
definition for sequence alignment: given two strings (not necessarily with same
length), an similarity matrix and a gap penalty value, best sequence alignment
is a alignment that will give the max similarity.
e.g.
a = "AGACTAGTTAC"
b = "CGAGACGT"
gap_penalty = -5
similarity matrix:
A G C T
A 10 -1 -3 -4
G -1 7 -5 -3
C -3 -5 9 0
T -4 -3 0 8
then the alignment:
AGACTAGTTAC
CGA---GACGT
will give:
S(A,C) + S(G,G) + S(A,A) + (3 * d) + S(G,G) + S(T,A) + S(T,C) + S(A,G) + S(C,T)
= -3 + 7 + 10 - (3 * 5) + 7 + -4 + 0 + -1 + 0 = 1
3. longest common sub-sequence
as the name indicates, see example if you are confused.
e.g.
a = "steven"
b = "sevn"
c = "seveneleven"
LCS(a, b) = 4, which is "sevn"
LCS(b, c) = 4, which is "sevn"
LCS(a, c) = 5, which is "seven"
4. regular expression
well, this one is quite hard for me to explain, please google it (forgive my
lazyness :P)
before i study their pros and cons in cases, i would like to stress an
important assumption and go thourgh the work flow of
searching:
--------------------------------------------------------------------------------
-
assumption:
in our project, all fileds can be keys of search. to make our lives MUCH
easier, i would assume that we do not allow flexi command in search, i.e.
search command for each field is fixed, see examples below if you are confused.
e.g.
user wants to search for a time interval, he MUST enter:
search HH:MM-HH:MM
user wants to search for a date, he MUST enter:
search DD/MM/YYYY
user wants to search by regular expression, he MUST enter:
search -reg regular_expression
we should state in user guide that -reg is reserved
user wants to search for descirption/location, he MUST enter:
search key
key can be ANY strings, with or without spaces, i.e. any unformatted
information will be regarded as this type!
however, multiple VALID keys are accepted:
search HH:MM-HH:MM DESCIRPTION
search DD/MM/YYYY HH:MM-HH:MM DESCIRPTION
however, you may find that search for priority field may be a problem since
"high", "mid", "low" could be involved in des/loc.
i propose that if user enters one of "high", "mid", "low", priority field have
higher priority to be searched and displayed, and then others fields.
work flow (priority field is ignored for now):
1. if the first pattern of userInput(exclude "search" command) is recognized as
time, searchTimeInterval() function will be called and return all tasks in that
interval, kill the first pattern, goto 1;
2. if the first pattern of userInput(exclude "search" command) is recognized as
date, searchDate() function will be called and return all tasks in that date,
kill the first pattern, goto 1;
3. if -reg is recoginzed and a valid regular expression is entered, searchReg()
function is called and return all matched results, kill the first pattern, goto
1;
4. searchText() function will be called to search matches in description field
and location field;
--------------------------------------------------------------------------------
-
from the work flow, searchTimeInterval() and searchDate() are quite straight
forward, thus no discussion will be made here. i will focus on regular
expression match and searchText() implementation.
for regular expression, c++ has a built in lib called <regex>. i am studying it
now and some of you may want to learn more about it from c++ reference. after
mastering <regex>, regular expression mathcing can be quite straight forward
(see example in c++ reference).
the most important algorithm we need to come up with is searchText(). the task
for this function is to find a string contains a sub-string with most
similarity to the pattern string.
by using editting distance method, we can list the result according to their
editting distance:
e.g.
pattern = "abc adsf"
match1 = "abc"
match2 = "abc lkji"
lev(pattern, match1) = 5;
lev(pattern, match2) = 4;
result:
1. match1
2. mathc2
however, we may find some matching/dismatching are more important than others,
e.g. matching of space does not important, look at the example given above: two
matches actually give us same information, only "abc" matches; but match2 gain
a higher rank because of a matched space. so we want to specify our need for
string matching. this brings us to sequence alignment method.
gap value = 0;
similarity matrix:
a b c ' ' d s f
a 1 0 0 0 0 0 0
b 0 1 0 0 0 0 0
c 0 0 1 0 0 0 0
' ' 0 0 0 0 0 0 0
d 0 0 0 0 1 0 0
s 0 0 0 0 0 1 0
f 0 0 0 0 0 0 1
SA(pattern, match1) = 3;
SA(pattern, match2) = 3;
for longest common subsequence, i think it can be replaced by above two methods
(only personal opinion, please correct me if you find any counter examples).
therefore, i propose to use sequence alignment to implement searchText().
for time complexity, SA is O(len_pattern * len_match). since we set a
limitation of length, which is 80 characters, doing SA for one string will cost
80^2 operations. considered a MODERN CPU, which will run 10^7 operations per
second, around 1000 entries will be accepted.
thanks for your reading :D please leave your comment below if you find any
mistakes :D
Original issue reported on code.google.com by [email protected]
on 31 Oct 2012 at 8:02
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.