17:05 CST | category / entries / tweets
permanent link | comments?
17:05 CST | category / entries / tweets
permanent link | comments?
When unlocked and the phone rings, the lower-left-to-right swipe gesture you normally use cancels the call instead of answering it. To fix, make the unlocked “answer call” button full wide green in the “slide to unlock spot” and the red “ignore call” button full wide red just above it.
There is only one default ringtone. I would prefer adding a “Default Unknown Number Ringtone”. That way you have your 2-5 “priority” ringers, your default ringer, and then your “unknown” ringer. Would be a life-saver when getting random wrong-number calls and you’re trying to chase down your phone to answer the call.
In addition, the iOS4 update nuked the “double-tap for favorites” feature. There’s been some talk of a “triple-tap for favorites” instead of mapping that to some accessibility feature I don’t know about. Tap-and-hold for voice dial isn’t quite a good enough replacement, and there is no “soft-button” I can put in the dock that reliably gets me directly to my list of favorites. Doesn’t anybody at Apple realize that people only ever call like 5 other people?
Finally, fix exposé in Snow Leopard. [X] Scale Windows Proportionally. Yes this means you have to translate “proportionally” into 57 different languages but you can do it. I have faith.
10:02 CST | category / entries
permanent link | comments?
I try to avoid editor advocacy as a rule but when I do see people using vi/vim, I am an advocate of squeezing out some of its potential.
Most introductions to vim focus on getting you able to type words in and move around in the file and neglect to mention that vim has “physics”.
The two primary physics of vim that I’m aware of are:
Secondarily, you have some extra stuff related to:
Basically anything that changes the text when you start it from normal mode is an edit. Anything that changes your cursor position but doesn’t change the text is a motion.
Things that don’t move your cursor, don’t affect the text, and just change what shows up on the screen are viewport operations. Commands/registers are where you get into the dark underbelly of vim’s power. I mention them here like you would mention calculus in an algebra class… it’s important to know that it’s there so you can hand-wave and say: “You’ll learn why this thing behaves funny later on”.
The simplest of these things to explain are the major viewport commands although most people are not even aware of them.
These are the simplest because they don’t actually change anything in the file, they don’t change your cursor position, they don’t change text, they are basically invisible in the “editing physics” of vim. If you work with split windows then this also includes things like the
The next simplest thing to explain is motion. Key point here is that ANYTHING THAT MOVES YOUR CURSOR (that isn’t an edit) IS A MOTION.
The interesting thing is that there are so many different motion commands. That’s why when you see an experienced vim user, they jump around in a file like their cursor is under mind control. With so many different ways to move around it pretty much is, and without using the mouse and without relying on keyboard repeat.
The counterexample to this is how basic editors require you to mash down the right or left arrow, overshoot the point in the line you’re looking for, tap tap tap backwards in order to get your cursor where you want it, then start typing or deleting, etc. Basic editors only allow cursor motion via arrow keys or mouse clicks which is severely limiting compared to the number of ways you can move around in vim.
When I’m looking for “the beginning of the function” in vim, I do “/function foo[cr]” and it takes me right there. If I want to get the beginning of the function arguments list, I do “f(” (find left-paren). No no holding down the right arrow, no moving my hand to the mouse, no popping up a dialog box. I’m just right where I want to be.
Motion is the workhorse of vim and one of the big advantages of using vim compared to any other “basic” editor.
Honestly, editing in vim is kindof boring.
If you’re paying close attention you’ll see that the “c” (change) and “d” (delete) commands take a
Going back to the example of finding a function (/function foo[cr], f(), if you want to move to the end of the function argument list, f) (find right-paren). If you want to df), you’ve just done an edit to delete until you find a paren. If you want to change what’s in there: cf). The “move” is f), the “edit” is either “d” or “c”. Zero friction between moving and editing.
This cannot be overstated: Learn your motions.
Motion is a fundamental “physic” of vim. As universal and inexorable as gravity, motion magnifies both your editing speed and your editing power. Speed because you can get your cursor precisely where you want as quickly as possible. Power because the basic editing tools of “c” (change) and “d” (delete) take ANY motion as a parameter, even the usually useless ones.
Take for example “HML” (move cursor to high, medium, low position on the screen). “dH” deletes from wherever your cursor is to the top of the screen. Why would you want to do that? I have no clue. But because “d” doesn’t care, it just does what you say to. Delete the motion.
A more relevant example might be: “Hd/foo[cr]”. Go “high” then delete everything until “foo”. Remember, search is a motion because it moves the cursor!
Motion in vim is your key to speed and power.
The other interesting thing about editing in vim is that if you can find a way to compose your goal in a single “edit” (ie: I//[esc] insert “//” at the beginning of the line), you can repeat that same edit by moving somewhere, then pressing the . (period / repeat) key.
That becomes incredibly useful when commenting things out, when changing “FooType a;” to “BarType a;” in selected places… just queue up the change that you want (cwBarType[esc], do some searches (/FooType[cr]), hit “n” (next) until you find the right ones, then “.” to make the change. “nnn.n.nn.”. Next next next, change, next, change, next, change, next, next, change. It’s quick, useful, and reduces the possiblity for simple typing errors. You’re taken directly to the spot you want to evaluate, and the only button you have to push is “.” in order to repeat the same change you made before.
The naysayers will say “well my editor has a dialog box for search and replace”, which is all well and good. But the repeat “.” command allows you to repeat any edit. And many edits can involve arbitrary motion commands, meaning you’re not limited to replace AAA with BBB, but you can use the “cw” (change word) or “df,” (delete finding a comma) edits which is strictly more powerful than the usual simple search and replace dialog.
The repeat command (prefix an edit or a motion with a “count”) is interesting to explore too. “80i-[esc]” will repeat the “insert a single dash” edit 80 times. “i-[esc]79.” or you can insert the dash once and then repeat the edit 79 times. This works equally well with “J” or “d” or any other editing command. Although the results might not be useful, vim won’t stop you from doing it.
For things that are “too big” for one simple edit, you end up getting into macro-recording (“q, @”) which isn’t very complicated but doesn’t actually fit into the category of “editing”.
That leaves commands, registers, and other “modes”, all of which most people can live without in the sense that if you know “enough” about visual selection, and a basic “:%s/foo/bar/g” you’ll get by just fine.
Do some reading on “:help modes”, take a peek at “:registers” and “:help registers” as well as “:help recording” and “:help macro” if you’re interested in yet more tricks to speed up certain editing operations.
What helped me the most when learning vim was the advice: “Think Bigger”.
In most other editors, you think in mashing letters to insert them and the biggest motions you have are page-up and page-down.
Vim is different and especially powerful because it lets you think in terms of characters (hjkl), words (wbe), sentences (()), paragraphs ({}), programming blocks (vi{, vi(), etc.), precisely “find me then next ‘y’ on this line” (fy, Fy), and hugely (ggdG), usually with tremendous precision and no more than a few keystrokes.
Instead of thinking “I need to delete about 100 characters” think “I need to delete until the end of the line (d$)”.
Instead of thinking “I need to highlight a bunch of lines” think “I need to select the contents of this block (vi{)”.
By training yourself to think bigger you’ll eventually be able to edit better.
16:34 CST | category / entries
permanent link | comments?
15:19 CST | category / entries / tweets
permanent link | comments?
Today the internet restored my faith in the internet.
OldSpiceGuy made me giggle uncontrollably. social media brand interaction, video over the intertubes
OhDoctah made me giggle. anything you can do, I can do better… well, try to do better
Pandora is rocking out with some afrolatin, flamenco, acoustic influenced music (with minor key tonalities, obviously) based on Rodrigo y Gabriela. streaming music with a brain, a great way to discover new music based on what you already know
I just added an item to my calendar in the cloud through an oauth shell-browser bridge that showed up on the phone in my pocket:
$ google calendar add "buy tickets today at 2pm" Please specify user: ramses0 Please log in and/or grant access via your browser at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=.........&hd=default then hit enter.
it’s the cloud!!! in my pocket!!! from my terminal window!!!
The other day I used git to cherry-pick and crossport work from one branch to another branch. everything I’ve ever wanted from version control
Really unimaginable stuff.
11:35 CST | category / entries
permanent link | comments?
13:57 CST | category / entries / tweets
permanent link | comments?
14:02 CST | category / entries / tweets
permanent link | comments?
Halibut or Haddock in Tomato Sauce
From the annals of history, specifically the Cookbook of the Lutheran Nursing Home of Brockton, Massachusets. A recipe by one Phyllis Peterson.
Blend flour and butter. Stir in tomato sauce. Add cheese when thickened.
Arrange slices of fish in a baking dish. Pour on sauce.
Bake at 350 until tender, about 350 degrees.
Serves 6.
I had to take some liberties… it’s not clear but I think you’re supposed to heat the tomato sauce (as if you’d boiled + pureed, etc) since it talks about thickening. I went ahead and literally blended the flour + butter (made into a paste) but perhaps you’re supposed to sauté or brown and then add the tomato sauce.
21:53 CST | category / entries / recipes
permanent link | comments?
21:47 CST | category / entries / tweets
permanent link | comments?
I have to admit the unedited version is more entertaining, but I’m saving it here so I can try out at least one of the recipes (pork shoulder, safrito, tostones).
Take a lesson from the Puerto Ricans. Millions of us have managed to survive in one of the most expensive cities on earth with recipes like this:
Find a supermarket that has black beans on sale. Buy as much as you can. Then buy 5 or so pounds of Carolina rice, a bag of onions, a few bulbs of garlic, and a box of Goya Sazon.
Bring 2 cups of water to boil
Throw in one cup of rice, turn the heat down to simmer and lid it
Slice up a small onion
Smash up a clove of garlic
Throw some olive oil or butter into a HOT pan.
Throw the onions and garlic into the pan and fry them till the onion gets glassy. Throw some salt in there.
Grind some pepper in there for good luck.
Toss in half a packet of Sazon and stir till you get a paste. Now you have a sofrito.
Dump in your can of beans bean juice and all.
Stir it up.
Add a pinch of Cayenne pepper so you remember that you have a set of cojones
Set it on simmer
Your rice is done.
Throw the beans on top.
Win
You should get at least 2 meals out of one can of beans, and if your lucky you can get black beans 2 for $1. Adding the cost of the Garlic, Sazon and a small onion and you still eat a tasty, hearty, relatively healthy meal for less than $1.
Now. You are a growing lad. You need MEAT
OK, first of all, forget eating lips and rumps. There is a much, much tastier option that has kept millions of starving boriquas alive for generations: PORK SHOULDER.
In my neighborhood in Brooklyn, Pork shoulder is 79 cents a pound. That’s right. 79 cents. A package of hot dogs at $2.50 is more than double the price and has offal and all sorts of vile stuff inside.
Buy yourself a nice meaty pork shoulder. 5 lbs should do nicely.
Bring it home and get out a long, thin knife.
In a pilon (that’s a mortar and pestle, gringo) smash up a few cloves of Garlic, some sazon, some, salt, some pepper, and some oil. Grind it up GOOD. Now you have another sofrito.
Take your knife and stab some holes in the pig. Twist the knife around so the holes get nice and wide.
Now, take some of your sofrito and stuff it into the holes. Don’t be shy blanco, ram it in there. Use the remainder to roughly coat the outside of the pig. RUB IT. CARESS IT. This pig died so that you may eat. Salt it all over the outside and crack some pepper on there.
Set your oven for ~300 degrees
Throw the pork in skin side up and WAIT.
It’s going to take like 45 minutes a pound…
A warning: The smell is going to drive you INSANE. You have to wait this part out. Farm work is the best cure.
After an an hour and a half, jab it with a meat thermometer, but remember to not rest it on the bone, or you will get a bad reading.
You should be at around 150-160 degrees. Now comes the fun part. CRANK the stove up to 400 degrees. This will give you an orgasmic, crispy skin that will make your pork rinds taste like year old carboard comparison.
At 170 ish? Pull it out, but DON’T carve it up. You need to wait at least ten minutes otherwise all those sweet, sweet pig juices will dribble out. WAIT.
Congratulations. You just made Pernil. A five pound Pernil should give you meat for at least a week. SAVOR IT BROTHER. SAVOR IT
Edit: Forgot the best and cheapest recipe!!!
TOSTONES!!!!!!!!!!!!!!!!!!!!!!!!!!!
Green plaintains are usually like 5 for a dollar!
Here’s my mom’s recipe:
Fry up some bacon. Set the bacon aside and save that lovely, glistening fat.
Take a plantain and run a knife down the side and split the skin off without breaking the plantain. This takes a bit of practice.
Slice up the plantain into ~1/3 inch thick slices. Throw them into a bowl of ice water.
You have a fry daddy? You’re golden papi. No? Pour around half an inch of oil into a frying pan. Corn oil works best, olive oil smokes too easily. Get it hot! Throw in your bacon grease.
Take your sliced up plantains out of the ice water and drain them or even pat them with a paper towel till they’re dry.
Fry them until they just turn golden.
Throw them in the freezer for 10 minutes.
Now, here is where you become a MAN: Get yourself a flat bottom glass and a cutting board or a plate. Throw some flour on there. Smash the plantains with the cup. You may need a spatula to get them off the board…
Fry em AGAIN until they are golden and crispy
Make all three of these things together and you have an incredibly delicious and cheap meal!
TLDR; Learn the lessons of my people: The Nuyoricans. (New York Puerto Ricans) We have survived for DECADES on no money in one of the most expensive cities on the planet.
17:14 CST | category / entries / recipes
permanent link | comments?
Like what you just read? Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.
Thanks for Visiting!