Access Count: (C)2007 Robert 'Admiral' Coeyman Jr. All rights reserved, so please do not steal my website. If you like my website and would like me to create a website for you, I am available for hire at reasonable rates."admiral @ corner.net" |
My Programming |
Over the past year, Computer Co-Op has had some difficulty getting work. I have been with the company for a very long time and am still trying very hard to keep the company afloat. One of the projects that I am working on, to this end, is our code showcase. On this part of the site, you will find the code that we are working on just to show to prospective clients. Everything in this section is a work in progress. One of the problems with bidding for work is that everything that we have written thus far belongs to a client. We cannot allow prospects to acces sensitive parts of client websites. The showcase is a section of unused websites that we can allow clients to play with. No real websites will be effected by this demonstration. I am hoping that this, along with specializing in code for things like mobile devices, will keep us around. Through 2008, Computer Co-Op will be shifting its focus into the custom programming aspect of computers. Computer Co-Op produces very good business class machines, however, we cannot compete with the disposables in the market. Our systems run well over the long run and can be both upgraded and repaired at minimal cost. People only see the initial cost of the system and we cannot compete with that and not lose quality. Computer Co-Op has a number of programmers who have been writing code since before the Internet was open to the public. We have been writing code since Fortran and assembly language were the big languages. If I had taken Fortran one year before I did, then I would have written my code using punch cards on the school’s mainframe. That is something that I would like to have done. As it is, the school did not use PC systems like those that we use now. I learned Fortran on old Apple computers before they used the GUI that is so common today. To get into the Fortran class, I learned BASIC on my TI 99/4a on my own time. The first computer that I remember ever using was a ‘Viking,’ followed by a Timex Sinclair 1000 and some older Atari computers in Junior High School. Then I got my TI 99/4A. Born in August of 1968, I became aware of computers in the old science fiction movies of the middle space age. I was 1 year old during the moon landing. Computers were huge at that time and they captured my imagination. Although I would have no use for anything the size of a mainframe or supercomputer, I still like ‘big iron.’ Small computers, even as powerful as they have become, are still toys to me. I knew that it would be a long time before I could afford a computer of my own. Therefore, I learned how they work in hopes of building one. The programmers of Computer Co-Op are not just trained in the use of RAD compilers, but we can read schematics. The first commercial, business, program that I wrote involved wiring a scale to a PC through the serial port. You do not know how much I would like to do things like that. Eventually, I did get Extended Basic for my TI 99/4a, but I really wanted to move up to assembly language. I could never afford it. The TI 99/4a was sold out and discontinued before I could afford more than the console and a few cartridges. All of this stuff is special to me and I still have it. I collect calculators and old computers. Eventually, I would like to get the rest of the TI 99/4a that I have. The problem with my first PC clone is that Microsoft DOS and Windows 3.1 did not come with a real compiler. From there, I managed to get a used assembler for my computer and worked with that. Finding free software online, I also got GCC and some tutorials. Unfortunately, I had a Packard Bell with a faulty motherboard that started failing within a day of purchase. That did not help my programming. Mostly, I stuck to assembly because I like computers on the hardware level. I’ve actually written assembly programs under Windows XP and Linux. The VGA Planets software on my website was all written in assembly language, using the Nasm assembler. I do not like it when a compiler does things ‘behind my back.’ Assembly, and machine language, programming gives me a clear picture of what the circuits are doing when I write code. While looking for Unix on the Internet, I came across a new operating system called ‘Linux.’ I downloaded this operating system, onto floppy disks, when Slackware was still based in Finland. I’ve been using Linux since before the kernel, the heart of Linux, because reliable. My Linux experience came into play when Computer Co-Op moved from the Synchronet BBS to the Internet. The first terminal server that Computer Co-Op ran was a system that I put together on the software end. Linux includes compilers. My use of the C language developed from there. I rewrote an idle program for the terminal server so that clients who were online over their daily time limit would be disconnected. From there, I started work on our radius servers. Most of the Linux software that Computer Co-Op runs has some degree of modification that I have done to make it suit our needs. The radius server had direct access to the password files on the system so that people could log in. This is a security risk, so I modified our servers to get the passwords out of a database that could be run as an unprivileged user. Since the server has a lower security level, the radius server is not as risky if somebody breaks through the software. Our radius server does not have direct access to anything sensitive so nobody who takes over that software has access to anything sensitive. Our mail servers use authentication. SASL, the type that we use, did not support having the passwords stored encrypted. I modified this for the same reason that I consider CHAP a bad idea. CHAP requires that all passwords be stored on the server unencrypted. PAP allows the passwords to be stored encrypted. This only works because PAP does not send the password to the server encrypted. There is a risk in the unencrypted sending of passwords over the network. If the network is being sniffed, then the password can be read from the network. However, you only get one password at a time. If the passwords are stored encrypted on the server, then the only place that you can get all of the passwords at once is secure. With CHAP, the passwords are transferred encrypted, but they are vulnerable on the server, which has a list of all passwords. Crack the server and you have all of the accounts at once. My Linux programming experience was extensive enough that Sams Publishing asked me to tech edit two Linux programming books that were first published in the year 2000. I was trained as a writer, graduating from Long Ridge Writer’s Group in 1993. The ability to document a program is very uncommon these days. Computer Co-Op can write documentation in house. Upon moving to the Internet, our first router ran FreeBSD, we got an Apache web server. We have not run a stock version of Apache since then. I recompile the server to match our needs each time that I update the server. In fact, I have written a custom Apache module that allows us to monitor account login and activity from the radius server. You will find a link to my Radius Online module elsewhere on this site. In this version, the module allows you to configure the database logins from the apache configuration file. That allows you to run the module many times on one server and watch several radius servers from that server. I also wrote a version of this module for Apache version 2.0. Most people still run apache 1.3 because most software has not bee modified to run under version 2.0. When Computer Co-Op started designing web pages, I learned to write code in perl. CGI programs can be written in any language, but I started with perl. Since then, I have written CGI programs in Bash script and the C programming language. I could also write CGI programs in assembly language, but there has been little call for that. Any programming language would do. Web Sites are now more than static content. After perl, I started working with php which had to link directly to MySQL databases. That is far from the only thing that I can do with php. Like most of the software that we run, I have custom compiled the PHP that we run on the servers here. Where necessary, I modified code to make it compile. My sites also include Javascript, but I avoid Java because it locked up my computer. For completeness, I have also been working with PostgreSQL. PostgreSQL seems to be a tighter and faster server than MySQL. It’s main advantage, to my use, is that the server runs without allowing connections from the outside of the server. For security, the server cannot be reached directly from the network. We do not store sensitive information in any of our databases even though they appear to be secure. My PostgreSQL database code is only half in PHP. The remainder of the code was written in the C programming language. I do not like to get stuck with only one language that I can use. My Fortran is frozen beyond use from lack of use. To keep this from happening to any of my useful languages, I keep myself practiced. Recently, I wrote an ODBC application just to keep myself in shape. With PHP, I recently learned that you have to shut down quoting on any file that you wish to store in a database. You do this with the command “set_magic_quotes_runtime(0);.” Without this line in your PHP code, the code gets double quoted. When you strip out all of the quotes used to protect the image when you insert it into the PostgreSQL database, the result is still quoted. I uploaded a file and compared it to the original using diff. The version that came out of the database was longer than the original, so I examined it with a hex editor. First, I noticed that the bare linefeeds were converted into carriage returns plus line feeds. Why a binary upload was converted into windows text on a Linux system is beyond me. Second, I noticed that the null bytes had been prefixed with quote characters. Just shut off magic_sys_quotes and the uploads will work. The scale code that I wrote was written using Borland C++ Builder. I also have a version of Visual Studio. We are learning to write code in ASP.NET to add to our substantial offerings. One of our Linux servers has even been modified to run a version of ASP.NET with the mono module. Programming is something that I enjoy and I have been known to obsess while writing code. You will find me listed as a contributor to such things as the WINE project. There is an extensive collection of free software tools on my local hard drive. This helps me to keep fresh by writing a piece of non-trivial code from time to time. After all this time, I still like to explore how machines work and tracing out program flow is a good place to start. |