Posts about programming

So What are Genetic Algorithms?

Genetic Algorithms: Cool Name and Damn Simple is a very nice explanation with python code of genetic algorithms.

What Can Genetic Algorithms Do?
In a word, genetic algorithms optimize. They can find better answers to a question, but not solve new questions. Given the definition of a car, they might create a better car, but they’ll never give you an airplane.

For each generation we’ll take a portion of the best performing individuals as judged by our fitness function. These high-performers will be the parents of the next generation.

We’ll also randomly select some lesser performing individuals to be parents, because we want to promote genetic diversity. Abandoning the metaphor, one of the dangers of optimization algorithms is getting stuck at a local maximum and consequently being unable to find the real maximum. By including some individuals who are not performing as well, we decrease our likelihood of getting stuck.

Related: DNA Seen Through the Eyes of a CoderEvolutionary DesignAlgorithmic Self-AssemblyThe Chip That Designs Itself

Read the Curious Cat Science and Engineering Blog in 35 Languages

I have added a Google gadget to the right side column of the Curious Cat Science and Engineering Blog that translates our blog into 35 languages. I have been proving a direct link to 6 languages, so this is a great increase in languages covered.

All that is required to add this capability to your site is add a short bit of javascript from the Google Translate gadget site. And as they add more languages that additional coverage will automatically be reflected on your site.

The usability of the Google translate is excellent, I think. If you are reading the translated page, say in Chinese, and you follow a link to another page on our site it translates that page for you automatically.

I hope you enjoy this new capability.

Related: Funding Google Gadget DevelopmentGoogle Offers $10 Million in Awards for Google Phone DevelopmentMarissa Mayer on Innovation at GoogleIs Google Overpriced?Javascript books

Rumors of Software Engineering’s Death are Greatly Exaggerated

Rumors of Software Engineering’s Death are Greatly Exaggerated by Steve McConnell

Indeed, one of the hallmarks of engineering as opposed to science is that engineers will work with materials whose properties are not entirely understood, and they’ll factor in safety margins until the science comes along later and allows more precision in the engineer’s use of those materials.

Software engineering already has been defined as engineering, we have an international reference standard for that definition, the field’s two largest professional bodies have jointly adopted a professional code of conduct for software engineers, we have accreditation standards for university programs in software engineering, we have university numerous programs that have already been accredited, and several countries are licensing professional engineers in software.

Related: Who Killed the Software Engineer?Is Computer Science a Science?What Ails India’s Software Engineers?Federal Circuit Decides Software No Longer PatentableA Career in Computer Programming

Open Source Abandoned by OLPC

Not Free at Any Price by Richard M. Stallman

When the OLPC appeared, it fell one step short of full freedom: the highly publicized wireless mesh network device, which allows OLPCs to connect to the Internet through nearby OLPCs, required a non-free program. This piece of non-free code prevented me from fully endorsing the OLPC. But that would not stop me from using one: I would just have to delete the non-free code and do without the internal wireless device.

The OLPC had practical inconveniences, too: no internal hard disk, a small screen, and a tiny keyboard. In December 2007 I test-drove the OLPC with an external keyboard, and concluded I could use it with an external disk despite the small screen. I decided to switch.

If you want to support a venture to distribute low-priced laptops to children, wait a few months, then choose one that donates MIPS-based machines that run entirely free software. That way you can be sure to give the gift of freedom.

He is more anti-microsoft than I am but I agree with this contention that what we should support is a open source solution to provide laptops to children around the world. It is a shame, I really liked the potential for OLPC. I still wish them success I just am not interesting in directly supporting that effort but instead would like an alternative open source solution.

The Sylvania Netbook is available from Amazon now with the Ubuntu operating system (linux version). I use Ubuntu and it is excellent.

Related: Will Desktop Linux Take Off?Lemote (fully open source laptop)13 Things For Ubuntuposts on UbuntuGreat FreewareOne Laptop Per Child – Give One Get OneOLPC’s Open Source Rift Deepens

Federal Circuit Decides Software No Longer Patentable

The Bilski Decision Is In: Buh-Bye [Most] Business Methods Patents

This was an appeal against a rejection of a business methods patent, and the appeals court has now agreed with the rejection. At issue was whether an abstract idea could be eligible for patent protection. The court says no.

Buh-bye business methods patents!

Court Reverses Position on Biz Methods Patents

The ruling in the case, called In re Bilski, largely disavowed the controversial State Street Bank case of 1998. There, the Federal Circuit opened the door to business method patents, which had until then been excluded from patent protection, by granting protection to a system for managing mutual fund accounts. The decision, according to its detractors — which included several members of the Supreme Court — had led to the issuance of weak patents and exposed financial services companies to high-dollar litigation over business method patents.

Related: Ex Parte Bilski: On the BriefsPatent Policy Harming USA, and the worldAre Software Patents Evil?Patent Gridlock is Blocking Developing Lifesaving DrugsThe Pending Problem With PatentsMore Evidence of the Bad Patent System

Problems Programming Math

Arithmetic Is Hard – To Get Right by Mark Sofroniou

I’ve been working on arithmetic in Mathematica for more than 12 years. You might think that’s silly; after all, how hard can arithmetic be?

