The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Monday, June 05, 2006

A thought on static types vs. dynamic types

The simple fact is, I would never choose to write shell scripts in a strongly type-checked language (unless someone were to write a scripting language that is as cheap and dirty as, say, bash). And I would never use a torque wrench to change a light bulb in my house when a crescent is handy. Type checking simply isn't a critical feature for the scripts that I write, and there is a certain cost in using languages that check types rigorously.

On the other hand, I would never be fully confident in a large system built on a DT language. It's not because I don't trust the language. It's because I don't trust myself. An ST language constrains the types of things you can say in a way that helps you avoid erroneous constructions. But the cost is that you have to consciously choose the types, and sometimes you have to build the types from scratch. This cost is not zero, and it's not negligible, which is why I prefer to write shell scripts in an untyped language.

But the larger the system, the more the type system of a language gives me confidence that the components are being used correctly. Since tests get more expensive to write the larger the pieces to be tested become, it is very nice to have the compiler tell me right away that I've done something stupid or made a simple error than to wait for a test to tell me that. Although type checking does not necessarily imply correctness, for many types of algorithmically simple program components, it gets you 90% of the way there.

Johnny Come Lately

Which pretty much sums up why I prefer to use statically typed langauges (I was probably the only one in college that liked programming in Ada). I tend to think of programmers that prefer dynamic typed languages as sloppy thinkers, but perhaps that's because all the languages I learned early on were statically typed (especially Assembly were you had to explicitely reserve memory for your variables).


Finally fixed

I just spent the past few hours on the phone with Smirk, acting as backup as he finally got “Project White Elephant” back up and running, with the control panels, MySQL replication, automatic backups and failover switching. P had left notes, but they lacked some crutial details that took P about a week to discover (the information was there in some configuration files, but getting the MySQL replication working with Blech (the control panel) was the major sticking point.

So it's back up and running, which is a load off our minds.

Obligatory Picture

Trying to get into the festive mood this year

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

Obligatory AI Disclaimer

No AI was used in the making of this site, unless otherwise noted.

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.