{"generator":"Jekyll","link":[{"@attributes":{"href":"https:\/\/noahkeck.dev\/feed.xml","rel":"self","type":"application\/atom+xml"}},{"@attributes":{"href":"https:\/\/noahkeck.dev\/","rel":"alternate","type":"text\/html"}}],"updated":"2022-12-12T21:56:36+00:00","id":"https:\/\/noahkeck.dev\/feed.xml","title":"Noah Keck","subtitle":"Home Page","entry":[{"title":"CheatBase","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/project\/2022\/06\/24\/cheatbase\/","rel":"alternate","type":"text\/html","title":"CheatBase"}},"published":"2022-06-24T17:03:00+00:00","updated":"2022-06-24T17:03:00+00:00","id":"https:\/\/noahkeck.dev\/project\/2022\/06\/24\/cheatbase","content":"<h1 id=\"a-retro-game-cheaters-database\">A Retro Game Cheater\u2019s Database<\/h1>\n\n<p>This Database has been designed with the purpose of being used primarily with emulators to automatically find cheat codes related to a game. It can also be theoretically used by anyone to find the cheat codes for any particular game if they have basic knowledge of SQL.<\/p>\n\n<p>Using a series of Python database tools, I have an easy way to import and export .csv files containing correlated data into an SQL database. I also wrote the tools to be capable of re-organizing the entire database, while still maintaining the relational data. That is, it can alter the primary keys of each table and automatically update the foreign keys.<\/p>\n\n<p>Currently my goal for this database is to be included in a future release of Riley Testut\u2019s <a href=\"https:\/\/deltaemulator.com\">Delta Emulator<\/a> to allow users to simply search for cheats in app instead of needing to search for them online.<\/p>\n\n<p>Here is a link to the <a href=\"https:\/\/github.com\/CheatBase\">CheatBase GitHub organization<\/a> that I created for the new cheat code database.<\/p>\n\n<p>By no means is this a complete database, if you are interested in contributing or reporting a code that doesn\u2019t work, please open an issue \/ pull request on the GitHub repo or contact me directly. At the time of writing, there are roughly 10,000 Nintendo DS cheat codes included, with my current work to include roughly 400,000 more.<\/p>\n\n<h2 id=\"the-relational-design\">The Relational Design<\/h2>\n\n<p>It uses the <a href=\"https:\/\/github.com\/OpenVGDB\/OpenVGDB\/releases\/\">OpenVGDB database<\/a> as its core for ROM hashes and game releases. This makes the database a must have for any emulator as it can get you cover art, various metadata, and now cheat codes for a plethora of games and consoles.<\/p>\n\n<table class=\"bordered-table\" style=\"margin: 1.5rem;\">\n  <thead>\n    <tr>\n      <th>Table Name<\/th>\n      <th>Table Description<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>ROMS<\/td>\n      <td>The (mostly) complete list of ROMs for every supported system and its technical details.<\/td>\n    <\/tr>\n    <tr>\n      <td>RELEASES<\/td>\n      <td>The release info related to a single ROM including cover image, region, and developer data.<\/td>\n    <\/tr>\n    <tr>\n      <td>REGIONS<\/td>\n      <td>A list of every release region which can include a single or multiple countries.<\/td>\n    <\/tr>\n    <tr>\n      <td>SYSTEMS<\/td>\n      <td>A list of the supported consoles and handhelds and their technical details.<\/td>\n    <\/tr>\n    <tr>\n      <td>CHEATS<\/td>\n      <td>The list of cheat codes, their related data, and their usage.<\/td>\n    <\/tr>\n    <tr>\n      <td>CHEAT_DEVICES<\/td>\n      <td>The list of various devices that cheat codes were written for.<\/td>\n    <\/tr>\n    <tr>\n      <td>CHEAT_CATEGORIES<\/td>\n      <td>A working list of the types of functions that cheat codes implement.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Using the ROMS table, the intended ROM cam be found either through the name of the game or using hashes of the file. Then with the correct romID acquired, it can be used to find the corresponding releases (which contain cover art and other useful metadata) as well as any cheat codes.<\/p>\n\n<p>To learn more about the database, check out the <a href=\"https:\/\/github.com\/CheatBase\/CheatBase\/blob\/master\/README.md\">README<\/a> and the <a href=\"https:\/\/github.com\/CheatBase\/CheatBase\/blob\/master\/CONTRIBUTING.md\">Contributors Guide.<\/a><\/p>","author":{"name":"noah"},"category":[{"@attributes":{"term":"project"}},{"@attributes":{"term":"sql"}},{"@attributes":{"term":"python"}},{"@attributes":{"term":"cheatcodes"}},{"@attributes":{"term":"retrogames"}}],"summary":"A Retro Game Cheater\u2019s Database"},{"title":"Three-Dimensional Sudoku Thesis","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/blog\/2022\/05\/24\/three-dimensional-sudoku-thesis\/","rel":"alternate","type":"text\/html","title":"Three-Dimensional Sudoku Thesis"}},"published":"2022-05-24T16:02:00+00:00","updated":"2022-05-24T16:02:00+00:00","id":"https:\/\/noahkeck.dev\/blog\/2022\/05\/24\/three-dimensional-sudoku-thesis","content":"<p>After a very busy spring semester, filled with Esports competitions, band concerts, and a senior thesis. I\u2019m happy to finally have some time to write another blog post, this one offering up a quick look at my completed senior thesis.<\/p>\n\n<h1 id=\"albion-college-prentiss-m-brown-honors-thesis\">Albion College Prentiss M. Brown Honors Thesis<\/h1>\n\n<p>As part of the requirement to graduate from Albion College with Honors, I had to attend four semester-length classes on varying subjects and draft a written thesis on a subject of my choosing.<\/p>\n\n<p>I have adored puzzles and games for as long as I can remember. Whether it was building enormous LEGO\u00ae sets, solving extreme dot-to-dot puzzle books, or just playing strategy games, I always had a puzzle to solve. This is largely where I find my love for computer science too!<\/p>\n\n<p>So naturally, Sudoku puzzles are of great interest to me. Back when I was still a high school student, I wrote a <a href=\"\/project\/2018\/03\/19\/sudoku-generator\/\">Sudoku generator application<\/a> that allowed users to generate and the solve the puzzle all in the application. An endless supply of fresh Sudoku for the puzzle lover.<\/p>\n\n<p>However, Sudoku generators have been around since the very same time that the puzzle rose to sudden popularity. (In fact, the person who is largely responsible for their popularity, Wayne Gould, wrote a Sudoku generator himself.)<\/p>\n\n<p>So for my project, I wanted to create something more complex that has never really had much time in the light. And this was how I got to my project idea: Sudoku puzzle generation in the third dimension.<\/p>\n\n<h1 id=\"sudoku-variations\">Sudoku Variations<\/h1>\n\n<p>The first thing that\u2019s highly important to understand is that there are a great many variations for three-dimensional Sudoku puzzles and there is not a single \u201cstandard\u201d puzzle format.<\/p>\n\n<p>Here\u2019s just a few of the varieties I found while exploring the subject:<\/p>\n\n<h3 id=\"isodoku\">IsoDoku<\/h3>\n\n<p>Easily recognizable by their isometric design. They are not really designed to by playable in the third dimension, they are merely projections onto the third dimension.<\/p>\n\n<p><img src=\"\/assets\/images\/isodoku_puzzle.png\" alt=\"IsoDoku Example\" style=\"max-width: 400px; height: auto; width: 90%\" \/><\/p>\n\n<h3 id=\"cubic-sudoku\">Cubic Sudoku<\/h3>\n\n<p>A true three-dimensional puzzle<sup id=\"fnref:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\" rel=\"footnote\">1<\/a><\/sup>, these Sudoku puzzles are typically presented with their cubes flattened and the planes stretched vertically or horizontally.<\/p>\n\n<p><img src=\"\/assets\/images\/cubic_sudoku.png\" alt=\"Cubic Sudoku Example\" style=\"max-width: 200px; height: auto; width: 90%\" \/><\/p>\n\n<h3 id=\"other-variants\">Other Variants<\/h3>\n\n<p>These are also sometimes considered SudokuKubes or Sudoku Cubes.<\/p>\n\n<p><img src=\"\/assets\/images\/sudoku_cube4.png\" alt=\"Example of another three-dimensional Sudoku puzzle\" style=\"max-width: 300px; height: auto; width: 90%\" \/><\/p>\n\n<h1 id=\"the-algorithms-behind-three-dimensional-sudoku\">The Algorithms Behind Three-Dimensional Sudoku<\/h1>\n\n<p>The generation of most types of Sudoku, including three-dimensional, is best approached in a two-step method:<\/p>\n\n<ul>\n  <li>First, a valid Sudoku solution is produced with all Sudoku rules being fulfilled and met.<\/li>\n  <li>Then, individual clues<sup id=\"fnref:2\" role=\"doc-noteref\"><a href=\"#fn:2\" class=\"footnote\" rel=\"footnote\">2<\/a><\/sup> are removed from the solution until the desired quantity of clues are left. All while ensuring that there is only ever one valid solution to the puzzle.<\/li>\n<\/ul>\n\n<p>There are a few different approaches to the actual algorithms covered in the actual thesis, but the ultimately best one to generate a valid Sudoku solution is shown below:<\/p>\n\n<div class=\"language-csharp highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">private<\/span> <span class=\"n\">Sudoku3D<\/span> <span class=\"nf\">GenSudokuSolution<\/span><span class=\"p\">(<\/span><span class=\"kt\">int<\/span> <span class=\"n\">h<\/span><span class=\"p\">,<\/span> <span class=\"kt\">int<\/span> <span class=\"n\">r<\/span><span class=\"p\">,<\/span> <span class=\"kt\">int<\/span> <span class=\"n\">c<\/span><span class=\"p\">,<\/span> <span class=\"n\">Sudoku3D<\/span> <span class=\"n\">puzzle<\/span><span class=\"p\">){<\/span>\n    <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">h<\/span> <span class=\"p\">&gt;=<\/span> <span class=\"n\">size<\/span><span class=\"p\">)<\/span> <span class=\"k\">return<\/span> <span class=\"n\">puzzle<\/span><span class=\"p\">;<\/span>\n    <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">r<\/span> <span class=\"p\">&gt;=<\/span> <span class=\"n\">size<\/span><span class=\"p\">)<\/span> <span class=\"k\">return<\/span> <span class=\"nf\">GenSudokuSolution<\/span><span class=\"p\">(<\/span><span class=\"n\">h<\/span><span class=\"p\">+<\/span><span class=\"m\">1<\/span><span class=\"p\">,<\/span><span class=\"m\">0<\/span><span class=\"p\">,<\/span><span class=\"m\">0<\/span><span class=\"p\">,<\/span> <span class=\"n\">puzzle<\/span><span class=\"p\">);<\/span>\n    <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">c<\/span> <span class=\"p\">&gt;=<\/span> <span class=\"n\">size<\/span><span class=\"p\">)<\/span> <span class=\"k\">return<\/span> <span class=\"nf\">GenSudokuSolution<\/span><span class=\"p\">(<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span><span class=\"n\">r<\/span><span class=\"p\">+<\/span><span class=\"m\">1<\/span><span class=\"p\">,<\/span><span class=\"m\">0<\/span><span class=\"p\">,<\/span> <span class=\"n\">puzzle<\/span><span class=\"p\">);<\/span>\n    <span class=\"n\">List<\/span><span class=\"p\">&lt;<\/span><span class=\"kt\">int<\/span><span class=\"p\">&gt;<\/span> <span class=\"n\">neighbors<\/span> <span class=\"p\">=<\/span> <span class=\"n\">puzzle<\/span><span class=\"p\">.<\/span><span class=\"nf\">GetNeighbors<\/span><span class=\"p\">(<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span><span class=\"n\">r<\/span><span class=\"p\">,<\/span><span class=\"n\">c<\/span><span class=\"p\">);<\/span>\n    <span class=\"n\">List<\/span><span class=\"p\">&lt;<\/span><span class=\"kt\">int<\/span><span class=\"p\">&gt;<\/span> <span class=\"n\">options<\/span> <span class=\"p\">=<\/span> <span class=\"n\">Enumerable<\/span><span class=\"p\">.<\/span><span class=\"nf\">Range<\/span><span class=\"p\">(<\/span><span class=\"m\">1<\/span><span class=\"p\">,<\/span> <span class=\"n\">size<\/span><span class=\"p\">).<\/span><span class=\"n\">ToList<\/span><span class=\"p\">&lt;<\/span><span class=\"kt\">int<\/span><span class=\"p\">&gt;();<\/span>\n    <span class=\"k\">foreach<\/span> <span class=\"p\">(<\/span><span class=\"kt\">int<\/span> <span class=\"n\">i<\/span> <span class=\"k\">in<\/span> <span class=\"n\">neighbors<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"n\">options<\/span><span class=\"p\">.<\/span><span class=\"nf\">Remove<\/span><span class=\"p\">(<\/span><span class=\"n\">i<\/span><span class=\"p\">);<\/span>\n    <span class=\"p\">}<\/span>\n    <span class=\"k\">while<\/span> <span class=\"p\">(<\/span><span class=\"n\">options<\/span><span class=\"p\">.<\/span><span class=\"n\">Count<\/span> <span class=\"p\">!=<\/span> <span class=\"m\">0<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"c1\">\/\/ select a random number from the options, remove it, and then test it<\/span>\n        <span class=\"kt\">int<\/span> <span class=\"n\">index<\/span> <span class=\"p\">=<\/span> <span class=\"n\">randgen<\/span><span class=\"p\">.<\/span><span class=\"nf\">Next<\/span><span class=\"p\">(<\/span><span class=\"n\">options<\/span><span class=\"p\">.<\/span><span class=\"n\">Count<\/span><span class=\"p\">);<\/span>\n        <span class=\"kt\">int<\/span> <span class=\"n\">testNum<\/span> <span class=\"p\">=<\/span> <span class=\"n\">options<\/span><span class=\"p\">[<\/span><span class=\"n\">index<\/span><span class=\"p\">];<\/span>\n        <span class=\"n\">options<\/span><span class=\"p\">.<\/span><span class=\"nf\">RemoveAt<\/span><span class=\"p\">(<\/span><span class=\"n\">index<\/span><span class=\"p\">);<\/span>\n        <span class=\"n\">puzzle<\/span><span class=\"p\">[<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span><span class=\"n\">r<\/span><span class=\"p\">,<\/span><span class=\"n\">c<\/span><span class=\"p\">]<\/span> <span class=\"p\">=<\/span> <span class=\"n\">testNum<\/span><span class=\"p\">;<\/span>\n        <span class=\"c1\">\/\/ check to see if a solution was found, else try another number in the spot<\/span>\n        <span class=\"kt\">var<\/span> <span class=\"n\">temp<\/span> <span class=\"p\">=<\/span> <span class=\"nf\">GenSudokuSolution<\/span><span class=\"p\">(<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span><span class=\"n\">r<\/span><span class=\"p\">,<\/span><span class=\"n\">c<\/span><span class=\"p\">+<\/span><span class=\"m\">1<\/span><span class=\"p\">,<\/span><span class=\"n\">puzzle<\/span><span class=\"p\">);<\/span>\n        <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">temp<\/span> <span class=\"p\">!=<\/span> <span class=\"k\">null<\/span><span class=\"p\">)<\/span> <span class=\"k\">return<\/span> <span class=\"n\">temp<\/span><span class=\"p\">;<\/span> <span class=\"c1\">\/\/ solution found<\/span>\n    <span class=\"p\">}<\/span>\n    <span class=\"n\">puzzle<\/span><span class=\"p\">[<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span><span class=\"n\">r<\/span><span class=\"p\">,<\/span><span class=\"n\">c<\/span><span class=\"p\">]<\/span> <span class=\"p\">=<\/span> <span class=\"m\">0<\/span><span class=\"p\">;<\/span> <span class=\"c1\">\/\/ reset spot, no valid solution on this branch<\/span>\n    <span class=\"k\">return<\/span> <span class=\"k\">null<\/span><span class=\"p\">;<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>This iterates through the matrix cell by cell, picking a random number from the available numbers that are possible without breaking constraints. Then it moves forward to the next cell. In the case that a cell has no possible numbers, it backtracks to the previous cell and picks a different number.<\/p>\n\n<div class=\"language-csharp highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">public<\/span> <span class=\"n\">Sudoku3D<\/span> <span class=\"nf\">GenSudokuPuzzle<\/span><span class=\"p\">(<\/span><span class=\"kt\">bool<\/span> <span class=\"n\">newSolution<\/span> <span class=\"p\">=<\/span> <span class=\"k\">false<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">solution<\/span> <span class=\"p\">==<\/span> <span class=\"k\">null<\/span> <span class=\"p\">||<\/span> <span class=\"n\">newSolution<\/span><span class=\"p\">)<\/span> <span class=\"n\">solution<\/span> <span class=\"p\">=<\/span> <span class=\"nf\">GenSudokuSolution<\/span><span class=\"p\">();<\/span>\n    <span class=\"n\">Sudoku3D<\/span> <span class=\"n\">tempPuzzle<\/span> <span class=\"p\">=<\/span> <span class=\"n\">solution<\/span><span class=\"p\">.<\/span><span class=\"nf\">Clone<\/span><span class=\"p\">();<\/span>\n    <span class=\"kt\">int<\/span> <span class=\"n\">clueCount<\/span> <span class=\"p\">=<\/span> <span class=\"p\">(<\/span><span class=\"kt\">int<\/span><span class=\"p\">)<\/span><span class=\"n\">Math<\/span><span class=\"p\">.<\/span><span class=\"nf\">Pow<\/span><span class=\"p\">(<\/span><span class=\"n\">size<\/span><span class=\"p\">,<\/span> <span class=\"m\">3<\/span><span class=\"p\">),<\/span> <span class=\"n\">h<\/span> <span class=\"p\">=<\/span> <span class=\"m\">0<\/span><span class=\"p\">,<\/span> <span class=\"n\">r<\/span> <span class=\"p\">=<\/span> <span class=\"m\">0<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span> <span class=\"p\">=<\/span> <span class=\"m\">0<\/span><span class=\"p\">;<\/span>\n    <span class=\"k\">while<\/span> <span class=\"p\">(<\/span><span class=\"n\">clueCount<\/span> <span class=\"p\">&gt;<\/span> <span class=\"n\">clues<\/span><span class=\"p\">){<\/span>\n        <span class=\"c1\">\/\/ continue to randomly pick indices until a spot is chosen<\/span>\n        <span class=\"k\">while<\/span> <span class=\"p\">(<\/span><span class=\"k\">true<\/span><span class=\"p\">){<\/span>\n            <span class=\"n\">h<\/span> <span class=\"p\">=<\/span> <span class=\"n\">randgen<\/span><span class=\"p\">.<\/span><span class=\"nf\">Next<\/span><span class=\"p\">(<\/span><span class=\"n\">size<\/span><span class=\"p\">);<\/span> <span class=\"n\">r<\/span> <span class=\"p\">=<\/span> <span class=\"n\">randgen<\/span><span class=\"p\">.<\/span><span class=\"nf\">Next<\/span><span class=\"p\">(<\/span><span class=\"n\">size<\/span><span class=\"p\">);<\/span> <span class=\"n\">c<\/span> <span class=\"p\">=<\/span> <span class=\"n\">randgen<\/span><span class=\"p\">.<\/span><span class=\"nf\">Next<\/span><span class=\"p\">(<\/span><span class=\"n\">size<\/span><span class=\"p\">);<\/span>\n            <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"n\">tempPuzzle<\/span><span class=\"p\">[<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span> <span class=\"n\">r<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span><span class=\"p\">]<\/span> <span class=\"p\">!=<\/span> <span class=\"m\">0<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n                <span class=\"n\">tempPuzzle<\/span><span class=\"p\">[<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span> <span class=\"n\">r<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span><span class=\"p\">]<\/span> <span class=\"p\">=<\/span> <span class=\"m\">0<\/span><span class=\"p\">;<\/span>\n                <span class=\"k\">break<\/span><span class=\"p\">;<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">}<\/span>\n        <span class=\"c1\">\/\/ now check to see if puzzle still has only one solution<\/span>\n        <span class=\"k\">if<\/span> <span class=\"p\">(!<\/span><span class=\"n\">tempPuzzle<\/span><span class=\"p\">.<\/span><span class=\"nf\">IsValidPuzzle<\/span><span class=\"p\">())<\/span> <span class=\"p\">{<\/span>\n            <span class=\"n\">tempPuzzle<\/span><span class=\"p\">[<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span> <span class=\"n\">r<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span><span class=\"p\">]<\/span> <span class=\"p\">=<\/span> <span class=\"n\">solution<\/span><span class=\"p\">[<\/span><span class=\"n\">h<\/span><span class=\"p\">,<\/span> <span class=\"n\">r<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span><span class=\"p\">];<\/span>\n            <span class=\"k\">continue<\/span><span class=\"p\">;<\/span>\n        <span class=\"p\">}<\/span>\n        <span class=\"n\">clueCount<\/span><span class=\"p\">--;<\/span>\n    <span class=\"p\">}<\/span>\n    <span class=\"k\">return<\/span> <span class=\"n\">tempPuzzle<\/span><span class=\"p\">;<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>This method will remove the value of cells one by one until the desired number of clues is reached by picking a random index to remove the value of. Then the puzzle is tested and if it has only one unique solution, it is still considered valid and proceeds to find the next index to remove.<\/p>\n\n<h1 id=\"conclusions\">Conclusions<\/h1>\n\n<p>Here is one of the many Sudoku puzzles my algorithm generated:<\/p>\n\n<p><img src=\"\/assets\/images\/Sudoku3D-Size-4-Hard.png\" alt=\"Sudoku3D Example Puzzle\" style=\"max-width: 400px; height: auto; width: 90%\" \/><\/p>\n\n<p>Feel free to download the image and try and solve it yourself! This one was generated on the \u201cHard\u201d setting, but because its only a 4 x 4 x 4 puzzle, it shouldn\u2019t be too difficult.<sup id=\"fnref:3\" role=\"doc-noteref\"><a href=\"#fn:3\" class=\"footnote\" rel=\"footnote\">3<\/a><\/sup><\/p>\n\n<hr \/>\n\n<p>Check out the open-sourced code that I developed for this project as well. You can find the repositories on <a href=\"https:\/\/github.com\/noah978\">my GitHub page.<\/a><\/p>\n\n<p>There are hard copies available at the Albion College Library and Honors building, you can also <a href=\"https:\/\/drive.google.com\/file\/d\/1DbSuBr97HKLlPYB4Cu-uLQRkn02THJmO\/view?usp=sharing\">view the online copy here.<\/a><\/p>\n\n<hr \/>\n\n<div class=\"footnotes\" role=\"doc-endnotes\">\n  <ol>\n    <li id=\"fn:1\" role=\"doc-endnote\">\n      <p>By \u201ctrue three-dimensional\u201d, it can be thought of as the puzzle could be constructed and just as easily solved in the third dimension as opposed to be designed for solving in the second dimension.\u00a0<a href=\"#fnref:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n    <li id=\"fn:2\" role=\"doc-endnote\">\n      <p>Clues are the valid numbers left remaining in a Sudoku puzzle. They are called <code class=\"language-plaintext highlighter-rouge\">clues<\/code> because they are the hints that allow players to logically solve the puzzle.\u00a0<a href=\"#fnref:2\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n    <li id=\"fn:3\" role=\"doc-endnote\">\n      <p>This puzzle will only have 64 total cells to fill as opposed to the normal 81 cells in a standard Sudoku puzzle. This reduces that number of constraints in a given puzzle and is expected to make it easier and quicker to solve.\u00a0<a href=\"#fnref:3\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n  <\/ol>\n<\/div>","author":{"name":"noah"},"category":[{"@attributes":{"term":"blog"}},{"@attributes":{"term":"c-sharp"}},{"@attributes":{"term":"sudoku"}}],"summary":"After a very busy spring semester, filled with Esports competitions, band concerts, and a senior thesis. I\u2019m happy to finally have some time to write another blog post, this one offering up a quick look at my completed senior thesis."},{"title":"BTBCS Development","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/blog\/2021\/09\/15\/btbcs-development\/","rel":"alternate","type":"text\/html","title":"BTBCS Development"}},"published":"2021-09-15T15:57:00+00:00","updated":"2021-09-15T15:57:00+00:00","id":"https:\/\/noahkeck.dev\/blog\/2021\/09\/15\/btbcs-development","content":"<h1 id=\"a-busy-summer\">A Busy Summer<\/h1>\n\n<p>Over the course of this past summer, I spent the majority of my time working at the founding CIO (Chief Information Officer) of a new Social Services organization called \u201cBuilding the Bridges Community Services\u201d. Our website is located at <a href=\"https:\/\/btbcs.org\">btbcs.org<\/a> and is available worldwide using <a href=\"https:\/\/dreamhost.com\">Dreamhost<\/a> as the backend and <a href=\"https:\/\/cloudflare.com\">Cloudflare<\/a> as the CDN (Content Delivery Network).<\/p>\n\n<p>Over the course of the summer, I built the entire website from the ground up using Bootstrap 4 CSS\/JS framework, my own PHP shell to manage header and footer items, and a variety of PHP and JS functions to perform various aspects of the website like PHPMailer and form submissions via AJAX requests. More on all these later.<\/p>\n\n<p>Of course, developing a massive website with so many intertwining web technologies, it became obvious that I had no way to easily test the site on my Windows OS. Which is why I also learned how to use <a href=\"https:\/\/docker.com\">Docker<\/a> this summer. With Docker, I could create a test environment that is nearly identical to my actual production environment on a shared Dreamhost server. The process was quite complex at first, but has become incredibly essential to my development workflow. In the future, I would like to be able to use Kubernetes or similar tools to simplify the transition from the development environment to production.<\/p>\n\n<p>Aside from the website development, I also got the chance to setup a Google Workspace as the primary administrator. It was a very worthwhile experience getting to see all the backend tools and settings that Google supplies to their customers.<\/p>\n\n<h2 id=\"general-state-of-web-development\">General State of Web Development<\/h2>\n\n<p>From my experiences this past summer, the state of web development is rather crazy. There are approximately millions of different ways to go about designing and building a website. There are almost a dozen different programming languages alone which can be used in web design (PHP, Ruby, JavaScript, etc). To be honest, you can usually use just about any language you want as the backend so long as the server\u2019s OS can support it.<\/p>\n\n<p>For my this website, I started with the basics. I refrained from using any language out side of HTML, CSS, and JS. I will readily say that working with Bootstrap CSS was a <strong>wonderful<\/strong> time. They have created an outstanding set of CSS helper functions and classes that made my amateur design abilities look visually pleasing. I look forward to seeing what improvements the community has made to Bootstrap with the v5 update.<\/p>\n\n<p>As nice and simple as trying to make a static website was, I quickly realized it was not feasible to create the functionality I needed without a backend server-side language. Enter PHP on to the scene. I have long expressed my displeasure with PHP overall, but I knew it was the most common and widely used server language.<\/p>\n\n<p>PHP was useful for a variety tasks on my website: submitting \/ handling forms, sending emails, and adding the header and footer to each page. Looking back however, I wish I had taken the time to learn something other than PHP like Ruby or NodeJS.<\/p>\n\n<p>I finally reached the point where the last big feature to implement on the website was blog. To do this properly, I needed the ability to archive posts and make a continually growing list of posts look nice. Most websites use WordPress to handle this, but I refused to use WordPress in order to keep the site source code function as independently as possible. The solution I came up with was perhaps a little odd.<\/p>\n\n<p>I used something known as Jekyll. This very website you are reading from right now was also generated by Jekyll. All Jekyll does is take websites with dynamic content such as a changing number of blog posts and generates a set of static HTML webpages from it. What made my use case really strange was that I was creating PHP files instead of HTML, something that Jekyll was never intended to do. With a little bit of tweaking to Jekyll\u2019s source code (something they actually encourage!), I was able to make Jekyll meet my needs perfectly.<\/p>\n\n<p>In the future, I\u2019d be much more interested in using tools like Ruby and Jekyll to generate the website from the very start. The idea of serving only static HTML files is very appealing, not to mention they support SASS too which will make the source code for my CSS much cleaner. Then whenever a dynamic capability like form submissions is needed, there is still a backend scripting language ready to go.<\/p>\n\n<h2 id=\"neat-tips-and-tricks\">Neat Tips and Tricks<\/h2>\n\n<h3 id=\"cdn-failsafe\">CDN Failsafe<\/h3>\n\n<p>Since I was working with so many mainstream web libraries like Bootstrap and JQuery, it only made sense to use the CDN versions for potentially faster load times. However, that means if those serves go down due to a DDoS attack or widespread system failure, my website would lose most functionality and appearance.<\/p>\n\n<p>Thus, I wrote some neat JavaScript failsafe scripts that would switch the site to copies of the libraries that are stored on the primary server instead:<\/p>\n\n<div class=\"language-javascript highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">if<\/span><span class=\"p\">(<\/span><span class=\"k\">typeof<\/span><span class=\"p\">(<\/span><span class=\"nb\">window<\/span><span class=\"p\">.<\/span><span class=\"nx\">jQuery<\/span><span class=\"p\">)<\/span> <span class=\"o\">===<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">undefined<\/span><span class=\"dl\">'<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nb\">document<\/span><span class=\"p\">.<\/span><span class=\"nx\">write<\/span><span class=\"p\">(<\/span><span class=\"nx\">unescape<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">%3Cscript src=\"\/resources\/jquery-3.6.0\/jquery-3.6.0.min.js\"%3E%3C\/script%3E<\/span><span class=\"dl\">'<\/span><span class=\"p\">));<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>This checks for the existence of an object called window.jQuery and in the case which it is undefined (meaning the CDN failed to load), it writes a script to load from the local version instead.<\/p>\n\n<h3 id=\"forcing-jekyll-to-output-php-files\">Forcing Jekyll to Output PHP files<\/h3>\n\n<p>I was really trying to create a much more elegant solution to this, but I ended up having to do a quick and dirty method of just forcing it to use a \u201ccustom\u201d extension when writing the files. So I could specify the desired custom extension in the file that was being converted. It failed to change the inner working of Jekyll so I then had to workaround the fact that Jekyll still thought the file extension was HTML when referencing it.<\/p>\n\n<p>The following is a snippet of a custom plugin I wrote to override the destination function with the desired custom extension.<\/p>\n\n<div class=\"language-ruby highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">module<\/span> <span class=\"nn\">Jekyll<\/span>\n  <span class=\"k\">class<\/span> <span class=\"nc\">Document<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">destination<\/span><span class=\"p\">(<\/span><span class=\"n\">base_directory<\/span><span class=\"p\">)<\/span>\n      <span class=\"n\">dest<\/span> <span class=\"o\">=<\/span> <span class=\"n\">site<\/span><span class=\"p\">.<\/span><span class=\"nf\">in_dest_dir<\/span><span class=\"p\">(<\/span><span class=\"n\">base_directory<\/span><span class=\"p\">)<\/span>\n      <span class=\"n\">path<\/span> <span class=\"o\">=<\/span> <span class=\"n\">site<\/span><span class=\"p\">.<\/span><span class=\"nf\">in_dest_dir<\/span><span class=\"p\">(<\/span><span class=\"n\">dest<\/span><span class=\"p\">,<\/span> <span class=\"no\">URL<\/span><span class=\"p\">.<\/span><span class=\"nf\">unescape_path<\/span><span class=\"p\">(<\/span><span class=\"n\">url<\/span><span class=\"p\">))<\/span>\n      <span class=\"k\">if<\/span> <span class=\"n\">url<\/span><span class=\"p\">.<\/span><span class=\"nf\">end_with?<\/span> <span class=\"s2\">\"\/\"<\/span>\n        <span class=\"n\">path<\/span> <span class=\"o\">=<\/span> <span class=\"no\">File<\/span><span class=\"p\">.<\/span><span class=\"nf\">join<\/span><span class=\"p\">(<\/span><span class=\"n\">path<\/span><span class=\"p\">,<\/span> <span class=\"s2\">\"index.html\"<\/span><span class=\"p\">)<\/span>\n      <span class=\"k\">else<\/span>\n        <span class=\"n\">path<\/span> <span class=\"o\">&lt;&lt;<\/span> <span class=\"n\">output_ext<\/span> <span class=\"k\">unless<\/span> <span class=\"n\">path<\/span><span class=\"p\">.<\/span><span class=\"nf\">end_with?<\/span> <span class=\"n\">output_ext<\/span>\n      <span class=\"k\">end<\/span>\n\n      <span class=\"c1\"># replace extension with custom_ext<\/span>\n      <span class=\"n\">path<\/span><span class=\"p\">.<\/span><span class=\"nf\">sub!<\/span> <span class=\"n\">output_ext<\/span><span class=\"p\">,<\/span>  <span class=\"n\">data<\/span><span class=\"p\">[<\/span><span class=\"s1\">'custom_ext'<\/span><span class=\"p\">]<\/span> <span class=\"k\">if<\/span> <span class=\"n\">data<\/span><span class=\"p\">[<\/span><span class=\"s1\">'custom_ext'<\/span><span class=\"p\">]<\/span>\n\n      <span class=\"n\">path<\/span>\n    <span class=\"k\">end<\/span>\n  <span class=\"k\">end<\/span>\n<span class=\"k\">end<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>The failures here are not really a major issue with Jekyll, and theoretically there is a way for a Jekyll package to fully enable custom extensions in the way that I wanted. Perhaps this may be a project for the future.<\/p>\n\n<h3 id=\"ajax-form-requests\">AJAX Form Requests<\/h3>\n\n<p>One of biggest ways to make a form look nice on a website is to have smart input validation and form feedback. Using AJAX to intercept the form submissions, I was able to add things like an upload percentage bar and a visually appealing success response.<\/p>\n\n<div class=\"language-javascript highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nx\">form<\/span><span class=\"p\">.<\/span><span class=\"nx\">submit<\/span><span class=\"p\">(<\/span><span class=\"kd\">function<\/span> <span class=\"p\">(<\/span><span class=\"nx\">e<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">e<\/span><span class=\"p\">.<\/span><span class=\"nx\">preventDefault<\/span><span class=\"p\">();<\/span>\n    <span class=\"nx\">form_data<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nx\">FormData<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">);<\/span>\n    <span class=\"nx\">form_data<\/span><span class=\"p\">.<\/span><span class=\"nx\">append<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">file<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">#inputFile<\/span><span class=\"dl\">'<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">].<\/span><span class=\"nx\">files<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]);<\/span>\n    <span class=\"nx\">$<\/span><span class=\"p\">.<\/span><span class=\"nx\">ajax<\/span><span class=\"p\">({<\/span>\n      <span class=\"na\">xhr<\/span><span class=\"p\">:<\/span> <span class=\"kd\">function<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n        <span class=\"kd\">var<\/span> <span class=\"nx\">xhr<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nb\">window<\/span><span class=\"p\">.<\/span><span class=\"nx\">XMLHttpRequest<\/span><span class=\"p\">();<\/span>\n        <span class=\"nx\">bar<\/span><span class=\"p\">.<\/span><span class=\"nx\">parent<\/span><span class=\"p\">().<\/span><span class=\"nx\">fadeIn<\/span><span class=\"p\">();<\/span>\n        <span class=\"nx\">xhr<\/span><span class=\"p\">.<\/span><span class=\"nx\">upload<\/span><span class=\"p\">.<\/span><span class=\"nx\">addEventListener<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">progress<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"kd\">function<\/span><span class=\"p\">(<\/span><span class=\"nx\">evt<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n          <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nx\">evt<\/span><span class=\"p\">.<\/span><span class=\"nx\">lengthComputable<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n            <span class=\"kd\">var<\/span> <span class=\"nx\">percentComplete<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">evt<\/span><span class=\"p\">.<\/span><span class=\"nx\">loaded<\/span> <span class=\"o\">\/<\/span> <span class=\"nx\">evt<\/span><span class=\"p\">.<\/span><span class=\"nx\">total<\/span><span class=\"p\">;<\/span>\n            <span class=\"nx\">percentComplete<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">parseInt<\/span><span class=\"p\">(<\/span><span class=\"nx\">percentComplete<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">100<\/span><span class=\"p\">);<\/span>\n            <span class=\"nx\">bar<\/span><span class=\"p\">.<\/span><span class=\"nx\">css<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">width<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"nx\">percentComplete<\/span> <span class=\"o\">+<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">%<\/span><span class=\"dl\">'<\/span><span class=\"p\">);<\/span>\n\n            <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nx\">percentComplete<\/span> <span class=\"o\">===<\/span> <span class=\"mi\">100<\/span><span class=\"p\">)<\/span> <span class=\"p\">{}<\/span>\n          <span class=\"p\">}<\/span>\n        <span class=\"p\">},<\/span> <span class=\"kc\">false<\/span><span class=\"p\">);<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"nx\">xhr<\/span><span class=\"p\">;<\/span>\n      <span class=\"p\">},<\/span>\n      <span class=\"na\">url<\/span><span class=\"p\">:<\/span> <span class=\"nx\">form<\/span><span class=\"p\">.<\/span><span class=\"nx\">attr<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">action<\/span><span class=\"dl\">'<\/span><span class=\"p\">),<\/span>\n      <span class=\"na\">type<\/span><span class=\"p\">:<\/span> <span class=\"nx\">form<\/span><span class=\"p\">.<\/span><span class=\"nx\">attr<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">method<\/span><span class=\"dl\">'<\/span><span class=\"p\">),<\/span>\n      <span class=\"na\">data<\/span><span class=\"p\">:<\/span> <span class=\"nx\">form_data<\/span><span class=\"p\">,<\/span>\n      <span class=\"na\">contentType<\/span><span class=\"p\">:<\/span> <span class=\"kc\">false<\/span><span class=\"p\">,<\/span>\n      <span class=\"na\">processData<\/span><span class=\"p\">:<\/span> <span class=\"kc\">false<\/span><span class=\"p\">,<\/span>\n      <span class=\"na\">success<\/span><span class=\"p\">:<\/span> <span class=\"nx\">done_func<\/span><span class=\"p\">,<\/span>\n      <span class=\"na\">error<\/span><span class=\"p\">:<\/span> <span class=\"nx\">fail_func<\/span>\n    <span class=\"p\">});<\/span>\n  <span class=\"p\">});<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"dropdown-navbar-on-hover\">Dropdown Navbar on Hover<\/h3>\n\n<p>One of the more hidden features that few people notice is the ability for dropdown bars to activate on hover rather than Bootstrap\u2019s default design which requires you to tap them. This feature also only applies to desktop devices because with a touch screen, the hover concept is ruined. I accomplished this feature using a custom JavaScript event listener:<\/p>\n\n<div class=\"language-javascript highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"nb\">window<\/span><span class=\"p\">).<\/span><span class=\"nx\">on<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">load resize<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"kd\">function<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">matchMedia<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">(min-width: 992px)<\/span><span class=\"dl\">\"<\/span><span class=\"p\">).<\/span><span class=\"nx\">matches<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span> <span class=\"c1\">\/\/ only apply to desktop devices<\/span>\n    <span class=\"nx\">$dropdown<\/span><span class=\"p\">.<\/span><span class=\"nx\">hover<\/span><span class=\"p\">(<\/span>\n      <span class=\"kd\">function<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n        <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"o\">!<\/span> <span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">).<\/span><span class=\"nx\">hasClass<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">show<\/span><span class=\"dl\">'<\/span><span class=\"p\">))<\/span> <span class=\"p\">{<\/span> <span class=\"c1\">\/\/ prevent it from toggling OFF when mouse arrives<\/span>\n          <span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">).<\/span><span class=\"nx\">find<\/span><span class=\"p\">(<\/span><span class=\"nx\">$dropdownToggle<\/span><span class=\"p\">).<\/span><span class=\"nx\">dropdown<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">toggle<\/span><span class=\"dl\">'<\/span><span class=\"p\">);<\/span>\n        <span class=\"p\">}<\/span>\n      <span class=\"p\">},<\/span>\n      <span class=\"kd\">function<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span> <span class=\"c1\">\/\/ mouse leaves area<\/span>\n        <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">).<\/span><span class=\"nx\">hasClass<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">show<\/span><span class=\"dl\">'<\/span><span class=\"p\">))<\/span> <span class=\"p\">{<\/span> <span class=\"c1\">\/\/ prevent it from toggling ON when mouse leaves<\/span>\n          <span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">).<\/span><span class=\"nx\">find<\/span><span class=\"p\">(<\/span><span class=\"nx\">$dropdownToggle<\/span><span class=\"p\">).<\/span><span class=\"nx\">dropdown<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">toggle<\/span><span class=\"dl\">'<\/span><span class=\"p\">);<\/span>\n        <span class=\"p\">}<\/span>\n      <span class=\"p\">}<\/span>\n    <span class=\"p\">);<\/span>\n  <span class=\"p\">}<\/span> <span class=\"k\">else<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">$dropdown<\/span><span class=\"p\">.<\/span><span class=\"nx\">off<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">mouseenter mouseleave<\/span><span class=\"dl\">\"<\/span><span class=\"p\">);<\/span>\n  <span class=\"p\">}<\/span>\n<span class=\"p\">});<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>This used the default Bootstrap JavaScript functions for activating dropdowns. Which was essential because I also added a smooth sliding transition that works on both desktop and mobile:<\/p>\n\n<div class=\"language-javascript highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nx\">$dropdown<\/span><span class=\"p\">.<\/span><span class=\"nx\">on<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">show.bs.dropdown<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"kd\">function<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">).<\/span><span class=\"nx\">find<\/span><span class=\"p\">(<\/span><span class=\"nx\">$dropdownMenu<\/span><span class=\"p\">).<\/span><span class=\"nx\">first<\/span><span class=\"p\">().<\/span><span class=\"nx\">stop<\/span><span class=\"p\">(<\/span><span class=\"kc\">true<\/span><span class=\"p\">,<\/span> <span class=\"kc\">true<\/span><span class=\"p\">).<\/span><span class=\"nx\">slideDown<\/span><span class=\"p\">();<\/span>\n<span class=\"p\">});<\/span>\n\n<span class=\"c1\">\/\/ Add slideUp animation to Bootstrap dropdown when collapsing.<\/span>\n<span class=\"nx\">$dropdown<\/span><span class=\"p\">.<\/span><span class=\"nx\">on<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">hide.bs.dropdown<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"kd\">function<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">).<\/span><span class=\"nx\">find<\/span><span class=\"p\">(<\/span><span class=\"nx\">$dropdownMenu<\/span><span class=\"p\">).<\/span><span class=\"nx\">first<\/span><span class=\"p\">().<\/span><span class=\"nx\">stop<\/span><span class=\"p\">(<\/span><span class=\"kc\">true<\/span><span class=\"p\">,<\/span> <span class=\"kc\">true<\/span><span class=\"p\">).<\/span><span class=\"nx\">delay<\/span><span class=\"p\">(<\/span><span class=\"mi\">50<\/span><span class=\"p\">).<\/span><span class=\"nx\">slideUp<\/span><span class=\"p\">();<\/span>\n<span class=\"p\">});<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>Take careful note of the delay(50) because without the short pause, the animations can get stuck in a loop of frantic opening and closing.<\/p>\n\n<h2 id=\"docker---incredibly-powerful-tech\">Docker - Incredibly Powerful Tech<\/h2>\n\n<p>The most useful piece of tech that I used over the course of this entire project was undoubtedly Docker. This incredibly simplified the process of creating and manipulating VMs as containers and made a fully operational Apache web server run locally on my desktop while allowing my web browsers to connect to the \u201cwebsite\u201d via a localhost port.<\/p>\n\n<p>The technology is most definitely an underused piece of software for all web development as one of the most annoying and difficult problems of development as an industry, is how to transition from development to production when the two OS environments can be vastly different. I expect to use a lot more Docker in my future projects.<\/p>\n\n<h1 id=\"wrap-up\">Wrap-Up<\/h1>\n\n<p>While I didn\u2019t spend the summer as an intern at a software company, I certainly didn\u2019t waste too much time. Taking a list of requests and features for a website and turning them into a reality was a very rewarding experience and I hope to be able to take on more big projects in the future.<\/p>","author":{"name":"noah"},"category":[{"@attributes":{"term":"blog"}},{"@attributes":{"term":"bootstrap"}},{"@attributes":{"term":"web-development"}},{"@attributes":{"term":"php"}},{"@attributes":{"term":"docker"}},{"@attributes":{"term":"btbcs"}}],"summary":"A Busy Summer"},{"title":"The Creation of AltStore Docs and Delta Docs","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/blog\/2020\/05\/21\/altstore-and-delta-docs\/","rel":"alternate","type":"text\/html","title":"The Creation of AltStore Docs and Delta Docs"}},"published":"2020-05-21T01:08:00+00:00","updated":"2020-05-21T01:08:00+00:00","id":"https:\/\/noahkeck.dev\/blog\/2020\/05\/21\/altstore-and-delta-docs","content":"<p>I love retro games and I have enjoyed Apple\u2019s iOS devices for a great many years. And at the collision of these two great passions: <a href=\"https:\/\/deltaemulator.com\">Delta Emulator.<\/a><\/p>\n\n<h2 id=\"but-alas-apple-refuses\">But Alas, Apple Refuses<\/h2>\n\n<p>Unfortunately for me and the rest of the Retro gaming community, Apple refuses to allow any<sup id=\"fnref:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\" rel=\"footnote\">1<\/a><\/sup> emulator on their official App Store. Their reasoning? Well it violates their guidelines of course! Apple says that emulators violate guideline 2.5.2, which prohibits apps from installing or running external code on iOS.<\/p>\n\n<p>In reality, it comes down to two big reasons for them:<\/p>\n\n<ol>\n  <li>Execution of arbitrary code (i.e. ROMs), is a security risk since the App Store review team cannot check the imported code for malicious functionality.<\/li>\n  <li>The app could allow \/ enable the retrieval of copyrighted content, posing a lawsuit risk to Apple.<\/li>\n<\/ol>\n\n<h4 id=\"and-so-this-is-where-altstore-comes-in\">And so this is where AltStore comes in.<\/h4>\n\n<p>AltStore allows non-developers to \u201ctrick\u201d Apple into thinking that they built their own application and are installing it to their device for testing purposes. It essentially copies the build process from XCode and makes any IPA a seamless installation.<\/p>\n\n<p>I\u2019ve been heavily involved with both the development and testing of AltStore and Delta with Riley Testut as the lead developer. The entire project is open-sourced so anyone can contribute!<\/p>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rileytestut\/altstore\">AltStore GitHub<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rileytestut\/delta\">Delta GitHub<\/a><\/li>\n<\/ul>\n\n<p>The markdown documentation that I\u2019ve written exists so that developers of AltStore Sources or Delta Custom Skins have an in-depth document that explains what values are expected for their json config files.<\/p>\n\n<h1 id=\"the-docs\">The Docs<\/h1>\n\n<p>You can find the two different sites that document Riley Testut\u2019s AltStore and Delta below:<\/p>\n<ul>\n  <li><a href=\"https:\/\/noah978.gitbook.io\/altstore-docs\">AltStore Docs<\/a><\/li>\n  <li><a href=\"https:\/\/noah978.gitbook.io\/delta-docs\">Delta Docs<\/a><\/li>\n<\/ul>\n\n<p>Both of these wiki-style documents are open-source and hosted on GitHub. They can be viewed using GitBook or GitHub pages, but personally I much prefer the GitBook view.<\/p>\n\n<hr \/>\n\n<div class=\"footnotes\" role=\"doc-endnotes\">\n  <ol>\n    <li id=\"fn:1\" role=\"doc-endnote\">\n      <p>Except sometimes they get to exist for years, but are <a href=\"https:\/\/9to5mac.com\/2021\/07\/22\/idos-2-emulator-for-ios-to-be-removed-from-the-app-store\/\">then randomly removed.<\/a> Sorry bout that one, iDOS.\u00a0<a href=\"#fnref:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n  <\/ol>\n<\/div>","author":{"name":"noah"},"category":[{"@attributes":{"term":"blog"}},{"@attributes":{"term":"ios"}},{"@attributes":{"term":"altstore"}},{"@attributes":{"term":"delta"}},{"@attributes":{"term":"documentation"}}],"summary":"I love retro games and I have enjoyed Apple\u2019s iOS devices for a great many years. And at the collision of these two great passions: Delta Emulator."},{"title":"A Shortcut to Create Shortcuts","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/blog\/2019\/01\/09\/a-shortcut-to-create-shortcuts\/","rel":"alternate","type":"text\/html","title":"A Shortcut to Create Shortcuts"}},"published":"2019-01-09T11:27:00+00:00","updated":"2019-01-09T11:27:00+00:00","id":"https:\/\/noahkeck.dev\/blog\/2019\/01\/09\/a-shortcut-to-create-shortcuts","content":"<p>Siri Shortcuts were introduced with iOS 12 and is considered one of the most impressive improvements to Siri ever. Apple realized that meeting every possible need or request in Siri was nearly impossible. But if they gave users the ability to create any set of chained commands to fulfill their request, they could <em>vastly<\/em> improve Siri\u2019s capabilities.<\/p>\n\n<p>Given the capabilities of the Siri Shortcuts app, I created a shortcut to help with my favorite emulators: <a href=\"https:\/\/gba4iosapp.com\">GBA4iOS<\/a> and the more recent and capable <a href=\"https:\/\/deltaemulator.com\">Delta.<\/a><\/p>\n\n<h3 id=\"introducing\">Introducing,<\/h3>\n\n<h1 id=\"my-ios-emulator-home-screen-shortcut-creator\">My iOS Emulator Home Screen Shortcut Creator<\/h1>\n\n<p>Using this shortcut, you can create a Home Screen Icon using any image you want, that when clicked will directly open into any game in your rom library. All you need to do is have an image and the exact name of your game (or in Delta\u2019s case, the deep link) as it appears in your library.<\/p>\n\n<h2 id=\"how-does-this-work\">How Does This Work?<\/h2>\n\n<p>Back when GBA4iOS was being developed, the developer Riley Testut implemented a feature that allowed a URL scheme to open games in GBA4iOS. This same feature is also present in Delta. A URL scheme looks like the following:<\/p>\n\n<p><code class=\"language-plaintext highlighter-rouge\">gba4ios:\/\/Pokemon%20Emerald<\/code><\/p>\n\n<p>~ or ~<\/p>\n\n<p><code class=\"language-plaintext highlighter-rouge\">delta:\/\/game\/989bcb79c779cv97<\/code><\/p>\n\n<p>In the case of GBA4iOS, when you input the name of your game, the home screen shortcut creator then runs another separate shortcut which will convert regular text into a URL compatible text. So anytime you use the shortcut it\u2019s actually the same as typing the URL scheme into safari!<\/p>\n\n<p>Delta\u2019s shortcut is even simpler since the deep link doesn\u2019t have any characters that need to be converted to URL compatible text.<\/p>\n\n<h2 id=\"how-to-use\">How To Use<\/h2>\n\n<p>To use the GBA4iOS shortcut you will need to add both of the following shortcuts to your Siri Shortcut library. This can be done by simply clicking the links on your device.<\/p>\n\n<p><a href=\"https:\/\/www.icloud.com\/shortcuts\/eab5089ca3fd4faaa910b79eed6735f3\">GBA4iOS Shortcuts<\/a><\/p>\n\n<p><a href=\"https:\/\/www.icloud.com\/shortcuts\/63d051ede25c4d63b3dd31f9f4422039\">Convert Text to URL<\/a><\/p>\n\n<p>Just click the \u201cGBA4iOS Shortcuts\u201d (which is now in your siri shortcuts library) and it will guide you along the process. I would recommend copying and pasting the name of your game to ensure that it is exact.<\/p>\n\n<p>For Delta, you only need to add the following shortcut to your siri shortcut library:<\/p>\n\n<p><a href=\"https:\/\/www.icloud.com\/shortcuts\/b5207b88f7464381aa4d487878496259\">Delta Shortcuts<\/a><\/p>\n\n<h2 id=\"credits\">Credits<\/h2>\n\n<p>Thank you to Riley Testut for creating GBA4iOS and Delta! And for including URL Scheme support in both!<\/p>\n\n<p>Thank you to Federico Viticci for creating the <a href=\"https:\/\/www.macstories.net\/ios\/home-screen-icon-creator-a-shortcut-to-create-custom-icons-for-apps-contacts-solid-colors-and-more\/\">Home Screen Icon Creator<\/a> shortcut, which I modified to create the GBA4iOS Shortcut creator.<\/p>","author":{"name":"noah"},"category":[{"@attributes":{"term":"blog"}},{"@attributes":{"term":"ios"}},{"@attributes":{"term":"siri"}},{"@attributes":{"term":"gba4ios"}},{"@attributes":{"term":"delta"}}],"summary":"Siri Shortcuts were introduced with iOS 12 and is considered one of the most impressive improvements to Siri ever. Apple realized that meeting every possible need or request in Siri was nearly impossible. But if they gave users the ability to create any set of chained commands to fulfill their request, they could vastly improve Siri\u2019s capabilities."},{"title":"The Struggle to Find Cheats","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/blog\/2019\/01\/09\/the-struggle-to-find-cheats\/","rel":"alternate","type":"text\/html","title":"The Struggle to Find Cheats"}},"published":"2019-01-09T11:27:00+00:00","updated":"2019-01-09T11:27:00+00:00","id":"https:\/\/noahkeck.dev\/blog\/2019\/01\/09\/the-struggle-to-find-cheats","content":"<h2 id=\"first-a-little-backstory\">First, A Little Backstory<\/h2>\n\n<p>During High School, I have thoroughly enjoyed playing old Nintendo games. My very first gaming electronic was a GameBoy, closely followed by a LeapFrog, and I have always and probably always will love Pokemon Emerald. As I grew older, my family bought Nintendo\u2019s DS and eventually a Wii. But out of every game, I chose Pokemon to spend my time playing. (Although Mario was a close second)<\/p>\n\n<p>However, technology grows old and I really couldn\u2019t carry my old GameBoy everywhere I went. That\u2019s where GBA4iOS came in. I clearly remember the first time I discovered the application. I had a simple iPhone 4 back then. The feeling of joy that it brought to me is almost indescribable. No longer did I need to carry a GameBoy anywhere, the phone that have to carry anyways can fully entertain me too.<\/p>\n\n<p>I never used any cheats up until the DS and Pokemon PLatinum but once GBA4iOS 2.0 was released, I really wanted to try some. I could finally get to Navel Rock to catch a Lugia or to the Faraway Island for a Mew using a simple cheat code. But I immediately hit a roadblock, it would seem that finding cheat codes are more difficult than I expected.<\/p>\n\n<p>In the case Emerald, some cheat codes won\u2019t work based on whether the ROM is of version 1.0 or 1.1. If a game had multiple different games for different localizations, that could prevent the code from working as well.<\/p>\n\n<h1 id=\"a-cheaters-database\">A Cheater\u2019s Database<\/h1>\n\n<p>For all of these reasons, I decided to create a sort of database for all of the cheat codes I could find. It contains GBA codes as of right now, but the goal is for it to contain GBA, GBC, GB, SNES, NES, and N64 as it progresses. Currently, the bulk of my efforts have produced an Excel sheet which contains all the data for the cheat codes I\u2019ve rewritten. Using a series of Python database tools, I have an easy way to import and export .csv files containing correlated data into an SQL database. I also wrote the tools to be capable of re-organizing the entire database, while still maintaining the relational data.<\/p>\n\n<p>It uses the <a href=\"https:\/\/github.com\/OpenVGDB\/OpenVGDB\/releases\/\">OpenVGDB database<\/a> as its core for ROM hashes and game releases. This makes the database a must have for any emulator as it can get you cover art, various metadata, and now cheat codes for a plethora of games and consoles.<\/p>\n\n<p>It\u2019s my goal for this database to be used in Riley Testut\u2019s upcoming Delta Emulator to allow users to simply search for cheats in app instead of needing to search for them online.<\/p>\n\n<p>Below is a link to the GitHub organization that I created for the new cheat code database.<\/p>\n\n<p><a href=\"https:\/\/github.com\/CheatBase\">CheatBase<\/a><\/p>\n\n<p>By no means is this a complete database, if you are interested in contributing or reporting a code that doesn\u2019t work, please contact me directly. If progress continues towards a successful database, I will update with another blog post.<\/p>","author":{"name":"noah"},"category":[{"@attributes":{"term":"blog"}},{"@attributes":{"term":"gba4ios"}},{"@attributes":{"term":"delta"}},{"@attributes":{"term":"cheat codes"}}],"summary":"First, A Little Backstory"},{"title":"Java Minesweeper","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/project\/2018\/03\/19\/minesweeper\/","rel":"alternate","type":"text\/html","title":"Java Minesweeper"}},"published":"2018-03-19T12:50:00+00:00","updated":"2018-03-19T12:50:00+00:00","id":"https:\/\/noahkeck.dev\/project\/2018\/03\/19\/minesweeper","content":"<p><img src=\"https:\/\/raw.githubusercontent.com\/noah978\/Java-Minesweeper\/master\/MinesweeperDemo.PNG\" alt=\"Screenshot\" \/><\/p>\n\n<hr \/>\n\n<p>This is a near-perfect replica of Microsoft\u2019s well known Minesweeper game. Using the same exact image assets, this application runs the game of Minesweeper entirely in Java using the Greenfoot library.<\/p>","author":{"name":"noah"},"category":[{"@attributes":{"term":"project"}},{"@attributes":{"term":"java"}},{"@attributes":{"term":"minesweeper"}}],"summary":{"@attributes":{"type":"html"}}},{"title":"Java Sudoku Generator","link":{"@attributes":{"href":"https:\/\/noahkeck.dev\/project\/2018\/03\/19\/sudoku-generator\/","rel":"alternate","type":"text\/html","title":"Java Sudoku Generator"}},"published":"2018-03-19T11:37:00+00:00","updated":"2018-03-19T11:37:00+00:00","id":"https:\/\/noahkeck.dev\/project\/2018\/03\/19\/sudoku-generator","content":"<p><img src=\"https:\/\/raw.githubusercontent.com\/noah978\/Java-Sudoku-Generator\/master\/SudokuExample.PNG\" alt=\"Screenshot\" \/><\/p>\n\n<hr \/>\n\n<p>The program generates its own sudoku puzzles using a complex, recursive algorithm. So far the algorithm can generate puzzles with about 21 remaining clues or more. The GUI allows you to generate as puzzles over and over, whether or not you fully solved the last one. It allows you to create \u201cpossible numbers\u201d to help with sudoku strategies. It will also turn a number red if there is a direct conflict with any of the other existing numbers.<\/p>","author":{"name":"noah"},"category":[{"@attributes":{"term":"project"}},{"@attributes":{"term":"java"}},{"@attributes":{"term":"sudoku"}}],"summary":{"@attributes":{"type":"html"}}}]}