Some time ago in the Clojure subreddit, the question was asked, “Does anyone have any concrete examples of when mutability got them into trouble?”
The answer is yes, I have some.
A few years ago, I was using Foo in my front-end. I had my own custom credit card form whose state was stored in a nice, immutable Redux store. I passed the card info into the Foo library. Payments got processed. All was well with the world.
But then I noticed, if you entered a bad card (expired, say), my form’s date field would suddenly become blank. …
Joel Spolsky once said that the single worst mistake a software company can make is rewriting the code from scratch.
Ever since then, this idea seems to have been enshrined as gospel. I’m not sure why. I’ve been involved in a successful rewrite or two, and still think that those rewrites were the best decisions we could have made. I’ll blog about those rewrites at some point. But right now, I want to start a fresh conversation about rewrites.
As mentioned, I’ve led some successful rewrites, but maybe I was just lucky. Maybe my thoughts are shaped mostly by survivorship…
(Or, haters, please go hate somewhere other than Reddit and Hacker News.)
It’s that last comment that I want to address. I’ve got JS fatigue comment fatigue.
Yes. There are a lot of front end web frameworks. Why…
Growing up, I was poor. And my friend, Levi, was poor. This meant we had to be very selective about what video games we bought. And it meant that we played the snot out of those games. If I had to make a top 5 list of games, ranked by how often we played them, it would probably be this:
We probably beat Secret of Mana a few gazillion times. Once, we decided to beat…
As someone who’s been around the software industry for a while, I frequently receive emails that go something like this:
“Hi Chris, I saw that you have N years of experience with technology X. I work for an awesome company in Expensiveville. We’d love to have you. We pay 100% of relocation costs…”
Instead of writing the same, “No thanks” email every time, I’ve decided to write this article (OK, it’s actually more like a rant) and point all future recruiters here.
Devops. No software engineer wants to do it, but we all need it.
I work on a tiny team (3 devs). None of us are dev-ops experts. None of us wants to be. We want to build products.
Unfortunately, our old monolithic Rails application currently requires us to do a fair bit of dev-ops, which means tinkering with a fragile amalgamation of deploy scripts + Chef. We fear to touch it. This makes us sad.
So, this past week, we began researching how we can minimize our dev-ops work. Our research led us to Nanobox.
Nanobox is (possibly) the simplest…
It’s a question I see all the time on Hacker News forums. Whenever someone posts a Show HN site that is implemented in React/Angular/Vue, this question shows up near the top of the comments.
So, I thought I’d sit down and reflect on my own projects — current and past — and try to answer this question.
Let’s be clear. As a general rule, I don’t like JS-heavy sites.
As an example, the Hacker News UX is so much better than the Reddit UX — especially on mobile. Reddit takes forever to load. HN loads almost instantly. Clicking a link…
Recently, mostly as an exercise in learning the Clojure ecosystem, I decided to try publishing a library to Clojars. I’ve published a handful of hacky things in NPM, and was curious how to do the same in the Clojure ecosystem.
lein new my-lib
My project.clj has the following plugins entry:
:plugins [[lein-cljsbuild “1.1.6”]
This gives us ClojureScript support and adds in a super handy testing utility called “lein doo” which allows us to re-run all of our ClojureScript tests anytime we make changes.
Recently, I sat down and compiled a list of programming features that really make a positive impact on my day-to-day work:
- Functional programming
- First-class immutability
- First-class REPL
- Data-oriented programming
- Static typing
That’s it. The end.
Rich Hickey, the author of Clojure expressed it best in his talk “Simple Made Easy”. The talk is mostly about architectural simplicity, but the language itself is also fundamentally syntactically simple.
I’m going to describe my ideal language. What I want to know is: what language is this?
- Cultural proclivity to produce clear, obvious code (like Go)
- 1st class server-side web/api development experience
- Great REPL experience
- Great IDE experience w/ refactoring and intellisense support
- Great debugging experience
- Immutable first, first-class immutable types
- When needed, mutability is not like pulling teeth
- Monadic error handling
- Ability to say “what is this term?” like (source …) (doc …) in Clojure’s REPL
- Data-first development (like Clojure) but with statically enforced guarantees about data shape
- No private data*
- Good perf analysis tools
- No null