Netbook Musings

I've been thinking about getting a netbook for some time, and I believe I have finally settled on the Eee 1005HA series (P version, which is the highest of the 3).

I will most likely be ordering this around the middle of October, unless something new and awesome comes out.

Hooray for netbooks!

Note: Pictures coming soon?

| comments
How NOT to Report a Bug

There has been a recent run of terrible bug reporting practices in recent months, so I am going to try to address this the only way I know how: by being a snarky ass about it! Hooray!

The following ways are examples of what NOT to do:

Report a bug over Jabber

This is just plain stupid. I know there are lots of those "little formy things" to fill out in a proper report in a given bug tracker. They are useful to solving a bug. Would you rather: put in a little more effort and have your bug solved quicker OR be lazy and irritate the people who are fixing your problem for you?

Additionally, jabber/IRC/instant messaging are all active mediums. In order for me to get the entirety of your bug report I need to do something. Here is an example bug-over-XMPP:

reporter: Hey have you had any problems with XYZ-1.3?
me: No
reporter: Oh, I have a problem.
me: Oh? What problem?
reporter: When I click the button it crashes
me: Crashes how? Is there any output?
reporter: Yes
me: Can you paste the output here?
reporter: Hold on
reporter: <output>
me: Oh ok. Please file a bug report. I will get to it later.

Now, the exact same thing as a generic bug report:

Subject: XYZ-1.3 crashes when clicking the button
When I click the 'foo' button, it crashes and gives me this
output: <output>

I leave determining which one is easier to understand as an exercise to the reader

Describe your bug via links to other things

The worst bug reports I see are of the following form:

Subject: Bug with foobar
I have the bug described here: http://some.bullshit.link

Why is this bad? Well, for one, I now have to follow yet-another-link to read, close that tab, remember what was written, and then read the rest of the bug report. Secondly, the links are usually forum posts, blog posts, or mailing list archives which never have the full information. I now need to read through 30 forum posts, stripping out the noise; or go through 5-10 back links for mailing list history; or even read comments on a blog to find out details of a bug report

A LINK IS NOT A BUG REPORT, IT IS A LINK

Throw multiple problems in one bug report

So there's a bug in barfoo-2.7. Also, the third menu doesn't work. Oh and
one time I made it crash. And I'd like a pony.

Don't let your ADD seep into the bug report. It's frustrating to read 100 different problems in one report. Stick to the mantra of "one bug, one report". If you have three bugs, file three reports - this isn't rocket surgery. I know it's tedious, but it's even more tedious on the other end - the end run by guys trying to help you fix your issues. Help us help you.

Don't read the bug reporting guidelines

Yeah, so someone wrote a wiki article about reporting bugs. Who cares? I don't need to read that, I'm above it!

No. Shutup and read it. Hell, I just learned something new by reading it right now. If you think you've read it already, read it again. If you just read it, read it one more time for good measure.

Epilogue

This little rant does, in fact, serve a purpose. With an influx of more inexperienced users, we get more and more shoddy bug reports. People need to learn how to do this properly - it's a skill that you can take with you to other distros, other projects, and even other jobs. Learn it!

| comments
Becoming a 'Morning Person'

Productivity literature on the internet is filled with reasons why you should "become a morning person" and references to all the famous people who woke up early - people like Benjamin Franklin and Dracula. Yeah, that's awesome, but it doesn't help me one bit.

Morning Enthusiasm

The realization I've come to recently is this: When I get to work in the morning, the first thing I do is check my Arch-related email, and respond/solve some of the issues therein, or delegate them for later in the day. In my head, I have this idea that "I will get to it when I get home from work." A noble goal, to say the least, but it usually doesn't work out that way. Work is stressful, and when I get home, I want to relax, or watch a movie, or read a book, or do anything but sit on a computer for a little bit longer.

But it's that initial burst in the morning that keeps niggling at me from the back of my brain. Why can't I replicate that after a long day at work? The simple fact is that I cannot. For this very reason, I am attempting an experiment.

The Experiment

This week I am going to attempt to "become a morning person."

Most geeks are known for their late hours. We stay up until 3am playing video games, writing python code to do something inane, tweaking code we use to manage our blogs, or even just fiddling with our config files. We all do it.

Sadly, late hours don't mesh to well with the rest of the world. We all still have to be at work or school at some point in the morning, and we rectify this by getting very little sleep. Any perusing of health literature will tell you that it's all sorts of bad for you to get such little sleep.

So, for the next few days, I will be making sure I don't touch my computer after 9pm, and will be getting in bed fairly early. Getting enough sleep will help me wake up early, and I will be able to do Arch-related work before I shower and go to work.

Status

This morning, in fact, I woke up 1.5 hours before I usually do, answered some emails, did some dishes, and took out the trash. It actually felt good to do simple chores when I woke up, rather than being rushed to shower and get to work.

Look for updates later and in the comments as to how my experiment goes. Advice and questions appreciated.

| comments
Personal Motivation

This is a followup post to my Pay Attention! post. Here, I want to discuss not the HOW of being realistically productive, but the WHY of it.

I previously discussed how it is important to kill off distractions when doing important, or large, tasks. That's all fine, but what about those tasks that you just don't really feel like doing? Everyone has a classic example: cleaning the garage, washing the dog, scrubbing the toilet, etc. Things you know you should do, and want to do, but you simply would rather do something else at any given time.

It's easy for some outside to say "Just suck it up and do it." But we all know that doesn't work when it's us yelling at ourselves. Let's face it: we simply don't want to do these things. Should is not the same as would.

