What is arguably the most important part of a programming game? The code editor! Modern programming requires a good IDE and not just a text editor (unless you are a VIM purist). I'm currently hard at work to give you the best possible coding experience in the integrated code editor within JOY OF PROGRAMMING. Here are some of its most useful features.
The Amazing Code Editor
Syntax Highlighting

Important keywords, comments, classes, functions and methods are highlighted in different colors. Eventually more color themes or custom themes will be supported.
Autocompletion / Code Hints

Maybe the most powerful feature of a good IDE is code completion. Essentially providing a list of possible tokens while you are typing. Using the power of the underlying mypy linter and it's type inference, the code editor provides you with context sensitive completion hints. So for example, if you type a dot "." after a variable pointing to a conveyor belt, you will see all member methods of the conveyor belt class.
Tooltips on Mouse Hover

Hover the mouse for a split second over a piece of text and a helpful tooltip will pop-up providing information about the data type, usage details and sometimes example code. You can also select text within the tooltip and copy / paste it (Ctrl-C / Ctrl-V).
Other Goodies
Smaller QoL features of the code editor include undo/redo (Ctrl-Z / Ctrl-Y), changing the font size (Ctrl + mouse-wheel) and focussing entities in the 3D Viewport from the code (right click on the string name of an entity, e.g. "_entityConveyorBelt0".
Python Tips and Tricks
Python supports very flexible truth testing. If you are coming from other languages you might be used to writing your if conditions like so:some_list = [5,6,9]
if len(some_list) > 0:
do_stuff()
However Python supports truth testing any object. And by default, any object that reports length 0 is considered "False". So you can simplify the code above:some_list = [5,6,9]
if some_list:
do_stuff()
For more information have a look at the official Python documentation.
Quiz Time
The solution to the previous quiz is ---> 8 <---.
The next quiz. Can you simplify this code?my_name = "max"
my_age = 38
if my_age>=0 and len(my_name)>0:
print("hello there")
else:
print("invalid")
Write your solutions in the comments below (consider using the [spoiler] and [code] tags).
