evanspa's comments

evanspa | 4 years ago | on: Ask HN: How do you deal with getting old and feeling lost?

In my 40s. I feel that way too sometimes. My advice: try new things! I just started motorcycling; signed up for MSF course, got a used bike and it’s awesome. I play beer league hockey and that one night a week playing and being with the boys is precious (and theuropeutic…in a house with only daughters and wife lol). Snowboard in the winter…got my kids into skiing…golf in summer…LeetCode for fun to keep my mind/coding sharp. You get the idea. My day job (Android coding) is kinda mundane and is really just for the paycheck…and so my personal philosophy of life is to keep trying new things, diverse things, not being afraid of new things, and just going for it. I’m never bored and I don’t sweat things like “legacy” and whatnot. Enjoy life!

evanspa | 4 years ago | on: Poll: Is the leetcode grind necessary to land a high paying remote job?

I'm in my 40s doing the leetcode grind, but weird thing is, I'm actually ENJOYING it. I get a little high when I solve a problem, and I feel good about re-learning / re-discovering data structures and algorithms that I just don't use on a day-to-day basis. I paid for the premium version and enjoy reading the solutions and maybe learning a new trick or algorithm technique or whatnot. And who knows, maybe something that I learn when grinding on some leetcode problem will actually be useful in my day job? Thinking about it, if I ever do land a MAANG job, I don't think I'll stop doing leetcode problems. Sure, I won't go crazy with it like I'm cramming for mid-terms or something, but I'll still hack on them for the pure joy of problem solving, for the sake of problem solving.

I guess where I'm going with this is, maybe change your thinking about leetcode? Don't think of it as a necessary evil in order to land a high paying job that you dread doing each night; look at it as a fun little hobby, with the nice side-effect that you're keeping your data structure knowledge, algorithms and general problem solving skills sharp.

evanspa | 4 years ago | on: Six Years of Professional Clojure

Great article, love Clojure. Was trying to figure out what Nanit does. Might want to consider putting a link to the Nanit homepage on your engineering page. When just typed in nanit.com and saw the baby monitor tech, I thought maybe I went to the wrong place, until I saw the logos matched. Anyway, good read, but please put a link to your home page on your engineering site, or, put a 1 liner in the opening of your blog giving context to what your company does.

evanspa | 4 years ago | on: CSRF, CORS, and HTTP Security Headers Demystified

> Note that CORS preflight requests are not made for GET HEAD POST requests with default headers.

I really wish the author included an explanation for this. What are "default headers"? What special header(s) needs to be on the request in order for a preflight request to be made?

evanspa | 8 years ago | on: Why I Moved Back from Gradle to Maven

I delivered a session at JavaOne (2001?) on Ant (I was a whiz at it). Then, I had to learn Maven as it gained traction. I'm currently doing Android development, but I'm a little embarrassed to say that I don't really grok Gradle the way I do with Ant and Maven. I don't have anything against Gradle. I just don't want to spend another minute of my life learning another Java build tool. So, I stick to the Gradle defaults when creating a new project in Android Studio, and rely on SO and whatnot whenever I need to customize. Haven't been burned yet.

evanspa | 8 years ago | on: NHL stunner: A 36-year-old accountant who has never played pro stars in win

In my beer hockey league (Charlotte), goalies have to pay the league fees too. And it's up to the player-coach to find a sub if the primary goalie can't make the game. Our league is relatively "formal" in that we all have to be registered with USA Hockey; our games have real refs, time keeper, etc. But I've been in other leagues, less formal, where goalies skate for free.

evanspa | 8 years ago | on: Show HN: A simple offline-first app to track your reps in the gym

Developer here. Thanks for checking out my app, Riker. In case anyone is curious, the iOS app is native, written in Obj-C. The Riker web app is written using React and Redux. The REST API is written in Clojure and the backend is Postgres.

Although there is also a fully functional web version of Riker, the app is preferred since it supports offline mode, provides Watch App and integrates with Apple's Health app.

evanspa | 8 years ago | on: Show HN: A simple offline-first app to track your reps in the gym

Agreed - it would be really great to have automatic recording of reps like we have for steps, but as you pointed out, you would need "smart equipment" and "smart free weights," which are either very far off from happening, or won't happen, which is why I built Riker. Being able to record reps from the Apple Watch is the most friction-less for me so far.

evanspa | 8 years ago | on: Show HN: A simple offline-first app to track your reps in the gym

Developer here. Thanks for checking out my app, Riker. In case anyone is curious, the iOS app is native, written in Obj-C. The Riker web app is written using React and Redux. The REST API is written in Clojure and the backend is Postgres.

Although there is also a fully functional web version of Riker, the app is preferred since it supports offline mode, provides Watch App and integrates with Apple's Health app.

Will be happy to answer any questions.

App Store link: https://itunes.apple.com/us/app/riker/id1196920730?mt=8 Web link: https://www.rikerapp.com

evanspa | 8 years ago | on: Anko SQLite, a library to simplify working with SQLite on Android

You are right. The way I solved for this scenario is that when a record is first created on the device, a GUID is created for it (and stored using another column of course). When POSTing new records to the server for syncing, the server will check the GUID and see if the record already exists in its database, and if so, can ignore it (so the duplicate isn't written).

But yes, you're right overall - full offline mode w/syncing, etc is a big pain :)

evanspa | 8 years ago | on: Anko SQLite, a library to simplify working with SQLite on Android

In my strength-tracking iOS app Riker, I use SQLite directly (not CoreData) as my local data store, and support full offline-mode. The backend is Postgres.

In the app, for each relation (e.g., a "workout set"), I have 2 tables: a master and a scratchpad. When a user saves a set, a row is written to the scratchpad table. When the user syncs it with the server, a row is written to the master table and deleted from the scratchpad table. When the user wants to edit the record, I first copy it down from the master table to the scratchpad table. All local editing impacts the scratchpad row. When the user wants to sync, only if a 200 response is returned will I copy-up the scratchpad row to the master row. If the set was edited on another device and the local copy is out-of-sync, the server would have responded with a 409 (http conflict code), and the body would contain the server copy, which is then written to the master table. The user can then figure how they want to merge the scratchpad row and the master row.

Anyway...trying to do all this with CoreData would have been a pain, so I use SQLite directly, and works great.

Or to summarize, I handle offline mode, syncing and conflict detection using "updated_at" timestamp columns along with logic in my REST API to returned appropriate HTTP status codes, interpret "if-unmodified-since" headers, etc.

https://itunes.apple.com/us/app/riker/id1196920730?mt=8

Riker on Android is currently in-progress...

page 1