March 24, 2013
Amazing Beef Bourguignon Recipe

This is my sister’s recipe. She made it for us years ago but just this year we decided to try it ourselves on New year’s Eve with some friends. It was one of our biggest successes.

She says she made minor adjustments to what was originally a recipe in Julee Rosso & Sheila Lukins cookbook, “The New Basics”. This is my sister’s version of that recipe but you can find references to the same recipe all over the place, including here.

Ingredients

  • 8 oz thick-sliced bacon cut into small dice
  • 3 lb beef chuck cut in 1 inch dice
  • 1 cup chopped onions
  • salt and pepper
  • 3T flour
  • 3 c Burgundy wine
  • 3 c beef stock (they call for homemade…yeah right)
  • 2 T tomato paste (we usually put an entire 6 oz can in)
  • 1T chopped fresh rosemary leaves (can get away with dried but fresh is way better)
  • 3-4 carrots pealed and cut into 1 1/2 inch julienne (like carrot sticks); we usually do way more b/c we like veggies
  • 2 c red or white pearl onions
  • 8 oz chanterelles or other wild mushrooms
  • 1T butter
  • 1T current jelly (we often don’t have this)
  • 2T parsley

Preparation

Saute bacon in big dutch oven (big orange Le Creuset is what we use).

Remove with slotted spoon and drain on paper towels.  Pour off all but 1T of the bacon drippings.

Saute the beef a few pieces at a time until brown on all sides (we usually do around 3 separate batches otherwise the excessive moisture from the beef ends up making the saute into a boil).

Add the onions to the beef and sprinkle with salt and pepper and the flour. Cook over highy heat stirring constantly for 5 minutes.

Add the wine, stock, tomato paste, reserved bacon, and rosemary.  Bring to a boil.  Cover the casserole, transfer it to the oven, and bake at 350 until the meat is tender, about  2 hours.

Meanwhile prepare the vegatables (here’s where we change things alot):

  • Get the carrots peeled and sliced.
  • Get the mushrooms washed and sliced.
  • Saute them in the butter until they have given up most of their water, around 10 minutes.
  • Drop the pearl onions into boiling water for 5 minutes.  Drain, rinse under cold water and peel.  (They also recommend making a small X in the root end of each pearl onion before boiling, which helps the peeling process later.)
  • After the beef has been in the oven for 1 hour add the veggies.  Cook for the second hour.  Add the current jelly, and parsley.

My own personal experience was that the veggies were a little soft, so perhaps a little less than than whole second our would be best.

Thanks Sis!

December 21, 2012
The NRA and the ‘Positive Good’ of Maximum Guns
Rebecca J. Rosen, theatlantic.com
In light of the NRA’s call for even more guns, in even more places, friend of the room and his­to­ri­an Tony Hor­witz (Con­fed­er­ates In The Attic, Mid­night Ris­ing) sends along this beau­ti­ful mis­sive not­ing the haunt­ing sim­i­lar­i­ties…

Wow. Possibly apt comparison to pre-civil war pro-slavery tactics …

The NRA and the ‘Positive Good’ of Maximum Guns
Rebecca J. Rosen, theatlantic.com

In light of the NRA’s call for even more guns, in even more places, friend of the room and his­to­ri­an Tony Hor­witz (Con­fed­er­ates In The Attic, Mid­night Ris­ing) sends along this beau­ti­ful mis­sive not­ing the haunt­ing sim­i­lar­i­ties…

Wow. Possibly apt comparison to pre-civil war pro-slavery tactics …

September 22, 2012
Apple Time Machine bug report

I hate that I literally cannot recommend Apple computers to my friends anymore. I don’t even know what the alternative is and maybe Windows sucks so much that I would change my tune if I knew. But, I don’t know and therefore, here I am: cannot recommend Apple computers for a family with simple needs.

Here’s the bug report Apple will never even notice:

Summary: Since Lion time machine backups between laptops and a Mac Mini with an attached hard drive are no longer usable. There are all sorts of failure modes, including starting from scratch after deleting all existing backups. The very same setup prior to Lion worked flawlessly for several years.

Today, for example, I have two computers on 10.8.2. It took about 10 or 15 minutes to create the initial sparse bundle on the destination mac mini. Peak transfer rates on the wireless network in my house were - during this transfer - 7+ Mbytes/sec. So 7MB up from the 2011 macbook air laptop, 7MB down to the 2011 mac mini. Unfortunately, for most of the time, the network connection was idle, as were the CPUs of the two computers. One wonders what was going on.