One size does not fit all

Motivation is an confusing notion that sits somewhere between psychology and self-help. There are seminars and books out there that will teach you how to "be the best you" and all that other rubbish.

And that's exactly what it is: rubbish. Unless a book is written specifically for you, you may end up taking only one thing away from it. What motivates one person will probably not motivate another. If you're expecting some motivational panacea from this blog, you came to the wrong guy.

Considering I can't tell you how to motivate yourself, I will tell you what works for me.

  • Talk about it

    Nothing works better as a motivational tool than other people. People who are passionate about the same thing you are doing. This is all the more easier to find in the age of instant-communication. Baking a casserole? Find a cooking website, chat room, or IM buddy. Call your mom. Writing some code? Find someone else who has worked on something similar. Find an IRC channel for the language or topic. Get a partner interested.

    Having others who are interested, not only in the topic, but in what you are doing, is very important. How did that casserole turn out? Any leftovers? Did you ever finish that wiki-engine you were writing? Take a look at mine, I implemented [feature-x].

    It's easy to be impersonal and read web pages, mailing lists, and/or books about a topic, but "Cleaning your Garage, for Dummies" isn't going to actually make you get off you ass and clean your garage. Get someone else involved - significant other, your kids, your friends, someone.

  • Pride

    Ah pride. Too much of it, and you look like a tool. Too little, and you seem weak. But pride motivates us. It can be a powerful tool.

    Pride is related to the above point about involving others. Do a good job on that casserole? Take some pictures, tell some people about it. Take pride in the fact that you did this and it was a good job.

    This is one of the main things that makes open-source software so fun. Showing people your code. The "look what I did" aspect. Think about when you were a kid. You'd make some puppet out of glitter and popsicle sticks, and couldn't wait to show you mom/dad/sister/brother. "Look what I made!"

  • Advertising

    What? Like that Coke commercial I saw yesterday?

    No, no, no. Advertising your work. This is the third point in a little trickle-down of points. It relates to getting others involved and taking pride in your work. You're not going to get either of those without actually advertising that you did something.

    I'm not saying "show off." Don't invite people over to show them what a great job you did organizing your garage. That will just make you look like a knob. But you have to tell people. Only the people that eat your pork-chops are going to know how good they were. Give out the recipe, post pictures on the internet, write an article for a cooking blog. Advertise. Be vocal.

Are you paying attention?

No, I do not need to clean my garage, bake a cake, or scrub toilets. I have many different on-going projects for Arch that I constantly need to motivate myself to do. Backend stuff that no one ever sees, and the developers usually don't even fuss with.

Regarding the last point (advertising), expect to see posts here regarding some of the internals of the ArchLinux world. Feel free to ignore them, but, if you were reading, maybe you want to throw some e-highfives my way :)

| comments
Pay Attention!

Productivity. That ambiguous dream we all seem to be chasing these days. It's one of these million dollar industries like diet books and pornography. Something we all think we need.

But (ah, you knew there was a 'but', didn't you?), just like those diet books, you don't need a big complex plan and layout with note cards and special $100 pens to be productive, in the exact same way you don't need nutritional pills and Weight Watchers frozen dinners and low-carb foods to lose weight.

I'm going to keep running with the weight-loss analogy, because it makes so much sense here. The best way to lose weight is to change your habits. Stop the "boredom eating", stop buying Snickers bars and triple cheeseburgers, stop eating when your full. Well, the best way to "be productive" is to change your habits as well. Stop changing gears, stop doing thirty things at once, stop trying to work in front of the TV.

It's your attention, stupid!

All the popular productivity (and weight loss) systems out there have one simple thing in common. Just pay attention. Stop dividing your attention between so much at once. GTD will tell you to have a "universal capture" system where you keep all your "to do" items in one central system. Inbox Zero will tell you to filter your email as much as possible so that you stay on topic when you need to check on things. Tim Ferris will tell you to simply stop checking email every 20 minutes.

It's all about attention. Have something important to do on your computer? Shut off your Instant Messenger, close your Browser (or all the other tabs/windows that aren't work specific), log off of IRC, and just do your work. This applies to other aspects of life too. Want to clean your apartment? Shut off the TV, close the laptop, put your cellphone sudoku game away, and just clean.

Now, it may seem like I'm trying to tell you not to have fun. Nothing could be farther from the truth. What I am saying is this: don't try to accomplish something and "have fun" at the same time. Dividing your attention isn't a matter of math. If 50% of your attention is on two different tasks, you aren't going to accomplish 50% of each task. It doesn't work that way. Changing mental contexts from one task to another wastes a lot of time.

How do I apply this in my every day life?

This part is easy. Try to cut out everything that could steal your attention away from your task. Get rid of popup computer based notifiers that will tell you when you have a new email. Keep your cellphone off or in another room. Shut off the television. Anything you can think of.

Now, work in short bursts. Let's say your email is important to you and you need to check it often, for the sake of example. Set a timer. 45 minutes of work, then when it beeps, do 15 minutes of non-work. Check your email, get a snack, write a blog entry (heh). This is what I've done in the past.

Doing this takes a lot of discipline. It's the same with weight loss. You just need to suck it up and do it, or find a reason good enough to keep you on task.

It's really quite simple: Just pay attention.

| comments
Anonymous Email, what the hell?

I dislike cowardice, and people who cannot stand by their opinions.

