Shows you what youre missing.
Monday, June 11, 2007
Sunday, June 10, 2007
It doesn't appear to have a penis
Its the 28th week and M. came back from the doctors appointment. They looked and they peered, they glared and the stared, but try as they might, they were unable to view the groundhog's shadow^w^w baby's man-marker, which means that its quite likely to be a girl.
Which means my psychic baby-gender-predicting powers are true, and everyone else was wrong. :)
Mini-review of Foundations of GTK+ Development
Foundations of GTK+ Development is definitely recommended for anyone doing any serious GTK+ development. The authors style is easy to read, and the book serves as both a decent tutorial for any programmer fluent in C looking to learn GTK+, and a reference for intermediate programmers who want to broaden their knowledge of GTK+.
The author wisely spends his chapters on the most useful and most often misunderstood parts of GTK+, leaving the hand-holding chapters to a blessed minimum. This means there is little fluff, and a lot of meat. Since its based on GTK+ 2.10, we are able to skip the deprecated, or just plain old crufty parts, and get straight to the modern usages, such as GtkTreeView, GtkUIManager, and Glade. There is even a couple pages on cairo, within the context of GTK+ 2.10's new printer support.
His entire chapter on deriving existing types, and creating new ones (in the often arcane GType system) is sure to be a god-send to beginning programmers, and a well worn reference point for programmers in code mode. Add in the over 100 pages of appendix material documenting GTK+ properties, signals, styles, stock icons, and error types, and you've got a handy resource.
While all the information in the book is available somewhere free online, including the indispensable devhelp, the GNOME website, and even the GTK+ website itself, having a coherent narrative in handy physical form, I think, is worth the purchase.
Even though the book weighs in at over 600 pages, given the degree to which GTK's abstractions leak, I would have liked it if the author spent a little bit more time explaining the design issues that lead to these leaks.
For example, the author briefly mentions GObject's inherent ability to support the Pimpl (pointer to private implementation) idiom, and gives the boiler-plate code to achieve it (which is good). But when reading the code, one notices that MyObject appears to contain no reference to MyObjectPrivate, while the class constructor for MyObjectClass contains the function
g_type_class_add_private (klass, sizeof (MyObjectPrivate));
(which is mysterious, to me at least). If abstractions are going to leak, I would like it if the author could spare a couple sentences to give me an idea why such a call is necessary, if only avoid a mild state of incongruous bewilderment.
Lastly, I would have liked to get a bit more insight into some of the more fringe, but related, technologies, such as cairo or D-bus; and more details into tricker parts like threading, or a full working example of how to integrate foreign sub-systems using Glib. However this may be asking too much for one book, so perhaps we will have to wait for the author to spring "Advanced GTK+ Development" upon us!
Saturday, June 9, 2007
There is life out there, really, you just have to look
Its times like these that I wish I could just point and click, and magically download a high quality mp3 of any song that caught my fancy.
how to add social bookmarking sites to your blogger footer
1. Click on Customize->Template->Edit HTML
2. Click the Expand Widget Templates button
3. Search for "post-footer-line-3" and place your links within the <p> tag
4. Your links would look something like this:
<a expr:href='"http://del.icio.us/post?url=" + data:post.url + "&title=" + data:post.title' title="del.icio.us">
note: the expr namespace is necessary for the engine to convert the data:post into dynamic content for each post.
change your ways young man
Some simple things to change your daily habits to improve the environment and your life
1. Go to bed early.
- Save the electricity cost (and the greenhouse gases they produce) of lighting necessary after dark, and TV, computers, etc. you use to keep yourself entertained.
- Sleep is an underrated factor in determining quality of life. Get yours, and live better.
2. Read a book.
- Save the electricity cost (and the greenhouse gases they produce) of TV, computers, etc. you use to keep yourself entertained.
- You might just learn something more valuable than what can be found on American Idol.
3. Eat more veggies.
- Save the carbon footprint of raising cattle.
- Enjoy the health benefits of eating more vegetables.
Take off your party hats an go outside
It would seem now that, not only is sunlight a underestimated regulator of moods, but also necessary for producing vitamin D, and underestimated agent for significantly reducing the risk of cancer.
http://www.theglobeandmail.com/servlet/story/RTGAM.20070608.wvitaminD08/BNStory/specialScienceandHealth/home
That means you need to wake up with the sun, and get outside to enjoy the mild morning sunshine!
Thursday, June 7, 2007
The Social Animal
Required reading for anyone who spends any time around other people.
http://www.amazon.com/Social-Animal-Elliot-Aronson/dp/071675715X
http://en.wikipedia.org/wiki/List_of_cognitive_biases
And while we're at it, I't tired of constantly finding these when talking to people:
http://en.wikipedia.org/wiki/Fallacy
http://en.wikipedia.org/wiki/List_of_fallacies
Wednesday, June 6, 2007
More Monkey^wTemplate Magic
From Bjarn's paper here.
Same idea as before, but perhaps more clear.
template <bool b, class X, class Y>
struct if_ {typedef X type; };
template <class X, class Y>
struct if_ <false,x,y> { typedef Y type; };
void f() { if_<sizeof(foobar)<40,Foo,Bar>::type xy; }
Apparently, template programming is Turing complete.





