Making Espresso
I wanted to play around with cutting a video together, and figured that pulling an espresso shot would be a good subject. So, the video is of me pulling a shot of espresso. Of course, I’m using my Expobar Office Lever Pro, Rancilio Rocky grinder, and some freshly roasted beans.
Carnitas Tacos
Last night, Elizabeth and I had gotten home from a Halloween party, and after putting the baby to sleep, realized that we hadn’t had dinner. I found some frozen Costco carnitas meat in the freezer, and put it together with some corn taco shells. I quickly fried them up and topped them off with salsa and guacamole.
ChefSteps will be my downfall
Once in a while, at night, when I don’t feel like going to bed, I start watching YouTube videos on my Android TV. I really like watching YouTube on Android TV because it keeps auto-playing videos that are related, and I can basically just let it run without interference and watch stuff that I enjoy. Lately, it’s been a lot of Billy on the Street, which Elizabeth has gotten into as well.
One thing tends to creep up and hook me, and it’s the ChefSteps videos. I started checking out their stuff when I bought the immersion cooker, as ChefSteps has a focus on sous vide recipes. They also have a lot of other great stuff, and tonight, when I had YouTube on auto-play, the ‘Deep-Fry Frenzy’ video came on:
Followed by ‘Waffle Iron Frenzy’:
Now, it’s midnight and I want to cook.
Bonus Billy on the Street video:
I should go to bed.
I like the news
It turns out that I like the news. I’m ditching my ’no news’ experiment, and re-subscribing to the New York Times.
My central complaint from before, about how the news media influences us, and may lead to us believing things that aren’t true. Thinking about this more, while there may be some truth to this, I think that cutting out the daily news may be a case of ‘perfect is the enemy of good’. Trying to get to some state of perfect information is probably not possible, and trying to get there may actually make me less informed in the process.
We still certainly need to be vigilant, and critical. There’s currently some concern that Time Warner is using its position to bolster Hillary Clinton’s position through its cable news property CNN. (As Time Warner was a major donor to Clinton.) However, not following the news, you may have heard sentiment from others that Clinton won the debate, based on coverage that they had seen on CNN, but without the criticism of CNN’s position with respect to Clinton. On the flip side, most of the criticism of this has been around CNN declaring Clinton the winner of the debate, coming from those who claim that Sanders won, however I agree with Vox’s assesment of Clinton as the easy winner here. It’s really hard to make the case that Sanders actually did better in the debate. I like Sanders, but he floundered in spots where Clinton shined, and basically stuck to the same difficult to comprehend talking points that involve lots of fractions and percentages. Actually, you can probably get a fairly accurate picture of what Sanders stands for by watching James Adomian’s impersonation of Sanders on Harmontown (below).
More to the point though, is that I enjoy my daily routine of reading the news. There are things that I do miss on a daily basis of not reading, and there are lots of connections that I wouldn’t be able to put together without reading and paying attention. I also think that I probably read more than the average American, both of the daily news and non-fiction books that cover large, important topics. My previous post mentioned Americans not knowing much about global poverty, but I’ve actually read several books that discuss this directly (including how things are generally improving).
I realized that, at least for me, Aaron Schwartz’s assertion that you get more insights from reading books and long-form works than the daily news is not true (see previous post). While yes, in a single story from the daily news, I may not have a huge epiphany, but in aggregate, I think that it may be on par. I collect information from the daily news, and build up a picture of the world from little bits of information.
No News is Good News
Today, I cancelled my subscription to the New York Times. I like the Times, but the reason that I cancelled, aside from a couple of minor issues, was that I’m less sure that consuming the news on a daily basis is a good idea.
I’ll start out with a big caveat to this post, I haven’t figured this out for myself yet. I still have a subscription to the Washington Post, because it’s in a free trial. This post is as much my trying to work out what I want to do as it is an attempt to highlight a concern with how we consume the news.
A few years ago, I read this blog post by Aaron Schwartz, and it resonated with me. I don’t agree with everything that he writes there, however, I do think that he’s got a couple good points. I’ll try to summarize my key takeaways from his post:
- Consuming lots of disparate information first thing in the morning does not help one trying to be productive in intellectually taxing work.
- Long form articles with good analysis, or books that can dive in depth on a subject can be much more impactful than trying to piece together a story from the daily news.
- Committing to a long form work forces you to focus on what you are interested in and find useful, as opposed to trivial noise.
- Much of what’s reported in the daily news is not terribly useful information to most of us.
Here’s a choice quote from that post:
The news’s obsession with having a little bit of information on a wide variety of subjects means that it actually gets most of those subjects wrong. … Its obsession with the criminal and the deviant makes us less trusting people. Its obsession with the hurry of the day-to-day makes us less reflective thinkers. Its obsession with surfaces makes us shallow.
Over the past few weeks, there has been quite a lot of coverage of the 2016 presidential race. There were two interesting bits of information that I came across. Vox published an article comparing Donald Trump’s polling numbers against his media coverage. His polling seems to increase following heavy media coverage. Then, they show that Fiorina’s numbers rise as the media focuses less on Trump. Could be coincidence, maybe not. If I’m being honest, when the talk shifts from focusing on Trump to Fiorina, I start questioning Trump’s position, and start wondering if he’s begun to fizzle out yet.
Then, there was a story on NPR about how much Sanders is fundraising compared to Clinton, and how Clinton has raised a substantial amount from individual donors. Clinton handily beat Sanders in the previous quarter, if there were any questions. This is interesting in light of all of the negative press that she’s received, reports of her low poll numbers, and constant talk of the email scandal that appears to be making a lot out of a little. My view had certainly been steered towards Clinton becoming a weaker and weaker candidate in an eventual general election, and wondering who was going to come out on top in the primaries.
The above two stories are examples of how the media can shift public perception, or at least mine.
Then, over the weekend, Nicholas Kristof wrote an opinion piece in the New York Times that got me thinking about this issue again. Kristof wrote about how 95% of Americans surveyed on global poverty levels were completely wrong about how those levels have changed. (Over the last 20 years, the level of extreme poverty has halved, respondents thought it had either doubled or stayed roughly the same.) Kristof writes:
We cover planes that crash, not planes that take off. Indeed, maybe the most important thing happening in the world today is something that we almost never cover: a stunning decline in poverty, illiteracy and disease.
He then goes on to discuss the issues that accompany the public’s misperception of the real trends. That since the public believes that no progress has been made (or that it’s gotten worse), despite all the effort already spent, that they see little reason to allocate more resources in trying to improve them. Whereas the reality is that things are getting better rapidly, and what we have been doing has been paying off.
My key takeaway from his piece was that even for people who try to stay informed, even consuming sources as well written and produced as the Times, that most people do not end up with a worldview that is reflected in reality. Not even close. This made me think about why I read the news, and what I want to get out of it.
I decided that the reason that I read the news is to inform my worldview, to try to better understand the world that I live in. Yes, it can be a sort of intellectual entertainment, however, for it to be worthwhile, it must serve a purpose. Is consuming daily news serving that purpose?
On the other hand, there’s no way that I would have even been able to put this post together if I hadn’t been keeping up with the news as much as I have. Or, is this a waste of time too? Have I gotten it all wrong myself?
My goal is to try to have as accurate and complete a view of the world as possible. Obviously, it’s impossible to have complete and accurate knowledge of the world, but I’d like to do my best to move in that direction anyways. With that in mind, I need to be honest, and try to cut down on things that are apparently moving me away from that goal, as much as I like them.
For now, I think that I’ll try cutting down on my daily news, and instead, spend that time reading non-fiction works that may help to improve my understanding of the world. The Facebook community, A Year of Books is a good place to start, I’m about half-way through last month’s title, Why Nations Fail.
One of my focuses is to understand as best I can people in emerging markets, especially those groups of people who are being lifted out of poverty. Poor Economics was a great read along those lines. The New Digital Age was another good one that I read shortly after it came out, and touched on emerging markets a bit. I still need to go back and finish Capital in the Twenty-First Century.
As the election cycles approaches, I will probably read books by the candidates, as well as seeking out long-form pieces on some of the issues. When I do consume the news, it will likely be in the form of podcasts like Planet Money, or Vox which has done a great job of contextualizing the news, and explaining it, as opposed to just giving the snapshot.
This isn’t something that I’m excited to give up, and I probably won’t ditch it completely. I wrote most of this last night, and this morning, I had the urge to pull up the Times app on my phone in bed, and then listen to NPR when I got into the kitchen. I liked having the news as part of my routine, but I think that it’s a worthwhile experiment to try to look for alternatives.
I will report back with an update at some point, and discuss how it’s going.
Update
I’m ditching this experiment, it turns out, I like the news.
Happy National Coffee Day!
May you always be heavily caffeinated, and never accidentally buy decaf.
That was from espresso #3 today. I think I’m ready for #4.
Come talk coffee with us on the talk.coffee Slack community.
Running NGINX in Docker without caching
Lately, I’ve been working on a little web utility that I decided to write in AngularJS. It started out as a couple of JSP pages, and I quickly realized why things like Angular exist. Anyways, if you don’t run AngularJS from a server, it’ll complain and want you to load internal bits with XHR. Obviously, you don’t want to do this. The solution is to fire up a server.
What I really wanted out of a server was something that was incredibly dumb, and didn’t require me to restart the server whenever I updated my frontend code. So, while I could’ve packaged it with my Tomcat app, and run it in my Tomcat Docker image, that would’ve required lots of killing and starting the Docker image, just for quick little frontend modifications. I figured that I should be able to use a traditional web server on Docker, and found that both Apache and NGINX were available. There was some reason that I didn’t choose Apache, but I don’t recall what it was, so I went with NGINX.
The quickest thing to do is to pull the hello world example from dockerhub and remap the volume that hosts the HTML content. This actually works fine until you start trying to quickly iterate. What I found was that the default configuration for NGINX (as used by all of the Docker images that I tried) enables caching. So, even though it’s serving the right directory, it may be serving a cached version.
UPDATE: It turns out that the root cause is actually not a caching issue, but a bug with the kernel utililty, sendfile
and Virtualbox. See here: NGINX docs, VirtualBox bug report. Thanks to u/justaphpguy for pointing this out
At first, I tried logging into a Docker image, and modifying the config, and using that. That did work, but it wasn’t a great process. Instead, I decided to build my own image, and pull in my own config file.
nginx.conf
Here’s the default nginx.conf
file with a couple of minor modifications. Lines 23-24 have been changed to disable caching, and line 25 turns on the autoindex feature (so that you don’t need to type in /index.html
in the browser).
Dockerfile
The Dockerfile is really simple, it just takes the stock nginx image, and pulls in our new config file.
Building and Running
Here’s a script I wrote to build and run my image. I tend to treat my Docker images as ephemeral, so I don’t really care if they get rebuilt frequently and overwrite some previous version.
As a note, on line 11, you’ll notice that we map a path that you specify as the volume to serve content from. On a Mac, this must be in /Users
, and won’t work elsewhere.
Conclusion
If you drop all three of those files into one directory, and run something like the following, you should be good to go:
$ ./build_nginx_docker.sh /Users/me/webstuffs
Weekend of Food - 2
This past weekend was another good weekend for food. While I didn’t go all out like I did Labor Day weekend, I still managed a few nice things.
We had brunch, which was eggs Benedict with hollandaise sauce, hash browns, and a home made buttermilk biscuit. I used the immersion cooker for the eggs. I made the hollandaise the hard way, with a whisk, and it came out really pretty good. I was happy that my efforts were rewarded.
I was in the mood for Buffalo wings this week, and since I live in California, I had to make my own. They came out ok, but not spectacular. I fried them on the stovetop, and used an IR thermometer to monitor the temperature. I think that I didn’t cook them long enough to get them really crispy. The sauce was good though, and they were still better than anything that I could get at a restaurant here.
Since I had bought the wings at Costco, I still had about 3lbs left, and decided to try the double fry method for the remainder. I fried them at 250ºF for 15 minutes, and then popped them in the freezer. That’s the first half, whenever I feel like wings again, I’ll pull them from the freezer and fry them at 400ºF until they’re crispy.
I roasted a pound of coffee, and made a batch of cold brew. That batch of beans came out a little too light, I cut the roast after the first crack, it was very bright when I used it for espresso.
For dessert, I had made home made buttermilk biscuits, and we had strawberry and blueberry short cake.
Bed Upgrade
With a baby sharing our bed, the queen size was getting pretty cramped. We decided to upgrade. I had built our frame back when we were living in Boston, and it’s very sturdy. I decided that all I really needed to do was to create a platform that was the right size, using 2x4s, and that should be good enough. I was right, it worked out really well, and we continue to have a very solid bed. It only took about an hour and a half to swap out the slats.
The only problem is that with the extra space, I’ve been sleeping in an extra hour or two every morning. My morning workouts have taken a bit of a hit.
Update
I probably should mention a couple of things. First, I bought the 2x4s at Home Depot, and had them all cut to length (76"). I was originally going to use 13 2x4s and plywood on top to create a flat surface for the memory foam mattress, but the saw for plywood was broken at Home Depot. Instead, I went with 20 2x4s, with about 1/2"-3/4" spacing in between. This ended up being less effort overall on my part.
Docker Cleanup Commands
Running docker, creating and running containers can make a bit of a mess, depending on how you use it. After a couple weeks of using Docker for development, I figured that it would be good to figure out how to clean up my unused images and containers.
Images
To remove an image called ’node'
docker rmi node
To remove all untagged images
docker rmi $(docker images -a | grep "^<none>" | awk '{print $3}')
To remove all images
docker rmi $(docker images -qf "dangling=true")
Containers
To list active containers
docker ps -a
To remove all stopped containers
docker rm $(docker ps -a -q)
To remove all existing containers
docker rm $(docker ps -aq)
To kill and remove containers
docker rm $(docker kill $(docker ps -aq))