I received an email today from an "Anonymous Remailer" application, to hide the sender's email address. They may have some valid points, or even something important to say, but instead they hid behind the guise of anonymity.

So, for that, I give you, the email, in full. It will receive no comment from me, or even any second glance, because the route for proper discourse has been abandoned.

Hi,

I'm sorry to have to write it this way,
but if you are really willing to stop
stripping the info-docs, maybe you could
think about a few things first:

When you argued with tpowa (btw. the
big iso with flashy grub and spaceinvaders
is also a "big improvement" over the former
one...), you said:

[quote]
  for all the "old timers" out there, I am on your side.
  I *am* an "old timer", and I will do everything in my
  power to make arch what it was.
[/quote]

Now, that's exactly what I would like to see -
Arch, as it was defined by Judd. This distro IS
special, and I love its way. The people in the
forums can have their docs in thousands of other
distros, why bother with em? I mean, the current
preffered way of installing is based on downloading
stuff through FTP... and they would spend their
bandwidth on something, which a) they never use,
b) is taking the storage space (regardless of the
size).

OK, I hope this reaches you.
And I also hope that the "_lightweight_"
motto in the logo will be still appropriate.
Bye.

So, for future reference: don't do this. It is stupid.

| comments
Comments Enabled

So I sat down and slapped together some comment-ability for this blog. Not that it's really needed, or anything.

I am using disqus because it allows me to push all the comment management stuff offsite. Hooray!

| comments
Patching, patching, patching

There's a lot of backstory here, that I'm going to ignore. This is not a rant, or a personal attack, or a justification. I want to explain the way I see things and where I want to take them.

When I began using Arch, we had the philosophy that we were "as vanilla as possible". This means that we trusted the upstream developers. If an Arch user wanted featureX, they contact the upstream developers, asked for featureX. Whatever upstream's decision, yes or no, we went along with it. We did NOT add the feature to our package anyway.

When I began using Arch, we had the philosophy in mind to "Keep It Simple, Stupid". This means that if things were too complex, we did it another way, or didn't do it ourselves. Someone wanted custom hardware modules? They could build them themselves.

When I began this all, we kept things as simple as we could, and allowed (and actually encouraged) people to change things they wanted to. This was the core of Arch - if you don't like it, do it yourself. We told people "If you don't like how the maintainer did that, use ABS and rebuild it". We told people, "If you want a package for that, make it yourself". We had users that knew this, and worked in tandem with us. Some users provided custom repos, different PKGBUILDs, alternatives.

This has all changed. For the worse. And it shows in the mentality of our patching. One user requests a feature, we apply a patch - we don't worry about upstream. One user has a brand-spanking new sound card, kernel gets patched. One user doesn't like a configure flag in a package, it gets changed.

We can't continue like this. Arch wasn't made to sustain itself in this way. Arch was made to work in tandem with the users - users that can help themselves AND us. Arch was made to work with you, not for you.

| comments
Veggie-wha?

My new task: try to be vegetarian for a month. No, I'm not doing this because I love animals, or am trying to be healthy, or any reason like that... I'm doing it because I really want to know how hard it is.

I started this little task on Sunday (Feb 17th), and have will continue until March 17th. Right now, it is not really that big of a deal. Sure, I need to remind myself "oops don't buy that" or "check the ingredients" every so often, but beyond that, I'm very complacent towards the whole thing.

I am, for the record, partially vegan-ing things. I cut out eggs and milk, but I keep forgetting when it comes to cheese. Cheese is its own food group as far as I'm concerned. It is also delicious.

Anyway, I plan on using ideas and recipes from the post punk kitchen, as it seems fairly thorough, but any ideas or comments from anyone else would be appreciated.

I'll keep you informed.

EDIT: I have removed a singular offensive word from the above text, because it offended the one person I thought would be happy for me. Sigh.

| comments
Archway

The Arch Way is a document that has been around for some time. It defines the core Archlinux philosophy - what makes us tick.

Here is my take on that document. My version of what we provide the user.

In short, the Arch Way is about simplicity and giving control to the user. Keeping things simple, and agile.

Arch is lightweight and simple, like clay - able to be molded by the user as they choose.

Arch is not a distribution made for "user friendliness". It is a distribution designed to be a platform - a "base" for the user to do what they want. This means that we don't try to force a user's hand into our way of doing things, with our configuration tools, and our ideas. It should be about their ideas.

It is important who controls the system here: the user. Developers suggest things, and push in certain directions, but let the user do as they wish.

Arch is a base for anyone to make into whatever they see fit. Arch is a tool.

Use it well

