Office Setup

I seem to remember talking about this already but I’ve further upgraded my man-cave to new levels of geekiness. I know have two 26″ screens that I’ve wall mounted just above my desk (keeps them in the same position regardless of all the clutter on my desk.)

Currently I’m running OS X on my right screen and Windows 7 on the left. I use Synergy to share mouse/keyboard commands so it feels like one continuous background. I’m mostly using OS X still but the new machine has 6GB of RAM which gives a lot of breathing space if the Mac gets bogged down.

What I’d like to do is switch out my aging Logitech system with two simple monitor speakers — I still haven’t decided what make/model to get but they have good stuff for pretty cheap. I’ll plan on mounting these on a small shelf along with all the hard drives and accessories that I have. If that all works, I could simply get rid of the desk and bring the leather chair from downstairs. Should be a nice setup.

I have visions of punching a hole behind the monitors and making an in-wall rack that I can use to store my rather large 4U case. The wall there backs into the garage rafters and there’s quite a bit of room. Ventilation and cooling would be an issue but I’m sure I can come up with something that works well.

What’s your work/play area set up like? I’ll post any pictures I receive…

, , ,

2 Comments

Ice and Keeping Warm

We’ve been having some icy weather of late. The frosts have been beautiful — much heavier than usual. Some of these last few days have just been gorgeous. Cold, crisp, but wonderfully clear!

Most of the plants are holding up well. With the exception of the new maple sapling and the new rhodedendron which our new puppy Jack 2.0 has decided to eat. I think they’re goners.

In order to keep Jack warm, I made a dog house. The design is pretty simple, should be big enough for him even when he’s full-grown and as a plus, it’s insulated. It’s not the prettiest thing inside but my woodworking skills are pretty rudimentary. I did get a new DeWalt Jigsaw (which works great). I was amazed by just how much this thing weighed… It’s heavy enough that I really need a hand-cart to move it around. I suppose that’s good — the boys and the dog won’t be able to move it around. The walls are about 2 inches thick — outer hardi-plank, 1″ foam insulation, and 1/2″ plywood sheathing inside. I was able to use a lot of scraps that I had. I think the total cost was under $100.

I made it to match the house so at least it fits in nicely with the yard. The roof is done pretty poorly. I actually have enough to put on a second layer of shingles (which would probably help keep it dry) but I got lazy and decided to wait and see what Jack does to this before moving on.

,

2 Comments

Graphs

Gotta love ’em.

,

No Comments

Google Public DNS

network wiringGoogle today announced that they’re providing a high-performance public DNS server. This sounds like a great idea from a performance perspective … I’ve not had too many complaints with my DNS servers provided by Comcast but I’ve definitely had some issues at my work with slow/non-responsive DNS servers.

However, I suppose this is just one more thing that can go wrong. Now there’s one BIG target to attack and if someone happens to poison the cache, we’re all in a world of hurt.

I do plan on updating my home router though to start using this. I’ll post a follow-up with my review.

From: Official Google Blog: Introducing Google Public DNS.

Update: They’re definitely taking security very seriously. Some more info can be found here that’s quite helpful.

, ,

No Comments

Types of People

Found this in some notes from a while back (I believe it was at a series of classes at Faith):

VRP – Very Resourceful People
These people IGNITE Spiritual Passion (Mentors)

VIP – Very Important People
These people SHARE Spiritual Passion (Peers)

VTP – Very Trainable People
These people CATCH Spiritual Passion (Proteges)

VNP – Very Nice People
These people ENJOY Spiritual Passion

VDP – Very Draining People
These people SAP Spiritual Passion

(If someone knows the source I’ll post it — I can’t remember)

, ,

3 Comments

Scuttle Firefox extension

I use Scuttle on my server (for storing bookmarks). The beauty of the solution is that I have a centralized repository of bookmarks (which isn’t too special considering that many services provide this feature) but in addition, it’s very nicely set up to server as Live Bookmark lists in Firefox. So for example, I can have a single Live Bookmark drop-down for all work-related links, or all my “daily” websites or whatever and automatically add and remove from them as I see fit. The Live Bookmarks mean that all I need to do to reorganize links is retag them and it’s instantly working on all the computers I have.

It’s handy. But there’s a problem. The Firefox extension for Scuttle isn’t really being maintained. It’s pretty simple but needed a new “max firefox version supported” string in the configuration. I’ve updated this and am now posting the unofficial 0.4.2 release of the Firefox Scuttle plugin with support for Firefox 3.5+.

Install Firefox Extension for Scuttle 0.4.2

, , ,

No Comments

Unicorns?

I don’t know how many people reading this may know, but you can use Google as a calculator. Doing a search for “4 * pi” will in fact return a special “first result” that is the calculation. This is handy as it also does unit conversions like in order to convert 22 km to furlongs. There are some easter eggs though, and this is definitely the best: number of horns on a unicorn. Maybe it’s just me, but this is incredibly funny to me.

I’ve been playing with the very impressive WolframAlpha and wondered if they had done anything similar. Sure enough “number of horns on a unicorn” return the expected result. Even more amusingly, my second guess, number of horns on a horse shows that they really having some fun:

Number of horns on a horse

,

1 Comment

Yikes

It’s been a month again without any updates. I’m not good at this blogging thing. It’s difficult because I think I haven’t defined my purpose very clearly. From my second blog entry way back in January 2005, I said that I would have this site “chronicle my hobbies” and might also include “items that I find amusing”. I feel a little cheap simply rehashing the million-and-one sites out there that have funny things on them so I tend to not include unless I find them extremely funny and I think that my blog readers likely won’t see the source site. With regards to my hobbies, it’s hard because my availability for hobbies ebbs and flows so when I’m not posting it’s usually because I’m not doing much.SMile

The thing I find funny about that original post is that I said: I know [my blog topic] is not original, but then again not many people are interested if your hobby is photographing sumo wrestlers.”

I think in fact that I would have more visitors if I had chosen sumo wrestler photography. I would have a very real chance of becoming the biggest, most popular sumo wrestler photography site. It would be part of that “long tail” that may not be as popular overall but with global availability could dominate the niche.

The problem with talking about just my hobbies and things that I find funny is that everyone does this and although it’s more interesting than journaling my diet (hey, that’s what Twitter is for!) it’s not terribly thought provoking. I don’t have a budget in cash or time to do anything that’s too thrilling or novel so I’m mostly just talking about my little 25 minutes of coding adventure in Groovy or my weekend of wiring the house (which I just did this last weekend!)

So I’ve decided to branch out. I think two things would help. First: posting more regularly. I need to get in the habit of posting at least every other day. That’s a lot of posting, but when I’m busy, I will content myself with rehashing other sites that I’ve read and digested. I usually have thoughts about posts on Coding Horror or similar sites and could easily indulge in 20 minutes of logorrhoea and save Sarah from having to hear me talk about some software methodology and why I think it’s terrible/wonderful.

So that’s the attempt. More posts, more content, less junk, less stuff about boring hobbies.

, ,

No Comments

C++ from Python

I was impressed today to see how easy it was to call a C++ DLL from Python. I got the following information from another site:

1. Create a file called dlltest.cpp and write a function that sums two numbers and returns the result:

      //dlltest.cpp
      #define DLLEXPORT extern "C" __declspec(dllexport)
 
      DLLEXPORT int sum(int a, int b) {
          return a + b;
      }

The extern “C” construct tells the compiler that the function is a C function. It also removes the decorations from the functions names in the DLL.
__declspec(dllexport) adds the export directive to the object file so you do not need to use a .def file.
2. Include the header of the function in dlltest.h:

      //dlltest.h
      int sum(int, int);

3. Create a new Dinamic-Link Library project and include the two files, compile, and create the DLL.
4. You can now use Dependency Walker to see the list of the exported functions. You should see here the sum function.
5. Move the DLL in the Python folder or use

      >>> import sys
      >>> sys.path.append(r"C:\path\of\dll")

to include the DLL folder in the list of Python folders.

6. Use the ctypes module to access the DLL:

      >>> from ctypes import *
      >>>mydll = cdll.dlltest
      >>> mydll

Note: ctype module is already included from Python 2.5. If you are using an older version you can download ctypes here.
7. Now call the function:

      >>> sum = mydll.sum
      >>> sum
      <_FuncPtr object at 0x0097DBE8>
      >>> sum(5, 3)
      8

Reposted from here… (Thanks!)

I need to get into Python more — I’ve used Ruby a bit but have tended to ignore Python simply because I’ve not seen it is needed. Evidently, I need more side projects.

,

No Comments

Google CTemplate

I just realized that I reinvented the wheel a month or so… I had a need for a nice templating language and although I did look for a solution that already existed, I didn’t look hard enough. Google CTemplate is exactly what I wanted. My solution was basically to create this from scratch while ignoring all the complexities that I thought I wouldn’t need. The result works (and may even be faster) but it feels clunky and it’s not very flexible. You learn something new every day. Maybe with Rev2 of our release I’ll start using this — it certainly would be easier and the API is already documented.

From their website:

Here is a simple template file:

Hello {{NAME}},
You have just won ${{VALUE}}!
{{#IN_CA}}Well, ${{TAXED_VALUE}}, after taxes.{{/IN_CA}}

Here is a C++ program to fill in the template, which we assume is stored in the file ‘example.tpl’:

#include <stdlib.h>
#include <string>
#include <iostream>  
#include <google/template.h>  
int main(int argc, char** argv) {
  google::TemplateDictionary dict("example");
  dict.SetValue("NAME", "John Smith");
  int winnings = rand() % 100000;
  dict.SetIntValue("VALUE", winnings);
  dict.SetFormattedValue("TAXED_VALUE", "%.2f", winnings * 0.83);
  // For now, assume everyone lives in CA.
  // (Try running the program with a 0 here instead!)
  if (1) {
    dict.ShowSection("IN_CA");
  }
  google::Template* tpl = google::Template::GetTemplate("example.tpl",
                                                        google::DO_NOT_STRIP);
  std::string output;
  tpl->Expand(&output, &dict);
  std::cout << output;
  return 0;
}

No Comments