Thursday, 06 April 2006, 14:26:30 EDT
Kind of dead around here, I know. I've been super busy with school; I just haven't had time to think about much other than numerical methods, relations, and partitions. The last two have really been giving me trouble, not sure why. My numerical methods work, though, has made me realize something — PHP is nasty.
A major part of my numerical methods class is programming methods and analyzing them. At the beginning of the semester I weighed my options and settled on C as my primary language (I have done one program in C-sharp, though). I considered Python, but it has horrible array support and the math precision is not good enough [referring to a basic installation]. C is a weak static typed language and PHP is dynamically typed. Before getting serious in my numerical methods class, I kind of preferred the latter kind of typed language (dynamic). In a dynamically typed language you don't have to worry about whether or not your variable is a string, a number, or whatever else. The runtime interpreter figures all of that out during execution. It should make writing a program quicker with some trade-offs. The problem is that it also allows sloppy programming habits to develop.
Discounting BASIC, my first programming language was Visual Basic 4 (VB). VB, prior to VB.NET (I have no knowledge of VB.NET), allowed the programmer to specify that variables be statically defined ala C; this is how I programmed in VB. So, when I took my computer science courses at CSU, the static nature of C++ (the language we used in class) was not a difficult transition for me. I had already developed decent programming habits because I eschewed the dynamic typing VB was capable of; it made debugging a lot easier. Later, when I got into web development, I moved to PHP as my primary language. Unlike VB, PHP does not have any method with which to enforce static typing and over time I got used to it. I became so used to it, in fact, that going back to a lower level language has proven troublesome. More than once I have forgotten to properly type my variables in my numerical methods homework. This lead to all sorts of weird errors (why GCC even compiled the code is beyond me) that I couldn't figure out without asking some people about. All because of the sloppiness of PHP.
What is the point of this? Nothing really. I just felt like putting my observation out there. I don't dislike PHP, I just realize now why so many people do. I still think it is the optimum language for writing web scripts (I don't need no stinking web application framework like Rails to do my work). I am liking C more and more, though. I hadn't ever really used regular old C before this class; C++ was the closest I had come except for a couple little programs (like winfo). I really prefer structured programming over object oriented. C gives me that to the extreme.
Categories:
- mathematics
- development
- webdev
- personal