Debugging made simple

November 7, 2017

A common question for people comming to clojure is "How do I figure out what's wrong with my code?", and while there are step debuggers and whatnot, I don't tend to use them. In ruby I do, and anyone coming from ruby is probably gonna ask:

Where's my binding.pry?!

Have you tried ...?

Continue reading →

Re-frame with the HTML history api

September 4, 2017

The default routing in the re-frame template is hash-based, which may be just what you need if you want to deploy it on a "dumb server".

If you can make the server forward all requests to where your app lives, however, (and don't need to support ancient browsers) then you can use the HTML history api. It makes your fancy SPA seem like an old-school server-responds-with-html website. Which is good, cause that's how people expect the web to work. (The back button, links, etc.)

The first part of this blog post does a good job of explaining the lay of the land when it comes to client side routing. (In the second part they implement a router, but we'll use one that someone else built.)

Continue reading →