Now that the sparse bundle is created it’s performing the backup. It, too, sits around idle for most of the time. Activity Monitor assures me that there is almost zero disk activity. The machine is, for all intents and purposes, idle. How is 80Gb of backup ever going to finish if it sits around doing nothing for 10 minutes at a time?

Now you might think this is just my specific hardware, but then you’d be ignoring the thousands of people online who experienced the same thing since they upgraded to Lion. Now, over a year later, never once has the issue been acknowledged or addressed by Apple. Therefore the release of Mountain Lion is exactly as messed up as Lion.

This behavior manifests itself in lots of ways. For example, you might finally have managed to finish your initial backup and might have been humming along just nicely for a few weeks, and then suddenly you have a simple hourly backup that just refuses to finish. Why, nobody knows. It just fails. Well, you think, sometimes the disk might be corrupted, so let’s delete it and start all over, and then you find yourself wait 15 minutes for a sparse bundle to be created and then another 2 or 3 days to perform a backup that prior to Lion took no more than 8 hours.

So now we have an apple fanboy spending as much time messing with his apple computers to get basic functionality working as he spent on Windows NT. Even Windows XP was better than this. I literally cannot recommend Apple any more. What the hell happened?

Steps to Reproduce: Setup Time Machine between a laptop and a mac mini.

Expected Results: Creates a sparse bundle as fast as your network will allow (like it used to in Snow Leopard days) and then performs a backup using up as much bandwidth as your network will allow (like it used to in Snow Leopard) without minutes at a time of sitting around literally doing nothing.

Actual Results: Sits around for minutes at a time doing absolutely nothing, with estimates of days to complete the task. It has been stuck at 246Mb transferred for the duration of this bug report. The estimate is up to 6 days. Both computers are connected at > 240 mbits/second to an Apple Airport Base Station Extreme.

Regression: Yes. This all worked flawless on Snow Leopard.

Notes:

Apple - fix a few bugs, OK? Seriously, fix a few bugs.

June 14, 2012
unfortunate emacs auto-revert-mode and git pull —rebase interaction

I use global-auto-revert-mode in emacs. It’s great.

I really like to use “git pull —rebase” to avoid all those unnecessary merges, but the way that works doesn’t go well with Emacs’s auto-revert-mode. What it does is replay your non-pushed commits after pulling down changes that are in the remote repository, a side-effect being that files you’re editing in emacs may change more than once in rapid succession. Because UNIX file timestamps are second resolution, there’s a race condition in emacs where it will reload the file and then miss a subsequent change (via git) during that same second.

So here’s a fix which I have applied to my current version of emacs: 23.3.1. It basically postpones an auto-revert if the last mod time of the file is the same as the current system time. It’ll pick it up the next auto-revert iteration, which appears to be to be every 2 seconds by default.

I just load this in my .emacs:

;;
;; Fix the auto-revert-handler so that if the system time is very
;; close to the new modified time for a file, skip it on this
;; iteration. This should fix race conditions when a file is changed
;; multiple times within the same second.
;; 

(defun file-change-too-close-for-comfort ()
  (let* ((file-time-raw (nth 5 (file-attributes (buffer-file-name))))
         (file-time (+ (lsh (nth 0 file-time-raw) 16) (nth 1 file-time-raw)))
         (current-time (+ (lsh (nth 0 (current-time)) 16) (nth 1 (current-time)))))
    (and (eq current-time file-time)
         (message "%s: postpone revert" (buffer-name))
         t)))

