Great Programming Labs!

A bug which was debugged in 1947.

Learning to program is difficult without good goals, and academia has been pretty good about making things fun for me. I have been asked to author a series of articles for introductory programmers to get them up to speed and maybe even show them some of the interesting aspects of software development.

Below is a list of interesting labs that i have come across and been asked to do. They are in no particular order, and more than that they are of mixed difficulties. You should be able to implement these projects multiple times and see changes over time as you learn more about programming.

  1. Frequency ChartsCount the frequency of words or characters in a given document, output the chart to the screen/a file as you see fit.

PHP States

I received an email a couple days ago from a UScript developer who was interested in applying something that seems to be pretty useful in UScript to provide a similar interface in PHP5. States. UScript pt States provide a developer with a means of encapsulating code, much the same way many of us have been doing for a long time with switches, and define methods and change their desired functionality.

    case "quick":
        include "overview.php";
    case "full-view":
        include "full.php";
        include "frontpage.php"

This may not be the best example for switches and their functionality, I don’t even suggest you necessarily use this, but it shows one thing. Changing functionality, based on variables. I am looking into a solution that is not only useful, but is at least readable.

Viewer Mail #2

I received an email a couple days ago and I have been trying to figure out how to approach it, until now.

Hey man,

I am new to coding, obviously, and I love your tutorials on hl2, but I have this distinct feeling that I’m missing something. I coded in VB for a while and it was a lot of fun to see what I was able to do with a few nouns and verbs, talk about words in action, but there was something that has always blown my mind, and I figured I would bounce it off of you. So here goes bro.

When I was in class a couple nights ago we went over random access files, which are neat in their own right, but since I ran into that I have been trying to figure out a file type to use for my own application. The values are going to have to be user editable/readable, but what are some of the options for it?

Thanks a bunch and keep up the good work!

Continue reading “Viewer Mail #2”

Inline Functions

I am turning a lab in tonight that handles two very shady topics that have been only lightly touched upon in my previous classes: Bit manipulation and inline functions. Each deserves its own article because they are both complicated in their own right.

Bit manipulation is the process of manipulating bits. For those of you who are not IT inclined as of yet, a bit is a switch and every data type is made up of them. There are only bits in your computer, no such thing as an int, or char pointer, everything is a bit. The emphasis here is that everything is a bit and I cannot stress that more.

Continue reading “Inline Functions”