Monday, August 31, 2009

Delicious Chicken Fingers

Original source: this webpage

This is ridiculously easy to make. Here's all you need to know:
  1. Combine beaten egg, honey, and mustard.
  2. Crush corn flakes; add pepper.
  3. Cut up chicken; dip in mixture; coat in corn flakes.
  4. Bake 450 F for 12 minutes.
There's no point in listing any measurements. Do what feels right.

This would be good over rice or quinoa that is flavored with chicken or vegetable bullion (or something better).

Note the absence of butter and oil. Some brands of corn flakes (not Kellogg's) come without high fructose corn syrup. Just make sure you get some vegetables on the side.

Reblog this post [with Zemanta]

Friday, August 28, 2009

iTerm and Terminal

One of the first things I did after getting OS X (It was an iBook G4) was to switch to iTerm, an alternative to the Terminal.app that ships with OS X. One of the main reasons for doing this was support for tabs.

I kept using iTerm, from that iBook G4 to a white Macbook, to a unibody Macbook Pro.

But iTerm has disappointed me too many times over the last few months. It tends to crash every now and then. More recently, I've noticed that when I hold down a key, the key repeats without refreshing the screen. That is, I don't see the result until after I let go of the key. This is unacceptable.

Apparently Terminal.app has come a long way, including adding support for tabs (though I cannot select a specific tab with a keyboard shortcut like I can on iTerm). It also seem much smoother, both in the rendering of fonts and in the response time to my input. So, I am giving it another try.

Reblog this post [with Zemanta]

Thursday, August 27, 2009

Wireless Security

WEP has been deprecated and insecure for a long time. Cracking WEP is as easy as this.

But now researchers have demonstrated a way to crack WPA in just one minute (here).

It only works on TKIP, so switch your wireless access point (typically your router) to use AES.

Wednesday, August 26, 2009

Tabs or Spaces!

I use Emacs. My coworker/boss uses Vi. Actually, he uses a Vi mode inside XEmacs.

I use spaces. He uses tabs. Our other coworker is the guy in red as shown here.

EDIT: Fortunately, we all use OS X.

Tuesday, August 25, 2009

Verilog Woes

As a language, Verilog is decent. It's a little too low level for my tastes, which is why I used to use Cryptol and now use my employer's fork of Cryptol called Quattro. Cryptol/Quattro allow us to write much more abstract, generic, and parametrized code, and to do so usually with no loss in performance.

Then there's the inconsistencies between simulation and synthesis tools, especially if your tools come from different companies. A language construct might be supported by your simulation tool but not your synthesis tool, or vice versa.

And then there's the case where your tool just does something batty. For example, lets say that I have an integer parameter P in module A, and I a string parameter P in module B, and I want to instantiate B inside A and have A's parameter determine B's parameter. So, I have something like this:
defparam B_inst.P = (P == 0) ? "TRUE" : "FALSE";
Fine and dandy right?

For whatever reason, my Verilog simulator decided that the two branches of the expression, the two strings, had to be the same length. So, it padded "TRUE" with a space at the beginning to become " TRUE". I did a lot of experimenting to verify that this is in fact what is happening. For example, if I change "FALSE" to a string of 4 characters when P is 0, it works fine.

Reblog this post [with Zemanta]

When to automate, abstract, generalize?

When you have a repetitive task to perform, at what point is it worth it to write a script to automate the task? When is it appropriate to abstract away the details? When should you write one highly parametrized function, and when should you write several specialized functions?

More importantly, how should you go about answering these questions beforehand so that you don't go down the wrong (i.e. inefficient) path?

At a conference a couple years ago I attended a talk that addressed some of these questions, but I do not really remember much about it...

I found myself dealing with all of these questions today. I had written some highly parametrized Verilog modules, but it was very tedious to support each variation. Furthermore, I ran into a bug in the simulator (described at the end of my next post), and I decided to circumvent the bug by splitting each module into a few specialized modules. I was then faced with the tedious task of factoring each module into its specialized variants, so I decided to write some elisp to do it for me.

So, in the end I found that I had made the wrong decision to implement parametrized modules, though I could not have predicted the ridiculous bug that I ran into and so was justified in the decision. I feel like writing the elisp to automate the rewrites of each module saved a lot of time, but I cannot really be sure.
Reblog this post [with Zemanta]

Sunday, August 23, 2009

Layout

I was sick of that fixed low width template. This one isn't so great, but at least it has a variable width.

Friday, August 21, 2009

Insomnia

It has always been difficult for me to fall asleep at night or nap during the day, even when I am extremely tired from missing sleep the previous night. So it is frustrating for me that everyone around me falls asleep effortlessly (my dog, my cat, my wife).

Here I am, one month into fatherhood and with all the exhaustion that comes with it, especially because of the last two nights that have been nearly sleepless for me. Ada is finally asleep, the room is at a very comfortable temperature for this time of year, and I am so tired that the shadows on the wall are moving. No, really, everything looks like it is expanding in place. It is one of the most realistic tricks my eyes have ever played on me, and the only reason I know it's not real is because the shadows have not consumed the entire room.

:)

Thursday, August 20, 2009

News Sources

It is hard to find good sources of written news (And televised news? Ha!). I'm talking about online sources, of course; does anyone still read printed materials??

