Simon contributes to the p5.Speech library

Simon has made a pull request to the p5.Speech GitHub repo (a milestone!) and hopes his request gets merged. In this video he explains what he wants to improve with his contribution.

Later it turned out that someone else made a similar request (with more extras) and that request will probably be merged, so Simon was definitely thinking in the right derection. He got positive response from Daniel Shiffman and it looked like Simon’s comments have sparked a discussion on GitHub.

 

Simon contrubuted to p5.Speech library. Pull request 14 Oct 2017

Simon writing on GitHub: 

This github issue is referring to pull request #7.

As you can see in commit a2a5d38, there are some comments. Which look like 
this:

// this one 'start' cycle.  if you need to recognize speech more

// than once, use continuous mode rather than firing start()

// multiple times in a single script.

The comments are right before the start() function in the p5.SpeechRec 
object. But the commit adds arguments to this function:

p5.SpeechRec.prototype.start = function(continuous, interimResults) {

  if('webkitSpeechRecognition' in window) {

    this.rec.continuous = continuous;

    this.rec.interimResults = interimResults;

    this.rec.start();

  }

}

And before, that piece of code looked like this:

p5.SpeechRec.prototype.start = function() {

  if('webkitSpeechRecognition' in window) {

    this.rec.continuous = this.continuous;

    this.rec.interimResults = this.interimResults;

    this.rec.start();

  }

}

Are the comments "unnecessary" now? In other words, Should we remove 
them or leave them there?
Advertisements

Simon’s Particle Train

Simon made a particle system based on Daniel Shiffman’s latest live stream. Here is the link to Simon’s code on CodePen: https://codepen.io/simontiger/pen/OxvYYW?editors=0010

He also tweeted about it:

Simon’s Chat Bots

Inspired by Daniel Shiffman’s recent live stream on chat bots, Simon made two chat bots himself. He seems to really enjoy the logic behind programming bot conversations. Daniel Shiffman even tried Simon’s second chat bot out during another streaming session today, which made Simon extremely happy:

Daniel trying Simon's chat bot 9 Oct 2017

And this is how Simon filled his chat bot in himself:

Screen Shot 2017-10-07 at 20.35.05

Here is the link to Simon’s demonstration of a chatbot as a programming language, anyone can play with it online at: https://play.rivescript.com/s/HwDyLgbKwY

 

 

 

 

Lessons for Mom continued

It’s great that Simon continues to find the time to teach me some JavaScript. We’re now done with the Basic course he had prepared, below are some impressions. The video is of the rectangle intersection lesson and the “highway” we built.

Later, Simon decided he was wrong with the math defining the vehicles intersecting each other and changed it to:

Screen Shot 2017-10-02 at 16.02.21

This is Simon’s explanation why he changed the formula:

dsc_21131485843373.jpg

From a lesson on importing images:

dsc_21191151075634.jpg

dsc_21161668129738.jpg

dsc_21181439851118.jpg

Circle Intersection (I like the design!)

dsc_1876236677532.jpg

dsc_1882128578110.jpg

Simon Proposes a Community Project in Procedural Design

Inspired by the Processing Community Day projects, Simon came up with an idea to launch his own community project – in procedural design. He used the Coding Train Community Cloud page as inspiration, trying to guess the code used to build it. The videos below show Simon in process of creating the interface.

Simon later presented his project on the Coding Train Slack channel where other members (including Daniel Shiffman) suggested that Simon narrowed down the theme (originally, it was procedural design projects in general and that was too broad). Simon was very upset as he was afraid his “big project” would become too small and couldn’t come up with a theme. Two days later we agreed that he would make several examples for the projects and publish them on the project’s website to give everyone a better idea of what he was looking for.

At the moment, Simon has already published the first example but there seems to be a bug in it, so please view it as work in progress. (Simon originally wrote the code for the Community Cloud project and it worked when he shared it in Processing JS, but on his own project page, using instance mode, the cloud looks like a circle).

