<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <id>tag:fhwang.net,2005:/syndicate/latest</id>
  <link rel="alternate" type="text/html" href="http://fhwang.net" />
  
  <title>Francis Hwang's site</title>
  <updated>2012-11-25T16:48:12Z</updated>
  <author>
    <name>Francis Hwang</name>
    <uri>http://fhwang.net/</uri>
  </author>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/fhwang" /><feedburner:info uri="fhwang" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost462</id>
    <published>2012-11-25T16:48:12Z</published>
    <updated>2012-11-25T16:48:12Z</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/XpoB4nyjgs0/Vim" />
    <title>Vim</title>
    <content type="html">&lt;p&gt;So I switched to &lt;a href="http://www.vim.org/"&gt;Vim&lt;/a&gt;, and now I love it.&lt;/p&gt;

&lt;p&gt;For years, I was actually using &lt;a href="http://www.jedit.org/"&gt;jEdit&lt;/a&gt;, of all things, even in the face of continued mockery by other programmers. My reasoning was well-practiced: TextMate didn't support split-pane, all the multi-key control sequences in Emacs had helped give me RSI, and Vim was just too hard to learn. jEdit isn't very good at anything, but it's okay at lots of things, and for years it was fine.&lt;/p&gt;

&lt;p&gt;But eventually, I took on a consulting gig where I was forced to learn Vim. And, as so many have promised, once I got over the immensely difficult beginning of the learning curve, I was hooked.&lt;/p&gt;

&lt;h2&gt;Beneath the text, a structure&lt;/h2&gt;

&lt;p&gt;I'm now one of those smug Vim partisans, and one of the cryptic things we like to say is that Insert mode is the weakest mode in Vim. So what the hell does that mean? It means that if you accept the (lunatic, counterintuitive) idea that you can't just insert the letter &lt;code&gt;*&lt;/code&gt; by typing &lt;code&gt;*&lt;/code&gt;, what you get is that every character on the keyboard becomes a way to manipulate text without having to prefix it with Control, Cmd, Option, etc. (In fact, the letter &lt;code&gt;*&lt;/code&gt; searches for the next instance of the word that is currently under the cursor.)&lt;/p&gt;

&lt;p&gt;When you edit source code, or any form of highly structured text, this matters, because over the course of your programming career you're far more likely to spend time navigating and editing existing text than inserting brand new text. So the promise of Vim is that if you optimize navigating and editing over inserting, your work will go faster. After months of practice, it does feel like I edit text far more quickly--that hitting Cmd/Ctrl/etc less often compensates for the up-front investment of learning these highly optimized keystroke sequences.&lt;/p&gt;

&lt;p&gt;But it's definitely a strange mindset. In most text editors, you think of the document as a casual smear of characters on a screen, to be manipulated in a number of ways that are all okay but never extremely focused. But Vim assumes you're editing highly structured text for computers, and in some ways it pays more attention to the structure than the characters. So after a while it feels like you're operating an ancient, intricate machine that manipulates that structure, and that the text you see on the screen is just a side-effect of those manipulations.&lt;/p&gt;

&lt;h2&gt;Investments&lt;/h2&gt;

&lt;p&gt;Is it worth the time? To answer that question you have to get almost existential about your career: How many more decades of coding do you have in front of you? If you're planning on an IPO next year and then you're going to devote the rest of your life to your true passion of playing EVE Online, then maybe keep using your current text editor. But for most of us, a few weeks or more of hindered productivity might be worth the eventual gains.&lt;/p&gt;

&lt;p&gt;As is often the case, it's not about raw, straight-line speed--it's about fewer chances to get distracted from the task at hand. Nobody ever codes at breakneck speed for 60 minutes straight. But when you're in the middle of a really thorny problem, maybe you'd be better off with a tool that's that much faster at finding/replacing/capitalizing/incrementing/etc, which might give you fewer chances to get distracted from the problem you're actually trying to solve.&lt;/p&gt;

&lt;p&gt;As somebody who's used Vim for a little less than a year, that's what it feels like to me. Most of the time. I have to admit that once in a while the Vim part of my brain shuts down and I stare at the monitor for a few seconds. Those moments are happening less and less, though.&lt;/p&gt;

&lt;h2&gt;Beginner steps&lt;/h2&gt;

&lt;p&gt;When it came to learning Vim, here's what worked for me:&lt;/p&gt;

&lt;h3&gt;&lt;cite&gt;Practical Vim&lt;/cite&gt;&lt;/h3&gt;

