{"id":17034139,"url":"https://github.com/lordnull/peck-assignment","last_synced_at":"2025-08-27T01:45:59.716Z","repository":{"id":232444614,"uuid":"744287484","full_name":"lordnull/peck-assignment","owner":"lordnull","description":"A demonstration of some elixir code.","archived":false,"fork":false,"pushed_at":"2024-01-17T01:44:26.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-28T01:36:42.914Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lordnull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-17T01:37:59.000Z","updated_at":"2024-01-17T01:44:30.000Z","dependencies_parsed_at":"2024-04-09T22:51:04.611Z","dependency_job_id":"02961a2e-e223-4288-9814-a6e5857da03d","html_url":"https://github.com/lordnull/peck-assignment","commit_stats":null,"previous_names":["lordnull/peck-assignment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fpeck-assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fpeck-assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fpeck-assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fpeck-assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lordnull","download_url":"https://codeload.github.com/lordnull/peck-assignment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245026004,"owners_count":20549067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:37:31.616Z","updated_at":"2025-03-22T21:42:56.642Z","avatar_url":"https://github.com/lordnull.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FindMeFoodTruck\n\nA web page to locate the nearest food truck to you. It uses the location\nyour browser reports as the start, and only considers food trucks in\nSan Franscisco as viable destinations.\n\n# Building and Depolying\n\nThis requires [elixir](http://elixir-lang.org).\n\nAssemble the application using `mix release`. There is no difference mix\nenvironments.\n\nFinally, run the system using _build/prod/rel/fmft/fmft start\n\n# That didn't work\n\nI was not able to complete the full ambitious project in just 3 hours. I\ndid not expect to. However, I did get something done.\n\nAfter cloning the git repo, `cd` into the project directory. Run `iex -S mix`.\n\nAt the prompt, run `{:ok, p} = Fmft.Datastore.start_link()`.\n\nFinally, run `Fmft.Datastore.find_trucks(p, 1.0, 1.0)`.\n\nThis will spew out a long list of `{locationid =\u003e truck_data}` entries sorted\nby distance from the latitude/longitude of 1.0, 1.0. If you know your actual\nposition on earth, you can imput that in instead of the 1.0,1.0.\n\n# Assessment Notes\n\nNormally this section wouldn't exist. However, due to the nature of the\nproject, it makes sense to have a central place to gather some thoughts as they\noccur, or explain facets that don't fit neatly elsewhere.\n\n## The Project Idea\n\nA user can browse to the website. The site shows a list of the food trucks in\norder of distance, nearest being first. The user can add filter, narrowing the\nresult list.\n\nI don't expect I'll get all the way there. The primary focus will be on Building\nthe functional parts and see how far I get.\n\nI have decided to build this in Elixir despite being far more familiar with\nErlang's syntax. My reason is 2-fold: I want to shore up my elixir experience,\nand I want to show what I can do in a Elixir environment as that is job I'm\naiming for.\n\n## Where I got\n\nAn agent module that is able to inport the contents of the provided CSV file, keep it\nin memory, and answer the question \"what's the closest truck\". This would be the core\nof the web app, thus a logical place to start.\n\nThere are many things I would improve about the project.\n1. Instead of storing a basic string -\u003e string map of the imported data, I would\n   send it through sanitation to ensure values make sense. Things like ensureing\n   the latitude and longitude are actual numbers.\n2. Storing the data in a `protected` ets table. This way, the datastore process\n   need not block itself and others asking to read the data. This would also\n   push the sort onto the requester, making for a faster overall system. I did not\n   do this as I'm not yet familiar enough with how Elixir interacts with ets to feel\n   confident I could get that far in 3 hours.\n3. Improved dialyzer typing. The functions are not spec'ed, and that bothers me. At\n   least they are documented.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordnull%2Fpeck-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordnull%2Fpeck-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordnull%2Fpeck-assignment/lists"}