Whether it's programming, material transformations, or competitive gaming, I'm fanatically curious looking at topics from a top-down and bottom-up approach.
Planning ahead, tagging and categorizing notes, and keeping coding/documents modular. When programming or writing technical reports, I make sure future me can understand me, as well as other people.
At UofT I worked with other engineering students, professors, and people in the industry. Multidisciplinary work lead me to collaborate and articulate ideas to a diverse audience.
Failure analysis of Sayano-Shushenskaya hydro power plant.
HAZOP analysis of vinyl chloride monomer pilot plant.
Examining origin and cause of failure of a plastic chair back.
Raspberry Pi News Ticker
Materials selection for smartphone frame
Discord bot for serving Vanguard and Epic card information.
A blog to show off neat websites/services.
Download Fanart posted on the RWBY subreddit.
Skule website for the University of Toronto Concrete Canoe club.
MSE Club website for the materials engineering discipline students.
A personal blog for Cardfight Vanguard.
Skule Website for the Multidisciplinary Analytical Kinesthetic Education Club.
Skule Club Website for Super Smash Brothers Melee for the Nintendo Gamecube.
Modeling Steak cooking times
Blog for another engineering student.
Evaluation scripts from principles of probability and game theory.
Solutions sets to numerical method programming.
Asynchronous music manager for LOVE2D
Fractals are beautiful.
Program atomic configurations using content from first-year courses.
Improvement to End of Life Service
Solution to APS106 problem set in C.
The Sayano-Shushenskaya Hydroelectric Power Station (SSH) is the largest power plant in Russia, but on August 17, 2009 suffered a major incident. This incident was analyzed from a process safety management (PSM) prospective to determine cause and prevention mechanisms to prevent similar disasters.
After reviewing past plant incidents, construction and operation history, an incident narrative was developed to describe the sequence of events that lead to the power plant failure and it’s resulting consequences. Operation parameters considered include turbine maintainence logs, control setpoints, shutdown triggers, and human factors.
A sequence of events was developed, revealing key decisions in poor management, turbine design flaws, and improper operation safety. This is paired with a Fault Tree Analysis, and Event Tree Analysis, provides an overview on where different levels of process safety can be interested.
The following process safety management assessment details solutions to avoid future incidents using all of the four pillars of PSM.
A lessons learned document summarized the failed actions in part of the SSH staff and management followed by some recommended PSM improvements for the SSH as well as other Power Plants, especially those connected to an external Dispatching/Control Center.
Perform a HAZOP analysis of a vinyl chloride monomer pilot plant. PI&D were provided to the team, as well as a map with distances to local facilities and sensitive areas.
Due to the group size and similar class schedule, brainstorming ideas in person is the best method to perform a HAZOP. Google Sheets was used to allow team members to fill in details and calculations after meetings.
From commonly known deviations (low/high temperature, low/high levels, low/high pressure, low/high flow, incorrect material, and human error), causes, consequences, and enabling events were listed out.
For consequences with high environmental, economical, or health factors, caluclations were done to determine frequency of failure and a risk ranking was assigned.
Safety recommendations and expected cost benefits of recommendation were developed for the highest risk. Management of Change documenations highlighted what changes may require a partial or full review of the pilot plant.
Performing an investigation of the origin and cause of failure of a plastic chair back.
The following material analysis was available:
In addition, standards on chair performance and material performance were collected.
A fishbone diagram of possible causes of failure was developed prior to investigation. The report used a Failure-Mode Contributing Factor Analysis (FMCFA) approach to reduce bias and to encompass all the factors that could contribute to the failure of the platic chair back.
Visual Inspection of the crack, along with the tensile test results of the failed chair, provided strong evidence to the cause of the failure. Other tests support the conclusion.
In the last few years, e-mails and word of mouth were the primary methods used to promote events to other students in the MSE discipline. To increase communication of upcoming events different types of media were established including Snapchat, the MSE club website, and Instagram. However it was noted that many students come to the common room during lunch hours, providing another outlet for advertising events. The TV set placed in the room had been underutilized by students, so the suggestion was put forth to convert the TV into a bulletin board.
The TV only has input for HDMI and component cables (no USB port). No option to produce slides was found in the TV software. None of the club members had a portable digital media player, but one had a spare Raspberry Pi to lend. The raspberry pi offered other advantages that were made apparent later:
To ensure the main function is as lightweight and reliable as possible, the raspberry pi used a simple boot script to run an image viewing program called feh. feh is able to take images from external media (a USB) and protray it onto the screen in a variety of ways. It also rechecks all playable files after each cycle, meaning changes made through the wi-fi server and pscp will be returned in real time.
feh -Y -x -q -R 7 -D 7 -B black -F -Z --r /media/
A surprising detail not mentioned much in the Raspberry Pi OS is that it automatically dims the screen after a certain period of time. Even worse, there is no built in method to disable this feature. Ironically the solution was to install a custom screensaver, xscreensaver, and use it’s program to disable the screensaver.
The wifi-adapter was set up as an ad-hoc server due to the absence of a router. A DHCP server program did most of the heavy lifting, however some custom firmware for the usb was necessary. If both setups fail (such as the usb dongle not inserted properly or not receiving enough power), it would default to displaying a slideshow. After a lot of troubleshooting, the Pi had to be downgraded to Debian Squeeze in order for everything to function smoothly.
For streaming twitch videos and other streaming services, streamlink and omxplayer were used. Streamlink is a continuation of the now abandoned livestreamer project, that supports streaming of Twitch videos to a custom video player built to efficiency use the Raspberry Pi’s graphics processor. (Applications like VLC were too slow and stuttered frequently, making it less than ideal). Unfortunately, streaming videos had to be started and stopped via the command line
export DISPLAY=:0.0
DESKTOP=:0 streamlink twitch.tv/teamsp00ky "720p,480p,worst" -np 'omxplayer -o hdmi --timeout 20'
Crtl+Z
disown -h %1
...
top
ps -A | grep
sudo kill <pid>
Streaming Youtube videos required a different program. To allow other students in the MSE discipline the ability to stream videos, RaspiCast was elected as it has video & picture streaming while having clients on Android smartphones.
Students were more informed about upcoming events, and enjoyed the additional features like Youtube and Twitch streaming. Short events like showing off MSE pets allowed them to directly contribute to the ultility of the Raspberry Pi and the installed television.
As of Summer 2018 the Raspberry Pi remains in Wallberg Building Room 143, with control of the Pi and it’s administrative credentials transferred to another student in the MSE discipline club.
Groups of 3-4 students were selected to perform a materials selection project for various items. Our groups item was the frame of a smartphone.
A design card was put together evaluating the function of a smartphone frame, and developing constraints and objectives mainly based on empirical new reports (Most phone companies perform their own testing instead of using military/international engineering standards). From there, materials indexes where calculated with a strength and stiffness constraint, and screened through a variety of parameters. These parameters were fed into CES Edupack to obtain a shortlist of viable candidates. Feasibility analysis of manufacturing and costs were developed to obtain a ranked list.
An environmental analysis was also completed through CES Edupack, however the results were not factored into the final decision.
Collectible trading card games offer a lot of complexity through the interaction between thousands of cards. Online websites for searching through cards are sometimes available, but it’s better for players to be able to retrieve card information without switching applications.
Discord is an application that allows people to commnicate to a server with other people, similar to Messenger or Skype. It is used by many gamers (source?).
Due to the lack of a discord bot for Cardfight Vanguard I made my own to host on other servers. This was a very involved project requiring the following:
This discord bot was maintained for around one year, updating to match requests from other people and various bug fixes. At one point the entire fetching algorithm was changed due to one of the servers being too restrictive. Overall it was a fantastic project and learned a lot about creating bots and testing deliberate attempts to crash the bot (cause some end users are jerks).
Source code for the project is available on github: https://github.com/NanoSmasher/cfvg-discordbot
After programming for several years and finding useful programs to optimize my work, I made a blog to talk about the various services I used.
Check out the blog at nanosmasher.github.io/book-of-topaz
Source code for the project is available on github: https://github.com/NanoSmasher/book-of-topaz
A lot of fan art is posted on the RWBY subreddit (source?), to the point where it is easy to miss good artwork. So it would be nice to download fanart for later viewing and sorting.
As Reddit is a well-established website I first looked for a corresponding API. As well, most fan art is hosted on a popular image board called Imgur, which also has an API. However, for my first revision I used another python module - imgurdl - so I could focus on the Reddit API.
This was my first real project in working with the REST API, but the tutorials and documentation on the API allowed for the program to be developed quickly and iteratively. API requests would have near immediate feedback, and the legibility of json files provided me with a strong understanding of the data structure returned. While the first “version” successfully downloaded images, there were a multitude of issues:
For version 2, the python script was pretty much redone and incorporated the imgur API. With more familiarity with APIs and other python libraries all the previous issues were resolved. For security the encryption is basic but functional, as values are no longer stored as plaintext. Debugging options can be enabled or displayed with verbose options, and the module (hopefully) can be implemented as a module for other projects.
I now have 10GB+ of RWBY fan art in the thousands sorted by year-month but have practically no time to look through and sort them all. A couple of other RWBY enthusiasts have also used the program and sent nice regards.
Artist attribution is still a difficult prospect. Being involved in the RWBY scene since the early days allows me to determine most contributors by art style, but the images downloaded are not going to be redistributed without knowledge of that artist and their intentions. This could be a starting point for a third version…
Source code for the project is available on github: [https://github.com/NanoSmasher/rwby-spider-v2]
Website for delivering:
After meetings with the project manager and previous website maintainer, Jekyll was chosen for the following reasons:
Website was deployed early October in time for the next round of sponsorships. The club website was able to be promoted along with the standard sponsorship package. Four new sponsors provided funding to the club for the following year.
The website was turned over to a new webmaster on September 2016, and has not had any major revamp at the time of this writing.
Visit site at canoe.skule.ca
Source code for the project is available on github: https://github.com/NanoSmasher/canoe.skule.ca
Website used to promote events and activites to other students in the MSE discipline.
Jekyll was chosen for the following reasons:
While word of mouth promoted events and activities more than the website, there were positive comments about the website from the general discipline.
Website was turned over to another developer on September 2017.
Visit the website at mse.skule.ca
Source code for the project is available on github: https://github.com/NanoSmasher/mse.skule.ca
Personally moved over from a WordPress website of the same name, I spent a fair amount of time migrating servers/pages/posts and modules. However, it was worth doing as it:
The blog has been on haitus since July 2016, due to increasing dissatisfaction with game direction. Link to blog
Source code for the project is available on GitHub: https://github.com/NanoSmasher/cfvg-blog
A website to display:
Visit the current website at make.skule.ca
Source code for the project is available on GitHub: https://github.com/NanoSmasher/make.skule.ca
A website to display:
The website was turned over to a new developer on September 2018.
visit the current website at smash.skule.ca
Source code for the project is available on GitHub: https://github.com/NanoSmasher/smash.skule.ca
In the cooking industry, cooking meat is largely based on experience; time required to cook meat to a desired degree is usually approximated due to many complications encountered during its cooking. These problems can come from cooking technique, ingredients involved, and variability in cooking equipment. As such, internal temperature must be measured either very frequently or with an expensive in-situ thermometer. An idealized method to estimate the required amount of time for a steak to reach a desired internal temperature would eliminate many uncertainties, and would only require measurement towards the end of the cooking process. Therefore the objective of this project is to estimate the required time to cook a steak to a certain “degree” (Medium-Rare, Medium, and Well Done).
Source code for the project is available on github: https://github.com/NanoSmasher/MSE316-AA3003-O
Source code for the project is available on GitHub: https://github.com/NanoSmasher/Popculturemecha-github.io
Cardfight Vanguard is a very fun card game (needs source). However there is a lot of heated debate on deck building advice. There are a few core mechanics that fundamentally affect each game:
Probability can solve these problems, however the complexity lies in the multiple ways a card can affect the aforementioned points. This is where scripts can come in handy, as they can perform all the number crunching and calculations without error.
There were some python libraries with probability however the overhead is ridiculous and still not specific enough for the problems to solve, so the code was made from scratch.
Source code for the project is available on github: https://github.com/NanoSmasher/Python-Vanguard-Probability-Modules
In a similar vein to the C problem set solutions for APS106, these solutions are written in Fortran with MATLAB. Again, these are purely for maintaining a schedule of git commits.
Source code for the project is available on github: https://github.com/NanoSmasher/Problem-Set-Solutions-for-MSE238
Loading a lot of music takes a fair amount of time, and is usually accompanied but an discerning freeze. To keep the action going music should be introduced as needed, and loaded in memory without causing slowdowns. This was the goal of LOVE Tobais, and there were only a few functions I aimed to implement:
This was unfortunately way out of my scope. Dynamic loading, signaling, transitions, and such topics made me realize how hard it actually was to implement a framework like this. It made me realize why developers often frontloaded most of the work with long loading screens and black fade out transitions, giving extra props to the games with “seemless loading” in games like God of War (PS4). Seamless loading spans several talks in of itself at gaming conferences, meaning this area still has a lot of room to grow.
Source code for the (failed) project is available on github: [https://github.com/NanoSmasher/love-tobias]
Fractals are beautiful. In here are Julia sets and Mandelbrot sets (from the simple quadratic to the irrational trigonometric functions). Each point in the Mandelbrot set represents a closed Julia set. Each of the programs were built with forward, backward, and boundary scanning methodologies.
Consider a basic function like Q(x) = x^2.
Now consider Q(x) = x^2 + c, where c is a real constant. For a particular seed value c, what values of x will be stable (black), and which values are unstable (white)?
Now consider the function Q(x) = x^2 + c, where c is a seed value containing both real and imaginary parts. A julia set is drawn with horizontal x-axis representing the real part and With the vertical y-axis representing imaginary part, which forms a basin boundary. This can either be one closed shape, or many small ‘open’ islands.
The Mandelbrot set is a dictionary of seed value c which details which Julia Sets whose basin boundaries are open (white) or closed (black). This is why the program does not provide an input for c, as it is already displaying all c values for a Julia set.
Q(x) = x^2 + c is the most famous and notable Mandelbrot set, but any other function can be done.
Source code for the project is available on GitHub: https://github.com/NanoSmasher/lua-fractal-set
Technical leads in the Multidisciplinary Kinesthetic Education Club plan, develop, and prototype a workshop event for junior engineering students to help them establish the practicality of theories they are being taught. Each workshop will need to consider materials cost, time allotted, and additional instruction beyond the main course content.
My goal was to help students understand and interpret crystal structures on a 2D plane. Displaying the real life prototype of the different crystal structures to the class was the traditional (sic) method used as a teaching aid. However, these structures do not show to near infinitesimal repetition of the actual crystal or allow the model to be cut away and viewed in any more than a couple angles. For this, I elected to use Lua (with LOVE framework) and Python (with the VPython framework) to program to freely rotate and cut sections from a repeating 3D structure. The event would focus on these three courses:
The largest issue that arose when developing the program was being able to keep the parts necessary to edit as simple as possible requiring as little programming as necessary, as most students have great trouble with programming*. From presenting my progress on the program throughout the summer, to running a mock event, the program went through numerous iterations to further refine this portion of the workshop.
* As evident from course averages and tone of the course in my year.
On the day of the workshop, 90% of the students were able to complete all the required activities in the allotted time, with the most common issue being interpreting the transformation matrices required for the program to function properly. In the time I spent juggling between the three courses, I had inadvertantly overlooked the linear algebra portion. With this feedback, I learned to give consideration to all objectives. Future revisions of this event would likely remove material from one of the three courses (to allow the workshop to be completed in due time).
Source code for the project is available on github: https://github.com/NanoSmasher/crystal-structure-rotation
The strategies and practice course aims to have groups of engineering students connect with a real client and help solve their problem. From the client statement, a rigourous methodology is used to ensure students are able to seperate the clients needs from their wants and develop multiple solutions to that problem. Evaluating the final project and its viability is done from a purely objective standpoint.
Withholding the client’s name and all other project details, the final solution after many meetings was proposing a website with an integrated app interface. While my team used traditional engineering methods such as weighted decision matrix, reading codes and standards, Gnatt chart project management, communication strategies were the most crucial to the success of the project. A tiered system of messaging was established:
As much as I would like to say it worked, poor leadership in assigning roles still lead to a lot of confusion during the projects’ duration.
My solutions for the C problem sets given in APS106, hosted on Github.
Through testing multiple methods of version-control software, I settled on Git due to its popularity and a large community focused on open source/leisurely licensed programs (Github). After testing Github for Windows, Smartgit, and a few other programs, the git command line ended up the most useful.
I found the computer engineer students in later years are taught what most companies prefer (client-server models like Subversion), much to my dismay…however I did recrete the then famous 2048 game for the rest of the engineering students to toil away at.
Source code for the project is available on github: https://github.com/NanoSmasher/aps106-problems
Check me out more!
In my spare time?
Find out more