&lt;p&gt;Drew Neil's &lt;a href="http://pragprog.com/book/dnvim/practical-vim"&gt;&lt;cite&gt;Practical Vim&lt;/cite&gt;&lt;/a&gt; is, uh, the best book about a text editor I've ever read. It does a great job of explaining the concepts embedded inside of Vim. I skim through this every few months to try to remember even more tips, and can imagine myself doing that for years.&lt;/p&gt;

&lt;h3&gt;MacVim&lt;/h3&gt;

&lt;p&gt;As &lt;a href="http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convince-me-to-use-vim-was-wrong/"&gt;Yehuda recommends&lt;/a&gt;, I started in &lt;a href="http://code.google.com/p/macvim/"&gt;MacVim&lt;/a&gt; and not just raw Vim. At first you should let yourself use whatever crutches you need--mouse, arrow keys, Cmd-S--to help you feel like you can still do your work. I agree with Yehuda that tool dogmatism is going to be counterproductive if it makes the beginning of the learning process so painful that you give up.&lt;/p&gt;

&lt;p&gt;And I still use the arrow keys, and don't really buy the argument that it's ever important to unlearn those.&lt;/p&gt;

&lt;h3&gt;Janus&lt;/h3&gt;

&lt;p&gt;As with Emacs, a lot of the power of Vim is in knowing which plugins &amp;amp; customizations to choose. Yehuda and Carl's &lt;a href="https://github.com/carlhuda/janus"&gt;Janus&lt;/a&gt; project is a pretty great place to start for this. I'd install it, and skim the README so you can at least know what sorts of features you're adding, even though you won't use them all for some time.&lt;/p&gt;

&lt;h3&gt;&lt;cite&gt;vim:essentials&lt;/cite&gt;&lt;/h3&gt;

&lt;p&gt;&lt;cite&gt;Practical Vim&lt;/cite&gt; is great for reading when you're on the subway or whatever, but you'll need something more boiled-down for day-to-day use. For a while I had this super-short &lt;a href="http://www.stanford.edu/~jacobm/vim.html"&gt;&lt;cite&gt;vim:essentials&lt;/cite&gt; page&lt;/a&gt; open all the time.&lt;/p&gt;

&lt;h2&gt;Extra credit: One intermediate step&lt;/h2&gt;

&lt;p&gt;After I got minimally familiar with Normal mode, I started hating the way that I would enter Insert mode, switch to my browser to look up something, and switch back to Vim forgetting which mode I was in. I entered the letter &lt;code&gt;i&lt;/code&gt; into my code a lot.&lt;/p&gt;

&lt;p&gt;I suspect many Vim users just get used to holding that state in their head, or never leaving the Vim window without hitting Esc first, but I decided to simply install a timeout which pulls out of Insert mode after 4 seconds of inactivity:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;au CursorHoldI * stopinsert
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As explained in &lt;cite&gt;Practical Vim&lt;/cite&gt;, the best way to think of Insert mode is as a precise, transactional operation: Enter Insert mode, edit text, exit Insert mode. The timeout helped me get into that mindset quickly, and live in Normal mode, which is the place to see most of the gains from Vim.&lt;/p&gt;

&lt;p&gt;This is an intermediate step, and you shouldn't try it right away. If you're a beginner you're probably not going to benefit from being in Normal mode all the time--if anything the frustration would be likely to make you give up on it. But once Vim starts feeling less disorienting, and you're ready to really learn what &lt;cite&gt;Practical Vim&lt;/cite&gt; has been telling you, I'd give this a try.&lt;/p&gt;

&lt;p&gt;Hope that's helpful. And I hope that after a month or two of this, you become as smug and self-assured about your text editor as I am today.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/11/25/Vim</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost280</id>
    <published>2012-10-09T23:28:59Z</published>
    <updated>2012-10-09T19:28:59-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/d7s2NFH7_aE/The-law-of-constant-testing-hassle" />
    <title>The law of constant testing hassle</title>
    <content type="html">&lt;p&gt;Over time, technological progress makes it easier to write automated tests for familiar forms of technology.&lt;/p&gt;


	&lt;p&gt;Meanwhile, economic progress forces you to spend more time working with unfamiliar forms of technology.&lt;/p&gt;


	&lt;p&gt;Thus, the amount of hassle that automated testing causes you is constant.&lt;/p&gt;</content>
  <feedburner:origLink>http://fhwang.net/2012/10/09/The-law-of-constant-testing-hassle</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost469</id>
    <published>2012-07-06T14:39:15Z</published>
    <updated>2012-07-06T10:39:15-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/6A32fSEiHI4/quot-unquot" />
    <title>&amp;quot-un&amp;quot</title>
    <content type="html">&lt;p&gt;Looks like your Twitter bots need to be better at quote-escaping:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://fhwang.net/image/image/142/twitter-bots.png" alt="bots" /&gt;&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/07/06/quot-unquot</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost468</id>
    <published>2012-07-03T22:57:01Z</published>
    <updated>2012-07-03T18:57:01-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/L-5_5Wsx0tA/The-Front-End-Future" />
    <title>The Front-End Future</title>
    <content type="html">&lt;p&gt;My Goruco 2012 talk, "The Front-End Future", is now up. In it, I talk about thick-client development from a fairly macro point-of-view: Significant long-term benefits and drawbacks, the gains in fully embracing REST, etc.&lt;/p&gt;

