Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Google's Simple is the new BASIC

DZone's Guide to

Google's Simple is the new BASIC

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

Google has released a simple, BASIC-like programming language called Simple. However, while the original BASIC language implementation was created as an educational tool to teach programming, Simple is intended for developing Android applications.

"Bringing an easy to learn and use language to the mobile world and the Android platform is the goal of the Simple project." - Herbert Czymontek.

According to Google, Simple programs are form definitions (which contain components) and code (which contains the program logic). The interaction between the components and the program logic happens through events triggered by the components. The program logic consists of event handlers which contain code reacting to the events.

Here is part of the Simple Tetris-like game source code:

' -----------------------------------------------------------------------------

' Analyze keyboard input

' -----------------------------------------------------------------------------

Event Tetris.Keyboard(keycode As Integer)

If keycode = Component.KEYCODE_BACK Then Finish()



If IsGameActive() Then

Select keycode

Case Component.KEYCODE_PAD_LEFT

BrickMoveLeft()



Case Component.KEYCODE_PAD_RIGHT

BrickMoveRight()



Case Component.KEYCODE_PAD_UP

BrickTurnRight()



Case Component.KEYCODE_PAD_DOWN

BrickTurnLeft()



Case Component.KEYCODE_PAD_CENTER, Component.KEYCODE_SPACE

BrickDropDown()

End Select

End If

End Event

Simple is available for Linux, Mac, and Windows. The source code for the implementation is freely available, along with sample applications.

(Please note that Simple is still a work in progress.)

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}