(defun auto-revert-handler ()
  "Revert current buffer, if appropriate.
This is an internal function used by Auto-Revert Mode."
  (when (or auto-revert-tail-mode (not (buffer-modified-p)))
    (let* ((buffer (current-buffer)) size
	   (revert
	    (or (and buffer-file-name
		     (file-readable-p buffer-file-name)
		     (if auto-revert-tail-mode
			 ;; Tramp caches the file attributes.  Setting
			 ;; `tramp-cache-inhibit' forces Tramp to
			 ;; reread the values.
			 (let ((tramp-cache-inhibit-cache t))
			   (/= auto-revert-tail-pos
			       (setq size
				     (nth 7 (file-attributes
					     buffer-file-name)))))
		       (and (not (file-remote-p buffer-file-name))
			    (not (verify-visited-file-modtime buffer))
                            (not (file-change-too-close-for-comfort)))))
		(and (or auto-revert-mode
			 global-auto-revert-non-file-buffers)
		     revert-buffer-function
		     (boundp 'buffer-stale-function)
		     (functionp buffer-stale-function)
		     (funcall buffer-stale-function t))))
	   eob eoblist)
      (when revert
	(when (and auto-revert-verbose
		   (not (eq revert 'fast)))
	  (message "Reverting buffer `%s'." (buffer-name)))
	;; If point (or a window point) is at the end of the buffer,
	;; we want to keep it at the end after reverting.  This allows
	;; to tail a file.
	(when buffer-file-name
	  (setq eob (eobp))
	  (walk-windows
	   #'(lambda (window)
	       (and (eq (window-buffer window) buffer)
		    (= (window-point window) (point-max))
		    (push window eoblist)))
	   'no-mini t))
	(if auto-revert-tail-mode
	    (auto-revert-tail-handler size)
	  ;; Bind buffer-read-only in case user has done C-x C-q,
	  ;; so as not to forget that.  This gives undesirable results
	  ;; when the file's mode changes, but that is less common.
	  (let ((buffer-read-only buffer-read-only))
	    (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
	(when buffer-file-name
	  (when eob (goto-char (point-max)))
	  (dolist (window eoblist)
	    (set-window-point window (point-max)))))
      ;; `preserve-modes' avoids changing the (minor) modes.  But we
      ;; do want to reset the mode for VC, so we do it manually.
      (when (or revert auto-revert-check-vc-info)
	(vc-find-file-hook)))))

March 20, 2012
Apple on the Wrong Track

This article may be on the money with respect to Apple’s new set of choices.

http://www.technologyreview.com/computing/39925/

As is often the case, great technology may be acquired by rather than invented at large companies, and Apple may be no different. I don’t think this matters all that much, as long as they do great things with the technology.

Where I worry with Apple is their drop in quality (at the OS X level) and the absurd rate of hardware obsolescence we’re now faced with. I couldn’t stand OS X Lion on my 2.6 GHz, 4Gb MacBook Pro of 15 months: they had redesigned the OS to work for SSD’s, the vast majority of existing users be damned. The current experience is excellent now I have the SSD, except for the bugs.

Bugs are bugs, Apple should fix them, but instead they are working on the next operating system, Mountain Lion. WTF!? LIon is buggy and slow as hell, and they are promoting Mountain Lion? And apparently it’s going to require hardware that is just a few years old only?

When I joined the Apple bandwagon in mid-2004 and went from one release to the next, I was impressed with the initial quality and then the improved quality of each subsequent release. Snow Leopard increased the longevity of my existing hardware, not reduced it! The best OS release in the history of OS releases. Lion has obsoleted, perhaps unofficially, lots of hardware and now Mountain Lion is making it official if not worse.

Come on guys. Sort it out. Back to basics.

March 13, 2012
Is Being President Like Becoming a New Parent?

I am one of those demanding liberals, disappointed in everything Obama has not done the way I would have liked and unable to see, perhaps, what he has done well. It sucks because some of the stuff really bothers me and I want not to vote for him again because, well, what good is it disagreeing vehemently with the guy if you’re going to go ahead and vote for him again anyway?

Then I saw this link today - actually he tweeted it - about dinner with Barack:

http://www.barackobama.com/news/entry/photos-dinner-with-barack-and-michelle

and I was just feeling so envious. Because, somehow I can’t quite imagine spending an entire evening with him - even though he is the President of the United States and I would be scared witless - without asking him some burning questions. I usually save my most impertinent questions for when my wine glass is raised, so as to be covering my face, just before I take a sip. That is definitely the approach I would take this time.

Here’s how I would do it. I would ask, simply, “Is being president like becoming a new parent?” Maybe he’d know what I mean and maybe he wouldn’t. After all, he was a new parent once. Here’s what I mean. See, the thing is, lots of people are parents but it’s very rare that one set of parents accurately conveys to prospective parents-to-be what it’s really like. They say it’s just too hard to put into words, you can try but it won’t help. Personally, I think I could do it, because I remember the utter shock of it all, the intense emotions at the top and the bottom of the scales that continue to this day, and so on and so on … and so on …

Where was I? Oh yeah. So, in the case of the presidency, is there something like that going on? I mean, before he became president he was going to close Guantanamo, and he along with many of us were quite indignant about the whole thing. So what happened? Or, the Afghanistan escalation, the war in Iraq dragging on? How about his right to assassinate American citizens whom are deemed to be terrorists without due process? These are not the kinds of things that would have gotten him elected by his loyal followers four years ago, so what’s up with that?

Is it just that things change when you’re president just like things change when you’re the parent instead of somebody else?

http://www.huffingtonpost.com/kara-gebhart-uhl/mom-judgments_b_1319775.html

I want to know. I hope he and his wife would take it in the right way and not think I was just trying to be a wiseass.

March 11, 2012
How I Learned to Love CMS and Had My Heart Broken by G1

Introduction

G1 is Sun’s new garbage collector that first appeared in Java 6 release 14 or something like that. It’s supposed to be the best of all worlds: concurrent garbage collection with compaction! Prior to G1 it was either concurrent collection with very short “stop the world” GC events but with no compaction, or the copying and compacting collector, which had “stop the world” events that would increase in duration with the size of your heap. The problem is that the size of heaps has been rising steadily and a 50 Gb heap is entirely reasonable on today’s modern computers, if only the garbage collector were up for it!

At Flipboard we have some servers with 14 Gb heaps. Before we could move to heaps of that size we knew we had to switch away from the parallel copying and compacting collector. The stop the world occurrences were too common and too long, often up in the 10 to 15 second range. With one particular server I first tried the CMS (Concurrent Mark and Sweep) collector. I couldn’t get that to work for very long. It would fall over, failed allocations, I assumed the fragmentation issue, that is a side-effect of a non-compacting collector, was what was causing the problem. So then I gave the great, new hope (G1) a try. It didn’t fail to allocate but it did seem to have to do a lot of Full GC’s, which are “stop the world” events. What the heck? What good is this? It was no good, is the answer, but I set out trying to figure out what was going wrong.

Watch What You Allocate

Turns out G1 kept running full GCs because we were making entirely unreasonable demands on the memory system. We were routinely trying to allocate 64, 128, 256, even 512 Mb of contiguous memory! The problem was caused by the way we were using hbase and, more importantly, the way the asynchronous hbase library we were using loads data for multiple key/values. I made some changes to that library which solved that problem, and suddenly the G1 collector was working as advertised!

FYI #1: Attempts to allocate large contiguous arrays of data will result in full GCs in order to compact away the fragmentation and make it possible to satisfy the request. Avoid at all costs.

With this fix in place we had made a great deal of progress. But still we were running into issues: our servers would continue growing beyond the bounds of their heap sizes, eventually causing swapping, which is death to a Java VM.

How I learned to Re-hate Finalization

Java has this notion of finalizers: if you declare a method called finalize() the VM will promise to call it when that object becomes garbage. In the early days of Java, since you don’t have to free data manually anymore, we thought we’d take advantage of that and add the notion of finalize, so that you could be a lazy programmer and not even close your file descriptors! OK - that’s not exactly why we did it but all that matters is we did do it. And it has served as a great way to hide all sorts of actual bugs over the years, and to enable all sorts of bad decisions. And sadly, with modern GC algorithms supporting super large heap size, finalization is just a huge problem rearing its ugly head. See, the VM gives no guarantees as to when it will run finalizers, and in the case of the new G1 collector, the answer seems to be: well, almost never.

The actual answer, as far as I can tell, is: we’ll run your finalizers after the next Full GC. The problem with that is, If you play your cards right, you will never run a full GC, ever! Because with a 14 Gb heap those GCs can take forever. (And, no, we’re not swapping.)

FYI #2: the G1 collector does not run finalizers. And it doesn’t matter if you personally don’t use finalizers in your code because the JDK is full of them, from top to bottom. It’s almost comical it’s so bad.

The side-effect of never running finalizers is unnecessary heap pressure, and I have to say, virtual memory issues. Some of the objects not getting finalized obviously have some native components to them. I am not sure if the 4 million SocketImpl’s, FileInputStreams, etc. that my jmap uncovered have a native component, but I am sure that some of the direct memory buffers definitely have a native component: the direct memory itself! The end result is that our machines eventually ran out of virtual memory as though a slow memory leak was occurring. Very frustrating.

G1 is CPU intensive

The other thing we noticed is that the CPU usage on the G1 collect was rather high. Machines with a fresh restart would have a CPU utilization at 50% of an older running server. How can that be a good thing? And we’re not talking 10% vs 20%, we’re talking 25% vs. 50% or 60%. A huge difference.

CMS Makes a Comeback

Meanwhile, I have been reading up on the web that people definitely run 40 and 50 Gb heaps, but how come I can’t? What am I missing? Why don’t other people run into the issues of having no finalizers called, ever? Why don’t other people have 30 second or more GC times as their heap sizes go up? CMS seemed to be a common indicator of success, so I decided to give it a try again. It had been a while since I last tried it.

Sure enough CMS is a dream come true. Before I get to the comparison, I had to ask myself, why is this working now when it failed for me before? And then I remembered that it failed for the very same reason the G1 collector failed: I was allocating those huge arrays back in the old days. Once I had figured out that that was what had brought down the G1 collector, I forgot to go back and try CMS again to see if it was working any better. The G1 just sounded so much better on paper I had to go with it!

In theory the only thing G1 should have on CMS is the compaction. And I figured that that would be a show-stopper, an obvious issue, and we’d see signs of it pretty quickly once the CMS were running for a few hours. Far from it, however. In fact, here’s what I have seen:

  • much lower CPU usage on average
  • zero detectable “stop the world” delays
  • lower heap usage in general
  • very timely finalization
  • zero swapping over time (probably due to the previous point)

The heap usage grows up to some point, perhaps 70 or 80 percent, and then some magic occurs and the heap size reduces back to 20% over the course of 10 or 20 seconds. Unreal! This would never EVER happen with the G1. The only way to see anything like that with the G1 is to run a Full GC (which we have disabled with a command line option because it stops the VM for 20 seconds or more). If we run a full GC with the CMS collector, the VM keeps running but the heap size just starts melting away down to the 20%. Say it with me: the app never appears to stop at all!

It is possible fragmentation will come to bite us eventually with the CMS collector, but, if it’s every few days or once a week, who cares? We do weekly backend releases in the normal course of events anyway.

March 11, 2012
Spotted over the skies of North London tonight. Two of three visible, but these two are next to each other. But what was that other thing?

Spotted over the skies of North London tonight. Two of three visible, but these two are next to each other. But what was that other thing?

January 16, 2012
Wifi and the conditional love of a daughter.

The following text exchange occurred this afternoon:

Father: Hope you like 108 Mbits/sec connection speed in your bedroom!
Daughter: Omgggggggg that’s amazingggg.
Daughter: Daddyyy I love youuuuu!
Father: Things that make me go Hmmm.

Meanwhile, the 108 Mbits is now 7, ooops now 54, oops now 27 oops now 108. WTF!?

And I now have a direct line of sight to the airport about 20 little feet away and I’ve gone from 162, to 108, to 14! I’m on the 5G network but apparently I am on the side of the house which is closest to all the other houses and their wifi networks. Why, oh Why did I give my wife the office in the back of the house and take the one in front!? She has 270 mBits and I have 27. I am the one who cares, she doesn’t give a hoot.

Now that the Apple Airport Base Station router is in the other room near the printer, that has become a wired connection instead of wireless. The end result of that is a 3x speed improvement scanning. 802.11/g my ass. Those 300kb/sec speeds are classic 802.11/b. I think Canon cheaped out on us when they put “g” on the printer, knowing there’s no real way to tell. And they are not the only one: I don’t think I have ever seen any better with an HP either.

In summary, wifi absolutely sucks. Huge wads. Hopeless. Frustrating as all heck.

January 13, 2012
Why is video freaking out my MacBook Air?

What’s up with my new MacBook air? It’s got 4 CPUs and they’re barely exerting themselves while I am watching a video, yet my CPUs hit 192 degrees and the fans shoot up to 6000 RPMs or more.

This is a serious step backwards from the MacBook Pro 13” which was just 2 processors. Faster processors for sure, but just two of them.

I am curious if anybody has an actual answer. What gives?

Liked posts on Tumblr: More liked posts »