Fork me on GitHub
#lein-figwheel
<
2018-05-21
>
mathpunk14:05:50

I have a new job where they don't think it's crazy if I use Clojure, and I am psyched. I want to do a thing that sounds complicated but maybe isn't? I'm doing QA on a new app with a Java back end and an AngularJS front end. It's pretty big --- not enterprise/legacy big but bigger than projects I've made for sure. I want to get some visibility into what is happening, so I want to open and connect to a repl on the front-end. (I also want to do this on the back end but Ill ask in #java about that).

mathpunk14:05:38

I know that there are functions that will open a repl you can connect to. I think what I need to do is write a tiny bit of code in our app somewhere that will call those functions. I'm still getting used to how there's a global namespace with all kinds of vars floating around in the browser; i.e. there's a lot I don't know

mathpunk14:05:12

Any advice on where to begin with this would be most appreciated!

mathpunk14:05:36

I have worked with figwheel before, but only on little greenfield projects where I just used the template and jacked in from emacs and boom, everything was shiny

mathpunk14:05:06

For now I'm doing the obvious thing and just reading the quick start carefully

bhauman15:05:40

@mathpunk unless I'm miss-understanding your situation, inserting a Clojure REPL into the java process sounds like a clear win. Whereas, the ClojureScript REPL may not be as much of a win over Chromes built in devtools.

bhauman15:05:36

oh now i get it, you want to write additional code in clojurescript

mathpunk15:05:41

@bhauman I see. I am not familiar with those devtools. The reason for the crazy idea is simply, 1) being more familiar with ClojureScript than JavaScript --- though I will be writing plenty I'm sure --- and 2) wanting to eventually find places to insert generative testing to break things and help the devs figure out where

mathpunk15:05:07

Yeah I'm not one of the app developers but I am QA with possibility of datasci

bhauman15:05:08

devtools are the tools that open in the bottom of the browser window, like firebug of old

mathpunk15:05:09

Trying to balance "Fit in with the team" with "We're fine if it's effective to do something odd"

mathpunk15:05:05

These are tools going beyond the console then?

mathpunk15:05:31

I'm testing through the UI now, with Protractor which is webdriver-for-Angular. Anything that gets me faster information about what's going on than squinting at Inspect Element will qualify as a win

bhauman15:05:59

well I was thinking that the console is a better introspector of a JS application, than a cljs REPL

mathpunk15:05:34

ok! "Learn to JS introspect" is a great answer actually

bhauman15:05:25

yeah, and its probably going to be hard to get by without learning the internals of Angular

mathpunk15:05:26

I'm definitely learning those. I got this job by not knowing anything about webdriver, but knowing how to REPL (with etaoin) my way into understanding.... now I'm learning about how Angular does things, what kinds of classes to look for

mathpunk15:05:35

but, I've been looking for them by inspection