&lt;p&gt;I also talk a fair amount about the cultural issues facing Ruby and Rails programmers who may be spending more and more of their time in Javascript-land going forward. Programmers are people too: They have their own anxieties, desires, and values. Any look at this shift in web engineering has to treat programmers as people, not just as resources.&lt;/p&gt;

&lt;iframe src="http://player.vimeo.com/video/45094154" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt;


&lt;p&gt; &lt;p&gt;&lt;a href="http://vimeo.com/45094154"&gt;Francis Hwang - The Front-End Future&lt;/a&gt; from &lt;a href="http://vimeo.com/goruco"&gt;Gotham Ruby Conference&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;As always, comments are welcome.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/07/03/The-Front-End-Future</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost467</id>
    <published>2012-06-24T17:08:28Z</published>
    <updated>2012-06-24T13:08:28-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/_4Sbz7VgSt4/Goruco-2012-is-over" />
    <title>Goruco 2012 is over</title>
    <content type="html">&lt;p&gt;
&lt;a href="http://instagr.am/p/MQzldvA5p5/"&gt;&lt;img src="http://distilleryimage5.instagram.com/fb937724be1511e19894123138140d8c_7.jpg"&gt;&lt;/a&gt;
&lt;/p&gt;


&lt;p&gt;This isn't just the event New York Rubyists want. It's the event they deserve.&lt;/p&gt;

&lt;p&gt;Thanks so much to all the co-organizers for pulling this off. Everybody else: See you next year, if not sooner.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/06/24/Goruco-2012-is-over</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost466</id>
    <published>2012-06-10T00:02:49Z</published>
    <updated>2012-06-09T20:02:49-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/TQfnDM4f-X8/Ellipsifier" />
    <title>Ellipsifier</title>
    <content type="html">&lt;p&gt;And there's this, too: &lt;a href="https://github.com/howaboutwe/ellipsifier"&gt;Ellipsifier&lt;/a&gt; is a Javascript library that truncates HTML. It will retain the tag structure, counting only visible characters in the resulting text.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;new Ellipsifier("to be or not to be", 5).result
//              "to be&amp;amp;nbsp;&amp;amp;hellip;"
new Ellipsifier('to &amp;lt;strong&amp;gt;be or&amp;lt;/strong&amp;gt; not to be', 20).result
//              "to &amp;lt;strong&amp;gt;be or&amp;lt;/strong&amp;gt; not to be"
new Ellipsifier('to &amp;lt;strong&amp;gt;be or&amp;lt;/strong&amp;gt; not to be', 5).result
//              "to &amp;lt;strong&amp;gt;be&amp;lt;/strong&amp;gt;&amp;amp;nbsp;&amp;amp;hellip;"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Another chunk of code written with the good folks at &lt;a href="http://www.howaboutwe.com/"&gt;HowAboutWe&lt;/a&gt;.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/06/09/Ellipsifier</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost465</id>
    <published>2012-06-08T19:17:46Z</published>
    <updated>2012-06-08T15:18:45-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/bpgmjyfL0o8/EasyMailPreview" />
    <title>EasyMailPreview</title>
    <content type="html">&lt;p&gt;The folks at &lt;a href="http://www.howaboutwe.com"&gt;HowAboutWe&lt;/a&gt; do a decent amount of HTML email, as you might expect for any site where people can send each other messages. Dissatisified with the tools for developing HTML email, I wrote &lt;a href="https://github.com/howaboutwe/easy_mail_preview"&gt;EasyMailPreview&lt;/a&gt;, a Ruby gem that makes it very easy to see the results of an HTML email in development mode. It auto-discovers mail methods and method arguments, and lets you write them on the fly with in an admin-ish screen.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://fhwang.net/image/image/139/screenshot.jpg" alt="EasyMailPreview screenshot" /&gt;&lt;/p&gt;

