Diatribe, Macintosh, Tips, UnixAugust 19, 2008 11:41 am

I’m sure everyone with Unix experience has their own cherished best practice to compile software from source. I’ll try to tone down the soapbox.

What set me off was a TidBITS article on DNS (at work, we compiled that patch as soon as it came out). I was ready to yell at my computer screen! They got it right about the need to patch right away, but wrong on how to do it well.

The very basic process to compile from source is:
./configure
make
make install # as root

Well, I like to log the results of those three commands; if it fails to build, I’ve got something to study later without worrying about my scroll buffer. I also like the visual feedback of how the compile is going, so I also want to see the output as well as logging it to a file. The reason why make install is its own step is so that you can follow the principle of least privilege. My method does all of those things.

./configure | tee configure.out
make | tee make.out
sudo make install | tee make-install.out

Feel free to choose your own file names, or switch to root instead of using sudo (potentially more secure, but longer). However you do it, just keep in mind that logging and least privilege are Good Things.

Tips, Health, InsomniaJuly 27, 2008 12:21 pm

I was once told there were two types of insomnia, sleep acquisition (can’t fall asleep) and sleep inhibition (can’t stay asleep). Luckily I usually only have one kind, can’t fall asleep. So I was asked how I fall asleep. I’ve listed before some of what works for me.

My friend Alison said she would take 0.5 mg of melatonin when she couldn’t fall asleep, followed by a second dose 30 minutes later if she still weren’t asleep, and that always worked for her. That never worked for me, so I gave her the rest of my bottle. Then I learned that melatonin is released when your eyelids don’t have any light on them, so I tried the eye shield, and that has worked well for me. As it turns out, the proper dose is 0.3 mg of melatonin instead. Melatonin is also effective for insomnia in ADHD children!

White noise is my other major aid along with an eye shield. However, I’ve also considered listening to an audiobook or podcast as I fall asleep. (Interesting note about working memory and falling asleep, sounds like it would also be effective for me.)

Other tactics … I try to switch off multi-tasking (thinking about everything) by concentrating on something, like the white noise, or my breathing if I have no congestion to distract me. If focus doesn’t work then I think about thinking about nothing until my mind is clear.

I like to do static stretches before bed and when I can’t sleep. It runs off some energy, and it aligns my body. Then I climb into bed, making sure that I’m super-comfy with no pain points, all symmetric joints aligned, and no twists.

Tips, Health, DietJuly 22, 2008 1:07 pm

Over the years, I’ve learned a few things about my food cravings. If I want salty food, I usually need protein. If I eat refined sugar, I just want more sugar (but I can turn that off with fruit, sweet but not refined). If I want chocolate, I’m stressed (or in the presence of really good chocolate). I’m not sure I believe all of it (but hey, it’s worth a try), but here’s a chart of what to eat for each craving. Some of these are ironic … if you crave soda then you need calcium, and that soda will likely impair your calcium absorption! Others make sense to me. For instance, craving chocolate is linked to B deficiency, probably the same B’s that are mal-absorbed under stress, completing the explanation of my rare chocolate cravings. I prefer the (hint of) scientific explanation for cravings, but since it’s a sales pitch, it stops short.

The other craving I get is when I’m late eating a meal, I often get The Hunger, where I want to eat for the rest of the day. It’s hard to fight The Hunger, and I’m gassy then too. (Like now. I thought that was a false alarm that I was hungry for lunch at 11:30 AM, but the after-effects indicate otherwise.)

Tips, Health, DietJuly 13, 2008 3:37 pm

I was looking for the most common food intolerances since Cale seems not to like something I’m eating. (This morning after breakfast, he was screaming and arching his back while nursing. Classic signs of baby gas.) I found CBS News on Food Allergy versus Food Intolerance, and it had just what I wanted to know, with plenty of additional background information.

A food allergy occurs when your body’s immune system mistakenly thinks that a harmless substance (meaning whatever food you happen to be eating) is harmful. In response, the body creates antibodies to that food. The next time you eat that food, the body releases massive amounts of chemicals and histamines to protect you. These chemicals trigger allergic reactions, typically in the respiratory system or gastrointestinal tract.

