Thursday, September 6, 2018

2018/09/06: IchigoJam + Docker/Linux/C Zen/Yoga Programming Workshop

We had fun doing many things today!

At first, Shimono, Shun, and myself, guys in our 20s, went up to the 2nd floor Zen room and did pair programming with IchigoJam connected to a monitor.

We took a break and did about 10 minutes of yoga and everyone said it felt really good!

After that, Dojo-san, an IchigoJam pro showed up, and helped us make a simple game.

For the next break, all 4 of us did Zazen meditation for 10 minutes. I was able to calm down my mind, but one of us had trouble sitting still for that long!

After that we split into two pairs, beginners and advanced, to do our separate projects.

A bit later, the beginners then presented their IchigoJam game that they made.

For the advanced pair, we used Docker on Windows to spin up a CentOS container to make a C program using vi and gcc.

最後は30分ぐらいかけて意見交換しました。シリコンバレースタイルのPivotal LabsのRetrospectiveというなやり方で!ペアとヨガが好きだった人が多くて、同時にさるに攻撃させるのは怖い人も多くて!
At the end, we spent about half an hour exchanging our opinions using the "retrospective" style from Pivotal Labs! Many people liked pair programming and Yoga, and just as many where scared of being attacked by monkeys!

Monday, September 3, 2018

Zen Programming Workshop - Open Source Greenplum Database

Today, I did a Zen programming workshop for about 2 hours with Masashi Dojo, a Japanese programmer with 7 years of experience! We met up at Fukui station, got pumped up after having dinner at a Japanese restaurant with nice Feng Shui, drove over to the Eiheiji Four Seasons Cultural Center, and started the workshop.

At first, we used the WiFi in the first floor office room to download the open source Greenplum code and set up our Docker environment. After that, we went up to the 2nd floor Zen hall.

It was pretty hot, so we went outside to do Zazen meditation on benches/zabuton for about 10 minutes in the beautiful nature under a starry sky surrounding by greenery. Amil got quite calm afterwards, but Masahi got nervours from being on alert of surroundings.

その後はワークショップを続いて、GreenplumのコードのConfigureとBuildとInstallをして、Demo Clusterを立ち上げられました。
After that, we configured, built, and installed the code after which we set up a demo cluster.

Greenplumの構成も少し説明して、簡単なSQL Queryを書きました。
I also explained the Greenplum architecture and we wrote some simple SQL queries.

Finally, we put up an open source PR on GitHub!

At the end we went outside to do Zazen meditation again, but got scared from the noises of animals we felt around us, so ran inside and locked the doors!

Masahi's impressions were first scared! and then thankful that he could study Linux, vi, and GitHub!

Saturday, September 1, 2018

Zen Programming - Private Class

Today, I gave a Zen programming private lesson to Shinichiro Nabeyama, a 15-year-old Japanese high school student who knows a little bit of English and had some prior experience with programming.

While communicating with simple English and Japanese, we used Docker on Windows to spin up CentOS containers, upon which we used vi to write C code that we compiled and ran with gcc.

Shinichiro didn’t have much experience with C, so a lot of our time was spent on explaining the fundamentals of C, but the actual code was not so complicated and we could do some TDD.

#include "assert.h"
#include "stdio.h"
#include "string.h"

char* artist(char* song)
        if (0 == strcmp(song, "levels"))
                return "avicii";
        else if (0 == strcmp(song, "faded"))
                return "alan walker";
        else if (0 == strcmp(song,"lose"))
                return "shinzex";

        return "unknown";

int addBack_old(int x)
        if (x == 0)
                return 0;
        if (x == 1)
                return 1;
        if (x == 2)
                return 1 + 2;
        if (x == 3)
                return 1 + 2 + 3;
        if (x == 4)
                return 1 + 2 + 3 + 4;

        return -1;

int addBack(int x)
        if (x == 0)
                return 0;

        return x + addBack(x-1);

void test()
        assert(addBack(0) == 0);
        assert(addBack(1) == 1);
        assert(addBack(2) == 3);
        assert(addBack(3) == 6);
        assert(addBack(4) == 10);

int main()
        //printf(artist("levels")); printf("\n");
        //printf(artist("faded")); printf("\n");
        //printf(artist("lose")); printf("\n");


        //for (int i = 0; i <= 4; i++)
        //      printf("%d", addBack(i));
        //      printf("\n");

Recursive functionの作り方も教えました。
I also taught a bit about recursive functions.

Of course, being a Zen programming workshop, we did Zazen. Also, I showed Shinichiro some of the Yoga I had been practicing for 13 years.

Extreme Programmingというなシリコンバレースタイルのペアプログラミングもやってて、2つのモニター、2つのキーボード、2つのマウスでした。あいにく、しん君のキーボードは日本語版だったからかなり苦労しました。
Using the “Silicon Valley style” Extreme programming, we used 2 monitors, 2 keyboards, 2 mice. Unfortunately, Shinichiro’s keyboard was Japanese so we had some difficulties there!

We also had some trouble turning on the lights in the Zazen room, as well as no fan, so Shinichiro was bearing the heat!

It was a short 3 hours, but we were able to do many things, and make some mistakes to help make next time even better!

Sunday, August 26, 2018

Beginner's Zen Programming Workshop @Eiheiji

We ran the first Zen programming workshop at the Eiheiji Four Seasons Cultural Center on 2018/8/26!

At first, we went up to the 2nd floor Zazen room, where we got about an hour of time from a Soto Zen monk, who explained to us the fundamental of Zen and how to do Zazen meditation. We then did Zazen for about 10 minutes.

After this, we all went to the 1st floor office space, gave introductions, and listened to a lecture from Amil about Zen x Silicon Valley x Inner Peace programming style. Then, we all returned to the 2nd floor Zazen room and did Zazen for about 10 minutes.

Back at the 1st floor office space, we did pair programming, TDD, and made a simple HTML/JavaScript web page.

Our website source code is below:

At the end, we again did Zazen at the 2nd floor, came back to the office room and exchanged our opinions.