biicode openexpoday

62
Francisco Fernández Castaño @fcofdezc www.biicode.com

Upload: fcofdezc

Post on 15-Jan-2015

131 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Biicode OpenExpoDay

Francisco Fernández Castaño

@fcofdezc

www.biicode.com

Page 2: Biicode OpenExpoDay
Page 3: Biicode OpenExpoDay

Multiple Paradigms

Code Reuse

Page 4: Biicode OpenExpoDay

➜ node git:(master) ls -l deps total 0 drwxr-xr-x 13 fran staff 442 16 feb 17:22 cares drwxr-xr-x 15 fran staff 510 16 feb 17:22 http_parser drwxr-xr-x 7 fran staff 238 16 feb 17:22 mdb_v8 drwxr-xr-x 21 fran staff 714 16 feb 17:22 npm drwxr-xr-x 7 fran staff 238 16 feb 17:22 openssl drwxr-xr-x 25 fran staff 850 16 feb 17:22 uv drwxr-xr-x 23 fran staff 782 16 feb 17:22 v8 drwxr-xr-x 29 fran staff 986 16 feb 17:22 zlib ➜ node git:(master)

Page 5: Biicode OpenExpoDay
Page 6: Biicode OpenExpoDay
Page 7: Biicode OpenExpoDay
Page 8: Biicode OpenExpoDay

sudo apt-get install opencv

Page 9: Biicode OpenExpoDay

brew install opencv

Page 10: Biicode OpenExpoDay

????? opencv

Page 11: Biicode OpenExpoDay

There are Tons of Windows users

Page 12: Biicode OpenExpoDay

There are Tons of Windows users

Page 13: Biicode OpenExpoDay
Page 14: Biicode OpenExpoDay

SETUP

Page 15: Biicode OpenExpoDay

Your computer

Your system

Your tools

SETUP

Page 16: Biicode OpenExpoDay
Page 17: Biicode OpenExpoDay

biicode way

#include “google/gtest/gtest.h”

bii find

sleep

Page 18: Biicode OpenExpoDay

Talk is cheap. Show me the code.

Linus Tolvards

Page 19: Biicode OpenExpoDay

Biicode in action$ bii new hello

Page 20: Biicode OpenExpoDay

$ bii new hello

#include “google/gtest/gtest.h" !int sum(int a, int b) {return a+b;} TEST(Sum, Normal) { EXPECT_EQ(5, sum(2, 3)); } int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }

$ vimfran/helloblock/main.cpp

Biicode in action

Page 21: Biicode OpenExpoDay

$ bii new test

$ vim

$ bii find

Biicode in action

Page 22: Biicode OpenExpoDay

$ bii new test

$ vim

$ bii find

$ bii cpp:build

Biicode in action

Page 23: Biicode OpenExpoDay

$ bii new test

$ vim

$ bii find

$ bii cpp:build

$ ./bin/test

Biicode in action

Page 24: Biicode OpenExpoDay

Biicode in action

