{"id":19763048,"url":"https://github.com/fdiskas/worldposts","last_synced_at":"2026-01-29T23:06:58.589Z","repository":{"id":145457696,"uuid":"299052740","full_name":"FDiskas/WorldPosts","owner":"FDiskas","description":"Example WPF app","archived":false,"fork":false,"pushed_at":"2020-09-25T18:38:14.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-04T02:21:31.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"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/FDiskas.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,"publiccode":null,"codemeta":null}},"created_at":"2020-09-27T14:44:16.000Z","updated_at":"2020-09-30T08:41:28.000Z","dependencies_parsed_at":"2023-04-14T02:17:20.834Z","dependency_job_id":null,"html_url":"https://github.com/FDiskas/WorldPosts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FDiskas/WorldPosts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FDiskas%2FWorldPosts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FDiskas%2FWorldPosts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FDiskas%2FWorldPosts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FDiskas%2FWorldPosts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FDiskas","download_url":"https://codeload.github.com/FDiskas/WorldPosts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FDiskas%2FWorldPosts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28889864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12T04:07:53.578Z","updated_at":"2026-01-29T23:06:58.584Z","avatar_url":"https://github.com/FDiskas.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WorldPosts\nWPF app that loads a 100 random posts\n\n## Context\n\nThis application was build as an assessment task.\nIt does not meet the requirements by one point: it does not contain a 10x10 grid, but instead a 4x25 grid.\nThat was done on purpose just for visual representation reasons, as 10x10 grid wasn't looking too great :)\n\n## Screenshot\n\n![Screenshot](https://github.com/VytautasLozickas/WorldPosts/blob/master/screenshot.png)\n\n## Running the app\n\nTo run this app first you need to install NuGet packages. After that - build and run as usual.\n\n## Assessment Q\u0026A\n\n\u003e 1. In C\\# there are several ways to make code run in multiple threads. To make things easier, the await keyword was introduced; what does this do?\n\nThe await keyword allows async method to be suspended until asynchronous operation is completed in another thread. The result of asynchronous thread operation is evaluated only when thread completes and calling async method execution continues.\n\n---\n\n\u003e 2. If you make http requests to a remote API directly from a UI component, the UI will freeze for a while, how can you use await to avoid this and how does this work?\n\nYou can avoid this by wrapping API calls inside async methods and waiting for http request results with await. This allows main thread to continue execution (updating the UI, executing other code or event listeners) while another thread is waiting on response from the request.\n\n---\n\n\u003e 3. Imagine that you have to process a large unsorted CSV file with two columns: productId (int) and availableIn (ISO2 String, e.g. \"US\", \"NL\"). The goal is to group the file sorted by productId together with a list where the product is available. Example: `1, \"DE\" 2, \"NL\" 1, \"US\" 3, \"US\"` Becomes: `1 -\u003e [\"DE\", \"US\"] 2 -\u003e [\"NL\"] 3 -\u003e [\"US\"]`\na. How would you do this using LINQ syntax (write a short example)?\n\nSomething like this could work:\n```\nvar grouped = from p in products\n    orderby p.Id ascending\n    group p.AvailableIn by p.Id into gp\n    select new { Id = gp.key, AvailableIn = gp.ToList() };\n```\n\n\u003e b. The program crashes with an OutOfMemoryError after processing approx. 80%. What would you do to succeed?\n\nSplit the data into chunks and merge the results after a multithreaded grouping.\n\n---\n\n\u003e 4. In C# there is an interface IDisposable.\na. Give an example of where and why to implement this interface.\n\nA class that deals with unmanaged resources should implement this interface so those resources could be released from the memory. One example could be a class that imports an unmanaged library (dll) which returns a memory pointer that we need to clean up after its use.\n\n\u003e b. We can use disposable objects in a using block. What is the purpose of doing this?\n\nTo dispose resources as quickly as possible. If the method has more code to execute after the block where the resource was used, we can wrap that code into the using block so the resource is disposed immediately after the code is executed inside the using block.\n\n---\n\n\u003e 5. When a user logs in on our API, a JWT token is issued and our Outlook plugin uses this\ntoken for every request for authentication. Here's an example of such a token:\n`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIi wibmFtZSI6IkplcmVteSIsImFkbWluIjpmYWxzZX0.BgcLOiwBvyuisQk9yWW0q 0ZScMyIHNmDctw12-meCHU`\nWhy and when is it (or isn't it) safe to use this?\n\nIt is safe to use this token as it is hardly possible to forge it as the token has embedded signature that only the server with a matching key can validate or create.\nIt is not safe to use this token if it was compromised even if the token has an expiration date and when stolen might not last long.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdiskas%2Fworldposts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdiskas%2Fworldposts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdiskas%2Fworldposts/lists"}