Here are some brief points to help explain what "good" means (and does not mean) in this case:
  • Quality of writing - It is a formal publication. If it is littered with grammatical errors, for example, I will lose confidence in the source.
  • Bias - An absence of bias is not necessary. I like opinions. I do not criticize the presence of bias alone. See next point.
  • Integrity - This word is overloaded, so it means a lot of things. Think ethics and objectivity.
So, for example, I do not despise Fox News for being biased, I despise them because they are devoid of integrity.

Now, why is it difficult to discover sources that meet the aforementioned requirements? Well, I'm glad you asked, because I was just getting to that.

The mainstream news sources all produce identical stories. A while back, I started using Google Reader to aggregate my news sources. I selected several different news sources, but instead of being provided with any variety, I was subjected to duplicate articles. It was worthless. The Daily Show often illustrates this point with a sequence of clips that show a bunch of newscasters all saying the exact same thing. It is hilarious and frustrating at the same time.

The Internet is huge. And you expect me to spend all day browsing it to find what I want? No thanks. I'm sure there are a ridiculous number of small websites that publish some really great articles, and I'm sure I will never discover most of them.

Fortunately, there are a couple sources that we feel we can trust. I wouldn't have expected it, but Slate and Rolling Stone produce very well written, high quality articles.

Reblog this post [with Zemanta]

Saturday, August 15, 2009

Emacs 23

Emacs version 23.1 is now stable. I have deployed it on several Linux machines and on my Macbook Pro. Emacs 23 natively supports OS X [1] (support for the NeXTstep APIs was integrated into CVS in July 2008 [2]), so building on OS X gives me an Emacs.app that runs as a Cocoa app.

Emacs 23 adds support for daemon mode (via "emacs --daemon"), which is like Emacs Server in that you can connect to it and open files using emacsclient, except that you do not have to have any frame open. I use the following shell aliases to send files to the daemon, run Emacs commands, and open new frames:
# start a windowed frame
alias ec="emacsclient -n -c -a emacs"

# start a terminal frame
alias em="emacsclient -t -a emacs -nw"

# do not start a new frame
alias ea="emacsclient -n -a emacs"
I also set EDITOR so that most programs use the daemon to open files:
export EDITOR="emacsclient -t"
I use daemon mode like GNU Screen, though I also leave Emacs terminal frames open inside Screen windows.

Cup Feeding

Cup feeding is an alternative way to feed a baby. More information and instructions are here.

Parents resort to bottle feeding (either formula or pumped milk) for a variety of reasons, some of which are the following:
  • Mother does not produce enough milk
  • Baby has trouble latching and sucking, such as when Baby is premature
  • Mother's nipples hurt too much
  • Mother cannot always be available to feed Baby
  • Convenience
In some of the cases above, parents may desire to return to breastfeeding once the problem has been fixed. However, it is difficult to return to breastfeeding after a baby adapts to bottle feeding. Eating from the bottle is easier and Baby will learn a new way to latch and suck that will not work for breastfeeding. Fortunately, Mother has another option.

One can cup feed Baby by holding a cup of liquid up to and below their lower lip and letting Baby lap it up with their tongue. It is particularly useful if breastfeeding is not currently an option but Mother wants to try breastfeeding later after the problem has been fixed. For example, one can cup feed a premature newborn until their latching and sucking abilities have developed.

We use the cup feeding technique to give Ada water that has been soaked in barley and fennel, a remedy for indigestion.

Starcraft 2 (Tower Defense)

http://starcraft2.pro/beta

Fun times.
Reblog this post [with Zemanta]

Y2k (Fear and the Media)

I do not watch news programs that contribute to a culture of fear (so basically I only watch the Daily Show). It is a despicable practice.

Thanks to the media, ten years ago computer illiterate people everywhere were panicking about the Y2K bug. I found the following quote on Computer Stupidities: Y2K from a TV news program.
You open your eyes, slowly waking up. It's Saturday, January 1st, 2000. What time is it? You look at your bedside clock, but it's blank. Is the power off? You check your digital watch. It's blank, too. The coffee maker, which runs on computer microchips just like your wristwatch, doesn't work. The same for the microwave oven and the stove. Your three-year-old computer-controlled car won't start.
You cannot excuse that as ignorance.

Reblog this post [with Zemanta]

Farmer's Market

Today Erinne and I went to the farmer's market with Ada. She is 22 days old today, and this was our biggest outing with her so far. We bought peaches, basil, garlic, prunes, tomatoes, and a half flat of berries.

I was absolutely stunned to find heirloom tomatoes for $1/lb. That is filthy cheap. We bought 2.5 pounds; we should have bought more.

Ada slept in the wrap for the first half of the trip. We were nervous about nursing Ada in public, but Erinne was able to find some steps to sit on and nurse discreetly.

On the way home, I dropped the box of berries and they spilled all over the sidewalk and dirt! We picked up most of them, abandoning a few of the blueberries.
Reblog this post [with Zemanta]

Pesto

I had no idea pesto was so easy to make until I tried last week. It was so delicious that we decided to make it again today. We bought the basil and garlic from the farmer's market this morning. I bought 3 types of garlic from a stand that had about 10 varieties. For the pesto, I used some garlic that was advertised as being good raw and in salads. This garlic was strong; it burned under my fingernails when I scratched off some of the skin.

There's no "right" ratio of ingredients for pesto; you do what tastes good. Erinne and I like extra garlic. I look forward to experimenting with the ratio of garlic and basil.