Week 8 – The User

This week was dedicated to creating a Graphic User Interface (GUI). So far this program was run by only me in my command line, this was great for me, because it meant I could find errors easily and I didn’t have to invest any time in making it look nice. The program was coming to a close, so it came time to create the user interface.

terminal.png
Running the code in the command line

I know very little about creating interfaces. In Mr. Balanda’s AP Computer Science, where I learned to code, we skimmed over the interface section in favor of more interesting topics. I did some research and I came across tkinter. tkinter is the most popular python library for creating dialogues (the program window). I did not want to learn tkinter, so I piggybacked off of what others have done. I found some great tutorials on tkinter and how to use it. I took what they wrote and put it into my code. Of course it did not work right away. I did some heavy tweaking to make it work for my purposes. I learned enough about tkinter to understand how it works and how to make it do what I want. That is all I needed in this situation.

 

SVG Editor.png
The GUI, complete with default values and help button

In everything, but coding especially, it is not necessary to reinvent the wheel. Using what others had done and adapting it to your use is the name of the game. Collaboration is a big part of coding, and stackoverflow.com is the place to do it. Odds are someone else has tried something similar to what you are doing. Stackoverflow is a place to post solutions to problems for the world to use, it is the Yahoo! Answers for all things computer science.  I credited a lot of what I used in my program, to give proper recognition.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s