Yesterday I updated my copy of BBEdit, a Mac-only text editor from Bare Bones Software that I have been using for over a decade. I never got far with the program during my English-teaching career, but this semester the program was particularly useful to me in writing Python code for the final project in ECE 463.
After installing the update, I opened the About… window and scrolled down to find a familiar name. I cannot recall what I might have done to get on the list, or whether that is coincidentally someone with the same name, but there I am:
One of my three electrical engineering electives for this final semester is ECE 463: Introduction to Computer Communication Networks. About two weeks ago, we were assigned a final project: Design a P2P Connect-Five game that communicates using the HTTP Protocol.
My partner, Jun Lin, and I quickly decided to use Python for the client-side GUI, since I had done a fair amount of GUI work in the course of my internship this past summer. We opted for Python 3 and used the Anaconda distribution. I did nearly all the Python GUI with the use of tkinter. Because the Spyder3 IDE was taking more time to adjust to than Spyder 2, I ended up relying on Bare Bones Software's BBEdit text editor--the power of which I am now beginning to appreciate--and Mac OS X Terminal. That was it!
Jun Lin worked some magic--the only word I can use, since I know nothing about PHP--for the server-side scripting. Initially we ran the server off my GoDaddy shared hosting account, but we found that it would block us after too many accesses from the same IP addresses. That forced us to turn to a different host, which we happened to have.
Anyway, we will demonstrate the game in class on Wednesday, but I wanted to put up some screenshots. I plan to make my Python GUI code available online at some point, because it would surely be helpful to others.
The following screenshot show the game at startup. We were required to have a 19x19 game board. I opted for check buttons, because they are easy to work with and make nice arrays.
The other screenshot shows a win. Every time black--you (peer is pink)--makes a valid move, my algorithms scan for a vertical, horizontal, SW–NE, or NW–SE win. If one is found, the peer is notified of their loss and scores are updated accordingly. If the peer logs out midway, that is correctly handled. We are rather proud of our game!
Though it began with my reluctance to depart for school, the day turned out to be a very good one for a couple of reasons:
- I was able to figure out viable algorithms for Connect 5, our peer-to-peer final project in ECE 463.
- Purdue's main campus will let me attend Commencement up there.
- A friend called to thank me for passing along the contact information of a recruiter who has since hired him. He is excited about moving to Michigan to work.
- Another friend I had not seen in a while happened by and said he had heard good things about my growing programming skills. They are definitely better, but they are still low.
- My 463 partner found out how to use the old PHP 5.3 that my hosting arrangement provides, which will allow our P2P game to work nicely.
Additionally, it was unseasonably warm: 71°F.
For my networking course, we are assigned some labs that require using a Wireshark, a free packet sniffer. These labs have forced me to start learning some basic commands in Terminal. I am currently running Mac OS X 10.11.
To get one's IP address, assuming en1 to be what you want:
ipconfig getifaddr en1
To find your DNS address:
To flush the DNS cache:
sudo killall -HUP mDNSResponder