Eliminating my trivial inconveniences building Discourse(samsaffron.com) |
Eliminating my trivial inconveniences building Discourse(samsaffron.com) |
Obligatory XKCD on this topic.
There are other factors at play besides the wall clock time. It should be easier to maintain focus and stay in the zone. I like having a shortcut for everything I do on a daily basis so that it can become muscle memory.
Also, consider that sometimes your behavior will change in response to the optimization, for example you may run your tests a lot more often if they complete quickly.
Finally, not all of your time has equal worth. I find that I do most of my work flow tweaking during my downtime.
As for different types of time, I fully agree. If I'm in a half hour between meetings for instance, and I can do some tweaking to simplify actions, I can claim I spent 30 mins on that, but, I can't claim I traded 30 mins of "productive" time for it. So if that 30 mins of work allows me to have a less disruptive action in a workflow, the amount of time that workflow actually saves is hard to measure, and may overall be well less than 30 mins, but who cares? Life is smoother, and it would have been 30 wasted minutes otherwise.
There's obviously no one-size-fits-all here, but think outside of the box for your workflow. Add macros to your editor, use something like LiveReload or Brolink.vim (shameless plug) to reload pages, streamline your build process, heck, even use AutoKey if necessary. Point is, you're the brain, and the computer is your slave. You don't need to be doing petty work that your computer can do for you.
What terminal client is that ? Could be cygwin ?
Also looks like hes running a local ubuntu VM for dev !? I wonder how he syncs it to the laptop, if he does at all.
+ some other Tool icons i cant really make out :)
On my mac laptop its a simpler setup, but same thing works I 'ssh -Y' into my ubuntu vm. Effectively giving me 3 monitors.
If you are interested in a slightly simpler Windows setup you could look at http://mobaxterm.mobatek.net/
Unless you're an old school Vim user, I see it as somewhat pointless to learn it in 2013 as a new user, considering Sublime can be just as powerful (support for shortcuts, mapping to compilers and script generators) we've got a better array of fast and feature-packed editors that offer Vim like power without requiring a read of a user manual just to edit some files and compile them to save a few mouse clicks. I can see why people who know Vim would never leave, it's a powerful and besides the self-satisfaction of mastering a highly complicated editor, those I know of who use it can code like the wind. It's amazing seeing them racing about the keyboard doing things I do in mouse clicks with sometimes long keyboard shortcuts they just know off of the top of their heads.
The bane of my existence used to be documentation, but through a few simple self-disciplined changes I ensure that I document every variable, class and function so I can automatically generate documentation (well most of it) without wasting hours documenting hundreds of lines of code and files.
The article raises some very good points though. The smaller things like waiting for a project to compile, waiting for your browser to open, compiling your LESS stylesheets, refreshing your browser and heck even leaving your desk to make tea and coffee all add up when you tally the time up times a 5 day work week and are things we really don't focus on.
I don't understand mapping the keyboard shortcut in Vim to reloading all browsers. Does that reload all tabs in all open browsers? What if I have a paused youtube video, or am saving my place in a large article that I am scrolled most of the way down the page. Doesn't that all take longer to fix than just going to the browser and hitting the keyboard shortcut in the browser? Since you're going to the browser anyway or else the reloading would have been meaningless?
The most obvious time sink that I can see from this article is that the tests are poorly optimised. But that isn't a trivial inconvenience. Having to wait 3 minutes, twice, every time you make a change in the code is a significant inconvenience. That should give plenty of time to do things such as reload a page. Designed properly tests are not meant to depend on one another just to run. Use minitest, use fixtures and fabricators. Test individual classes, test controllers, avoid full stack tests unless there is something that can't be tested about it at a lower level.
As others have said also Vim is a powerful tool but there isn't really very much it can do that a modern graphical text editor like Sublime Text 2 cannot... I'm sorry I am just having trouble making this article resonate with me. Is it something wrong with me or am I right?
Bull. I started using emacs when I was 18 and switched to vi at the age of 40.
The reason I switched was the I found many difficulties when I was using emacs on one hand and mouse-based editors on the other. One problem is that you can't easily cut-and-paste out of an emacs window because of the continuation characters. Another one is that if you use emacs and Windows editors, you'll end up confusing ^X^S with ^S and wind up typing the wrong thing into the wrong window.
You can get started with vi if you know the arrow keys, switching in and out of INSERT mode, as well as :wq and :q!. If you're using putty, visual cut-and-paste works great.
Learn how to use / and you're cooking with gas. I keep an old Unicos vi reference card around so I can gradually learn "dd", "G" and other useful keystrokes. But I was productive within 10 minutes of switching to vi.
I have one question. How were you able to manage a 23.5 ms time in the mini profiler over Internet? Were there no database queries involved while rendering that page?
Your website does load fast, no doubt about that.. :)
http://meta.discourse.org/uploads/meta_discourse/833/0abd085...
First paint is 380ms in which is not too bad considering my ping time to the Linode is 250ms (even though http keepalive is helping me cheat in this screenshot)
Autotest has a fast start option that stops it from running the entire test suite on load. --fast-start of -f for short
Try to keep your environments as consistent as possible, whenever it is reasonable to do so. In the long run, it's better for your peace of mind.
But... when you compare either to VS ... well startup time is not its strong point, just launched my old VS 2010 copy and it took 5 seconds.
I can't put my finger on exactly what, but when I was using sublime even in vintage mode it just did not "feel" like vim, that and the missing plugins, rails.vim is a masterpiece as are most of Tim Pope's plugins.
I just timed it here on Windows; 5 seconds to load with 2 unsaved tabs open. That startup time of Sublime Text Editor is the bane of my life, a long time when trying to hold a thought in my head I want to jot down.
According to the console:
plugin init time: 0.726977 loading bindings loading pointer bindings found 1 files for base name Default.sublime-theme theme loaded app ready pre session restore time: 4.48531 startup cache, total files: 94 cache hits: 94 startup time: 4.62067 (package setup was not run) loaded 837 snippets
So indeed around 5 seconds to load.
I'm using all default stuff apart from choosing a different theme. My machine ins't SSD but is up-to-date otherwise.
That's what happens by default when using the asset pipeline when in the "development" environment, it's supposed to ease debugging and works well when only including a few JS files. In "production" all the files would be merged into 1.
There is a flag "config.assets.debug = true" in the "development.rb" file, switching that to "false" will output just one file.
It really hurts not having the ability to dive into the separate files.
The "refresh all browsers" is only refreshing browsers pointed at my local dev Discourse instance, youtube is safe. I run a multiple monitor setup, I press a key and see right away the effect of my change.
We use fixtures and fabricators, we test individual classes, we mock and all that jazz. I am totally open to PRs that simplify and streamline our test suite, the point though is that now I am never blocked on my test suite in dev despite a full run taking 3 minutes.
While at home I ssh from the Mac to my Ubuntu VM. A huge advantage of Linux is that mvim will not run over ssh -Y but gvim will.
I could also run the VM from the laptop and ssh -Y from the workstation or laptop locally to have a portable setup. But my Macbook Air is rather slow compared to the pc.
edit looks like latency is a major issue with X11 forwarding so i see why you do it this way...I guess for my purposes its easier to just use a complete Ubuntu VM to develop in and sync that between machines.