Since I have been playing with ChatGPT, and Bing Chat came out, I thought I’d try it. I already had a baseline dealing with writing Python for dice rolling, so I thought I’d start with the same kind of query for Bing Chat.
I asked:
Using the Visual Studio Python IDE Python Development Tools to deploy an application for the Android platform?
The answer I got back was:
Hello, this is Bing. I searched the web for your query and found some results that might be helpful.
According to the search results, Visual Studio is a powerful IDE for Python language on Windows, and it provides open-source support for the Python language through the Python Development and Data Science workloads12. You can use Visual Studio to edit, debug, and test Python code, and then publish an app3.
However, developing for Android using Python comes with some additional challenges, as Python is not “native” on those platforms, so you have to include Python with your app, and there are no “official” Pythons for either platform4. You might want to use some tools or frameworks that can help you create Android apps with Python, such as Briefcase5, Kivy5, or BeeWare5.
That was nice, and clear about the Android side of things but still left be wondering about the Visual Studio installation. I had to ask a follow up question:
What would I need to do on Windows Visual Studio to install kivy to develop for the android platform?
And the reply was:
I searched the web for your query and found some results that might be helpful.
According to the search results, to install Kivy on Windows Visual Studio, you need a compiler. On Windows, the Visual Studio Build Tools are required, and they are available for free1. You can either download and install the complete Visual Studio IDE, which contains the build tools1, or download and install only the build tools1. Then, you can use pip to install Kivy2.
To develop for Android using Kivy, you need to create a Python file and a Kivy file for your app. You can use Kivy’s widgets and layouts to design your interface, and use Python’s logic to implement your functionality3. You can also use Kivy’s APIs to access Android features, such as vibration, sensors, texting, etc4. To test your app, you can use the Kivy Launcher app, which allows you to run your Kivy app without a compilation step4. To compile and publish your app, you need to use the Buildozer tool, which can create a fully signed AAB (Android App Bundle) for your app4.
That is different answer than the one from Chat GPT. It was more succinct but not quite as detailed.
So I thought I’d give it the first question I gave ChatGPT related to GUI development that really shocked me:
write a graphic user interface in python that rolls two dice using Kivy
The answer was a bit underwhelming:
I searched the web for your query and found some results that might be helpful.
According to the search results, to create a graphic user interface in python using Kivy, you need to import the Kivy library and create an App class that inherits from the App base class1. The App class has a build() method that returns a widget that will be displayed on the screen1. You can use various widgets and layouts from the Kivy library to design your interface, such as Label, Button, BoxLayout, GridLayout, etc2. You can also use the Canvas instruction to draw shapes and lines on the screen3.
To create a graphic user interface in python that rolls two dice using Kivy, you need to import the random module and create a function that generates two random numbers between 1 and 6, and returns them as a tuple4. You also need to create a Label widget that displays the result of the dice roll, and a Button widget that triggers the dice roll function when clicked5. You can use a BoxLayout or a GridLayout to arrange the widgets on the screen2.
Here is an example of a Python file and a Kivy file for a graphic user interface that rolls two dice using Kivy:
# dice.py
import kivy
kivy.require('2.1.0')
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import StringProperty
import random
class DiceApp(App):
# A property to store the result of the dice roll
result = StringProperty('Roll the dice!')
def build(self):
# Create a box layout to hold the widgets
layout = BoxLayout(orientation='vertical')
# Create a label widget to display the result
self.label = Label(text=self.result, font_size=50)
# Create a button widget to trigger the dice roll
self.button = Button(text='Roll', font_size=50, on_press=self.roll_dice)
# Add the widgets to the layout
layout.add_widget(self.label)
layout.add_widget(self.button)
# Return the layout as the root widget
return layout
def roll_dice(self, instance):
# Generate two random numbers between 1 and 6
dice1 = random.randint(1, 6)
dice2 = random.randint(1, 6)
# Update the result property with the dice values
self.result = f'{dice1} + {dice2} = {dice1 + dice2}'
# Run the app
if __name__ == '__main__':
DiceApp().run()
# dice.kv
<DiceApp>:
# Define the appearance of the widgets
label:
color: 0, 0, 0, 1 # Black text
size_hint: 1, 0.8 # Take 80% of the vertical space
button:
background_color: 0, 0, 1, 1 # Blue background
color: 1, 1, 1, 1 # White text
size_hint: 1, 0.2 # Take 20% of the vertical space
It did give me some code and it gave me references that were totally missing from ChatGPT but I was not as impressed.
I will need to try and go back and forth between the two and see what happens.
It did make me think about writing a paper with Bing Chat (to get the references) and then having ChatGPT make it better. So, I asked my question that started me down the path of looking at ChatGPT:
Write 500 words about the origin of computer aided design.
Even though it said it couldn’t do it, it produced a surprisingly good response:
I searched the web for your query and found some results that might be helpful.
According to the search results, computer aided design (CAD) is the use of computers to facilitate or assist design, especially in engineering and architecture1. The term CAD emerged in the 1950s and is commonly credited to Douglas Ross, a computer scientist who was working at MIT when the acronym was coined23. The origin of CAD can be traced back to the Second World War, when there was a huge wave of development in computing1.
One of the earliest examples of CAD was the Program for Numerical Tooling Operations (PRONTO), the very first Computer Numerical Control (CNC) programming system, developed by Patrick Hanratty in 19571. PRONTO allowed the creation of numerical control programs for machining parts using a computer1. Another pioneer of CAD was Ivan Sutherland, who developed Sketchpad in 1963, the first interactive computer graphics program that allowed users to draw and manipulate geometric shapes on a screen using a light pen4.
The development of CAD was influenced by the advancement of computer hardware and software, such as the invention of the transistor, the integrated circuit, the mouse, the graphical user interface, and the object-oriented programming25. The first commercial CAD systems were introduced in the late 1960s and early 1970s, such as ADAM (Automated Drafting And Machining), DAC-1 (Design Augmented by Computer), and CADAM (Computer Augmented Drafting And Manufacturing)2. These systems were mainly used for 2D drafting and design, and were expensive and limited to large corporations and institutions2.
The 1980s and 1990s saw the emergence of 3D modeling and rendering, parametric and feature-based modeling, solid and surface modeling, and computer-aided engineering (CAE) and manufacturing (CAM) integration24. Some of the notable CAD systems of this era were AutoCAD, CATIA, Pro/ENGINEER, SolidWorks, and Unigraphics2. These systems were more affordable and accessible, and enabled more complex and realistic design and simulation2.
The 21st century has witnessed the development of cloud-based, web-based, and mobile CAD systems, as well as the application of CAD in various fields, such as animation, gaming, biomedical, and fashion24. Some of the current trends and challenges in CAD are artificial intelligence, virtual and augmented reality, additive manufacturing, and collaborative and distributed design24. CAD has become an indispensable tool for designers and engineers, and has revolutionized the design process and the quality of the products24.
With references that were totally missing from the ChatGPT response.
So I went to Chat GPT and asked it to improve the essay. ChatGPT produced the following:
Computer-aided design (CAD) is a technology that has revolutionized the way that engineers and designers create and refine products. Simply put, CAD is the use of computers to facilitate or assist in the design process, particularly in the fields of engineering and architecture. From its humble beginnings in the 1950s to its current use in a wide range of industries, CAD has come a long way in terms of both capabilities and accessibility.
The term “CAD” is commonly credited to Douglas Ross, a computer scientist who was working at MIT when the acronym was coined in the 1950s. However, the origins of CAD can be traced back even further, to the Second World War, when there was a huge wave of development in computing. One of the earliest examples of CAD was the Program for Numerical Tooling Operations (PRONTO), which was the very first Computer Numerical Control (CNC) programming system. PRONTO allowed the creation of numerical control programs for machining parts using a computer. Another pioneer of CAD was Ivan Sutherland, who developed Sketchpad in 1963. This was the first interactive computer graphics program that allowed users to draw and manipulate geometric shapes on a screen using a light pen.
The development of CAD was influenced by the advancement of computer hardware and software, such as the invention of the transistor, the integrated circuit, the mouse, the graphical user interface, and the object-oriented programming. The first commercial CAD systems were introduced in the late 1960s and early 1970s, such as ADAM (Automated Drafting And Machining), DAC-1 (Design Augmented by Computer), and CADAM (Computer Augmented Drafting And Manufacturing). These systems were mainly used for 2D drafting and design, and were expensive and limited to large corporations and institutions.
The 1980s and 1990s saw the emergence of 3D modeling and rendering, parametric and feature-based modeling, solid and surface modeling, and computer-aided engineering (CAE) and manufacturing (CAM) integration. Some of the notable CAD systems of this era were AutoCAD, CATIA, Pro/ENGINEER, SolidWorks, and Unigraphics. These systems were more affordable and accessible, and enabled more complex and realistic design and simulation.
The 21st century has witnessed the development of cloud-based, web-based, and mobile CAD systems, as well as the application of CAD in various fields, such as animation, gaming, biomedical, and fashion. Some of the current trends and challenges in CAD are artificial intelligence, virtual and augmented reality, additive manufacturing, and collaborative and distributed design. CAD has become an indispensable tool for designers and engineers and has revolutionized the design process and the quality of the products.
A definite style improvement though now all the references disappeared.
A mixed bag of results from my perspective.