From Ben's Writing

Jump to: navigation, search

The following is my attempt to lead a more public life. Not because I think I'm so interesting that anyone will care about the all the same things I find interesting, but rather that one person might find something I have contemplated interesting as well. Maybe doing this will help remove the onus of research on the topic from them. Maybe they will be able to correct a thought I've had. In the worst case, it'll just be a place I can come back to and rediscover the things I've thought about in the past.

Maximum number of open file descriptors on OS X

Having to test load on a server, I ran into issue w/ the number of open file being high. These limits, though not recommended in practice, can be lifted with the following:

$ sudo sysctl -w kern.maxfilesperproc=65536
kern.maxfilesperproc: 4096 -> 65536

$ sudo sysctl -w kern.maxfiles=65536
kern.maxfiles: 8192 -> 65536

$ sysctl -a | grep files
kern.maxfiles = 65536
kern.maxfilesperproc = 65536
kern.maxfiles: 65536
kern.maxfilesperproc: 65536
kern.num_files: 3033

About Me

I've been using computers as long as I can remember. I broke, then fixed my first computer at the age of 7. I've been hooked ever since.

It has been a long while since I concentrated strictly on the internals of machines. I became fascinated with software construction at age 10, after joining a school computer club. We learnt how to use our trigonometry lessons to make something happen on the screen. It was never fast, or even pretty, but it is was fun translating otherwise dry memorization exercises in to something tangible.

I have since stopped keeping up with the latest hardware releases. Instead, I focus on the architecture I am currently targeting. Despite not attending to the latest trends in consumer hardware, I still keep myself informed about larger trends or shifts in hardware design. I am currently particularly interested in multi­ and many­core systems: from how their cache and register memory is arranged, what new concurrency primitives the core supports, all the way to how they shepherd bits between cores and even other physical CPUs.

I've been developing software professionally for almost 17 years. I've written critical systems­level code; database applications; elaborate, native and aesthetically pleasing graphical user interfaces; highly parallel and distributed systems; as well as basic utilities to help myself and others close to me perform everyday task more pleasantly. Many of these projects have been developed using a variety of languages and a diverse set of tools. The remaining ones were written in C.

I prefer to use stable languages and mature tools for "production" code. However, experimenting with new languages and novel tools for small projects is something I continue to do often­­for better or worse. Ultimately though I like writing: I like writing code, I like writing about code, I like writing documentation for code, and I really like writing tutorials on how to use code. The latter two tend to suffer the most when I am busy, but only because it is usually the part that requires the most care to get correct. As far as I can tell, there are no automated tests for good explanations.

Enable AirDrop on Unsupported Macs

Here is a simple one-liner to enable AirDrop over unsupported Macs running (Mountain) Lion

defaults write BrowseAllInterfaces -bool true

VMWare Fusion NAT

This document is based on VMware Fusion 4.1.3 (730298). It's based on a post on Michael McLaughlin's Technical Blog.

→ continue reading...

Making a Power Mac G5 use one CPU

This one is really quite simple: First, boot into Open Firmware by holding down Cmd-Opt-O-F

   0 > setenv boot-args cpus=1
   0 > mac-boot

Letting the online seller to give you a discount

This post my have been better titled: "Getting [an] online seller to give you a discount." But that would imply there are stores that will out right bargain with you, I don't know first hand if there are many. However, you can test If the company is willing to bargain by cancelling an order proceeding some distance between the time you start enrolling in their online program, but then later thought better of it, and canceled. This seems to be a common way for advertisers to get your business, if you fail to enter user data for registration, they send you a discount code, as an incentive to come and fill in the form. They are effectively paying you for the time it takes you to give them your personal information, which is where they can extract a lot of revenue.

→ continue reading...

Blind (or double) SSH hops

In a previous post, I wrote about using a simple load balancer to find a suitable remote machine to connect to via ssh. The intention was to simplify getting access to a workstation in my office. Unfortunately, none of my office machines are public facing, so they require a second hop once I've logged in to the public machines. This can get a little tiresome to type if you end up working remotely a lot, like I do.

→ continue reading...

First phone based manipulation

I am surprisingly easy to manipulate apparently. Not for malicious intent, which is fortunate, but the outcome of it still felt abusive in some way.

→ continue reading...


I've realized that I have been so sucked in to Reddit that I've actually had to go out of my way to fill the front page I get displayed with mostly pictures and a dozen article links. Further, I only allow myself to read whatever is on the front page after which my time is up. I almost went on to Reddit just to post this. It's that bad.

What got me interested in Computer Science

Some one recently asked me what first got me interested in Computer Science. I had a bit of a hard time coming up with a good answer.

→ continue reading...

A Speculative Memoir

