Monthly Archives: May 2008

ReproducibleResearch.org

I started a new web site this week, http://www.reproducibleresearch.org, to promote reproducible research. I’d like to see this become a community site. Depending on how much interest the site stirs up, I may add a blog, a Wiki, etc. For now,

Tagged with:
Posted in Software development, Statistics

Porting Visual C++ code to Linux/gcc

Here are a few lessons learned from porting a numerical library recently from Windows/Visual C++ to Linux/gcc. Some of our code only runs on Windows, and only needs to run on Windows. Our first thought was to put #ifdef WIN32 directives around

Tagged with: , , ,
Posted in Python, Software development

PowerShell script to make an XML sitemap

A while back I wrote a post on how to create a sitemap in the standard sitemap.org format using Python. This post does the same task using PowerShell. The solution presented here is an ideomatic PowerShell solution using pipes, not

Tagged with: ,
Posted in PowerShell

Reproducible scientific computing

Greg Wilson gave a great interview on the IT Conversations podcast recently. He says the emphasis on HPC draws time and energy away from quality concerns, and may not even help scientists get their results faster. While some problems definitely require HPC,

Tagged with:
Posted in Software development

Diagramming modes of convergence

Sometimes a good diagram is a godsend, reducing the entropy in your head at a glace. When I was studying integration theory, I ran across a diagram something like the following in the out-of-print book Elements of Integration by Robert G.

Tagged with: ,
Posted in Math

Uninitialized variables in PowerShell

I just got a bug report about an uninitialized variable in a PowerShell script I’d written. I’d gone through and renamed most instances of a variable, but not all. If I’d put Set-PsDebug -strict in my profile, the instance I

Tagged with:
Posted in PowerShell

Custom search engines

I added a Google custom search engine to my web site this weekend. You can always get Google to limit it search to a particular domain by starting your query with site:domain, but custom search engines are more convenient and more configurable. You

Posted in Uncategorized

Managing passwords

When everything you do requires a different password, how do you keep up with them all? The most common solution is to use the same username and password in as many contexts as possible. Not only is this ill-advised, it’s

Posted in Computing

Transactional memory

The IT Conversations podcast carried a by Simon Peyton-Jones entitled Transactional Memory for Concurrent Programming. The best programmers find concurrency hard and the rest find it impossible. And yet concurrency can’t be avoided if we’re going to take advantage of multiple core

Tagged with: ,
Posted in Software development

Plane crashes, software crashes, and business crashes

I’ve run into the same theme in very different contexts lately: people ignore data from crashes. FlowingData has an article today claiming that, contrary to popular belief, some parts of an airplane are safer than others.  According to the article, pundits

Tagged with: ,
Posted in Business, Software development

Rounding and integer division in PowerShell

The way PowerShell converts floating point numbers to integers makes perfect sense, unless you’ve been exposed to another way first. PowerShell rounds floating point numbers to the nearest integer when casting to int. For example, in PowerShell [int] 1.25 evaluates

Tagged with:
Posted in PowerShell

Barriers to good statistical software

I attended a National Cancer Institute workshop yesterday entitled “Barriers to producing well-tested, user-friendly software for cutting-edge statistical methodology.” I was pleased that everyone there realized there is a huge difference between code created for personal use and reliable software that others

Tagged with: , ,
Posted in Software development, Statistics

Customizing the PowerShell command prompt II

I just picked up a copy of Windows PowerShell Cookbook by Lee Holmes. One of the first examples in the book is customizing the PowerShell command prompt. His example sets the command window title as part of the prompt function.

Tagged with:
Posted in PowerShell

Customizing the PowerShell command prompt

By default, the PowerShell command prompt does not echo the current working directory. To customize the command prompt, simply create a function named prompt. If you want this customization to persist, add it to your profile. For example, adding the

Tagged with:
Posted in PowerShell

Jenga mathematics

Jenga is a game where you start with a tower of wooden pegs and take turns removing pegs until someone makes the tower collapse. A style of mathematics analogous to Jenga reached the height of its popularity about 40 years ago

Tagged with: ,
Posted in Math