&lt;p&gt;I've been using it for a while, and I find it eases the pain of developing HTML emails. Somewhat.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/06/08/EasyMailPreview</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost464</id>
    <published>2012-05-29T00:23:46Z</published>
    <updated>2012-05-28T20:23:46-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/l04S_vwH2W0/Goruco-Six-years-on" />
    <title>Goruco: Six years on</title>
    <content type="html">&lt;p&gt;I wrote a little something about Goruco on &lt;a href="http://goruco.com/news/2012/05/28/six-years-of-goruco.html"&gt;the Goruco site&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Let me make a confession: Before we hosted the first GORUCO, I kind of didn’t want to be bothered. NYC.rb had been a successful Meetup for years, and people would occasionally say “you know, we could have a great regional conference here.” Which made sense in theory, but just thinking about the work involved gave me a headache. I usually smiled politely and tried to change the subject.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;It's worth a read if you're not already convinced this year will be the best Goruco evar. And if you have yet to &lt;a href="http://bit.ly/goruco-2012-registration"&gt;buy your ticket&lt;/a&gt;.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/05/28/Goruco-Six-years-on</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost463</id>
    <published>2012-05-22T00:54:32Z</published>
    <updated>2012-05-21T20:54:32-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/4tFoo-y6J50/Speaking-at-Goruco" />
    <title>Speaking at Goruco</title>
    <content type="html">&lt;p&gt;So, I'm speaking at Goruco this year. On &lt;a href="http://goruco.com/speakers/"&gt;The Front-End Future&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;With the rise of Javascript MVC frameworks like Ember and Backbone, web programmers find themselves at a fork in the road. If they keep doing server-side web programming, they'll benefit from tried-and-true tools and techniques. If they jump into Javascript MVC, they may be able to offer a more responsive web experience, but at significant added development cost. Which should they choose?&lt;/p&gt;

&lt;p&gt;This talk will address the strategic costs and benefits of using Javascript MVC today. I will touch on subjects such as development speed, usability, conceptual similarities with desktop and mobile applications, the decoupling of rendering and routing from server logic, and the state of the emerging Javascript MVC community. I will also discuss the impact of this seismic change on Ruby, Rails, and your career as a software engineer.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Nobody should confuse me with a Javascript expert, and that's not why I'm giving this talk. There are many talks you can see that focus on the specifics of implementation that are being hashed out today. With my talk, I will be drawing out the macro trends in our field that affect the products we build, and the careers we craft.&lt;/p&gt;

&lt;p&gt;In particular, I feel like the move to thick-client web apps is giving the Ruby and Rails community a bit of existential paralysis--we should be talking about this far more, and meeting this change head-on. The future is uncertain, but it is also bright.&lt;/p&gt;

&lt;p&gt;Goruco is on Saturday, June 23. This is our sixth year, and without giving away the rest of the speakers, I think this might quite possibly be our best program yet. If you want to join us, &lt;a href="http://bit.ly/goruco-2012-registration"&gt;tickets are still available&lt;/a&gt;.&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/05/21/Speaking-at-Goruco</feedburner:origLink></entry>
  <entry>
    <id>tag:fhwang.net,2007-01-26:BlogPost461</id>
    <published>2012-03-29T16:00:05Z</published>
    <updated>2012-03-29T12:00:05-04:00</updated>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/fhwang/~3/RghuFbwaCuY/That's-what-she-or-he-or-Michael-Scott-said" />
    <title>That's what she or he or Michael Scott said</title>
    <content type="html">&lt;p&gt;&lt;a href="http://geekchick77.dreamwidth.org/472.html"&gt;Awesome.&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Last Friday, the bot went a bit crazy and started throwing ["That what she said"] into the conversation with no apparent rhyme or reason. Finally, I had had enough. And then it came to me: I would write my OWN bot, that responded to TWSS with a quotation from a notable woman. If they are so keen on what she said, why don’t we get educated about what she really had to say. And so the “whatshereallysaid” bot was born. It might annoy the guys into shutting off the TWSS bot, or we might all learn about notable women. It’s a win either way, in my books!&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As a side note, I've always found "That what she said" to be annoying humor, not just because it can be sexist but because it's also just the dumbest, sloppiest humor you can think of. It's used by Michael Scott in "The Office" ironically, as an example of what a socially inept man-child might think of as funny. When and how it got stripped of that irony I'll never know.&lt;/p&gt;

&lt;p&gt;But is it too much to ask people to be less stupid than Michael Scott?&lt;/p&gt;
</content>
  <feedburner:origLink>http://fhwang.net/2012/03/29/That's-what-she-or-he-or-Michael-Scott-said</feedburner:origLink></entry>
</feed>