I started writing this is 2007, and I'm surprisingly not to upset at how it started. It's only a small portion of the text, but it seemed worth having in a place that is easily accessible. Keep in mind it needs some serious editing.

The story is about me, many years from now. By then my family and wife have left me, and I’ve gained over 800lbs and grown rather fond of KFC. Well, fond does not quite describe my new found affection for the food. If you’ve ever seen the Seinfeld episode where Kramer gets hooked on the bird, then you only have an inkling of what I’m referring too.

My new addition get so bad that I stop even bothering to bathed or even wash my, what have then become paws, between meal, so my entire house hold slowly becomes coated with a thin to medium coating of grease and honey mustard meddle.

→ continue reading...

Once, In Belize

I remember a time in Belize, we had just finned a hike. We were starving, hot and exhausted. On our way back down the trail we saw a sign to a waterfall. We weren't convinced it was a great idea, but we figured we'd likely never be back, so it would be best to see it while we could. It probably took us 20 minutes longer than the 10 minute trail hike to get there, but what we found made up for it all. I am not sure if you have jumped in glacier water, but that is how cold the water felt. I think I recall wondering if my body was going in to shock. Fortunately that passed, and the hunger and exhaustion disappeared as we found different ways to jump in and through the water fall. The water was poring over so swiftly, and from such a hight, it felt like you were being hit with very large and very cold rubber mallets. After we go out, all the pains from before returned, but I think it was the best part of the trip. (And this is compared to snorkelling for hours on the reefs.)

Getting an Acer Aspire One (722-BZ610) to run Linux

I just got my hands on a new (to me) Acer Aspire One (722-BZ610). It's a nice little 10-11 inch netbook with a rather interesting CPU. Actually, it's an APU: it is a CPU and GPU combination. Anyway, before I could working on running experiments on it, I needed to get it to run Linux. Surprisingly, given the state of most modern Linux distributions, there were a number of frustrating issues that came up during the configuration of the new machine.

→ continue reading...

Force Mail to Display All Messages as Plain Text

For one reason or another, I've grown used to viewing my email in plain text, and having to continually subject myself to other people's idea of a good font is irksome, to say the least. I've had my system configured to hide all the jazz from me for sometime, but I have no refenrece for how I did it originally. It seems the simplest method to put this in effect is:

$ defaults write PreferPlainText -bool TRUE

Restore alternate-click in OS X Lion

The new track pad options in OS X Lion (10.7) do not allow for Snow Leopard's classic two-finger plus button click combo as a right-click. Running the following from the shell will enable it:

 $ defaults -currentHost write -g -bool YES

The best quality LaTeX is made with Rubber

Well, that may be overstating the point, but it makes for a good title. I ran in to this tool today, just by chance. Rubber handles everything for building LaTeX documents.

→ continue reading...

Addressing threats to Canadian an US security, or: How I learnt to feel concerned about the misuse of personal information on Canadian citizen

"The Declaration on a Shared Vision for Perimeter Security and Economic Competitiveness is based on principles that recognize and respect our separate constitutional and legal frameworks that protect privacy, civil liberties, and human rights. It also recognizes the sovereign right of each country to act independently in its own interest and in accordance with its laws.


Collaborating to address threats before they reach our shores, we expect to develop a common understanding of the threat environment through improved intelligence and information sharing, as well as joint threat assessments to support informed risk management decisions."

Go here to voice your opinion.

→ continue reading...

Writing online

As much as I like writing, blogs and wikis, I wish the whole mess was a lot more unified. As much as I fight the Facebook urge, I love sharing things with people, and having to do it manually each time I write something is tiresome. Maybe we'll have another rainy Sunday and I can sit down and connect this thingamabob to Facebook, so I don't have to push the updates manually. Should I really be publicly advertising that I have so little a life that I'd welcome a rainy day after so many months of snow. Yes, I guess I should be; maybe it's a cry for help.

Help! I have no social life!

Naw, just kidding, I'm ok.

Dynamic link libraries and grids

It seems natural to have an error at the OS level, when a dynamic link library is missing. If the library is not on the machine, or not in the search paths, then of course the executable cannot be run. But this style of feedback does not scale well.

→ continue reading...

Last time on...

I was thinking the other day---odd, I know---that it might be nice if the video game industry paid closer attention to the needs of their aging players. As much as I hate to say it, my memory---if it ever was worth anything---is starting to fade. For years TV shows have been kind enough to remind me of the critical details in the stories plot so far, but video games still have me resorting to writing notes, so as not to loose any precious clues. I'm not saying they need to add a full highlight reel, but it would be nice if they gently reminded me of some of the things I previously did in the game that might be relevant to my current position.

→ continue reading...

« newest ‹ newer 20 ... oldest »
Personal tools