David Acevedo

Rabbit Moon

Fixing Autocomplete in Github's Atom Text Editor for Ruby

I really like Github's Atom Text Editor. I really like that it's multi-platform allowing me to master one set of skills that is transferable to all platforms and all machines. 

On thing that just burns me of the default set-up in Atom is the Autocomplete feature that seems to change my words as a type them. Because Ruby uses the end of line as a terminus for a statement you usually finish a word with pressing the return button and you get really annoying changes to your finished typed word a la MS Word. I find myself yelling "No that's not what I wrote!" at the screen in busy coffee shops.

I disabled autocomplete for a while but it is a very useful function. Then I found out they changed the package that gave the autocomplete to a new one called "Autocomplete Plus" that gives you more options. All that I needed to change to make autocomplete sane again:

1. Open Atom's Preferences
2. Search the bundled packages for "Autocomplete Plus"

3. Go to the Setting section below
4. Change the "Keymap for Confirming A Suggestion" from "tab and enter" to just "tab" and now the feature is sane again.
 


And that's it! Now Atom respects my Ruby code and I get less stares at the coffee shop. 
Comments

Programming is a Craft (And that's a good thing)

Programming is a craft. You are building something. The modern languages have given the programmer great ownership of the craft. Before it was more like an assembly and one programmer was responsible for one cog in a big machine and few programmers, the elite, saw the whole machine, understood the whole craft. But now with languages like Ruby and Python, the massive power at the hands of the programmer bring the whole thing back to a craft. It is something you do with your hands. It is creative, like writing and while not physical or tactile, it is built piece by piece.

The connection is deep and actually obscured by the way programming is taught. Because programming originated from a mathematical discipline and math has mostly lost its craft origins and now is taught more as an intellectual pursuit, it is often forgotten that math is but a tool itself. Not an end goal. Math is used to do things with it. Calculous to measure trajectories of objects. Geometry is essential for architecture and building. Because Math as a tool, or tools, have become so important, it is a discipline onto itself. And it can solve problems we haven't asked yet. Computer Science is a bit like that, but programming is more like building something. If computation science is like geometry programming is beyond architecture to include building.

The beauty of a program comes from its functionality as much as its cleverness. Like a house. It can be beautiful and architecturally brilliant, but if it fails as a house it fails, however if the architecture enhances the house, then it's a masterpiece. Too much emphasis can be given to the algorithms of computation and not enough at honing the craft.

The care you take for a program is a beautiful thing. The desire to build it right, is a beautiful thing. To see it survive updates with minimal changes, to see it endure, to have its construction push you to learn new techniques and new ways to look, new paradigms, is a beautiful thing.

And like a craft, you hone it bit, by bit, each time raising your level once more. But the skill is not in how much you know, or even how much you've mastered, but in how you hone that craft. Do you value it? Do you express yourself through it honestly? Does it open you up like a meditation, or challenge you like a competitor?

Craft is a beautiful thing. Yet how do you convey that beauty to a potential employer? How do you avoid those clog-maker-seekers that will crush the beauty of your craft, thinking the programmer an interchangeable cog as well?

Come to think of it. What is not craft in one way or another?

Maybe I'm just a craft-man, and what I do is craft... one way or another...
Comments

Embarking on a new venture

On a beach in Costa Rica, on Biscayne Bay in Miami, on Cassadaga in Central Florida and who knows where else my travels will take me.

Feeding myself good reading: Paolo Coelho's The Alchemist.
Feeding myself good food.

And beginning to write.

It is hard to leave behind the troubles and toils of Puerto Rico, but their fate is their own.

There is shock, loneliness and sorrow I'll have to deal with.

Embarking on new ventures of writing, long hard work ahead and I'm ready.

Behind me the past and dried leaves rustling in the wind.
Comments

textmate vs. atom yaml






Comments

Great Technical Books on Programming

We are in the middle of a computer programming languages explosion. In the last few years, a slew of programming languages have come into their own, others have been revived with new expressions and a whole bunch of them have been born anew. Also a new modality has appeared of the polyglot programmer, that is a programmer that works in multiple languages.

This last change is the most significant. Because for a long time programming was dominated by a very few select group of languages: C, C++, Java and C#. All of which are related. And dominated by a tool set like Visual Studio with C# and Visual Basic. Now that is no longer the case and things are for the better.

Recently I taught myself how to program and want to highlight a few books that are good reads. Most books in programming fall into a trap, that is they don't teach programming at all, but instead teach only the programming language. That's like teaching someone the rules to America Football and expecting them to automatically 'get' the strategy of the plays. That was my experience when I picked up the white book on Ansi C in college and couldn't make heads or tails of it.

So here are some great technical books that are just great even if you know how to program:

1. Why's poignant guide to Ruby by _why (also called the onion book, in a self-deprecating reference to pungent) is the best book I've read on programming. It is not for everyone but for everyone that it is for, it's absolutely superb. It does an incredible job of teaching you both a language and programming using comics, scatological stories and all sorts of cool mnemonic tricks. I would consider this a master piece. And it is free!

2. Javascript: the Good Parts by Douglas Crockford. Now this book is not about programming but about the language only. But it's super concise and helps you see why programming languages are constructed the way they are. His talks on the subject are super illuminating (look them up on YouTube). Javascript is a language that has a lot of quirks and they can get in the way of the beauty of the language, this book lets you see it. Javascript is also a very different language from the typical say Java or C#, it's prototypal not classical inheritance base, it's dynamic not static typed (meaning you don't have to say what a kind of things a variable will contain, that's what a type in programming is called), and multi-paradigm with a strong functional component. This book shines a light into the the sexy parts of the language and helps you understand how to avoid the crazy parts.

3. Practical Object-Oriented Design by Sandi Metz. I haven't finished this book yet. Just two chapters worth earns it a place on this list. This book is about how code is organized. Its short and dense and brilliant. More about it as I read it, but it's just great and written in a no-nonsense style that makes it perfect for a novice or an expert, a feat that is not easy to to do.

4. Exploring Everyday Things with R and Ruby, by Sau Sheong Chang. This is another great book that works both as an introduction to languages (ruby and R) and programming. It's well written and takes and interesting path using programming to satisfy your curiosity and experimenting with things in the real world. It's fairly fast on it's introduction to the languages but it does a good job of tying everyday things to programming which reveals a lot of what programming can be used for outside of just making apps.

Now for some general good books: the seven languages in seven weeks series (there's two of them) are pretty good, I'm reading the second one now. They also have a db one which is not as well written but an interesting topic. I've heard good things about Test Driven Development with Python but haven't read it. I'm liking Leanpub's everyday Rails Testing with RSpec and the Rails 4 way for solid practical advice. And when I was learning Rails, Sinatra: Up and Running was really helpful. Exceptional Ruby is an interesting book. And the Well Grounded Rubyist is a fantastic book for learning the Ruby language (it's the one I used in conjunction with the above).

Lastly, I want to reiterate the strange polyglot environment we are in now in programming. It is a time like no other, because instead of an arcane family of languages dominating all of programming: C, C++, C#, Objective-C and Java (which once was going to be called C++++) all of which follow the similar conventions now we are having a sort of Cambrian explosion of languages with whole bunch of interesting new ways of doing things. The "this is how you do things in programming" has been thrown out the window.
Comments
See Older Posts...