Random Science Fact - Celery is the Only Food with Negative Calories Celery is the only food that takes more calories to digest than it contains averaging about 6 calories a stalk, but burning almost twice that in the digestion process since the celluloid fibers are so tough to break down. This does not mean you will lose weight eating celery, but...
Will a Food Diary Help Double Your Weight Loss One of the most looked over things when you're trying to lose some weight, is knowing exactly what and how much food you are eating, you can to a certain extent roughly guess how much food you are eating in a day, by simply writing down the calories on the...
Eat Throughout The Day and Keep Weight Off Having frequent meals throughout the day instead of the traditional three times a day model, which we are all so used to perhaps now might not necessarily be the best way to keep your weight in check. You are far better off by eating five to six small meals throughout...
the art of being ill sickness is something i've been getting used to. i seem to be getting flus with a kind of regularity this past few years. a recent doctor put it down to some wacky sinuses which may be getting infected and then going on to infect the rest of my body....
creepy and hatboy - red dwarf moments the coffee table incident it happened while hatboy was out getting snacks. i was sitting all comfy on the good side of the couch, when i heard hatboy’s voice mumbling from inside the coffee table. “i don’t want to alarm you, creepy, but i really need to tell you...
horror of dracula The Horror of Dracula is the first Hammer Dracula film with Christopher Lee as the title role of the dreaded count of evil doom and blood-drinky, and is, in my humble opinion, the best of the lot. Firstly, Hammer films are an acquired taste. They take a bit to...
Palin, the brand A week or so ago, CNBC had a discussion with Donny Deutsch who hosts The Big Idea. He offers Palin, the brand and sees her as: which just struck me as a bit surrealistic. Palin as a breakfast cereal. This post does not reflect any opinion regarding either set of...
Planning a Bulk-Buying Grocery Staples Excursion I'm definitely an underbuyer. I don't like to spend more than I have to, even if it'll save money in the future. Parting with that money now just scares me. But I'm biting the bullet and becoming more efficient and a better planner. I recently discovered that there is a...
Repairing Cracked Concrete 101 There are a number of different factors that can cause your concrete driveway or garage floor to crack. This may include shifting of the ground underneath, an extreme fluctuation in the temperature between hot and cold, too much weight having been applied, and numerous other things as well. Not only...I was running in the park, my usual route, iPod on, when I saw a ball rolling towards the path. When I caught up to it, I kicked it to the nearest kid and kept going. The kid started running along with me and kicked the ball in my direction again. I immediately responded by kicking it back to him, this time with more flair (Maradonna?) then kept running. Next, the ball flew right by my face and into the horizon, completely out of my reach. I immediately stopped, I looked back at the kid wondering what the hell he did that for, when he said, "I just want to talk."
4 Ways to Stop Overeating Trying to map out a new health plan can be difficult, especially when you are used to overeating on a regular basis. Many of us don't even realize just how much we eat and how this can affect our bodies. The key to weight loss is the simple formula of...
Flat Belly Diet: Top 10 Foods to Avoid What's in Store The 4-day Jumpstart is a great way to reduce belly bloat and start flattening your stomach instantly. You can lose up to 7 pounds! You'll drink Sassy Water (a signature Flat Belly drink) while eating healthy foods prepared in delicious, simple ways. The jumpstart was created for the specific purpose of reducing water retention, eliminating heavy solids, and relieving gas so you will quickly look and feel lighter. Avoid these 10 foods and you'll be on your way to a trimmer tummy today!
Common First Time Home Buying Mistakes (And How to Avoid Them) Buying a home for the very first time can be an exciting and exhilarating process. You’re pursuing the American dream, providing a home for your family, and hopefully making yourself more financially secure. Unfortunately many first time homebuyers dive in head first and often make a number of mistakes in...
The High Cost of Fast Food Convenience When fast food first came on the scene, it offered consumers an easy, convenient and affordable dining alternative. This billion dollar industry has grown and evolved over the years offering much more than the traditional hamburger and french fries. Americans have long had a love affair with fast food, however...
Is Saving Up For Dinner Ruining Your Diet? It is a common practice, and many of us are guilty of it. We forgo eating all day long, because we know we’ll be eating out that night, or that there is a special event coming later in the day and we want to be able to eat whatever we...
101 ways to reduce your spending and keep more of your money Here are 101 areas where it's easy to make cuts that will allow you to keep more of your money. Since this article is long, it's broken it down into sections. Browse through the whole thing, or use the links below to jump to the sections that interest you most....
The 9 Most Helpful Blogger You Can Look Up For ! Dear Friend, My link love exercise was truly amazing! So far, I got a 10% increase in traffic and if there were more, the traffic percentage may be more then... 15 to 20 % ! God bless all the 9 blogger that participate in this small exercise. You know, one...
Will Obama have to be better because he's black? Just days before he was sworn in, President Obama was giving his daughters a tour of the Lincoln Memorial when one of them pointed to a copy of Abraham Lincoln's second inaugural address carved into the wall. Obama's 7-year-old daughter, Sasha, told her father that Lincoln's speech was really...
How To Eliminate Credit Card Debt On Your Own Being in debt is not fun. Unfortunately, many people do find themselves in debt and carry balances on multiple credit cards. This article will show you how to eliminate credit card debt on your own without using credit card debt consolidation services. Personally, I think these credit card debt consolidation...
Roni's Way to Professional Blogging This was a fun Webside Chat! I interviewed pro blogger Veronica Noone (Roni) from RonisWeigh.com, GreenLiteBites.com, and BlogtoLose.com yesterday. This "mommy blogger" uses everything at her disposal to create really great blogs with different media and a less "formulaic" approach to blogging in general. The result is a high traffic...Part five of my weeklong "Best Shows I've Seen" theme, culling from the 200 I've attended.
The 2002 reunion of Mission Of Burma was something I thought I'd never see. Their output was tiny; One album, one EP, two singles, and a couple rarities comps. Their name wasn't rolling off many tongues but those it was either started a band themselves or were hardcore music junkies. They dissolved because of guitarist/vocalist Roger Miller's worsening tinnitus, a symptom in which a constant ringing is heard within the ears, which... how do you get over that? Miller and drummer/vocalist Peter Prescott stayed relatively active in other musical projects while bassist/vocalist Clint Conley and tape looper Martin Swope albut left music altogether. There was little hope.


This is a followup to my previous post.
A fairly common pattern in GTK code seems to be updating a widget whenever a value changes in your controller. That is, something like this:
Needless to say, this can get a bit tedious. With a bit of stack frame hackery we can reduce that boilerplate to the following:
Here's the code:
Last week I set out to learn PyGTK by doing. Quickly. As can be imagined, the resulting code was less than stellar, but I did learn a lot.
By far the most glaring design error I made was in not completely decoupling my UI objects from "business" logic, ala MVC. This failure was the result of not totally comprehending the role signals should play in GTK applications. I made the first step correctly, with distinct objects for the UI panel and logic, but sadly that was the last smart choice I made. My next was deciding how to update the UI when the state of the system changed. "Hmm", I thought. "If I just pass the appropriate UI control through to the logic layer, I can update the view as necessary! Brilliant!". BZzzzzzzzzzzzt! Wrong.
The right approach in GTK is to use signals to notify the UI of changes to your objects. To do this, inherit from gobject.Gobject and add a __gsignals__ attribute. Here's a mocked up example of a simulation that emits a "simulation-step" signal every time the simulation is updated. To update a hypothetical counter widget we simply connect the signal to a callback that updates the widget.
The fundamental mistake I made was assuming that GTK signals were purely for notifying my application of UI changes. In reality, signals are equally important in notifying the UI of application state changes.