[==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from Sum [ RUN ] Sum.Normal [ OK ] Sum.Normal (0 ms) [----------] 1 test from Sum (0 ms total) ![----------] Global test environment tear-down [==========] 1 test from 1 test case ran. [ PASSED ] 1 test.

Page 25: Biicode OpenExpoDay

Hello Bii!!$ bii new hello

Page 26: Biicode OpenExpoDay

Hello Bii!!$ bii new hello

#include “hello.h” int main(){ hello(); }$ vim

void hello();

#include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; }

fran/helloblock/main.cpp

fran/helloblock/hello.h

fran/helloblock/hello.cpp

Page 27: Biicode OpenExpoDay

Hello Bii!!$ bii new hello

#include “hello.h” int main(){ hello(); }$ vim

void hello();

#include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; }

fran/helloblock/main.cpp

fran/helloblock/hello.h

fran/helloblock/hello.cpp$ bii cpp:build HelloBii!!

Page 28: Biicode OpenExpoDay

#include “hello.h” int main(){ hello(); }

void hello();

#include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; }

fran/helloblock/main.cpp

fran/helloblock/hello.h

fran/helloblock/hello.cpp

Dependency Graph

Page 29: Biicode OpenExpoDay

ADD_EXECUTABLE(fran_hello main.cpp hello.cpp)

CMakeLists.txt

Automatic building

Page 30: Biicode OpenExpoDay

Publish

$ bii publish tag: STABLE msg: MyHello main.cpp

hello.h

hello.cpp

main.cpp

hello.h

hello.cpp

MacBook Fran

biicode

Page 31: Biicode OpenExpoDay

Just one command is necessary

Page 32: Biicode OpenExpoDay

Reuse & Play(john) $ bii new hello

Page 33: Biicode OpenExpoDay

Reuse & Play$ bii new hello

#include “fran/helloblock/hello.h” void repeat(){ hello(); hello(); }$ vim

void repeat();#include “repeat.h” int main(){ repeat(); }

john/repeatblock/repeat.h

john/repeatblock/main.cpp

Page 34: Biicode OpenExpoDay

Reuse & Play$ bii new hello

#include “fran/helloblock/hello.h” void repeat(){ hello(); hello(); }$ vim

void repeat();#include “repeat.h” int main(){ repeat(); }

john/repeatblock/repeat.h

john/repeatblock/main.cpp

$ bii find

$ bii cpp:build

HelloBii!!HelloBii!!

Page 35: Biicode OpenExpoDay

Find

main.cpp

hello.h

hello.cpp

biicode

void repeat();

john/repeatblock/repeat.h

john/repeatblock/main.cpp

fran/helloblock/hello.h

fran/helloblock/hello.cpp

src dep

Page 36: Biicode OpenExpoDay

ADD_LIBRARY(fran_hello hello.cpp) ADD_EXECUTABLE(john_repeat main.cpp) TARGET_LINK_LIBRARIES(john_repeat fran_hello)

CMakeLists.txt

Automatic building

Page 37: Biicode OpenExpoDay

Publish

$ bii publish tag: STABLE msg: MyRepeat main.cpp

repeat.h

main.cpp

hello.h

hello.cpp

PC John

biicode

Page 38: Biicode OpenExpoDay

Publish

main.cpp

hello.h

main.cpp

hello.h

hello.cpp

PC John

biicode

main.cpp

repeat.h

Page 39: Biicode OpenExpoDay

Reuse & Play(carmack)$ bii new doom3

$ vim

void repeat();

#include “john/repeatblock/repeat.h” int main(){ repeat(); }

john/doom3/main.cpp

$ bii find

$ bii cpp:run

HelloBii!!HelloBii!!

Page 40: Biicode OpenExpoDay

main.cpp

hello.h

hello.cpp

biicode

main.cpp

repeat.h

Reuse & Play

Page 41: Biicode OpenExpoDay

Update

$ vim #include “hello.h” void hello(){ cout<<“Bii rocks!”<<endl; }

fran/helloblock/hello.cpp

$ bii publish tag: STABLE msg: 2 version

Page 42: Biicode OpenExpoDay

main.cpp

hello.h

hello.cpp

0

main.cpp

hello.h

hello.cpp

1

hello.cpp

Page 43: Biicode OpenExpoDay

Reuse & Play

#include “repeat.h” int main(){ repeat(); }

(john)$ bii find —-update

$ bii cpp:build

Bii rocks!Bii rocks!

Page 44: Biicode OpenExpoDay

dependency resolution policies can be defined

Page 45: Biicode OpenExpoDay

Tags and Versions

Authors

Branches

Page 46: Biicode OpenExpoDay

biicode guarantees compatibility between files

Page 47: Biicode OpenExpoDay

Other features

Page 48: Biicode OpenExpoDay

Data dependencies

Automatic build configuration

Collaboration

Page 49: Biicode OpenExpoDay

real file level usage metrics

Page 50: Biicode OpenExpoDay

main.cpp

hello.h

hello.cpp

biicode

main.cpp

repeat.h

Page 51: Biicode OpenExpoDay
Page 52: Biicode OpenExpoDay
Page 53: Biicode OpenExpoDay
Page 54: Biicode OpenExpoDay
Page 55: Biicode OpenExpoDay
Page 56: Biicode OpenExpoDay

How?

Page 57: Biicode OpenExpoDay
Page 58: Biicode OpenExpoDay
Page 59: Biicode OpenExpoDay
Page 60: Biicode OpenExpoDay

PREMIUM USERS

OPEN SOURCE PROPRIETARY CODE

FREE USERS

€$

REVENUE SPLIT

$

Biicode gives back!

Page 61: Biicode OpenExpoDay
Page 62: Biicode OpenExpoDay

Thanks!