If you are determined to learn programming or determined to
teach programming using fun examples to keep students engaged then, my
Figlet.VB.Net console application might be for you.
db db .d8b. db db db
`8b d8' d8' `8b `8b d8' 88
`8bd8' 88ooo88 `8bd8' YP
88 88~~~88 88
88 88 88 88 db
YP YP YP YP YP
Figlet IS interesting material. The
reason why is because I’ve seen people pasting Figlet
style text such as the example Yay into comments and forum posts at MySpace and FaceBook; Surely, these people think it’s a cool trick.
Kidding aside, utility programs like these actually have a place in the
business world. What's more is, if you HAVE to learn or teach computer programming then, my
rendition of Figlet is designed to introduce and demonstrate the
Input and Output
Object Oriented programming
I’ve been a corporate application developer at past jobs so, I’ve thrown in an additional trick into the source code such as, Resource Files and language localization. This Figlet program is contained in a Microsoft Visual Studio 2010 Solution and consists of five files. It is a console app developed in VB.Net. There is a Main module that serves as a controller for a class that contains all the logic necessary to produce Figlet text based on the values a user passes to the program. It also makes use of Figlet fonts that were developed by other people, and there are 167 of them included with this solution. You might want to refer to my previous blog post where I used the C# language to create a simple Figlet program that makes use of a very simple hand made Figlet font.
******* ** ** ****
/**////** /** /** ** ** **//**
/** /** ***** ****** /** /** //** ** /** /**
/******* **///** //////** /** /** //*** // **
/**///** /******* ******* /** /** /** **
/** //** /**//// **////** /** /** ** //
/** //**//******//******** *** *** ** **
// // ////// //////// /// /// // //
To use this program, open a command prompt, change directory to the location of this program which, if you've downloaded the source code and unzipped it using the original folder names, you would find it in this folder, Figlet.VB.Net\bin\Debug, type the name of the program which is Figlet.VB.Net.exe, followed by a -t switch and the text you want printed in Figlet text.
Example: figlet.vb.net.exe –f 3-d –t Cool
Figlet.vb.net.exe is the main program. The switches, –f and –t, tell the program to use the 3-d font (-f), and to output the word, “Cool”. If you happen to forget to include switches then the program will display simple usage text and quit. To view a list of figlet fonts included with this solution, navigate to the folder, Figlet.VB.Net\bin\Debug\fonts. Try out each font by using the -f switch followed by the name of the figlet font file without the filename extension. If you notice, the Figlet text output is green. This is another neat trick I’ve thrown into the project. I decided with this approach as a way to round out a student's learning about variables and data types such as, structure and enum, which a student will no doubt cross paths with prior to becoming a professional developer.
The source code is heavily commented. I’ve given credit where credit is due and provided web links in the source code to references that helped serve in the creation of this Figlet program.
Notes for Students
If you will be teaching yourself using this program then here are some tips. Open the solution in Microsoft Visual Studio. If you don’t have Visual Studio, visit Microsoft’s web site and download a trial evaluation version.
- Use the Build menu to create a debug version of the executable
- Use the Debug menu > Step Into (F11) command to step through the program execution one line at a time. Using the F11 key allows you step through the Sub routines and Functions. Whereas using the F10 key will bypass the details of Subs and Function calls.
- A yellow arrow will indicate the line of code that will be executed when you press F11
- You can move the arrow to execute code within the same procedure
- When stepping through each line, make sure the Autos window pane is visible so that you can inspect the application’s variables as they are being initialized
- Visual Studio will automatically create a command window so that you can see the output of the application as you step through each line
Notes for Instructors
Students are going to be overwhelmed by programming topics. Such as variables, loops, procedures, etc. The first thing we all learned in programming was variables and data types followed by basic input. The first line
of this program will call a series of sub-routines that will introduce students to variables, scoping, and initialization. To help keep the code in Main manageable and less intimidating, the application design includes sub routines and functions that will introduce and help students to focus on the following concepts…
- Variables, data type and initialization
- Command-line processing
- Console output
- Learn the difference between
- a sub-routine (Sub)
- method or function call (Function)
- class module and objects
- Logically structuring an application
- Using Application Resource and Resource files
When covering a programming topic, one or all of the Sub and Functions can be used as standalone examples. For example, if you’re teaching a student…
- how to process command line instructions
- For Loops
You can use the code in the GetCommandLineArg function and illustrate the mechanics and workings of both topics. If the topic is about File Handling, you can use the code in the AttemptGetFontDir function and introduce students to methods in the Dot Net framework at the same time.
Computer programming is a complex topic. Students come in a variety of background experiences and are diverse in their study habits. Some students are good at self-paced learning while some require a class room
environment. Some students may already be working professionals with some or no programming experience. Teachers are challenged in creating curriculum for computer programming. New Teachers are faced with the option of following along with the chapters in a book about computer programming or creating their own agenda.
As a former student, I learned several programming languages within the span of a year. Later, already a working professional programmer, I had to learn new languages as the times changed. I remember the struggles I
faced as a brand new programming student which is why my examples emphasizes on documented code and using the learn by doing approach.
I am a former Junior College teacher that was never certified on paper as qualified to teach students but, was invited by the Dean of Business at Skyline Community College in Northern California to teach introductory classes on various technical subjects. I accepted the challenge and discovered I was good at easing non-programmers into the world of computer programming using my understanding and method of communications.
Use my material for your personal learning, either as a student or instructor. Hopefully, this program will serve as a good primer to computer programming concepts. I love to teach, and education and sharing knowledge
is in my blood and nature.
Download the source files
Please donate. Any donation amount is accepted. Your generous donation is very much appreciated and assists in helping pay for the costs associated with creating, delivering and maintaining educational material on the Internet.