(for context: I’m a solid TDD believer and practitioner)
My worry with TDD marketing is that people really get stuck on the “test” word and misunderstand it as “write the kinds of tests you currently write…except before the application code” and that just confuses everyone because the TDD tests are very different from the kinds of unit tests one would typically write. Tests are just a vehicle for the practice and I think they’re used to drive TDD because we typically have infrastructure in place that runs the test code quickly and easily.
Either way, I like the framing that this post gives the practice as a versatile tool with many uses!
That’s an excellent way of describing it! I think you hit the nail on the head - people get tripped up on the “test” part of it.
When I’m “in the zone” with TDD it doesn’t even feel like writing tests at all really, it just becomes an extension of my design or coding process, and the “ceremony” or “separateness” of the tests kind of starts to fall away.
BDD (behavior driven development) kind of moves away from thinking of this as purely a testing practice, at least by using the word “behavior” rather than “test”, but I don’t think many people think of BDD as writing tests first.
I’ve often thought of TDD (and unit testing in general) as kind of like a visual design aid in which instead of a whiteboard or design doc, you visualize the problem by defining your inputs and your expected outputs. I might write another post similar to this one using the “visual learning” concept as a basis for another way of thinking about TDD.
Khan Academy set aside 6 weeks at the end of 2017 for the entire company to work on paying down technical debt
Khan Academy set aside 6 weeks at the end of 2017 for the entire company to work on paying down technical debt
Getting that sort of organizational buy-in is pretty special! Props to the tech leadership for making that happen.
Also, I thought the footnote was interesting about how JS gets refactored as part of performance initiatives because there’s an incentive to get the bundles as small as possible. Makes me wonder if there’s some other performance metric you could attach to the backend that would naturally motivate the Python refactoring as well. I guess it just defaults to “velocity” which is hard to measure to begin with.
After seeing too many “Rails is dead” rants from intermediate developers, who may have enough experience to make their own judgements but not enough to generalize to others' situations, it’s refreshing to read this.
I agree. The future of Rails and of Ruby has less to do with raw speed or hipness than it does with having a smooth and long path from “quicky” web apps up to major APIs with many contributors and appropriate amounts of abstractions.
In my own experience, on a number of small and verging-on-major Rails apps, the transition from the former to the latter scale of Rails project has always been marked by the creation of an app/services directory.
sorry this is a bit off-topic but would you mind pointing me to what is implied by having an app/services directory? I’m currently learning Ruby/Rails at a new job that involves managing and extending legacy Rails apps and am trying to get a handle on what good refactoring paths are. I have experience doing similar work in Java but I imagine the Rails community has had plenty of time to come up with their own best practices for cleaning up technical debt.
Not OP but, if you have a flow where you are orchestrating more than a few models, doing some mailings, etc, you could extract it to a Service object (or interaction, or interactor, or whatever you prefer to call it) A classic example of this popping up in a rails project is handling signups for a SaaS. You may have to create a few internal models (User, Account, Subscription), communicate with Stripe, and send welcome emails. It’s good to compose those into smaller actions, but you probably need something top level to coordinate.
Yeah, I also highly recommend that Code Climate blog post. A set of options any solo developer or team can start using right away and grow into over time as their knowledge of architectural patterns increases (and I say that as a technical lead still only confident in a few of ‘em).
What about https://github.com/pholser/junit-quickcheck for Java? I’ve used it only a tiny bit but it has felt very straightforward and user-friendly.
It fails the “supports example shrinking” requirement.
In general QuickCheck ports that don’t support shrinking are basically a dead end because they’re more frustrating to use than it’s worth, and if you make serious use of them you end up wasting a lot of time debugging their output.
Sounds similar in spirit to “Press release driven development” I’ve heard of being used at Amazon. If the imagined benefits to the user aren’t obvious or difficult to articulate then it’s possibly worth rethinking your approach instead of diving into development.
I’m working on trying to read, understand, and write and run the clojure code on Yoav Rubin’s An Archaeology-Inspired Database which is basically an in-memory datomic-like database from scratch. I’m finding it super educational and interesting to both see at a very high level how something like this is put together and it’s also the most complex clojure stuff I’ve ever tried to write.
Just got to the first few macros last night and that was a bit rough. I’m coming from a Java/Python background at my job and it’s tough to really wrap my mind around the fact that the forms passed to macros don’t have a “type”…they’re just lists of symbols that are manipulated into other lists of symbols that eventually become things to be evaluated.
(Also would like to say that I really love the articles from the “500 Lines or Less” series so far. I find a lot of tutorials for languages or technologies out there to be a bit boring and as a non-beginner I like how this series dives into interesting problems and solutions very quickly.)
I picked up my work on the Build Your Own Lisp book this weekend again. Implementing functions was exciting so I’m hoping to keep up the momentum and finish it up this week! It’s been the most C I’ve ever written in my life and I’m now wondering how difficult it would be to try learn some Rust by converting the finished product into it as a little learning project next.
If anyone is curious about the book I highly recommend it.
I believe I read this once. The problem I had (as well as others) were the fact it just dumps a library for parsing at you, and you really don’t learn much from the random library dropped on you, especially when you could have written it yourself.
I wasn’t able to find any existing libraries that handle these kinds of problems. If anyone knows of anything they could point me to that would be great!
This looks great! I especially like the tree visualization and manipulation. So many things become easier once you can “see the tree”.
I’ve settled on a workflow that combines command line for quick commits and work in progress. Then I load up Gitx (rowanj fork: https://rowanj.github.io/gitx/) and do interactive rebase or something and edit the commits one by one with good messages and add/remove chunks in the staging interface. I’ve tried a few times to get the hang of staging chunks via command line but while I understand it’s possible and fully supported, a visual UI works wonders and saves me a lot of time.
So many things become easier once you can “see the tree”.
When teaching hg, I always tell people to alias hg log -G to hg glog, and I make a point of always telling them to use hg glog. It does seem to help. Our Windows hg users by and large use hg through TortoiseHg, which also has the DAG front and centre. I really don’t get why git users seem to have a habit of not really thinking about the DAG. The average git user thinks about branches, but cares little about their topology.
hg log -G
Remember that most VCS users don’t really want a VCS at all. Most, not the kind that posts to lobste.rs or HN, just consider babysitting history to be a chore, and hardly ever learn anything beyond four or five commands. Their method for getting out of trouble is to re-clone, or follow a convoluted path to get back to a state that they know what’s happening instead of trying to learn new ways around the state they’ve found themselves in. There is Google-backed usability research to back this up.
git reset --hard all the things~
git reset --hard
i like git-cola for interactive rebases and the venerable gitk for exploring the graph
Slightly OT: Are there any large/general-purpose eInk displays/devices?
I really wish there was one big enough for papers/math books that wasn’t super expensive. I love reading on my Kindle but I basically can’t use it for anything work related.
There is Sony Digital Paper  but last I checked it was prohibitively expensive for a tablet (>$1100)
I keep wondering whether the new high-ppi displays on kindle/kobo could be juuuuust decent enough for most papers…have yet to try them out though
Haven’t read this yet but looks useful on first glance. Short and sweet.
I really wish every service/project people would write would have documentation around what architectural patterns it implements and why. Plus discussion of any deviations or “weird parts” that might not make sense at first, etc. It would really help put code into context right from the beginning for both writers and readers.
Anyone know of any open source projects that do this well? Would be great to see some examples for inspiration.
Back in 2003, I hacked on a native Win32 client for AOL Instant Messenger. It uses a combination of a microkernel architecture + message (aka event) broker to decouple the application into pluggable features I called components that can be developed independently. It turned out pretty well, but working on a real implementation of the AIM protocol sucked up a lot of time. You can sign on to 1-n AIM accounts, set your away message, and message other users.
People who are interested in URR may also be into the episode of Roguelike Radio where they discuss this game w/ the creator. (Also in general, I am a huge fan of that podcast. Recommended if you’re curious about roguelike games!)
Thinking about ways to visualize generative spaces, esp. for stuff like generative music. Wrote a blog post about an experiment I (w/ collaborators) just finished, which tags a generator’s control space with crowdsourced subjective word clouds, which is one angle. Might try to integrate something based on objective musical features also, like what the CataRT tool does for concatenative corpus-based synthesis.
That looks so interesting! I’ve always had an idea in the back of my mind to create a generative ambient music engine for myself to just have on at work that I could tweak using various high-level parameters and have uninterrupted audio all day.
Oh man, reading that blog post gave me some warm fuzzies about my days in my Computer music class back in College. Makes me want to start wiring things up and making god-awful sounds in Pd again.