SciBlogs

Posts Tagged programming

Structured procrastination, 2 Dec 2012 Grant Jacobs Dec 03

1 Comment

Another edition of my irregular structured procrastination reading lists – have fun exploring these. (Geekier ones nearer the end.)

Sci-fi movie

Geneticist Ricki Lewis offers a review of Jim, which she says is more compelling than GATTACA. The movie can be viewed on-line. (If you watch it, let me know what you think.)

Gene-based dating

You think gene-based dating in sci-fi? It’s already with us. See also this twitter conversation. (There’s also a service that matches dates by their dogs.)

Read the rest of this entry »

Finding a long-lost treasured item Grant Jacobs Apr 20

1 Comment

Media loves those romantic, emotionally appealing, stories of someone rediscovering their favourite lost toy or book from their youth. What if that favourite thing was the computer source code of a project you put your all into?

This story could win a geek’s heart. Jordan Mechner, writer of the early graphical computer game* Prince of Persia, gets sent a box by his Dad. In the box is a 5¼” floppy disk containing the original source code, something though he’d lost. A trans-continential flight over a weekend, others’ work on hardware setup to read the disk, ensue – it’s a saga.

It’s all on his blog – read it, he writes well, recounting the arrival of the box and a post-event exploration of ’why?’ ArsTechnica also has coverage.

Aside from the story itself, some of the technology appeals to me. Read the rest of this entry »

The software developer’s generalisation dilemma Grant Jacobs Nov 12

4 Comments

xkcd nails it :-

I find when someone's taking the time to the right in the present, they're a perfectionist with no ability to prioritize, whereas when someone took the time to do something right in the past, they're a master artisan of great foresight.

I find when someone's taking the time to the right in the present, they're a perfectionist with no ability to prioritize, whereas when someone took the time to do something right in the past, they're a master artisan of great foresight.

It’s the classic dilemma, isn’t it.

Faced with coding a new bit of functionality, do you write the version that solves only your immediate problem or do you think ahead and try cater for future, more varied, uses too?

Perhaps you want to find that middle ground; lay it out enough that the opportunity for future generalisation is documented well enough and sufficiently in place so that you can move on in peace, having noted the opportunity and laid the tracks for future development without having expended too much effort.

Read the rest of this entry »

The coders’ quotation quandary Grant Jacobs Oct 31

6 Comments

Seen on twitter:

Coders are special. ’We are expected to know how to do things we’ve never done before and estimate how long they will take.’

Offered to readers with no comment.

Paypal’s massive error, hex and nybbles Grant Jacobs Sep 20

6 Comments

(A little light computing entertainment for general readers.)

Seen recently on an on-line bookseller’s news updates:

Paypal has a global problem where for some customers the ‘$’ in their email confirmation is being replaced by ’24′. For example if you purchase something for $19.99, your paypal email will say you have purchased it for 2499.99.

There is no need to worry however as you have been charged the correct amount. Paypal engineers are working to fix the problem.

Ohhhhh… some people are in for a shock!

Computer geeks–programmers, at least–will instantly spot the problem.

Read the rest of this entry »

Research project coding v. end-user application coding Grant Jacobs Jul 27

8 Comments

Hurtling around around the tubes have been links to John Cook’s excellent short article Software exoskeletons. Relayed on some with legions of followers, it will have been widely read.

John contrasts the programming styles and objectives of two camps: ’There’s a major divide between the way scientists and programmers view the software they write.’ I encourage readers to read his piece; it’s short and well worth the thoughts it raises.

I’d like to offer a few thoughts on what he’s written.

In particular, I’m left thinking that this comes back to talking with others and thinking ahead as you design a project, before you get into the meat of it.

If an aim is to spin off an end-user application ideally this wants to be recognised and built into the project from the onset, so that the coding approach used reflects that the code later intends to be part of an application.

Read the rest of this entry »

Literate and test-driven programming (in bioinformatics) Grant Jacobs Jun 01

3 Comments

PROGRAMMING and BIOINFORMATICS: Literate and test-driven development, especially for data-processing projects.

One of my concerns about bioinformatics (or computational biology) is the quality of the software efforts. As encouragement for thought on this, I’ve outlined below an approach I take for many of my projects.

"Code Monkey" (Source: wikipedia)

"Code Monkey" (Source: wikipedia)

When you’re running bulk data processing, it’s pretty hard to know if the code is really doing what it’s supposed to. It ends up being pretty much a black box, in cases even for the person who wrote the code.