Simon writes: Everybody is welcome to contribute to my community project called *Procedural Designs*!
Link to GitHub rep (for this community project: https://github.com/simon-tiger/procedural-designs/ (link to github pages site in the README).

 

 

10 PRINT in p5.js and Python. Emulating a text console.

A simple code creating a beautiful pattern using text:

Based on a coding challenge by Daniel Shiffman, where he created a version of the classic one-line Commodore 64 BASIC program in JavaScript using p5.js. Inspired by the book 10 PRINT (https://10print.org/, Amazon: http://amzn.to/2wJlRVx )

Simon later made a similar project about #10PRINT in Python:

 

View the awesome 10 PRINT creations via the #10print hashtag on Twitter: https://twitter.com/search?f=tweets&q=%2310print%20&src=typd

Simon’s Spellcheck API

Simon has continued with server side programming and made a spellcheck API! Here is the link, you can play with it yourself by adding new words to the corpus (dictionary):

https://spellcheck-api.herokuapp.com/

Here is how the API works:

And the making of, step by step:

 

 

 

 

 

 

 

The project is partially based on what Simon learned from Daniel Shiffman’s tutorials about creating web servers and the materials available online in Daniel Shiffman’s Programming A to Z course (analyzing and generating text-based data) and is partially Simon’s own code.

Wikipedia Crawler

Simon has made his version of Daniel Shiffman’s Wikipedia Crawler, graphing the relatedness between Wikipedia articles.

Play with it yourself online at: https://simon-tiger.github.io/wikipedia-crawler/wikipedia/

Code: https://github.com/simon-tiger/wikipedia-crawler/

Simon writes:

How it Works

Enter a query (e. g. apple) and either hit Enter or press the button “Query the API”. If an article called “Apple” exists, a circle will pop up with th word “Apple” in it. If an article called “Apple” doesn’t exist, a circle with something alse will pop up. Click the circle (or article) to reveal its related articles. As you might expect, you can click any of those articles to reveal its related articles.

Inspiration

The inspiration comes from Daniel Shiffman and its Coding Train. Link to Daniel’s version here.

Text Generating Machine that Posts to Twitter

A milestone in server side programming here, as Simon has built a text generating machine that posts to Simon’s Twitter account! Essentially, it’s website where anyone can enter his own text for the machine to make a “poem” from using an acrostic algorithm; the machine simultaneously posts that “poem” to Simon’s Twitter.

This project falls under the topic of building an interface for Twitter. The original inspiration came from Daniel Shiffman. Simon writes:

You can try my Acrostic machine at http://acrostic-tweeter.herokuapp.com/ and it tweets to my account at https://twitter.com/simontigerh/

In this scenraio, I’m feeding in some text and a word. I’m clicking a button, to tweet the acrostic. I used node to create the server. I later put that server on heroku.

I’m also using a couple of packages:
– express – to host my interface
– socket.io – for the server and the client to talk to eachother
– twit – to tweet the acrostic

 

 

 

 

 

 

In the previous video, I got everything working, except that after I try to use heroku (by typing `heroku login` in git bash), What appeared was:
“`bash: heroku: command not found.
Later we solved this issue by using command prompt:

Simon got positive feedback on his project from Daniel Shiffman, who asked Simon to give some explanation about what the machine on the webpage and also to give a link to Simon’s Twitter:

Acrostic 18 September 2017

The Magformers saga continued

Oops, the Magformers are back in our life. I thought that Simon was over Magformers (which he built with excessively when he was six), but he has picked them up again and taken them to a new level. He seems to be using Magformers to illustrate his increasingly philosophical thoughts in the pauses he takes between lessons and programming. Yesterday, he was quite disturbed after building with the mirror piece for a while and said: “What if two mirrors reflect each other? Would that stop time?” He added: “Just for safety, I’m going to put the mirror in the box. Never, never ever put two mirrors opposite to each other!”

And there is more! Magformers the company has actually contacted Simon on his YouTube channel, saying they loved his Magformers Table program he made in JavaScript and wanted Simon to send them an e-mail and to talk to him about it! Simon put his code on GitHub and shared it, you can view his Magformers Table online here:

https://simon-tiger.github.io/magtables/magtable/

He hasn’t made it interactive yet though. This was the original plan but he got stuck.

DSC_1823