HackerTrans
TopNewTrendsCommentsPastAskShowJobs

DaveWM

no profile record

Submissions

Real-Time Web Apps in Clojure

blog.davemartin.me
3 points·by DaveWM·vor 3 Jahren·0 comments

Critique of Pure Hooks

blog.davemartin.me
2 points·by DaveWM·vor 4 Jahren·0 comments

Building a CLI Application in Elixir

blog.davemartin.me
5 points·by DaveWM·vor 4 Jahren·0 comments

Show HN: Only 6 – an Ivy Lee Method app

play.google.com
1 points·by DaveWM·vor 4 Jahren·1 comments

Debugging in Clojure

blog.davemartin.me
124 points·by DaveWM·vor 5 Jahren·27 comments

comments

DaveWM
·vor 4 Jahren·discuss
Hey HN! In 2020, I stumbled across a productivity method called the "Ivy Lee method" [1], and found it made me much more productive. Basically, you write down 6 tasks you need to do throughout the day, then focus solely on them. I was so impressed that I ended up writing an android app to help me follow it, which I've been using for about a year. I've spruced it up a bit, and launched it today as "Only 6".

There's a free version [2] (ad-supported), and a paid version [3].

I built it with React Native, ClojureScript, and Re-Frame. It's currently closed source, but if you'd like to see the source code just drop a comment here and I'll consider making it open source. It's Android-only at the moment, but if anyone would like to team up on an iOS version please drop me a message :)

Any comments or feedback are much appreciated!

[1] https://jamesclear.com/ivy-lee [2] https://play.google.com/store/apps/details?id=com.only6 [3] https://play.google.com/store/apps/details?id=com.only6.prem...
DaveWM
·vor 5 Jahren·discuss
Ah sorry, I don't know of a way of doing that in Clojure. What I usually do is figure out where the exception was thrown, wrap that form in `sc.api/spy`, and then somehow re-execute it.
DaveWM
·vor 5 Jahren·discuss
Nice!
DaveWM
·vor 5 Jahren·discuss
Cursive's debugger doesn't, but as one of the other posters mentioned there's a library called debug-repl which gives you this: https://github.com/gfredericks/debug-repl.

However, as I mentioned in the article, I've found it's usually better to use scope-capture than a debugger that pauses execution. The main reason is that I mainly work with Kafka Streams atm, and when the debugger pauses one thread other threads start timing out and throwing exceptions.
DaveWM
·vor 5 Jahren·discuss
Thanks! Perhaps the wording isn't great in that paragraph, I intended the phrase "println debugging" to mean the general style of debugging, rather than specifically using the println function.
DaveWM
·vor 5 Jahren·discuss
I've heard good things about debug-repl, although I haven't used it myself. From what I understand, it fills a similar niche to scope-capture. However you do it, being able to capture the state at a certain point in the code is essential.
DaveWM
·vor 5 Jahren·discuss
Assuming the crash doesn't cause the process to completely exit, you could indeed use `scope-capture` for this. This works well for local dev. In theory, you could use `sc.api/spy` in production code, and then attach a remote repl to diagnose any crashes. I wouldn't recommend this though, I think it would be best to use a good logging library like Mulog: https://github.com/BrunoBonacci/mulog
DaveWM
·vor 5 Jahren·discuss
Sayid does look really powerful. However, I declared Emacs bankruptcy years ago, and switched to Cursive. If I ever have the courage to switch back, I'll give Sayid a go :P