An intolerance is typically when your digestive system has trouble processing foods that you’ve ingested. Other parts of your body (such as the respiratory system) may not be affected.

Someone who is allergic to a substance, such as food, will typically react to it in a very short time, whereas someone with an intolerance can react hours later. This is an important thing to keep in mind, because symptoms of allergies and intolerances can be very similar. They include trouble breathing, hives, vomiting, diarrhea and cramping.

There is evidence to suggest that if a parent or a sibling has an allergy, you are more likely to have one. There is also evidence to suggest if that one of these close relatives has a condition such as asthma or eczema, you are more likely to have a food allergy.

Common Food Allergies:

* Dairy
* Eggs
* Wheat
* Soy
* Peanuts
* Tree Nuts
* Fish

These are the most common foods to cause allergic reactions. That said, people can be allergic to almost anything. There are certain allergies (such as milk) that often start and finish in childhood. The nut and fish allergies are more likely to extend into adulthood.

Common Food Intolerances:

* Dairy
* Wheat
* Peanuts
* Tree Nuts

Again, you can have an intolerance to almost any food (just like you could have an allergy to any food), but these are the most common.

Interestingly, eggs, soy, and fish are likely allergens, but are otherwise generally tolerated. Hmm.

Anyway, I can easily track dairy, wheat, peanuts, and tree nuts against how Cale reacts to a feeding. This morning, I had just had dairy and wheat (cereal). In the previous 24 hours, I also had tomatoes and peppers (in the nightshade Solanaceae family with potatoes) with garlic and onion (in the Allium family). We’ll see how the food tracking goes!

Tips, SewingJuly 7, 2008 10:01 pm

I’m getting my first sewing machine ready for a new home (yay! I couldn’t throw it out, but I rarely used it), and it makes me think of the checklist I used to select it in fall of 1991.

I wanted

  • straight stitch and
  • zig-zag stitches in at least 3mm and 5mm stitch widths,
  • variable stitch lengths,
  • reverse for easy bar tacking,
  • and hopefully a free arm for sewing in tight spaces.

What I sew determines what sewing machine features I use. I’ve made clothes, accessories (like purses), and some light household items (napkins and curtains). I’ve added applique accents. Sometimes I mend fabric things, but I usually mend by hand since it seems easier.

For my second and current sewing machine, the main feature I added to that list was a 1-step automatic buttonholer. I was, I confess, also swayed by all of the accessories and specialty stitches on my new one. However, those extras didn’t add to the cost once “one-step buttonhole” made the necessary list. I noticed that I made shirts in one long weekend except for the buttonholes, and those took a couple of months to get around to finishing. Making buttonholes fun, instead of a chore, speeds up the whole project.

Between the first sewing machine and the second, I’ve also added a serger and an embroidery machine to my collection, so I didn’t need or want a combination machine. I expect a combo machine to be jack of those trades, master of none.

Sewing machines can last a long time. When I say a working sewing machine is old, I usually mean that it needs to have its timing adjusted. However that service costs $50 or more, a good portion of the cost of a new not-too-specialized machine. Sewing machines have their timing slip most commonly when sewing heavy fabrics, like layers of denim. After the timing goes, a sewing machine doesn’t stitch thin fabric as well as a new or recently tuned one. So my thought is, use an old machine for the heavy work, and new for light.

I don’t like maintenance-free sewing machines (or anything else). They may go longer without service, but at a high cost. The maintenance-free failure mode is that it breaks, while the maintenance one just needs that tune-up. Hmm, several tune-ups (maybe many!) versus dead. Not a tough choice for me since I don’t mind oiling and cleaning my sewing machine! Other than that, I like good workmanship (it just fits together well) and a good sound (easier to hear when you need maintenance).

,

Tips, UnixJune 24, 2008 2:26 pm

I have some scripts that echo warning messages that really should go to stderr instead of stdout. The basic form is
echo "error" >&2
but I’ve twice gotten frustrated when I’ve tried to get fancier than that (not with echo, but with other commands). The essential problem is that the redirecting to stderr needs to be the last redirection. So my quick example is
echo "error" > /dev/null >&2
where redirecting to /dev/null or a file must come before the stderr part.

Hope this saves some time!