The standard “schoolbook” algorithms are pretty easy. But they’re inefficient and often unnecessarily inaccurate. So people like me have done a huge amount of work to find algorithms that are more efficient and accurate. And the problem is that these algorithms are inevitably more complicated, and one has to be very careful to avoid insidious bugs.

Take multiplying integers, for example. The standard “schoolbook” long-multiplication algorithm uses n^2 multiplications to multiply two n-digit numbers. But many of these multiplications are actually redundant, and we now know clever algorithms that take n^1.58, n log n, or even fewer multiplications for large n. So this means that if one wants to do a million-digit multiplication, Mathematica can do it in a fraction of a second using these algorithms–while it would take at least a few minutes using standard long multiplication.

It’s not easy to get reliable numerical computation, and it’s not something one can “bolt on” after the fact. It’s something one has to build in from the beginning, as we’ve done in Mathematica for nearly 20 years.

Related: Who Killed the Software Engineer?Sexy MathFreeware Math Programs1=2: A ProofThings You Need to be a Computer Game Programmer

Ruby on Rails Job Opportunity

I, John Hunter, work for the American Society for Engineering Education (Information Technology Program Manager): my work on this blog is not associated with ASEE and the opinions I express are mine and not those of ASEE. That said, we are looking for a Ruby on Rails developer at ASEE, in Washington DC. So please apply, if you are interested.

I could list details but essentially we develop web applications using Ruby on Rails. We are seeking someone with the experience and skill to be an immediately productive member of a team working on rails applications. They will need to be able to code features with little supervision and follow ruby on rails and our coding conventions. Programmers are given responsibility but within our conventions – this has been something we have slipped on prior to moving to Ruby on Rails but now we are focused on doing this well.

We do have a senior Ruby expert so we do have a senior person to assign the most complex tasks to. We are very focused on following best practices in ruby and ruby on rails development. And we are very focused on creating applications that follow rails, and ASEE coding conventions in order to maximize performance and minimize life cycle costs. My experience indicates that as a programmer shows they can take on more responsibility they will be given more responsibility.

The ideal candidate will love Ruby on Rails. For those of you who are not programmers loving your job might seem odd. But a large number of those that develop using Ruby on Rails do. And those will fit in well. Those that don’t appreciate the beauty of Ruby code can still succeed in this position, but might feel out of step with how we work. Contact Keith Mounts or me if you are interested. We are looking to hire a permanent employee that will work in our office, but we may consider hiring a contractor that could work remotely on a 3 to 6 month project that we have recently started.

Related: Programming RubyHiring Software DevelopersIT Talent Shortage, or Management Failure?software development posts from the Curious Cat Management Improvement blogposts related to computer programming

Babbage Difference Engine In Lego

Building A Calculating Machine Using Lego Pieces by Andrew Carol

Before the day of computers and pocket calculators all mathematics was done by hand. Great effort was expended to compose trigonometric and logarithmic tables for navigation, scientific investigation, and engineering purposes. The larger efforts involved rooms of semi skilled people, called ‘computers’, capable of doing reliable arithmetic who would be under the direction of a skilled mathematician.

In the mid-19th century, people began to design machines to automate this error prone process. Many machines of various designs were eventually built but, the most advanced and famous of these was not. The Babbage Difference Engine.

Because of engineering issues as well as political and personal conflict the Babbage Difference engines construction had to wait until 1991 when the Science Museum in London decided to build the Babbage Difference Engine No.2 for an exhibit on the history of computers.

Babbage’s design could evaluate 7th order polynomials to 31 digits of accuracy. I set out to build a working Difference Engine using standard LEGO parts which could compute 2nd or 3rd order polynomials to 3 or 4 digits. I have built two generations of Difference Engines and am designing the third version now.

Related: Rubick’s Cube Solving Lego Mindstorms RobotLego Autopilot Project UpdateOpen Source for LEGO MindstormsDonald Knuth, Computer Scientist

Google Summer of Code Projects

Over the last three years Google Summer of Code has provided 1500 students from 90 countries the chance to work on open source projects. Each participant will receive $4,500 as a stipend. Student applications will be accepted from March 24th to March 31st.

Details on the software projects are available now. Given the short time that the application is actually open getting a start looking for projects that interest you might be wise. offers listings of science internships and engineering internships.

Related: Preparing Computer Science Students for JobsOpen Source for LEGO Mindstorms Open Source: The Scientific Model Applied to Programmingposts on fellowships and scholarships

Google Summer of Code 2008

Over the last three years Google Summer of Code has provided 1500 students from 90 countries the chance to work on open source projects. It also has provide some great software and software enhancements to the open source community. Google has increased their funding by another $1 million. Each participant will receive $4,500 as a stipend.

I don’t understand why they have such a short window of opportunity to apply – but this is how they do it every year. They are accepting applications from open source projects, to act as mentoring organizations, through March 13th. Student applications will be accepted from March 24th to March 31st. See Google’s announcement. offers listings of science internships and engineering internships.

Related: Preparing Computer Science Students for JobsIT Employment Hits New High AgainA Career in Computer ProgrammingHoward Hughes Medical Institute Summer Research JobsThe Joy of Workposts on fellowships and scholarships


Programming Dinosaurs - comic

Dinosaur Comics: “programming is for folks who are thrilled when a computer reminds them they’re missing a bracket or a semicolon

Related: A Career in Computer ProgrammingComputer Game ProgrammersWanna Play Work (comic)What Makes Scientists Different (comic)