{"id":18318564,"url":"https://github.com/maxmind/dev-hire-homework","last_synced_at":"2025-04-05T21:32:56.361Z","repository":{"id":20127913,"uuid":"23397936","full_name":"maxmind/dev-hire-homework","owner":"maxmind","description":"A homework exercise for engineering applicants","archived":false,"fork":false,"pushed_at":"2021-12-02T18:25:36.000Z","size":849,"stargazers_count":13,"open_issues_count":0,"forks_count":8,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-21T12:12:34.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxmind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-27T16:58:22.000Z","updated_at":"2022-07-07T17:35:12.000Z","dependencies_parsed_at":"2022-08-31T05:41:40.519Z","dependency_job_id":null,"html_url":"https://github.com/maxmind/dev-hire-homework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fdev-hire-homework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fdev-hire-homework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fdev-hire-homework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fdev-hire-homework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxmind","download_url":"https://codeload.github.com/maxmind/dev-hire-homework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406078,"owners_count":20933803,"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-11-05T18:10:01.880Z","updated_at":"2025-04-05T21:32:55.813Z","avatar_url":"https://github.com/maxmind.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"Please note that while this is a relatively simple matter of programming, we\nare particularly interested in seeing the design of your solution. We will\nevaluate your code not only based on correctness but also based on design,\nsimplicity, and organization. Pretend this is code being written to go into\nproduction.\n\nThe given log file is a standard log file in the [Apache combined log\nformat](https://httpd.apache.org/docs/2.4/logs.html#combined) (with referrer\ninformation stripped out). You will write code to parse this file and generate\na report which breaks down some of the information based on the country and US\nstate where visitors came from. Please include any tests you wrote along the\nway as well.\n\nAlthough we primarily use Go and Perl, you may write the code in your preferred\nlanguage. You are also encouraged to use any third-party libraries you like.\nHowever, you must deliver the result in a way that allows us to run the code on\na standard Ubuntu system. That means either packaging up all of your\ndependencies or giving us very clear instructions on how to install them.\nUnless the language you choose is Go or Perl, assume that we do not know\nanything about the package management tools for that language! We will run your\ncode to look at the output, as well as looking at the code itself.\n\nInclude instructions on how to run the code, either as the output of\n`your-command --help` or as a separate README.md file. Your instructions should\ntell us how to specify the access log file to parse, as well as how to specify\nthe MaxMind GeoLite2 City database to use. This can either be done via\ncommand-line flags or by telling us where to put these files relative to your\nscript.\n\nThe code you write should use one of the available GeoIP2 APIs to get\ngeographical information about the IP addresses in the log. See [our developer\nsite](https://dev.maxmind.com/geoip/docs/databases?lang=en#api-clients) for\ndetails on the available APIs. Feel free to use either an official API or a\nthird-party one. **You must use one of the APIs linked from this page.** Use\nthe [GeoLite2 City\ndatabase](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data) as your\nMaxMind database. **Do NOT use the GeoLite2 web service.**\n\nInclude a command-line program to run your code against an arbitrary file. The\noutput of that program should be a report in the format of your choice. Don't\nworry too much about making this fancy. Printing lightly formatted text to the\nconsole is fine (so is an HTML page).\n\nIgnore all requests for images, CSS, and JavaScript. This is any request path\nbeginning with:\n\n* `/[a-f0-9]+/css/`\n* `/[a-f0-9]+/images/`\n* `/[a-f0-9]+/js/`\n* `/entry-images/`\n* `/images/`\n* `/user-images/`\n* `/static/`\n* `/robots.txt`\n* `/favicon.ico`\n\nPlease note that the first three path prefixes are regular expressions. The\nremaining are plain text.\n\nAlso ignore all paths ending in `.rss` or `.atom`.\n\nThe report itself should show the following information:\n\n* Top 10 countries by number of page views\n  * include the name of the country in English and the number of page views\n    from that country\n  * sort the results by number of page views (most to least)\n  * for each country show the page *other than `/`* that visitors from that\n    country viewed the most\n* Top 10 US states, ignoring visitors outside the US\n  * same as above for output\n\n**For the purposes of this code, \"the page\" is the path including the query\nstring.**\n\nIf there are less than 10 states or countries with visitors, only show those\nwhich have at least one visitor.\n\nNote that the GeoLite2 data file may simply not have all the relevant\ninformation on some IP addresses. In this case, assign the page views to a\nstate or country of \"unknown\" as needed.\n\n## How Long Should It Take?\n\nWe've created this exercise with the expectation that it take approximately 2\nhours. You're welcome to spend longer if you judge it appropriate, but we want\nto be respectful of your time.\n\n## Sharing Your Code with Us\n\nWe do not want your answer to be publicly available on the Internet for anyone\nto find. You can share your code with us in one of several ways:\n\n* Make a private repo on GitHub, BitBucket, or GitLab, and share it with us. We\n  will tell you who to invite to the repo when we ask you to do this homework.\n* Send us an email with a zip or tarball attachment. You can send this to your\n  HR contact at MaxMind.\n\n## Copyright\n\nThis repository is copyright MaxMind 2014-2021. You may distribute it under the\n[Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International\nLicense](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmind%2Fdev-hire-homework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmind%2Fdev-hire-homework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmind%2Fdev-hire-homework/lists"}