Tips, Journal, GTDJune 1, 2008 2:06 pm

I like TiddlyWiki, and I like the d3 version for GTD, but it wasn’t fitting how I wanted to organize tasks at work. The main problem, of course, is that my job doesn’t fit GTD that well. Mainly that Done part. I always need to upgrade software to the latest version, and to fix something, and whatever: I have many eternal projects and loose tasks.

The real problem was that I was using Projects in d3 as Categories. So where do projects go? And so almost every action in some projects was floating, and that breaks down the utility of the powerful Next Action concept.

Well, it’s just JavaScript and I ain’t afraid of no new programming language. So I created Categories for myself, just above Projects, as well as a way to look up uncategorized projects. It’s not difficult.

First I edited the GTDMenu tiddler, adding this line at the very top:
+++(gtdCategoriesSliderState)[Categories]< >===
That line is just like the following line for Projects, except with Categories.

Then I created a tiddler titled CategoryList tagged gtd with these lines:

*<<list tagged \"category -someday\" all>>
*+++(gtdUncategorizedSliderState)[Uncategorized Projects:] <<list tagged \"project -Category1 -Category2 -Category3\" all>>===

Fill in your actual categories instead of those CategoryN placeholders, and you’re set. (Or, if you’re better at JavaScript, list the tiddlers that are tagged project that aren’t tagged with a tiddler tagged category.)

Now make yourself some category tiddlers! Remember to use the category tag to make them show up in the menu on the left.

Diatribe, TipsMay 30, 2008 9:29 pm

I thought this was a gentle exposition of the difference between “lay” and “lie”. Basically,

The main difference between the two words is that lay is a transitive verb, while lie is an intransitive verb.

and

Verb Infinitive Past Tense Past Participle
lie lie lay lain
lay lay laid laid

The summary is the best part, emphasizing the lesson.

So here’s the drill:
You need to lie down today, yesterday you lay down, in the [ast you have lain down.
Today, you lay the book on the table. Yesterday, you laid the book on the table. In the past, you have laid the book on the table.

Favorite Software, Tips, Journal 10:55 am

I know this is geeky, but I like it. You can aggregate all of your blogs, twitter, flickr, Pandora, YouTube, or anything else with an RSS feed into a very attractive timeline at Dipity (it’s even free!). This may sound sad that I needed a timeline tool to show me this (I was sleep-deprived at the time!), but having Dipity correlate my twitter posts with my blog posts made it obvious to me that the benefit of following my baby’s routine was that he started sleeping all night!

If you’d rather have your timeline on your own computer, I also like the SIMILE Timeline a lot. Lifehacker has a Quick and Dirty Event-XMLO-Matic to power SIMILE Timeline, just to make it easy on you!

Geek toys to make timeline pictures … and you know a picture is worth a thousand words!

Tips, Machine EmbroideryMay 24, 2008 11:19 pm

I’ve been fighting with my embroidery machine (again) in my small scraps of what is laughably called free time. The two things that worked this time were to add stabilizer backing, and to reseat the bobbin.

I thought this heavier mid-weight woven fabric was heavy enough without stabilizer, but the difference in the test results indicate otherwise. So lesson one: use stabilizer. I get the feeling that this lesson is universal to machine embroidery. To make testing easier, I stitched the stabilizer to the fabric. If I were to do this not-for-testing, I think the stabilizer border stitching would be a perfect place to use one of the fancy stitches on my new sewing machine.

Once I added stabilizer, I still had undesirable results. The stabilizer side looked tidy now, but the so-called right side was all wrong. I only saw top thread on the back, while the front showed somewhat loose bobbin thread. That looked to me like there was zero bobbin tension. Pulling on the bobbin thread end felt like zero tension as well. So I switched out the bobbin and was very careful how I seated the new bobbin.

I was so happy to see it work well after those two changes, stabilizer and reseated bobbin, that I kept running more tests, just to watch it work, just to wash away some of the previous frustration of seeing it not work and not having time to diagnose and fix it then. Ahh ,,,

And just in time too. I wanted to embroider a present for a friend, and my mother requested her chop on the jacket that she sometimes leaves at work (and would like to see again thankyou). So I’m ready to help out embroidering now.

,