Carbon Five Blog
blog.carbonfive.com · Company blog · on HN since 2009
The engineering blog of Carbon Five, a software consultancy, with tutorials on Vim, JavaScript, Rails, Git, and Elixir.
What HN saysCommenters cite it for practical guides, such as the Vim text objects article, the Elixir dependency injection post, and the squash-and-rebase Git advice.
74HN people shared it
20linked it in comments
136stories submitted
1.1Kstory points
2 years agolast shared
2009people per year2026
Most-shared posts
- 1Vim Text Objects : The Definitive Guide9 people · 204 points · first shared 2011 · 41 comments on HN
- 2The Javascript Event Loop Explained5 people · 6 points · first shared 2013 · discussion on HN
- 3Rails Database Best Practices3 people · 5 points · first shared 2016 · discussion on HN
- 4How to Use (and Create) Open Source Libraries in XCode 43 people · 4 points · first shared 2011 · 1 comments on HN
- 5Always Squash and Rebase Your Git Commits3 people · 2 points · first shared 2021 · 1 comments on HN
- 6Deploying Node.js on Amazon EC22 people · 89 points · first shared 2011 · 17 comments on HN
- 7A Modern Guide to Threads2 people · 72 points · first shared 2011 · 11 comments on HN
- 8Exploring Client-Side MVC with Backbone.js2 people · 22 points · first shared 2011 · 3 comments on HN
- 9Taking Advantage of Multi-Processor Environments in Node.js2 people · 9 points · first shared 2014 · discussion on HN
- 10WebRTC Made Simple2 people · 7 points · first shared 2014 · discussion on HN
- 11Functional programming in your Rails codebase2 people · 5 points · first shared 2014 · discussion on HN
- 12TODOs never get to done2 people · 4 points · first shared 2011 · discussion on HN
- 13Hanging up on Callbacks: Generators in ECMAScript 62 people · 2 points · first shared 2013 · discussion on HN
- 14Lightweight dependency injection in Elixir (without the tears)2 people · 1 points · first shared 2018 · discussion on HN
- 15Always Squash and Rebase Your Git Commits2 people · 1 points · first shared 2018 · discussion on HN
What HN people wrote when they linked it
amorphid · 2018-07-16
Here's a blog article by Carbon Five on dependency injection in Elixir that I quite liked...
https://blog.carbonfive.com/2018/03/19/lightweight-dependency-injectio…
For context, Elixir (which includes Erlang) is a compiled language, but it doesn't/can't catch a lot of compile time type errors that you'd only uncover at runtime. For example, one process can send a message of any type to another process. There just isn't a great way (for the Elixir compiler) to catch that at compile time. It gives you more flexibility, but you can't have confidence that it'll work just because it compiled. Dependency injection with tests is a really helpful tool in Elixir.
WhatIsDukkha · 2018-03-08
As I got better over with Vim I wanted more and more things under the editing and movement power of Vim Text Objects -
https://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive…
That's probably why I ended up with Emacs/Evil mode :)
https://www.emacswiki.org/emacs/SqlMode
For me SQL is editing and sending chunks of text fluently, that exactly where vim or emacs are at their best.
hippipp · 2014-01-29
In the event that you find yourself wondering how these newfangled generators (used by the rethinkdash driver) work, see the following:
http://blog.carbonfive.com/2013/12/01/hanging-up-on-callbacks-generato…
rektide · 2021-07-02
> The best developers and engineers I’ve known all used Neovim. Coincidence?
Generally I rather advise we not do this!! This is a baiting question & one built around superficial narrow-dimensional assessments of "best". But sure, Friday, I've got summer hours: why not write a little homage to what I think is compelling & makes vim such a life-long joy to ongoingly immerse myself into, let's talk some about why I think vim makes some users feel unmatchedly free in a way they would never put down:
Vim's origins as the most user-hostile text-editor known to man (ed) is an interesting origin story. Ed excelled at automation, at writing little scripts to modify programs, in a non-interactive fashion.
This excellence as an automated text editing system stems, in my view, from Ed/Vim's notion of Text Objects, ed/vim's way of telling the editor about where you want to go/what you want to select in a file. The editor as a bunch of buffers (opened files), named registers (which is basically a 1-dimensional (many points) rather than 0-dimensional (point) clipboards), text-objects that can select spots in buffers ("lines 4-7", "the first two characters of this line"), and commands that can be run on text-objects is an incredibly powerful set of general purpose abstractions for doing any variety of text processing task, and there's a nice break down of responsibilities for what does what in this system.
The shake out is cool. Macros in this system are nothing but a stream of…
npsimons · 2024-07-09
> I don't want half finished changes forever committed to history.
This is exactly why I hew to squash+rebase. As I like to put it "I don't care about every little sneeze a developer had." Git has spoiled me with this, where I have the power to commit to my private repo anything I damn well please, but in the end I can clean things up and keep the central repo clean and bisectable[0].
Any VCS that doesn't offer these (squash, rebase, bisect) is a complete non-starter for me.
[0] - https://blog.carbonfive.com/always-squash-and-rebase-your-git-commits/
gregors · 2021-08-13
I'm definitely on the side of rebase being much better in most cases. https://blog.carbonfive.com/always-squash-and-rebase-your-git-commits/
jhall1468 · 2018-04-11
> That means it is not in general possible to tell which branch a particular commit belongs to.
That's because commits can belong to multiple branches, which is by design.
> Therefore visualizing complicated branching scenarios, in ways that makes sense to users, becomes almost impossible.
There a reason users need to visualize complicated branch scenarios?
> This is why people advocate rebasing https://blog.carbonfive.com/2017/08/28/always-squash-and-reb... The idea is to "lie" to the vcs because otherwise your history becomes a hodge-podge mess of merges. :)
Rebasing/cherry-picking isn't lying, it's avoiding the mess of a merge at the expense of being a tad more difficult.
Seems you have a very concrete idea of what you think a VCS is, and git disagrees with you, thus they "all suck".
hammerandtongs · 2017-03-26
As far as I remember you are foregoing text objects which are really one of the most powerful things in vim.
http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-…
Ironically I think most of the IDE (ie intellij etc) vim plugins have them while you do not.
rafapaez · 2017-03-23
- If I have to choose a Ruby tech, I would go for Rails, no Sinatra, no Padrino, nop. Whatever you think is simple now it will change in the future. So start with what you know well and has everything you might need, even if you're not using it now. I've seen many "small" services being rewritten in Rails for this reason and that's painful and a waste of resources.
- Nowadays I have several reasons not to use Rails for new projects (https://blog.jaredfriedman.com/2015/09/15/why-i-wouldnt-use-rails-for-… But I actually I have more reasons to use Elixir instead (https://medium.com/@kenmazaika/why-im-betting-on-elixir-7c8f847b58#.gu… (http://blog.carbonfive.com/2016/04/19/elixir-and-phoenix-the-future-of… And yes, it's fun, incredibly robust and scalable. :D
xlm1717 · 2016-02-25
The author briefly touches on what the author doesn't like about the event loop. I think it helps to learn more about how the event loop works in JS:
http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explai…
A possibly helpful module which gives you multithreading options is threads a gogo:
https://github.com/xk/node-threads-a-gogo
SEMW · 2015-01-22
Our solution to that is to always rebase & push right before you run through ci & merge. As well as updating the PR diff to be against the master it was actually merged against, this also has the advantage of making your git history a lot more linear[0], which has various other upsides (e.g. makes it a lot more sane when using fugitive or something to navigate backwards & forwards through the history of a file).
[0] i.e. looks like http://blog.carbonfive.com/wp-content/uploads/2010/12/multiple-no-fast…
socksy · 2013-06-29
Try using text objects: http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-…
brown9-2 · 2012-07-09
sciurus · 2012-05-12
And Yan Pritzker's post is primarily a summary of Jared Carroll's http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-…
ehamberg · 2012-01-30
Learn to use text objects¹ – they are what makes Vim much more powerful than Vi. You can even add custom text objects² such as function argument³ or camel case word⁴.
Text objects let you operate on logical units of text. E.g. “change inner word” (ciw), “delete a sentence” (das), change inner double quotes (ci"), ...
[1] http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-…
[2] http://vim.wikia.com/wiki/Creating_new_text_objects
[3] http://www.vim.org/scripts/script.php?script_id=2699
[4] http://www.vim.org/scripts/script.php?script_id=1905
jakehow · 2011-12-05
Interesting, but only seems to go half way. Half the battle is getting library maintainers to package things in a sane manner.
This alternative has been working really well for us so far: https://github.com/CocoaPods/CocoaPods
It has the added benefit of encouraging good practices in library development as described here: http://blog.carbonfive.com/2011/04/04/using-open-source-static-librari…
jsavimbi · 2011-09-04
I'm not a fan of fluxflex and I've discontinued using them. Too much middle-man for my liking. Last Friday I worked through http://cuppster.com/2011/05/12/diy-node-js-server-on-amazon-ec2 , better than http://blog.carbonfive.com/2011/09/01/deploying-node-js-on-amazon-ec2/… in the afternoon and save for a couple of idiot glitches on my part, it works fine. EC2 is a real bitch, for me at least, so I'll stick with Linode for now. With a little elbow grease you'll be able to get it to work with Github as well, but I'm looking forward to using whiskey_disk today.
bjourne · 2018-04-11
No, they all suck. Here is a graph rendering of a simple ClearCase repository:
https://svn.apache.org/repos/asf/subversion/developer-resources/guis/p…
ClearCase is 20 years old or so, but no git gui comes close.
The reason is git's peculiar object model. It has nodes (commits), edges between nodes (parent references) and references (pointers to commits) but no branches. That means it is not in general possible to tell which branch a particular commit belongs to. Asking a question like that just doesn't make sense i git's world. Therefore visualizing complicated branching scenarios, in ways that makes sense to users, becomes almost impossible. This is why people advocate rebasing https://blog.carbonfive.com/2017/08/28/always-squash-and-rebase-your-g… The idea is to "lie" to the vcs because otherwise your history becomes a hodge-podge mess of merges. :)
Btw, all other features of ClearCase were just horrible and brain-damaged. But the branch visualizer kicked ass.
jfaucett · 2015-06-27
This is a nicely consumable lightweight summary of how the node event loop works. In my experience this is one of the hardest things for new JS developers to actually understand, especially those coming to the language with a limited asynchronous programming background. Here's a good link to how the browser event loop works for those interested: http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explai…
IMHO, there's just a few things you need to understand to start getting productive with js fast, #1 on the list is to know how the event loop in the browser/node works and this is a really good intro to the node side of things. #2 is event bubbling/capturing in the DOM (http://javascript.info/tutorial/bubbling-and-capturing), and #3 would be everything about functions / function scoping.
Those are the parts I always try to explain first to devs I've mentored who were just jumping in to javascript.