Shawn Driscoll's Tech Blog


Stuff That Happened in the Past

Monday, April 30, 2012

A Small Amout of Code For a Hello World

I'm trying to remember the last time I used such a small amount of code to trigger a GUI box in Windows. In my previous life, when I designed FX09 for OS-9 Level II on a TANDY Color Computer 3, I seem to recall using slightly less code than this for initializing and bringing up a GUI screen.

Anyway, I'm half-way through reading Wesley Chun's Core Python Programming (2nd Edition) book after a week so far. And I'll be spending another entire week going through the other half of it. Learning C++ was like a chore for me compared to learning Python.

Yes, I know that C++ is used to write operating systems and that it is used to write Python. But I don't want to write my own operating system or my own programming language. I just want to write computer programs using an interactive language that is easy, powerful, and fun to use. You know. The exact opposite of what COBOL is.

Saturday, April 28, 2012

How to Write Bug-Free Code in Python

It's just a few days that I've been learning Python programming. And already, I've learned how to write bug-free code.

I'm joking.

And yes, I'm reading about Python's error trapping at this moment.

For those of you old enough to have programmed in the early '70s, programming in Python after having programmed in C++ is like programming in BASIC after having programmed in FORTRAN. At least it is for me.

Python is so much easier to read than C++. And it's quicker to write programs with. Everything KISSable that I learned from in the '70s, Python's creator learned from also. And it shows in Python. Python is a minimalist's dream. Everything in it has a purpose. A function. And there is a form to it all. Python has a style that no other programming language comes close to in elegant power. It's very easy on the eyes. And stimulating to the mind. Typing Python code is a luxury. It's like enjoying a scenic drive on the best designed roads.

Languages like C++ remind me of programmers that like using a spoon to dig a hole, so they can keep track of every grain of sand. But Python doesn't care about digging holes, or about the sand.

Complex C++ applications can be ported easily to Python, yet porting complex Python applications to C++ can be a real nightmare.

Friday, April 27, 2012

The Early Game Console Wars

In this day and age, gamers haggle with each other (and rather seriously) about which game console is better -- XBOX or PS3. Well, before them, and before wii, there were these game consoles to choose from. Now imagine the game console wars that broke out between gamers back then!

FORTRAN 77 is 35 Years Old

It happened so fast. Seems like yesterday. At the time, FORTRAN was just another one of those '70s mainframe computer programming languages I was eager to learn. I loved the thick books we had on programming back then. They were about the size of old telephone books, with huge IBM letters stamped on their bindings.

The first Star Trek movie was being filmed while the last of the mainframe Star Trek games was being written. I'd spend my classroom time sitting in a back-row seat, typing in my FORTRAN code. I was very thrilled about not having to use the punch card reader that semester.

Wednesday, April 25, 2012

Python

Yesterday, I started learning a computer programming language called Python.

Maybe I should rephrase it as:
I've programmed many computers using many programming languages and even no languages (meaning using just machine code) since 1975. It has had its ups and downs. Even computer programmers can get writers block and/or lose interest because of other hobbies and real life, etc. But now Python has reversed this trend.

I had heard about Python years ago. In computer years, it was probably 20+ years ago. But it was actually around 2004. Anyway, 3D software came with Python (Poser, modo, and Vue are some) so users could run Python scripts to speed up their modeling/texturing process in those applications. At the time I was programming in C after using so many other languages in the past, and I was kind of excited about learning C++ (and kind of not also). But I had not heard anything bad about Python from anyone. I just figured that maybe not many people were using the language.

Let me just flat out say right now that I have always liked programming computers when the program itself did something fun. Like a computer game. But even some of that programming can get boring. Well, I have found that the more boring a programming language is, the less fun it is to write any programs with.

I am from the old days when a ^G made a teletype's bell ring. In BASIC, it was PRINT CHR$(7). And ^H or CHR$(8) was BACKSPACE. Look up what a DECWriter II is.

What are the old days? They were the time when anyone that had a computer, had to write their own programs for it. They were the time when a computer's entire DOS -- "Disk Operating System" fit in less than 16K of RAM. A typical computer had between 16K and 64K of RAM total. A video screen used up 16K of RAM. And there were no hard drives.

People wrote small programs back then. But programming wasn't exactly fun. Especially with the machine language some of those CPUs used back then. Some people lived by KISS -- "Keep It Simple, Stupid" and designed the best programs they could with what they had (me being one of them). But over the years, computers became more boring (a choice of either IBM or Mac) and languages got uglier and programmers got sloppier. And bookstores were full of programming books for ASM and COBOL and FORTRAN and ALGOL and MODULA and APL and PL/1 and DB-II and BASIC and VISUAL BASIC and FOXPRO and PASCAL and C and ADA and LISP and FORTH and SMALLTALK and then later full with SQL and NOVEL and .NET and ORACLE and C++ and JAVA and C# and PERL and RUBY and IPHONE/IPAD and...

Ok breathe.

So anyway. Yesterday, I started learning Python. It is probably the one most single amazing computer-related thing I've encountered in my 35+ years with this hobby. I wish that Python existed in 1975.

Tuesday, April 24, 2012

It's About Time!

Being as how I use my computer for 98% of what I do, I thought I might as well start a tech blog of some sort. This should help with keeping my computer related stuff out of my other blogs (which, by the by, require a computer to even look at).