Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could...

24
Slider A simple language to automate presentation preparation Daniel Miau Tai-Hsu Lin Ximin Zhang Stephen Chao Chia-Yu Hsu

Transcript of Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could...

Page 1: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

SliderA simple language to automate presentation preparation

Daniel MiauTai-Hsu Lin

Ximin ZhangStephen ChaoChia-Yu Hsu

Page 2: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Imagine:10 minutes before the meeting, and you are still making the last minute update of your presentation…

Page 3: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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

Page 4: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

What if,There were a way to let you automaticallyinclude all the latest simulation data andfigures into your presentation

Page 5: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Imagine:

Page 6: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

With Power Point, it takes

Page 7: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

What if,

Page 8: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from
Page 9: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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

Page 10: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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

Page 11: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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

Page 12: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Select

Slider: Structured

Sort

update?

Page 13: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Traditional search?NO! Consider if you have 100 slides

Page 14: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Say goodbye to manual search,

Just try ‘select’...

With Slider,

Page 15: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

How Slider Helps ?

Well structured+

tags= ?

convenienceefficient storage

Page 16: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Who and when?

• Preparing for various versions of probably the same content.

Lecturesfor

CS 6121graduate

Lecturesfor

CS 4121undergraduate

Page 17: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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.

Page 18: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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… $}

Page 19: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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);

Page 20: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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

Page 21: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Compiler Structure

Page 22: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

Tools we used

• Jflex

• Byacc/J

• Java platform: Eclipse(Subclipse), netbeans

• Version Control: Google Code,SVN

Page 23: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

To test Slider:

• Unit Testing

• White Box Testing

• System Testing

• Used scripts to automate tests

Page 24: Slider - Columbia Universityaho/cs4115_Spring-2011/lectures/10-04-28_Slider.pdf · an user could use the Slider language to simplify his/her work. • Imagine you just came back from

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