Foundational Python
2018-07-21
Here are the briefing slides for my Python presentation at HOPE:
Here are the briefing slides for my Python presentation at HOPE:
It's official: Here's the Python programming lecture that I'll be giving at this year's Hackers On Planet Earth (HOPE) conference in New York City on Saturday, July 21st, 2018:
Here I am (in the middle) with my Master's capstone group from George Washington University, where we presented our GreaterGoods.care system to help charities get more goods donated to them. Note: The site is not yet mobile-friendly on smartphones but it should display correctly on tablets and larger devices.
Our system is meant to be simple and easy to understand, but we featured a number of advanced techniques and have tried our best to design a highly secure web application. Cybersecurity is hugely important to me, so I built the codebase to try and defend against:
In addition, before a user can create an account, they must click on a unique link that is sent to their email account. Also, users can securely reset their password or get a reminder email of what their username is if they forget it. Moreover, user passwords are never stored in plaintext as I have it using a secure hashing algorithm with random salt (bcrypt) to store user passwords. This means that even though I built all of the backend code and have access to the database, I do not know the passwords used by any user. As an example, here is the password hash for the test_user_1 account:
$2y$10$5eCYhInILuAmvfev4elYZufG1a1rFKg6tPvWKrG6DTTo6U.lPD38S
I highly doubt that somebody could easily decrypt that hash to the real password, but if you're able to then please tell me as the bcrypt designers would like to know!
--William
I finalized the code for the OpenVigilance Task for how my client wanted the program to operate. The purpose of the program is to measure the reaction time of test participants by having them stare at a screen for about 25 minutes while a bunch of random letters flash in-and-out quickly and to have each participant press a button only when they see the correct letter. It is pretty tough, believe me! In the future I'll set up a short demo for those who may want to test out the system.
Overall, I am pretty proud of how the web application functions. It allows researchers to place a test participant into four different test conditions. For instance, some people may or may not get a short break and those with a break may see either a short video, a blank screen, or just more random flashing letters (that doesn't require them to press a button during the break).
Actually, this whole project was very unique from a programming point-of-view. Unlike many web applications that allow for lag or other delays, I had to design the program to do things that were NOT standard for web programming, such as forcing a web browser to download an entire ~40 MB video before allowing a participant to start their test. This was tricky as this is not a native feature of HTML5 or JavaScript, as the "Web 2.0" model expects that everybody has a fast connection and can just stream video content when needed. But, my client needed the program to play the video immediately once the break starts for a participant without delay.
Moreover, my program is very precise as it measures the reaction time of each participant in milliseconds (1/1000 of a second) and as well as the millisecond time-stamp of when a random letter was displayed, which I eventually combine into a sensible data report stored as comma-separated (.csv) files. Further, I accounted for situations when a participant is able to initially connect to my website and begin their test, but then their Internet connection drops out for some reason. If this were to happen, I provide instructions on how a test administrator can send me the recorded test results which then I would manually process later. I did this as I would never want a person to take such a hard test for so long to have their data lost simply because of a bad Internet connection.
In closing, it was a fun and challenging programming project, which I hope will help bring about interesting research that may eventually help to understand what may improve a person's reaction time to detail-oriented tasks.
--William
I have been building a custom web application to help researchers conduct what are known as vigilance tasks (also called: sustained attention tasks) on participants. My program, titled OpenVigilance Task, presents a series of random letters that are either O, D, or backwards D to help determine what influences a person's reaction time. In a sense, it's like taking an eye test but it is more difficult as the letters flash in and out rapidly, and the participant needs to press a button every time they see the letter O.
The code is open source under the MPL 2.0 but it is still actively being worked on. Also, because the program is built to help avoid abuse from bots or the like, it requires a test participant to login to the system before any of their reaction data can be recorded. So, this is why the live demo only shows the OpenVigilance Task login page at present.
Eventually, the goal of the source code is to allow other researchers to install their own version on a web server for them to conduct vigilance tasks to their participants that they have selected. I might also continue to host the software as a cloud-like service, but that remains to be seen.
Core technologies used: PHP, HTML5/CSS3/JavaScript, Ajax, MySQL, and custom images that export to millimeter specifications on a display monitor. All pages are validated for W3C compliance of HTML5. Furthermore, the web application is tested on Ubuntu Linux 16.04 LTS (Firefox and Chrome) and MS Windows 10 (Firefox, Chrome, MS Edge, and Opera).