Skip to content

chore: generalize client challenge #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
- "**.md"

env:
GO_VERSION: "1.22.5" # https://go.dev/dl/
GOLANGCI_LINT_VERSION: "v1.59.1" # https://github.com/golangci/golangci-lint/releases
GO_VERSION: "1.23.4" # https://go.dev/dl/
GOLANGCI_LINT_VERSION: "v1.62.2" # https://github.com/golangci/golangci-lint/releases

jobs:
lint:
Expand All @@ -27,15 +27,15 @@ jobs:
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
skip-cache: true
working-directory: ./ios-engineer/server
working-directory: ./client-challenge/server

security:
runs-on: ubuntu-latest
steps:
- uses: golang/govulncheck-action@v1
with:
go-version-input: ${{ env.GO_VERSION }}
work-dir: ./ios-engineer/server
work-dir: ./client-challenge/server

build:
runs-on: ubuntu-latest
Expand All @@ -45,5 +45,5 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
- name: Build go code
working-directory: ./ios-engineer/server
working-directory: ./client-challenge/server
run: go build
11 changes: 6 additions & 5 deletions backend-engineer/readme.md β†’ backend-challenge/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Backend Challenge

This challenge is part of the backend hiring process at [Heart
Hands](https://hearthands.tech/).
_This challenge is part of the engineering hiring process at [Heart
Hands](https://hearthands.tech/)._

## Why this challenge?

Expand All @@ -11,8 +11,9 @@ understanding of their technical stack, and excellent product intuitions to join
our team.

This exercise has been designed to give a glimpse of what it is like to build a
messaging app, and the kind of technical challenges we face and care about. We
are expecting you to spend between 4 and 6 hours on this challenge.
messaging app, and the kind of technical challenges we face and care about.

We expect you to spend 4-6 hours on this challenge, simulating real-world, time-boxed work.

## Instructions

Expand Down Expand Up @@ -50,7 +51,7 @@ will have to prioritize what you work on. A few things that are important for us
and that will be considered during the review:
- **documentation**: is the readme clear? are important parts of the code
documented?
- **impact**: which features did you prioritize?
- **impact**: what did you consciouslly decided to prioritize?
- **maintainability**: is the code well-structured and easy to read/evolve?
- **robustness**: is the code tested or easily testable? are edge-cases
considered? is static analysis leveraged?
Expand Down
File renamed without changes
31 changes: 18 additions & 13 deletions ios-engineer/readme.md β†’ client-challenge/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# iOS Challenge
# Client Challenge

This challenge is part of the iOS hiring process at [Heart
Hands](https://hearthands.tech/).
_This challenge is part of the engineering hiring process at [Heart
Hands](https://hearthands.tech/)._

## Why this challenge?

Expand All @@ -11,19 +11,24 @@ understanding of their technical stack, and excellent product intuitions to join
our team.

This exercise has been designed to give a glimpse of what it is like to build a
messaging app, and the kind of technical challenges we face and care about. We
are expecting you to spend between 4 and 6 hours on this challenge.
messaging app, and the kind of technical challenges we face and care about.

We expect you to spend 4-6 hours on this challenge, simulating real-world,
time-boxed work.

## Instructions

You are tasked with the implementation of an iOS messaging app that allows the user to
communicate (send and receive text messages) with bots, each in their own 1:1
You are tasked with the implementation of a messaging app that allows the user
to communicate (send and receive text messages) with bots, each in their own 1:1
chat.

A server is available for you to use. You can read more about it in
A companion server is available for you to use. You can read more about it in
[`./server`](./server). Its documentation contains information on how it can be
run, and what kinds of API endpoints & entities are available.

You can choose a target platform of your choice for this challenge: iOS, macOS,
or web.

Functional requirements:

- [ ] The app should start on a screen showing the list of all chats
Expand All @@ -36,14 +41,14 @@ Functional requirements:

Some topics that we find interesting to dig:

- [ ] Make the app work offline (both for app state and sending)
- [ ] Make the app work offline using a persistence layer of your choice
- [ ] Make the app idempotent in regards to what you send and receive
- [ ] Integrate a splashscreen to hide chats while the app is loading
- [ ] Add support for optimistic sending to give instantaneity in the UI
- [ ] Add support for a local read/unread indicator
- [ ] Avoid block changing states so the app feels fluid & snappy
- [ ] Make the app compatible to run on iPad and macOS
- [ ] Make the app runnable on multiple devices
- [ ] Avoid to block changing states so the app feels fluid & snappy
- [ ] Make the app available in multiple environments (e.g.: iOS/macOS,
web/electron)
- [ ] _Anything_ that you feel could improve the UX!

## Design
Expand All @@ -60,7 +65,7 @@ will have to prioritize what you work on. A few things that are important for us
and that will be considered during the review:
- **documentation**: is the readme clear? are important parts of the code
documented?
- **impact**: which features did you prioritize?
- **impact**: what did you consciouslly decided to prioritize?
- **maintainability**: is the code well-structured and easy to read/evolve?
- **robustness**: is the code tested or easily testable? are edge-cases
considered? is static analysis leveraged?
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions client-challenge/server/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
"I told my doctor that I broke my arm in two places – he told me to stop going to those places.",
"This is your captain speaking, AND THIS IS YOUR CAPTAIN SHOUTING.",
"Before you criticize someone, walk a mile in their shoes. That way, when you do criticize them, you're a mile away, and you have their shoes.",
"I was at the park wondering why this frisbee kept getting bigger… and then it hit me.",
"Two fish in a tank, one looks at the other and says, 'How do you drive this thing?'",
"Evening news is where they begin with 'Good evening,' and then proceed to tell you why it isn’t.",
"When I met my now wife, I asked if she was vegetarian because she really loved animals. She responded, 'No, I just really hate vegetables.'",
"I know they say that money talks, but all mine says is 'Goodbye.'",
"I have an inferiority complex, but it's not a very good one.",
"What do you call a lazy kangaroo? A pouch potato.",
"My wife and I laugh about how competitive we are. But I laugh more.",
"My wife told me to stop impersonating a flamingo. I had to put my foot down.",
"Have you heard about the guy who stole the calendar?! Well, he got 12 months!"
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ module github.com/hearthands/challenges/ios-engineer/server
go 1.22.5

require (
github.com/go-chi/chi/v5 v5.1.0
github.com/go-chi/chi/v5 v5.2.0
github.com/go-chi/render v1.0.3
github.com/google/uuid v1.6.0
github.com/r3labs/sse/v2 v2.10.0
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
)

require (
github.com/ajg/form v1.5.1 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/net v0.33.0 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
)
14 changes: 8 additions & 6 deletions ios-engineer/server/go.sum β†’ client-challenge/server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw=
github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0=
github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/r3labs/sse/v2 v2.10.0 h1:hFEkLLFY4LDifoHdiCN/LlGBAdVJYsANaLqNYa1l/v0=
Expand All @@ -14,11 +16,11 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w=
golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y=
Expand Down
Loading
Loading