Jul 212012

The rsync utility has a lot of great uses, such as keeping servers in sync with one another, but sometimes you want it to run unattended. So how do you securely and automatically sync between servers?

Because rsync and ssh work so well together, it’s easy to set up an encrypted, rsync-only link. There are a few different pieces that have to be put in place, so be sure to follow along closely.

First, understand that the method I’m describing is a “pull” rather than a “push”. The backup server connects to the production server to pull the most recent copies of the files. I prefer this method because it reduces the attack surface of the backup servers – they don’t need to accept ssh or rsync connections. They only need to connect to ssh on the production servers. The production servers are also well protected from outside/malicious ssh connections, as you’ll see below.

Continue reading »

Jun 022012

In the HPC industry, it seems that history is always doomed to repeat itself. The CPU isn’t fast enough, so we add a co-processor to handle the really serious calculations. Then process technology improves, we can fit more transistors on a chip and the co-processor is moved onto the CPU die.

For the last half-decade, we’ve been in the midst of this cycle. Researchers realized that graphics cards (GPUs) were basically huge vector processors. Why make a couple CPU cores churn away on the math when the graphics card has a couple hundred cores? Thus we have General-Purpose GPU computing (GPGPU). Some have resisted this trend, but a lot of very serious scientists and institutions are using GPUs extensively. Like many cutting-edge technologies there is constant change and it takes more effort to get everything working, but these co-processors offer significant benefits.

I wasn’t really around for the previous batch of co-processors in the 1980s, but it’s clear that this time there is more at stake. Multi-billion dollar corporations (with billion-dollar R&D budgets) are building the co-processors. Astronomers, biologists, physicists, chemists, doctors, surgeons, mathematicians, engineers, and bankers are taking advantage of the performance. The fields of data analytics and computational modelling are serious business. Some in the life-sciences fields are calling them the “computational microscope” because they offer so much potential.

Continue reading »

Mar 182012

Today our son’s 26-year-old uncle passed away. When he heard the news he responded, “That’s ok…I can still dream about him.”

As adults, we are expected to understand the world and have the capability to handle any situation. But on the subject of death we are all no more than children.

Feb 032012

Procedurally generated content is a fairly large movement at this point. The most prominent, recent example is probably Minecraft, which relies heavily upon computer algorithms to generate the world and events in the game. There’s no cubicle farm of artists churning out Minecraft landscapes.

To a large extent, we have Ken Perlin to thank for this. Ken was awarded an Academy Award for the invention of Perlin Noise during the production of the film Tron. His name is now ubiquitous, but unfortunately the algorithm which bears his name is dated. Ken published a paper in 2002 describing the drawbacks of Perlin Noise and introducing a new algorithm. Many references to this algorithm confusingly call it Improved Perlin Noise, but it is actually named Simplex Noise.

It seems many developers start searching for noise functions and don’t know which to use. Thankfully, Simplex Noise is a suitable replacement to Perlin Noise in almost every way: the noise is cleaner, less computationally expensive and easier to implement in hardware (if desired). Unfortunately, with all the confusion on the web it’s hard to find a good implementation and impossible to find documentation.

Continue reading »

Jan 272012

Maybe you’ve had the experience of retrofitting your computer to operate quietly? Afterwords you say to yourself, “How did I ever think with all the noise that computer was making?” A small change in your environment creates a shift in your thinking and productivity.

I had the same reaction to the Sublime Text editor. After an hour of use I was loving it. A couple hours later it was customized just the way I like it. The next day I realized I was spending more time getting good code written and less time fiddling around.

Screenshot of Sublime text editor

Sublime doesn’t have every feature possible, but it does have some imaginative features such as multiselect/multi-edit. Linux, MacOS and Windows are supported. A vi mode is available. It’s also incredibly clean and fast. You’ll love the way it looks and feels.

There are all sorts of options for customizing the editor. Many plugins are available and it’s easy to write you own. You’ll also find plenty of assistance in the forums. It seems Sublime is going viral within the developer community.

Jan 122012

I just ate at Così and realized I’m sitting next to Dries Buytaert, the founder of Drupal. The world is a small place sometimes.

Remember, even the greatest humans of all time were just people. You can be great, too, if you work. And with a little luck at the right time, you can be amazing.

Dec 072011

I like to have the option of playing music on my headphones or outputting to the stereo – it really improves family life when they don’t always have to hear my dubstep ;) Unfortunately, the sound cards and devices you have available don’t always fit together nicely. For Linux users, ALSA gives you a lot of control and flexibility over audio devices. However, it is usually difficult to figure out exactly what needs to be done to output to multiple audio devices.

In my case, I have an onboard audio device with optical digital out. But onboard audio usually receives a lot of noise from the rest of the components on the motherboard – your headphones buzz when a hard drive seeks or you move your mouse pointer. I have broad musical tastes and orchestras sound pretty awful with static in the background. By adding an old-school Creative Labs SoundBlaster Live card, I can get exceptional quality output for headphones.

What caused difficulty was getting audio output to both the onboard and SoundBlaster audio devices at the same time. By default, Linux applications will send audio directly to one specific device. All you need is a properly structured ~/.asoundrc file to configure ALSA.

Continue reading »

Nov 202011

I have read rumors that certain shared web hosting providers assign more than 1,000 users to each of their servers. This implies that the servers will be grossly overworked and the service will be slow. However, you never really know what you’re going to get with a new host, because such numbers are never published. You won’t see the sales pages for Godaddy and Dreamhost list service descriptions as One 8-core Opteron processor, 16GB memory and one 2TB hard drive with 2,000 user accounts per server. Unfortunately you won’t find anything like that on AN Hosting’s pages either, but I did a little sleuthing and have more details for you.

Continue reading »

Oct 212011

Fusion is the physical process in stars which generates energy. Incomprehensible amounts of pressure and heat covert hydrogen into helium. It is the engine which drives the universe, but it does create a fair bit of nasty radiation.

Cold fusion is based on the theory that energy may be created in a more controlled fashion. The goal is to generate a smaller amount of heat without all the dangerous behavior which occurs inside a star. Unfortunately, the field of study was ruined in 1989 by some irresponsible geniuses and a lot of crackpots.

Since then, a small number of respectable scientists at NASA, NRL and the DOE have studied these types of reactions. To avoid crackpots, they have termed their research as Low Energy Nuclear Reactions (LENR). Although they have not discovered any magical formulas, there has been enough progress to justify continued funding.

In early 2011 an Italian physicist, Andrea Rossi, announced that he had created a functioning device. It generates a good deal of heat by converting nickel into copper. This heat may be used directly as a furnace or to generate electricity through steam turbines (the same way coal and nuclear power plants operate). There have been a number of demonstrations for technical audiences and a major trial will be run on October 28th. If Rossi’s Energy Catalyzer (e-cat) device is real, energy will become more-or-less free.

Continue reading »

Oct 182011

I’m giving a lightning talk at the Boston Python User Group this week. The presentation is very short, but provides a 5-minute overview of why an object-oriented design may not be ideal for game development. None of these are my own ideas – I’m simply passing along the wisdom of much wiser (and larger-scale) game developers. Object Oriented designs have caused them much pain in the past, so they’ve come up with a better scheme: Entity Systems.

Entity Systems provide more flexibility (for the developers and the game designers) and higher performance. The end goal is a design that is easier to create and much easier to modify.

Continue reading »