Jump to content

User:SPage (WMF)/My setup

From mediawiki.org

Hardware

[edit]

4GB MacBook Air, fine hardware. I wish it had one more USB port, and 4GB is not enough to run Firefox, local MediaWiki install, and a VM running MediaWiki-Vagrant

My desk setup is more interesting. I work 95% of the time standing up, so bought an Ergotron Workfit-C for which WMF later reimbursed me. It holds an LCD monitor and my laptop above a small worksurface with a keyboard tray below, and the entire set moves up and down. It's cheap compared to the fancy, oversized Focal standing desks they're now buying. Read my review on Amazon.

Everyone's different but I prefer an upright un-hunched posture. So I look across at my monitor, not down. And a typical keyboard forces you to kink your forearms in and your wrists out, so I try to use an ergonomic keyboard. I use a Kinesis Maxim split keyboard and the excellent Logitech M705 mouse.

Software

[edit]

I run Kubuntu on a desktop at home. I told IT I wanted to run Linux and at the time Ubuntu on the MacBook Air was their recommended config, so that's what I got. For all the hate for the Unity interface (typical response to new version of Unity: "I tried it three years ago and hated it" that gets rated +5 informative) it works fine. Erik Moeller installed CompizConfig Settings Manager to turn off some of the more obnoxious Unity desktop effects. I don't use multiple desktops or workspaces; Unity had a tendency to push windows onto separate desktops when I disconnected the external monitor, so I forced it to one desktop (System settings > Appearance > Behavior > uncheck "Enable workspaces").

I split my external screen between Firefox and the Ubuntu terminal, both split into tabs. In Firefox, gmail in one tab (obviously). I love gmail's search, I hate its two-pane model. I tried delete and advance, but it's no substitue for a proper three-pane model.

Terminals and vim
[edit]

I have terminal tabs running each logical area of work, using pushd to bounce between directories. In them I run the zsh shell; despite all bash's improvements, zsh command completion is better.

I glued together various prompt lines to set my prompt to path, username@host, and git status indicators; really cool but the result is my typing changes color due to unmatched terminal escaping. I have a little alias in .zshrc to set a tab title,

settitle () {
	print -Pn "\e]2;${@}\a"
}

IRC is critical for collaboration. I used to have Pidgin running IRC on the Mac screen, but Pidgin bothered me, so I switched to irssi in a terminal tab. To remain connected I don't connect to freenode directly, but to a ZNC instance that a kindly co-worker runs. So spagewmf on ZNC remains connected 24x7, and I connect to that and it updates me.

I use locate name| grep /some/tree , find some/tree -iname 'name, ack-grep --js phraseInFile, etc. to find files.

I use vim for all code editing (that isn't on MediaWIki). I'm a master at navigation, marking and yanking, but not on recording or writing my own macros. I use :split and :b to work on large groups of files. I have jshint plugged in so :JS<tab> lets me check a .js file. I should hook up php -l for the same goodness. I have grep in vim configured to launch ack-grep.

MediaWiki development

[edit]

I got a local MediaWiki instance running mw core and a bunch of extensions, and despite all the benefits of MediaWiki-Vagrant, I do most of my development with this native instance. Speed matters.

git work

[edit]

I have MW core and a bunch of extensions checked out from git in extensions/ underneath it. For deployments I have a separate git tree that only has master and branches in it, plus all extensions in those branches.

I wrote up my git workflow but never merged it into the Gerrit page. In a nutshell:

  • daily git checkout master ; git pull --ff-only, then checkout my dev trees and git rebase master
  • when developing a feature always git checkout -b My_new_feature -t origin/master
  • lots of local commits, then git rebase -i to collapse them before submitting git review

front-end development

[edit]
  • Firefox with Firebug is still better than Chromium developer tools, I use both.
  • Occasionally I'll go to SauceLabs to try things in other browsers.
  • Obviously, ?debug=1 to get ResourceLoader to tell me what went wrong.
  • mw.loader.getState( MyModule ) in the browser console helps tell me why something isn't working.