Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could...
Transcript of Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could...
SliderA simple language to automate presentation preparation
Daniel MiauTai-Hsu Lin
Ximin ZhangStephen ChaoChia-Yu Hsu
Imagine:10 minutes before the meeting, and you are still making the last minute update of your presentation…
With Power Point,it takes
for (i = 0; i < 200; ++1){! ! create new slide;! ! (browse->select)! insert a new photo! adjust photo position! fix caption}
Complexity Analysis:
0.7 sec1.2 sec0.5 sec1.5 sec1 sec
(4.9) * 200 + fatigue factor (5 mins time watching youtube) + 2 mins checking NYTimes headline
= 23 mins
What if,There were a way to let you automaticallyinclude all the latest simulation data andfigures into your presentation
Imagine:
With Power Point, it takes
What if,
Slider_class.odp
Slider_pro.odp
Present to Professionals ?
Present to users ?Slider_user.odp
Slider_A.odp
Slider_B.odp
Traditional
Make a copy and update
Slider_class.odp
Slider_pro.odpSlider_user.odp
Slider_A.odp
Slider_B.odp
class pro user A B ...
classIntroEx
Test
IntroExPic
IntroExPic
Pic ...
proIntroEx ... ... ...
user ... ... ...
A ... ...
B ...
...
Redundancy
Traditional
Slider
level 2
level 1
level 1
level 2
level 2
level 2
level 2
Level Control
NY
Chicago
Cluster Control本
Slider: Structured
Unit: Slide
Select
Slider: Structured
Sort
update?
Traditional search?NO! Consider if you have 100 slides
Say goodbye to manual search,
Just try ‘select’...
With Slider,
How Slider Helps ?
Well structured+
tags= ?
convenienceefficient storage
Who and when?
• Preparing for various versions of probably the same content.
Lecturesfor
CS 6121graduate
Lecturesfor
CS 4121undergraduate
Example: Travel pictures
• Here we see a longer example that illustrates how an user could use the Slider language to simplify his/her work.
• Imagine you just came back from a trip to the New York City and Chicago and you wants to give a short talk that includes stories and pictures to your friends.
slide ArchCover : Cover::PhotoAlbumMosaic{ #: ArchCover; #> ArchTextP1; #@ "architecture", Tag::PBegin; this.setTitle("New York Buildings"); folderAddr = "/user/photo/NY/building/"; #insert;}
slide ArchTextP1{ #> ArchTextP2; #@ "architecture"; this.setTitle("New York Buildings: The Story");
$ New York is the most populous city in the United States… $}
String [][] places = { {"NY", "architecture", "/user/photo/NY/building/"} … };
for( int i = 0; i < places.length; i++){ iterator pos = find( myTalk, (#@ == places(i, 0)) && (#@ == places(i, 1)) && (#@ == Tag::PEnd)); String[] picFiles = dir( places[i][2], ".*jpg"); for( int j = 0; j < picFiles.length; j++) { slide tempPage = create( select( #$ == "BigPic")); tempPage.picAddr = picFiles(i).name; pos.add(tempPage); }}
render( myTalk, "/user/presentation/");
set myCluster = create( select( (#@ == "NY") || (#@ == "Chicago")));
list myTalk = sort( myCluster);
System ImplementationTokenize Input File
-Lexical Analyzer (JFlex)
Build Parse Tree and Generate Target Java Code-Syntax Analyzer (Byacc/J)
Generated Java Code works with Backend Libraries
Compiler Structure
Tools we used
• Jflex
• Byacc/J
• Java platform: Eclipse(Subclipse), netbeans
• Version Control: Google Code,SVN
To test Slider:
• Unit Testing
• White Box Testing
• System Testing
• Used scripts to automate tests
What we learned
How to use new tools for creating a language
• Managing everyone to work consistently toward a common goal is difficult
• Pains of sticking to initial project goals
• Dealing with deadlines