One informal verification approach is to take some input data you are very familiar with and explore the output you get. While I recommend this, it isn’t terribly strong testing. You’re unlikely to put a lot of effort into it (let’s face it, we all only have so much time) and if you’re the developer you’re likely to focus on the same things that might have occurred to you whilst developing the code meaning you’re unlikely to test for ‘unexpected’ things, which is… after all… the whole point of testing.

What I’m leading to more is formalised approaches to testing code, regression tests in particular. In particular, I’m curious as to how bioinformatics developers are developing their code. I’d like to think, or at least wish, that most have formal testing as part of their development process, but then again you don’t see remarks about how the software was tested in most bioinformatics publications so how are we to know? (Were I the editor of a bioinformatics journal, I’d consider making it a requirement that the testing regime be explicitly discussed. Maybe that’d make me an overly harsh editor – ?!)

For some projects[1] my approach is a mix of sort-of literate programming and test-driven development.

Read the rest of this entry »

WWW database servers on Mac OS X 10.6.x, part III: managing the web server Grant Jacobs Mar 18

No Comments

PROGRAMMING/BIOINFORMATICS: Part III of a outline guide to setting a Mac OS X machine up for a web server database using Mac OS X 10.6.x, MySQL and Perl.

Originally intended as one long document, I have broken this into several parts. These instructions do not consider Mac OS X Server, which has a slightly different setup for MySQL. Part I covers installing MySQL. Part II covers installing the Perl modules to communicate with MySQL, setting up the first (empty) database and where to place your WWW files and scripts.

MySQL-logo

I’m not going to get into the details of tweaking config files and whatnot – the aim here is to offer a basic recipe that should work for most people without too much extraneous fluff which confuse a first-time installs. It’s a prescriptive outline rather than an detailed explanation.

I’m going to assume installing it on a client’s machine, i.e. you’ve no idea what it’s set up with.

Configuring Apache

Apache-feather

This section is a little geeky and may not be needed by many users. I’m including it as it gives a little insight in to controlling access to files and directories by editing the Apache config files. If you are going to develop web services you should at some point get to grips with configuring the server yourself.

Before providing users access to your web server, you might want to configure the access in ways that suit your purpose. This involves editing the Apache configuration files.

This gives you finer control of access and effectively provides a second layer of control after the firewall access controls (these are described below).

Read the rest of this entry »

WWW database servers on Mac OS X 10.6.x, part II: installing the Perl modules Grant Jacobs Mar 17

1 Comment


PROGRAMMING/BIOINFORMATICS: Part II of a outline guide to setting a Mac OS X machine up for a web server database using Mac OS X 10.6.x, MySQL and Perl.

Originally intended as one long document, I have broken this into several parts to better suit my time. Part II focuses on installing the modules the Perl programming language requires in order to interact with the relational database, MySQL, and setting up the first (empty) database and where to place your WWW files and scripts. These instructions do not consider Mac OS X Server, which has a slightly different setup for MySQL. Part I covers installing MySQL.

MySQL-logo

I’m not going to get into the details of tweaking config files and whatnot – the aim here is to offer a basic recipe that should work for most people without too much extraneous fluff which confuse a first-time installs. It’s a prescriptive outline rather than an detailed explanation.

I’m going to assume installing it on a client’s machine, i.e. you’ve no idea what it’s set up with.

Installing perl database modules via CPAN

CPAN

CPAN is the comprehensive perl archive network, basically a collection of more perl modules that you could believe existed. Although you can manually download the modules and install them, it’s easier to run CPAN from the command-line perl, especially if you already know what modules you want to install.

Start up CPAN via perl:

perl -MCPAN -e ‘shell’

Read the rest of this entry »

WWW database servers on Mac OS X 10.6.x, part I: Installing MySQL Grant Jacobs Mar 16

3 Comments

PROGRAMMING/BIOINFORMATICS: Part I of a outline guide to setting a Mac OS X machine up for a web server database using Mac OS X 10.6.x, MySQL and Perl.

Originally intended as one long document, I have broken this into several parts to better suit my time. Part I focuses on installing the relational database, MySQL. (I may offer these instructions as a complete document once the series is complete.) These instructions do not consider Mac OS X Server, which has a slightly different setup for MySQL.

MySQL-logo

I’m also not going to get into the details of tweaking config files and whatnot – the aim here is to offer a basic recipe that should work for most people without too much extraneous fluff which confuse a first-time installs. It’s a prescriptive outline rather than an detailed explanation.

While this description is oriented at those intending to use the Perl programming language to interact with a relational database, with a WWW interface for users, this first part only deals with MySQL itself. I’m going to assume installing it on a client’s machine, i.e. you’ve no idea what it’s set up with.

Read the rest of this entry »

Network-wide options by YD - Freelance Wordpress Developer