The Concept

In this chapter we are going to discuss the goals behind the language design and implementation.

The First Generation

In this generation we did a lot of research to develop the main ideas behind the project

The Concept of The First Generation

In December 2005, I started to think about developing PWCT.

I started with many ideas and I tested each idea through practical development

In 2007, The core idea was very simple (Goal Designer instead of Code Editor)

We see this in the next screen shot, Instead of writing textual code directly, we follow a procedure of four simple steps

  1. Select a component

  2. Enter the data required for this component

  3. Interact with the steps tree (If you need this)

  4. Run the program

The next diagram demonstrates something similar to what I wrote using a pen and paper to explain the idea to my friends (The diagram uses screen shots from PWCT 2.0 that doesn’t exist at that time).

Hello

At that time, the advantages were very clear

  • Selecting components means we can explore the programming system and start using it without previous knowledge.

  • Separating data from instructions through the data-entry forms provide the ability for quick reuse

  • Using a GUI to program means easy support for translation (Arabic, English, French, etc.)

  • No Syntax Errors (Happy experience for beginners)

  • The generated steps tree (instead of source code) provides a chance for Maximum Readability

  • The generated steps could replace many lines of source code (Higher Abstraction)

  • The generated steps could be in many locations at the same time

  • Interaction with a tree (Steps Tree) provide the ability to control many nodes (Parent & Children) together (Faster)

  • The same component could generate different steps based on the data that we enter through data-entry forms

This design was enough to attract a few thouands of developers until 2009

from 2009 to 2013, We improved the system with the next features

  1. Using Keyboard Shortcuts to improve the writability

  2. Adding Colors & Customization to the Steps Tree

  3. Improving a domain-specific language that are used for developing the components

  4. Supporting more programming languages in the code generation layer

  5. Show/Hide steps based on the context

  6. Two modes (Syntax Directed Editor OR Free Editor + VPL Compiler)

  7. Automatic Documentation (Generate HTML Files from Visual Programs)

  8. Optional automatic update of programs after components update

  9. Adding the Time Dimension

Using the Time Dimension we can

  • Move to a point in the past during development and run the program

  • Play programs as movies to learn how to create a program step by step

For example, the next program print numbers from 1 to 10 and print the Three message after the number 3.

Time Machine 1

Using the Time Machine slider, we can move to the past and run the program before adding the if statement that print the Three message.

Time Machine 2

The previous screen shots uses PWCT 2.0 but, the same idea is implemented in the first generation of PWCT from 2011 (PWCT 1.8)

These updates were enough to attract hundered thousands of developers to download the product and try it!

The Disadvantages of the First Generation

It’s all about the implementation and the missing features!

The concept is very good, that attracted many developers with different background and they started asking about many things!

And Yes! some developers asked about improving the concept itself! (More innovation is required)

  1. Some developers reported that using Code Editors is too much flexibile and faster in some situtations

  2. Slow performance when using large visual source files

  3. Visual Source Files are database files (not textual) which is not good for Version Control software

  4. Support importing the source code (Convert source code files to Visual Source Files)

  5. Opening many files and quick nagivation

  6. Multiplatform support (Windows, Linux & macOS)

  7. Support Web & Mobile development

  8. Support more programming languages

  9. Translation & Unicode

  10. Modern Form Designer

  11. Support powerful libraries and frameworks

  12. More educational resources!

I started to think about all of these issues and feature requests and how I can implement them.

I discovered that I need a new programming language (Ring) that could help me to do all of this in an efficient way

The Second Generation

The second generation (PWCT 2.0) is developed using the Ring programming language

Our goal is to provide a more powerful version of the software that satisfy two conditions

  1. To be an easy tool to start learning about real programming concepts

  2. To be a better replacement for Textual Code Editors

In the first generation we tried to achive the same goals but, we did a lot of mistakes, we learned from them and developed new ideas then we implemented these ideas in PWCT 2.0

I could be brave and say that after PWCT 2.0 development, I don’t see any reason to use a Textual Code Editor when developing Ring applications. The same could be applied for other textual programming languages when we support them.

Improving the Concept

1- The Ring textual language is designed for high writability

2- The PWCT visual language is designed for high readability

3- We can use them together at the same time using (Ring2PWCT)

3.1 - We can write Ring code directly and get the Visual Representation

3.2 - We can import textual source code files and complete projects written in Ring

Interactive Visualizations

In the Goal Designer we can type Ring code directly and PWCT will do the visualization

The next Ring code create an object and a class in one line.

Fast Typing 1

We get the visual output in the Steps Tree

Fast Typing 2

We can continue and write more code, for example using a (For Loop) and (If statement)

Fast Typing 3

Again, we see the output in the steps tree

Fast Typing 4

We can define three functions (one, two & three)

Fast Typing 5

The steps tree are updated

Fast Typing 6

We can call these functions

Fast Typing 7

So, if you are a Ring programmer and know how to write textual Code, You can reuse this knowledge and PWCT will not get in your way!

Fast Typing 8

Import Textual Source Code Files

PWCT 2.0 comes with Ring2PWCT that can import any textual source code file.

We imported all of the Ring applications and samples

For example the next screen shots for the Flappy Bird 3000 game

Flappy Bird1 Flappy Bird2

Improving the Implementation

In the second generation of PWCT, we worked on solving all of the reported problems in the design and implementation of the first generation. Also we implemented most feature requests that are useful and improve the flexibility of the product.

Open Many Files

PWCT 2.0 Support opening many visual source files at the same time

Open Many Files

Inserting Steps

PWCT 2.0 support starting new interactions at any location in the steps tree (Not just Start Here steps)

The new steps will be inserted in the right location

This feature is supported while using components, Ring2PWCT and Paste operations

Auto-Complete

In PWCT 2.0 Interaction Pages, we have better usability through default values, search in listboxes and better auto-complete.

Auto-Complete

64-bit version

We have 64-bit version of the software (no longer limited to ~4gb of memory)