I want to write myself a simple program in Windows

But the ability to program your own algorithms wasn’t exactly true during the monochrome 1980s MSDOS days either. To make EXEs, you had to buy a compiler… either MS Quick Basic, MS Quick C or Professional C, or Borland Turbo Pascal, etc. The only thing “free” was BAT files or running DEBUG at the command line and entering assembly instructions by hand.

The idea of tiny programs is still there but it’s just in a different form: thousands of websites with javascript. There are websites to calculate the capacity of DVDs, or mortgage amortization, astronomy, etc. The paradigm of distribution has simply shifted. Instead of CDs or floppies, it’s personal websites with javascript.

The free alternative to SAS is R Statistics.

I think javascript fulfills this type of hobby problem solving very easily. With Windows 7, another free scripting environment builtin is PowerShell.

It’s not free, but: RealBasic.

It’s an awesome rapid-prototyping or one-off tool, and it can create cross-platform (OS X, Linux, Windoze) applications.

Of course, OS X has a very full-featured development system available for free - Xcode, and command-line compliers built-in. But, this probably doesn’t help with your Windows issue.

This is confusing two points. It is one thing to have to pay for something like Quick C to be able to write programs. It is another for anyone who wants to use your program to also have to pay for a special environment that can run it, or for you to have to pay for such a special environment for each of your dozen miscellaneous computers on which you might want to run it (if it’s licensed per box). The difference is practically the difference between being able to write for “Windows” as opposed to being able to write for users of a specific package.

OK, at this point I am thinking I’m wrong, and I need to learn about javascript (and perhaps others). I hope this has been relevant to the OP and not a derailment, but, folks certainly seem to be understanding what I meant but pointing out counterexamples. Thanks!

So it is. Athena, you’ve taught me something useful. This might have been my most productive moment all week.

Thanks, everybody!

Well shucks… and here I was thinking that posting code was far too geekish for this thread!

Nope, that’s not the case for just about every programming environment out there. If you have to pay for them, you only pay for the development environment, not the runtime environment. That’s almost universally something you give away free, or, in the case of most Windows-based Microsoft tools, built into the OS.

EXE files sometimes can be run without anything else. Most often nowadays for Windows at least, they need a few extra .dll files. The most common ones come with newer Windows versions; older versions may require a download, but it’s a free download, and once you have them, you don’t need to re-download them every time you get a new file that needs them.

I’ve never seen a dev environment except maybe VERY specialized ones that require a license just to run a program written for them.

Napier, reading between the lines, I think some of the reason you’re a bit confused about the newer programming languages/environments is the bit shift from procedural programming to event-driven and OO programming that happened about 15 years ago.

Procedural programming is what you’re used to. You type out a program, and when you execute it, it starts at the first line (or the first line of the “main” function) and goes from there.

Nowadays, things are almost universally event-driven. Meaning, code reacts to user events. Programs are built around objects - like a window can be an object. You can tell the program to do something when the window is first displayed, or when a user presses a button, or moves a scroll bar.

It’s a different way of thinking, but it’s not particularly harder once you get your head around it. But it’s definitely confusing at first.

(and for all you techies - this post is definitely a very general post. Yes, I’m sure you can find a dozen things that you can take exception to or make a point about. I’m just talking in generalities, not trying to explain the whole programming world right now in this thread.)

Just for completeness, if you are thinking of going the browser route, try PHP.

Also for completeness, AppleScript is a fantastic way to write quick, one-off apps.

Definitely going to second this. I’ve used a ton of IDEs (integrated development environments), and Visual Studio is simply the best out there. As stated above, Microsoft currently makes C# (and a number of others) available in free versions, which, while not tiny in size, aren’t likely to fill up your drive.

For something quick-and-dirty, the aforementioned Javascript method is quite workable, but its going to require you to learn both JS and some HTML (in order to create a front-end).

I’m a huge fan of Flash, especially for quickie things, but its not for everyone. However, the ability to “draw” out a UI and then use Actionscript (very similar to Javascript) makes it something of an all-in-one for Web-based applications.

About paying for the runtime - I mean, if I write a program in SAS, or Mathematica, or FlexPDE, you have to have the application to run my program. These don’t compile to executables. Even environments like LabVIEW that now give away the runtime for free haven’t made any promises that the runtime will always be free. The environments I am describing might more often be thought of as applications than as programming environments, but they are still used entirely by writing programs. Even writing mathematically oriented things in C#, I found it expedient to buy the IMSL numerical library for things like its iterative solver, but then have to deal with licensing issues to distribute what I wrote.

I did do, by the way, the step from procedural to OO with C# (and a little Java and C++). And to event-driven with C# and, if you include it as programming, LabVIEW. About C#, I do have to say the OO approach seems very smart. But it is smart in a logical sort of way, which is clear when you read examples about a shopping cart on a web site being an object. All the time with the shopping carts. For programs where the math is a bigger deal than the logic of the interface, such as in the extreme a program that reads a file of numbers and generates another file with numbers, with a user interface that has a single button labeled “Run”, it doesn’t seem like OO necessarily matters.