Furthermore, the driving philosophy behind Arch is provided in this document. Here, again, is my take on this (really just reworded).

  • Keep It Simple, Stupid: A simple design is usually the most elegant (See also Occam's Razor)

  • 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use, and technically crap.

  • Relying on complex tools to manage and build your system is going to hurt the end users. Maintenance and upgrading should be an active process, not a passive one.

  • "If you try to hide the complexity of the system, you'll end up with a more complex system". Layers of abstraction that serve to hide internals are never a good thing. Instead, the internals should be designed in a way such that they NEED no hiding.

  • We can't help you. Yes this is a philosophical point. Every Arch user is expected to be able to help themselves - to be able to look up information, configuration files, bugs, etc. You're expected to be able to do a little research when you have a problem. Teach a man to fish, and all that.

  • We are, above all, a community oriented distro. Contributions and effort from the end users should never be discouraged.

  • Unlike other distros, Arch is not primarily concerned about the user. The user is important, sure, but most important are simplicity and elegance. The user is important as long as it does not interfere with these doctrines.

  • "It is what you make it" -- Judd Vinet

| comments
Development Methodology

With the advent of the "new leaf" for Arch, I figure it's time to explain, to those of you who don't know me that well, how I go about this development thing.

See, I have one defining principle that is covered pretty well in the Python Philosophy.

Now is better than never.

Really, this is a simplification of Pareto's principle - also known as the 80/20 rule.

See, I am a strong supporter that completing 80% of the work that is "easy" as soon as possible and in a functional manner, is far better than waiting for 100% completion.

To make this an analogy: If I were building a house and it's the only shelter I had, I would rush to at least get the roof up. That's just a small portion of the work, but it is functional - I could sleep under it and all that fun stuff.

When I try to explain this to people, I describe it like molding clay. If you are sculpting a 1:1 scale human being, out of clay, you don't start on just the ear, make it perfect, move to the cheek, make it perfect, etc. No. You take a lump and make it look kinda like a human, maybe add some small details, go over it with another pass, add some muscle definition, another pass to clean up some things and fix inaccuracies, and another pass for fine details.

This is how I attack these things.

You don't need a perfect fool-proof plan. It's impossible to make something fool-proof, because fools are so ingenious. Someone will always piss in your proverbial cereal. Accept it. Accept that 80% is just as good. Accept that the ear doesn't need to be perfectly defined right away.

| comments
A Life in Flux

Ah, what a hectic time we're in.

For those of you who don't monitor my every move (and why haven't you started?), there was some recent news involving my life:

Read this first

Yes. That means I'm now the "big hat" in the ArchLinux world. It's a mixed blessing - as a whole I think we both need and fear this sort of thing.

But, that's how life works. When life gives you lemons, and all that. I'm here right now to give a sort of informal roadmap to anyone who may be watching. I figure this will percolate out to the community at some point, but this way I can keep the vision small and open for discussion.

I plan on making some changes soon to the way ArchLinux is run as a whole, and I guess I'll kinda give a preview here.

See, something like this is easy when you have 3 or 4 people, with similar goals and ideals. But when you hit 30 or so developers, that's when you run ashore. What you need, at that point, is something to keep everyone in line, something to keep everyone from going off on different tangents.

You need Process.

I know. It's a frightening word for anyone who has ever worked in a heavy corporate environment. But we need it. The more hands we have doing different things, the more opportunity we have to introduce human error.

This process begins with the new [testing] repo policy. That is, if a package is in the core repository, it must always go to the testing repo and be "signed off" by another developer. It is more important to ensure the stability of the core repo than to have updates minutes after they are released.

In the coming weeks, I am also planning on defining a set of "roles" or "teams" for our developers. Right now, everyone is just a generic "I do everything" guy. Again, this works when you are small, but doesn't work anymore. Everyone can't and shouldn't do everything.

So what we gain is a set of specialists instead of a group of generalists. Instead of "I work on ArchLinux", it's "I work on for ArchLinux".

More to come, don't worry.

| comments
Weight loss: Part 1, Clean Eating

This is Part 1 in a series of weight loss articles I want to write, so it will serve as a sort of "history". See, I see a lot of these weight-loss articles and my gut reaction is "What the hell makes you an expert?"

I'm 5'10", 25 years old. About 3 or 4 years ago, I weighed 210 pounds. That's fat. It hit me hard at one point, so I decided to make some changes in my life. Over the course of 4 months, I ended up dropping down to 160-165.

Recently, however, I got back up to around 185. So, of course, I kicked my ass into gear yet again.

Ok, enough history, on with the content.

Metabolic Rates

Clean Eating is a technique I learned from the Men's Health Forums, and it is the basis of every successful diet out there. So, for this reason, I'm going to explain the technique in full, and all the logic behind it as concisely as I can.

Determine your BMR. This is the rate at which you burn calories doing absolutely nothing at all. The formula is rough, but works as a really good estimate.

66 + (6.3*weight) + (12.9*height) - (6.8*age)
weight units: lbs
height units: inches
age units: years

If I calculate mine right now, I end up with 1902.

Now keep in mind that this is not the number of calories you use every day. Typically, you're not doing absolutely nothing unless hospitalized, so we need to multiply our base rate.

Sedentary = 1.2 [Couch potato, desk job, etc]
Light Activity = 1.375 [Walking, biking, jogging 1-3 times per week]
Moderate Activity  = 1.55 [Biking, running, weightlifting 3-5 times per week]
Heavy Activity = 1.725 [Running, working out, weightlifting daily]
Superhero Activity = 1.9 [Marathon running, manual labor/heavy lifting]

I'm sure you fit in one of these categories. It doesn't matter which one, that's not important here. What's important is the number associated. Take this number, and multiply your BMR by it.

For me, with a 1902 BMR and moderate activity, I end up with 2948.

This number is important. Write it down. This is the number of calories that you can intake right now, without changing a thing, and maintain your weight. But that's not what we want just yet, is it?

Caloric Deficit

Time for more math! Yay. This one is easy though. One pound of fat is 3500 calories. For every 3500 calories you go BELOW the number above, your body needs to burn off one pound of fat to compensate. 7 days in the week, 3500 calories, that means that if you drop 500 calories a day from the intake you just calculated, you can lose one pound a week without doing anything else. Neat!

Now, it's important to note that you DO NOT want to drop more than 1000 calories a day, and even 1000 calories is pushing it. You may be tempted to do this to lose weight faster, but it doesn't work that way. Here's the rule I try to live by:

Never drop below your BMR with calorie deficit alone

You can always up your activity level. I'm going to assume that the people reading this far aren't doing super hero workouts and lifting piles of bricks during their day job.

Here's the thing. If you cut calories too much, your body goes into "oh shit, I'm starving" mode and slows down your metabolism (i.e. drops your BMR) so you end up cutting way less than you expect.

Macronutrients

Macro-nutrients are things we all know (but I'm going to add one more): protein, carbohydrates, fat. These are the things which actually give your body energy, but they do it at different rates. Let's look at this in calories:

Protein:        4 calories per gram
Carbohydrates:  4 calories per gram
Fat:            9 calories per gram
Alcohol:        7 calories per gram    OMG!

For those of us that know our daily caloric intake that we're shooting for, you generally want to partition you calories at about 1/3rd (33%) to each macronutrient. My adjusted BMR was calculated at 2948. A 500 calorie deficit drops me to 2448. That means I need 808 calories from each macronutrient. 202 grams of protein, 202 grams of carbohydrates, and 90 grams of fat.

This doesn't mean you can eat anything. This wouldn't be "clean eating" were that true. A comment I received via email contained the following insightful point, which will be the jist of the rest of this:

Which would be better: eating 2000 calories from snickers or eating 2000 calories from vegetables, healthy fats, lean meats and fruits?

usedtire, from the Arch Forums

Carbohydrates

Carbohydrates are what your body uses for fuel. They directly effect your metabolism and your energy level.

  • Use the Glycemic Index as a reference. Low GI carbohydrates are absorbed slower by your body and have less of an impact on blood sugar.
  • Stay away from high GI carbs. Anything "white" (bread, rice, etc) is best only in moderation
  • Go for whole grains as much as you can.
  • Try not to add real sugar to things like cereal, coffee, etc
  • Switch to lowfat (1%) or skim milk
  • Try to avoid potatoes at all costs (they're one of the worst)
  • Eat fresh fruit instead of dried (grapes, apricots, etc)

Protein

Protein helps protect your muscle mass (so you lose fat, not muscle) and helps your body process carbohydrates better.

  • Eat the leanest meat you can (grocery meats are labeled, try for 90-95% lean)
  • Choose fish or chicken over beef or pork (less fat, more protein, typically)
  • Eat more egg whites than yolks (I do a 2 whites to 1 yolk ratio when I make eggs)
  • Avoid super fatty meats like bacon, non-lean pork, and ribs
  • Cottage cheese is an amazing source of protein, and a great snack.
  • Avoid sugar laden or fatty dairy, such as whole milk, ice cream and (oh noes) cheese

Vegetarians typically have issues with protein intake. Look above, most of that is meat and dairy. [NOTE: If you have tips for vegetarians, I'd love to know them. Email me]

  • Soy protein is good for you, but absorbed differently than whey (animal) protein. Try, if possible, to at least buy some whey-based protein shakes.
  • If at all possible, try intaking more dairy, and cheeses. Fatty cheese might be bad, but this is the best source of protein you can get without eating meat.
  • Beans and nuts can give you small amounts of protein, so eat them in large quantities if you can.

Fats

Ah there never was a macronutrient more looked down upon. Fat is good for you. It can help protect your heart, internal organs, and even help brain functioning. Just know what NOT to consume.

  • Load up on "Essential Fatty Acids" - omega-3 and omega-6. Use pills if possible.
  • Fish and fish-oil generally have large quantities of omega-3.
  • Almonds and walnuts are good sources of omega-6 and mediocre sources of omega-3 fats.
  • Steer clear of "trans fats" - margarine, Crisco, etc - fake fats.
  • Lowfat dairy and lean meats (mentioned earlier) are usually better for you.
  • Try to stay away from vegetable and corn oil - substitute for Canola oil if cooking

Water

One of the simplest things you can think of. Water.

This is the most important "nutrient" you will ever come across. There is NO a substitute for water - Gatorade, Vitamin Water, coffee, beer. No.

If there is nothing else you take away from this entry, please take this one:

Drink as much water as you can.

Carry a bottle with you and refill it constantly. While it's not perfect, I tend to judge my water intake based on the color of my urine (ewww!) near the end of the day - urine gets darker if you are dehydrated or eating poorly.

As a quick aside here - do not buy bottled water. It is something in the order of 1000 times more expensive than tap water. Buy an empty bottle, or even one bottle, and reuse it as much as you can.

Summary

In conclusion, here are the salient points, and a few tips, from above.

  • Watch your macronutrient levels
  • Stick to low GI carbs as much as possible
  • Protein is good, but stay away from fatty meats
  • Fat is your friend
  • Carry a water bottle and drink as much as you can
  • Stay away from packaged meals - fresh is better than pre-made
  • Sugary snacks usually have high GI levels - for best results cut out all cookies, candy, and soda if you can.

Next time, in Part 2, I will cover exercise! Yay!

| comments
Junk Mail, Just Say No

Here's a neat tip I discovered recently, and wanted to share.

You don't need to "settle" for junk mail. In fact, there are security reasons as to why you should not. All those credit card applications you get in the mail can be used by identity thieves to get credit cards in your name. Don't believe me? Just ask Rob at Cockeyed.com.

Ok ok, I'll trust that you believe me. Junk mail sucks, and shredding all of it gets tedious. What can one do?

Well, you can opt out. I'd recommend the 5 year opt out, as doing anything "permanently" always seems a bit flaky.

No joke. Fill out this form, and all of the sudden, you stop getting all this junk mail. In fact, counting last Thurs, Fri, and Sat, I got 2 pieces of mail - neither of them junk.

Now you might be thinking "hmmm is this safe?". Of course.

Opting-Out refers to the process for removing your name from lists supplied by the Consumer Credit Reporting Companies, Equifax, Experian, Innovis and TransUnion, to be used for firm (preapproved / prescreened) offers of credit or insurance. Your rights as a consumer under the Fair Credit Reporting Act (FCRA) include the right to "Opt-Out" for 5 years or permanently.

Enjoy your empty mail box!

| comments
Stuff, Things, and More

Sometimes you look around you and realize "this isn't what I planned on". Things change. Sometimes you can't control it, or don't pay attention to it, But other times you can. This is one of those times. Take a look at your life, at where you're at, and decide what, if anything, you aren't satisfied with. I'll tell you what I've changed.

Spending money like a fool

We all do this sometimes. Because I had 2 incomes, I had a lot of expendable cash. The $3 cup of coffee wasn't a problem. Brand name toilet paper? Sure! I made a lot of 'mistakes' as to where my money went because I was stable where I was at. Well, when your spending technically doubles overnight, you rethink this quite a bit. So here are things I've learned from experience, which means you might not have to:

  • Make a grocery list. Nothing is worse that going to the grocery store with the intent of "buying what looks good". You need to understand, not only that packaging is as much advertising as anything else, but also that if you know ahead of time what you want, you will buy healthier foods.
  • "Do I need this?" is one of the most important questions you can ask. A 2 liter of Coca Cola is $0.80? Do you need it? Probably not. You're thinking in terms of the "now" and not the "what next". Imagine all the money you can save when you realize that the Starbucks coffee is just as satisfying as the half-caf latte.
  • A brand-name does not mean better, only better marketing. You don't need to buy everything brand named. There is a gas station near me that has coffee as good as Dunkin Donuts, and for half the price.

Too much clutter

I have (had) a lot of crap. Stuff I don't need anymore, but it's there because there is no reason to get rid of it. I have books I bought ages ago, which are no longer relevant (computer books, c'est la vie), DVDs which I hated, and furniture that just sits in the corner and collects dust.

I've noticed something more and more recently - "having things" does not equate in any way, shape, or form, to being happy. Having things means you have things. Sometimes these things can be conduits to other more satisfying things (the TV and DVD player will let you watch movies and television; the computer will let you talk to friends, find information, and listen to music; books will give you information, great stories, or even advice; etc), but more often than not, it is just Stuff.

Trying to balance your conduit-vs-stuff ratio is hard, but doable. And here are some things I learned in the process. I know it is hard to get rid of things. I'm a digital packrat as much as the next guy, but you need to sit down and just do it. Spend a few hours and go through a closet, or a room. You won't regret it.

  • If it's electronic, or related to electronics, and you haven't touched it in 3-6 months, it's probably useless. This goes for everything. Spare cables, ethernet cord, that old wireless router, the super iPod dock with speakers, your old Nintendo 64, etc.
  • Furniture you don't use needs to go. This one is hard for a lot of people (but way easier for us apartment dwellers). Here are a few things to put your mind at ease:
    • Minimal interior design makes use of few pieces of furniture, and open spaces.
    • Less furniture means less to clean.
    • If you live in an apartment, it's less to move when your lease is up.
    • You can get some spending cash.
  • Old clothes are a pain. We all know you have "that shirt that wrinkles too easily" or "the pants that are cool but a bit too tight" or even "the ugly weekend shirt". We all do. Ditch it. Getting rid of clothes you don't wear has numerous benefits. Firstly, you can donate it and feel good about yourself. Secondly, it allows you to buy new clothes, which DOES make you feel better about yourself - looking better makes anyone feel better.

Eating right makes you feel better

In a relationship, especially a long term one, most people tend to get into this vibe of "nothing to do, let's go to a restaurant". It's common and I don't look down on it. But replacing idle time with an eating habit can be bad in the long run. If you've been in something like this for some time, switching to proper eating habits gives you a huge energy boost. Try it out, I promise it'll help. Eat as healthy as you can - if you're able to "do" vegetarian, try it. Do this for 3 days. I promise you will feel better.

Sleep is good for you

This is a hard one for me. See, when in a long term relationship, it can be hard to find time for yourself. The way I did things, is that I'd let her go to bed first, and get my techy computer stuff done then. This, of course, kept me awake way longer than I should have been. You get used to 4 hours of sleep a night, but it's not ideal. It's doable, sure, but you wake up much easier, and feel much better in the morning with the proper amount of sleep. This is another "try this out" item. For about one week, try and get 7 or 8 hours of sleep. At some point, you might even wake up slightly before your alarm (this took me about 2 weeks, in all honesty).

See, here's something I find interesting. I've heard it all my life but never believed it. "You can get more done in the morning than in the evening". It always seemed silly to me, and the reason is simple. I always felt like crap in the morning. Well, try sleeping right. Now I can wake up, go for a quick jog, make some coffee, eat breakfast, check my email, shower, and go to work in before I used to get in when I was simply waking up and taking a panicked shower,

Working out is a form of meditation

This one is weird. Feel free to ignore it, as I know it doesn't "strike home" with a lot of people. Forcing yourself to work out is hard. Really hard. It's painful, and work, and not enjoyable. I understand, believe me. Here's the thing, though - you're doing it wrong. What works for me, is not the crowded gym, with an iPod. No. I need quiet (or rather, the ability to tune things out) and concentration.

After trying different things, it actually became very simple to tune out the world, and concentrate on concentrating. There is a calming effect to lifting a weight, something serene in running. It has become, almost, a form of relaxation.

If you can do this, do it. I know I've done the "it makes you feel better" thing twice already, but this is the largest one of those. Working out will make you feel way better than anything else.

Stay tuned for specific articles on all these topics, as well as productivity tips.

| comments
Easy Good

Config file post-o-ramas are always entertaining, at least for me. I was inspired to write this one because mark pilgrim's and neil dunn's were so bloody similar to mine, but it seems I shy on the side of excess complexity.

Quoting the inspiring part of mark's post:

It’s true that you can spend a lot of time editing configuration files, but most people don’t realize how portable they are and how long they remain useful. The cost of customizability is amortized over years, not months. The cost of setting up a new workstation is near-zero.

I keep all my configs in an svn repo on this machine, so here's all the fun stuff:

  • ~/.xinitrc

    I usually start X with slim or startx. Both of these commands read a user-based ~/.xinitrc. This one is small, so it's here:

    #!/bin/sh
    
    xmodmap ~/.xmodmap
    xset m 2 1
    
    #this will keep the clipboard in sync
    #   with the selection buffer
    #autocutsel -selection CLIPBOARD -fork
    
    tpb & #thinkpad button handler (with xosd output)
    mpd & #moosics!
    
    #just in case scaling the BG fudges at the edges, make them black
    xsetroot -bg black
    eval $(cat ~/.fehbg)
    
    exec ratpoison
    
  • ~/.bashrc

    My bashrc is fairly complicated. I have a handful of functions that I should probably break out into ~/bin/ scripts. All-in-all, there's not really much there. Though ~/.inputrc is probably fairly important as well.

    Here's a little excerpt I posted to mark's blog, about letting bash set screen's window title automatically.

    #special screen-specific stuff for window titles
    case $TERM in
        screen*)
            trap 'echo -ne "\ek${BASH_COMMAND%%\ *}\e\\"' DEBUG
            PROMPT_COMMAND='echo -ne "\ek$(short_pwd 15)\e\\"'
            ;;
    esac
    

    Note that the trap line sets screen's title to the command I'm running, and the PROMPT_COMMAND line sets the title to the current dir when at the prompt. short_pwd is similar to vim's pathshorten() function used in tab names - well, the output is, at least.

  • ~/.vimrc

    Set the switch to More Magic. Like the other guys (though they appear to use emacs), my vimrc has grown up over time, and has many little if/else cases for different terminals/OSes and just about every setting I like. The only changes I make anymore are to global plugin settings.

    I should make it a point to say that vim's "wildmenu" is a must-have for tab completion on the :command line

    set wildchar=<tab>
    set wildmenu
    set wildmode=longest:full,full
    
  • ~/.ratpoisonrc

    Not much to say here. It's almost all keybindings. Note that the multimedia key bindings take the place of mark's 'nowplaying' + ncmpc usage

    A bit interesting: I use windows at work, so it's hard to break the Alt-Tab usage... here's the bindings for ratpoison:

    definekey top M-Tab next
    definekey top M-ISO_Left_Tab prev
    
  • ~/.screenrc

    A bit longer than the other two use, but I abuse the hardstatus line for a "system monitor". This is the only really non-portable config file I keep, because screen doesn't have a good "if/else" mechanism to allow different settings depending on the machine.

    Here's something fancy. Because I never use urxvt without screen running, I've bound S-PgUp and S-PgDn in urxvt to sent invalid escapes (the terminal does nothing but spit out gobbledygook). I then map these escapes in screen to enable simplified scrolling through screen's copy mode.

    #let pgup/pgdn scroll under urxvt (see .Xdefaults)
    bindkey "^[[5;2~" eval "copy" "stuff ^u"
    bindkey -m "^[[5;2~" stuff ^u
    bindkey -m "^[[6;2~" stuff ^d
    
  • ~/.Xdefaults

    All my colorful fancy urxvt settings (and a few for Xpdf) are held here. Just some important notes. urxvt's perl extensions are fabulous. For instance, matcher can match text patterns and make clickable links out of them. By default, it's setup to handle URLs and launch them with urlLauncher.

    urxvt*perl-lib:         /usr/lib/urxvt/perl/
    urxvt*perl-ext-common:  default,matcher,searchable-scrollback
    urxvt*urlLauncher:      /opt/mozilla/bin/firefox
    urxvt*matcher.button:   1
    

    Also, just a note. The above simple-scrolling in screen is done with these two:

    urxvt*keysym.S-Prior:   ^[[5;2~
    urxvt*keysym.S-Next:    ^[[6;2~
    

There's much more over at http://phraktured.net/config - feel free to check it out.

| comments
ssh-connection-control

I just discovered this today. For those of you who ssh everywhere, this is really beneficial:

In ~/.ssh/config, add the following lines:

host *
   controlmaster auto
   controlpath /tmp/ssh-%r@%h:%p

What this does is set a 'master control' socket when you make an SSH connection. The socket is named based on the 'controlpath' setting (%r = username, %h = hostname, %p = port).

This master socket is used for each successive connection after the first, as long as one connection still exists. That is, if I connect via "ssh myuser@myhost.com", a socket named /tmp/ssh-myuser@myhost.com:22 is created. If I then ssh again to the same host, the socket is found and the remote ssh session is told to spawn a new shell. This shell does not require a login, and spawns immediately, as you're already logged in.

Brilliant!

| comments
Linux Console Colors

What you say?

Yeah, I'm talking about coloring the 'linux console' - the little thing that you get when you login without X.

Most people I know use a framebuffer. That's due to the fact that non-framebuffered text is huge by default. Typically, you'll set vga=791 or something, and the text gets more readable, and it's left at that.

Yes, some people out there prefer bootsplash/gensplash/usplash/wtf-splash... I don't (though I do use grub-gfx from the AUR - grub with the background pixmap patch). However, when one boots into a framebuffer mode, you typically chose a color depth (personally, my laptop doesn't like anything over 16bit color, but that's good enough for me).

Ok, so I'm sure some people have asked "well, if I'm not using a splash screen, what use is all this color depth malarky?" - I'll show you. My ~/.bashrc contains the following lines:

if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0222222" #black
    echo -en "\e]P8222222" #darkgrey
    echo -en "\e]P1803232" #darkred
    echo -en "\e]P9982b2b" #red
    echo -en "\e]P25b762f" #darkgreen
    echo -en "\e]PA89b83f" #green
    echo -en "\e]P3aa9943" #brown
    echo -en "\e]PBefef60" #yellow
    echo -en "\e]P4324c80" #darkblue
    echo -en "\e]PC2b4f98" #blue
    echo -en "\e]P5706c9a" #darkmagenta
    echo -en "\e]PD826ab1" #magenta
    echo -en "\e]P692b19e" #darkcyan
    echo -en "\e]PEa1cdcd" #cyan
    echo -en "\e]P7ffffff" #lightgrey
    echo -en "\e]PFdedede" #white
    clear #for background artifacting
fi

Yeah, it's confusing, I know... however, these are console escapes specific to the linux console.

As with all escape codes, it begins with a little prefix indicating what the escape is actually doing: in this case "e]P", which is the "set color" escape. The format for the data is "XRRGGBB" where X is the number of the color to modify (in hex). This is a standard 16 color notation, which I have commented above. The colors above are taken verbatim from my ~/.Xdefaults file, with "color0" converted to "e]P0" and "color16" converted to "e]PF".

Note the last 'clear'. If you set these colors without clearing the terminal, the background color will change (assuming 'color0' changed) only for new text. You will get odd artifacting.

Here is a screenshot of my current, non-X setup, using the terminus consolefont (ter-112n) and the above colors.

Enjoy!

| comments
vim-python

Though python works well inside vim, there's a few things lacking when compared to the C/C++ capabilities of vim, so I'm going to try to correct them.

First of, I corrected/added on to the old python compiler plugin, making it work a bit more like a 'compiler'.

See here for more. It uses the py_compile package to check for compilation errors without actually running the script. Follow the install instructions, then simply run ':make' to compile the code (and output a corresponding pyc file). Use :cwindow/:clist to view errors, and :cn(ext)/:cp(rev) to flip from error to error (for those not familiar with using vim as a development environment).

You can always adjust the makeprg to and from "python" itself for running with error output, which I may add at some point.

I'm also going to finish up the syntax completion for python, to work with omni completion, as it's rather simple. More forthcoming...

pycomplete.vim is here: http://www.vim.org/scripts/script.php?script_id=1542

Add it to your $VIMRUNTIME/autoload/ dir, and set omnifunc=pycomplete#Complete when editing a python source file. It currently needs a decent amount of work, but it does work for top-level variables (not inside a 'def' statement)... partial completion is borked for now, until I fix the matching.

NOTE: This will be included in the next vim-devel snapshot, so if you have that, no need to download it from here, unless you want the most up-to-date version.

Screenshot:

| comments
vimmity-vim-vim

I'll update this throughout the day, as I tend to multitask alot:

I'd like to give a little primer on vim and programming under vim - because everyone seems to think "IDEz r teh r0x".

Note: I found this screenshot on iphitus' blog, which is a nice display of taglist (on the left) and minibufexplorer (on the top).

Let's start by detailing some plugins that are invaluable:

  • Taglist - probably the single most downloaded plugin on vim.org
  • Minibufexplorer - a nice little "tab bar" at the top for all open files.
  • Tabbar - an offshoot of Minibufexplorer - much better looking, and also binds Alt+[NUM].
  • A - yes this plugin is called "A", for "alternate" - it quickly flips between related files .c/.h , .aspx/.aspx.cs , et al
  • SearchComplete - one of those plugins you never notice. It provides tab completion inside incremental searches.
  • gdbvim - plugin to allow debugging of an app via vim - allows for setting of breakpoints and regular gdb commands
  • python_calltips - a must if you are programming python.
  • python syntax - an updated version of the distributed python syntax file
  • Doxygen Syntax - awesome! provides syntax highlighting of doxygen formatted comments
  • DoxygenToolkit - related to the previous script - this one will automatically generate all proper doxygen comments for a given class/function
  • cvscommand - cvs integration without leaving vim
  • svncommand - svn integration without leaving vim

Other nice plugins:

  • GetLatestVimScripts - auto update all personal vim scripts from vim.org (woohoo)
  • CRefVim - add the C stdlib to vim's ":help" command.
  • Manpageview - integrates man pages, perl docs, and info into vim (instead of using external viewers)
  • sudo - requests a password to save files with root permissions
| comments