Hacker News new | past | comments | ask | show | jobs | submit login

My day job is Django - and the ipdb based `shell_plus` from the `django_extensions` package is invaluable.[1]

I have a shell open almost all the time, and use it constantly for testing functions, writing queries etc. It drives me crazy watching other Devs change a query, wait for the server to reload and refresh the browser repeatedly, when editing in the REPL is so much faster.

Being able to `dir` and tab complete experimentally is so fast. (I also have this in the ipdb debugger... Also Django extensions has a debugger inside templates which is really nice)

Being able to `%edit 1-20` and have the repl session instantly in my editor to copy paste is fantastic too.

I also use a lot of TDD for tasks that fit that style, mostly where I'm writing business logic or data processing functions... but for exploring data / APIs /queries / data shaping, interactive just feels instantly productive. Once I've got the API or whatever it is to correctly produce the happy path, it's then easy to copy that into the codebase knowing what shape to expect, I can then turn that into unit tests and throw all the weird external data and edge cases at it with reasonable confidence about what should be happening underneath.

It also has a mode to print out all SQL statements it runs underneath your code - which is great for checking that you've not missed a join or something and got n+1 sneaking in

[1] https://django-extensions.readthedocs.io/en/latest/




I had to fight a lot to stop colleagues doing the long change a variable, reload, renavigate, trigger some dom event and wait.

Obviously I come from a lisp heavy culture, but I'm still stumped how many people stay in those high latency exploration mindset.


I work on embedded firmware that has a web UI (as embedded firmwares have nowadays). I don't touch it much, but when I had to a major bit of development on it, I did as much work in JS, out of a big JSON generated by the firmware. One thing that allowed me to do was to capture the page put out by the firmware and then iterate on that, and work the changes back to the original source files. In fact, I accessed it as a local file (file:// URL). Otherwise it's: run the build to make the firmware image; flash; reboot; wait for firmware to bring up webUI server; navigate to the page, trigger some DOM event and wait". :)


Pretty sweet trick. I even think this should be a generalized strategy in computing and taught in studies.


I knew someone would mention REPL-based development. We really should have better tooling in this area where we could set a breakpoint and when hit, change both code and/or data and continue.

The REPL is so incredibly productive with immediate feedback that the long ORM expression actually runs the SQL query you were intending (or notice it does something you didn't intend).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: