Archive for category Geekiness

Recursion

So what happens when your can of WD-40 is left out too long and the trigger gets stuck and won’t stop spraying? Spray it with some WD-40?

Did you know that WD-40 stands for “Water Displacement – 40th Attempt”? Thanks Wikipedia!

1 Comment

Price Tracking

Price tracking can be confusing online. Retailers  like Amazon and Newegg (two that I buy from frequently) seem to sometimes change their prices daily. One expects prices to drop over time but this doesn’t always happen. I was surprised to find that prices for Solid-State Hard Drives have actually been rising recently (although the real deals appear to have been back in October/November). Thankfully there are some tools that can help. One of them is the Camelizer — a Firefox plugin. Alternatively, you can access the same data at the website camelcamelcamel.com (for Amazon) and camelegg (for Newegg). The same group also tracks prices at BackCountry, Best Buy, OverStock.com, and Zzounds,

Here’s an example of one of the SSD’s that I’m interested in:

In this digital age it’s nice to have something that keeps some history around. It’s easy to get information these days but it’s always easy to change information (which is why I’m also a big fan of the WayBackMachine — check out the original Google page!) We don’t keep coupons, flyers, or catalogs anymore, we just remember the website.

Anyone experience this sort of problem?

, , ,

No Comments

Happy New Year

It’s 2010 everyone! It’s ridiculuous how fast 2009 went by. I have high hopes for the year. We’ll see how things go…

1 Comment

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

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

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