Better HN
topnewbestaskshowjobs
Log inSign up

DaveWM

193 karma · joined Dec 9, 2014 (11y ago) · 56 submissions

Submissions

1.

Real-Time Web Apps in Clojure(blog.davemartin.me ↗)

3 points · by DaveWM · 3y ago · discuss

2.

Critique of Pure Hooks(blog.davemartin.me ↗)

2 points · by DaveWM · 4y ago · discuss

3.

Building a CLI Application in Elixir(blog.davemartin.me ↗)

5 points · by DaveWM · 4y ago · discuss

comment 4y ago · link · parent

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...

5.

Show HN: Only 6 – an Ivy Lee Method app(play.google.com ↗)

1 points · by DaveWM · 4y ago · 1 comment

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

Nice!

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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

13.

Debugging in Clojure(blog.davemartin.me ↗)

124 points · by DaveWM · 5y ago · 27 comments

comment 6y ago · link · parent

SEEKING WORK - Functional Web Developer, UK or remote

Hi, I'm an experienced Functional Web developer. I have 8 years' experience of web development (both frontend and backend), and 5 of functional programming with Clojure.

I'm currently looking for freelance work or short term contracts.

Website: https://davemartin.me

GitHub: https://github.com/DaveWM

LinkedIn: https://www.linkedin.com/in/davewm/

Email: mail@davemartin.me

Technologies: Clojure, Scala, Kafka, Elm, React, Angular

15.

Import a CSV into Kafka, Using Babashka(blog.davemartin.me ↗)

1 points · by DaveWM · 6y ago · discuss

comment 6y ago · link · parent

I've got a couple of side projects on the go:

1. Intention (https://i.ntention.app) - a todo app where your todos are arranged in a DAG. 2. JSON Viewer (https://json-viewer.io) - a simple web app for displaying JSON reports in a nice UI.

comment 6y ago · link · parent

Thanks very much! Best of luck with your Clojure journey

comment 6y ago · link · parent

Agreed! The only problem is that once you're used to hiccup, writing HTML becomes a chore!

comment 6y ago · link · parent

Thanks very much! I've made a few small static sites this way, and it's worked really well. However, it is missing several features that you need for larger (or more frequently changing) sites: asset minification, markdown compilation, etc.. Once these things become a pain, I'd either bring in a library like Misaki or Stasis (although I haven't actually tried either of these myself), or move to Hugo/Gatsby.

comment 6y ago · link · parent

I meant this article as a "thank you" to the brave doctors and nurses putting in extra time and effort to look after everyone else. Regardless of the state of NHS funding, it's just basic human decency to say thank you to them. I didn't mean it as any kind of political statement.

comment 6y ago · link · parent

Definitely! Also, just being a bit more diligent around social distancing and washing your hands can help :)

22.

Saying Thank You to the NHS, Using Clojure(clojure-conundrums.co.uk ↗)

60 points · by DaveWM · 6y ago · 67 comments

comment 6y ago · link · parent

Sorry about that, it should be fixed now. There isn't a paid version at the moment, but there's a web app at https://i.ntention.app . If you're on android, it should ask you if you want to add it to your home screen - if you do, it behaves very like an app.

comment 6y ago · link · parent

Wow that's really cool, thanks for sharing

comment 6y ago · link · parent

Thanks very much for the feedback. To respond:

- Is this in the list view or the graph view? I did originally have the list order reversed (i.e. root node at the bottom), but I found it very confusing. I could potentially add a setting to control the order.

- I've tried to avoid deleting nodes where possible. If you delete a parent node, its children will be automatically re-arranged rather than deleted. Could you re-name the root node instead of deleting it?

- Agreed, the graph view is very basic at the moment. I'm looking to make it much more powerful in future.

- I've intentionally ignored recurring tasks for now, because I want to get them right when I do implement them. I'm aware it'd be a nice feature, so I am looking to add it asap.

- Good idea

comment 6y ago · link · parent

That's a really good idea, I'll add it to the roadmap. If you have any suggestions for specific templates, please send them over to me (my email's on my profile).

comment 6y ago · link · parent

Haha looking forward to the competition ;). TaskDB sounds good, I'll keep an eye on it. Your approach to keeping the entire history of the graph is a good one, I'm using Datomic in Intention mainly for this reason.

I do hope DAGs become more commonplace, I think a lot of areas (e.g. project management) could benefit from using them.

comment 6y ago · link · parent

Got it, the app works well. I did consider using `react-digraph` for Intention, but the UX seems very focused on desktop (lots of clicking and dragging) and I wanted something more mobile focused.

comment 6y ago · link · parent

Nice! I got TaskGraph running locally, but couldn't figure out how to create a node. Seems like it's built on the same basic idea as Intention though - tasks structured into a graph. I'd be very interested to hear how you get on with TaskGraph.

comment 6y ago · link · parent

The main reason is they're easier to market. I've tried to advertise web apps before, and had very little success. People seem to much prefer mobile apps over web apps, even if they have exactly the same functionality. At a guess, I'd say it's because they're more familiar, and there's a sense of security in downloading them from the app store.
12