Pages

1. Welcome to my Programming in FreeBasic Blog!

Why Programming?

If you enjoy learning then programming is a fun hobby that is easy to get into, inexpensive, and can provide you with skills that can be used at home and in the workforce.  If you are a student, this blog  will help you learn computer programming and make sure you understand the fundamentals.

If you search the internet for software, you get the impression that any program you could possibly want has been written.  Over the following series of posts, you will see that not everything has been written. We will write a useful program that will help get the creative juices flowing.  We will also gain the skills to modify our program to work exactly how we want it to work.

HP-85A computer image from:
 http://www.hpmuseum.net/display_item.php?hw=33

My personal programming experience started in 1980 with Fortran and punch cards. No instructions were given other than copy these words onto these cards and don't make a mistake! The whole idea of programming seemed like a bit of a waste of time.  In 1983 I worked for a clinical laboratory that owned a HP-85A computer that could be programmed in Basic.  The lab had an instrument that determined blood iron levels, however the instrument results had to go through a series of manual calculations before the values were useful to clinicians.   I learned enough Basic  to write a small program that did all the calculations and printed them out on the thermal printer on the top right of the computer. I had reduced a task that would normally take an hour or more, involving lots of manual input with the potential for typing errors and needing repeated checking and rechecking, to one that could be completed in less than 10 minutes with much less need for error checking. My current job, still in a computer department, does not involve much programming but I still enjoy writing programs in various programming languages.  The intellectual challenge is better than completing a sudoku or a cryptic crossword and results in useful programs.

Why FreeBasic?

I have chosen FreeBasic (http://www.freebasic.net/) for this series of posts.  FreeBasic, as the name implies, is free to download and use.  I have found it easy to use and learn, yet powerful enough to cope with what I need. FreeBasic may not be a popular programming language, however the techniques we will cover in the following posts will be applicable to most languages.  Initially we will work on text only programs but we will move to full graphical windows based applications later.

You may never become a professional programmer but the thrill of writing a program that does what you have asked it to do is amazing.  By the way, if you do become become the next Bill Gates or Mark Zuckerberg, remember who got you started 😉.

Next Post

In the next post we will download the FreeBasic compiler, download an editor to write our code in, and set up our directories so everything is easy to find and manage.  We will also write the mandatory "Hello World" program to make sure everything is set up correctly.

Please feel free to leave a comment and see you in the next post.

3 comments:

  1. You may never become a professional programming...
    *programmer
    Thanks for writing this blog.
    May I link to you @ fbcadcam.com
    Owen Reese

    ReplyDelete
    Replies
    1. Thanks Owen - good pickup, fixed it now. I'd be happy to be linked from your site. I had a quick look and you have a massive project on your hands. Thanks for making your code available. There's lots to learn by looking through your code.
      Happy new year.

      Delete
    2. The freebasic community is really terrific. Back in 2007 I thought about making a contribution. I figured every programming language should have a cad program but had no idea how to tackle it. After looking throug several of the available libraries and not really understanding how to use them, I settled on coding the whole thing without them which resulted in an app that had the look and feel of the good ole dos days. The GUI was fun to write as it was when I found out about UDT's. I wrote mygui.bas as a separate program to be used in other projects besides fbcad. The problem with GUIs is the matter of using multiple windows and getting them to work together. For example, Mygui's open / save dialog window would write to an external file which would in turn be opened by fbcad. Sloppy technique but it worked.
      My focus should be on fbcad not a gui. So I gave in. I experimented with a few gui libraries and settled on gtk. That was when my hair started falling out.
      Now, the community is asking me to use FLTK.
      I drive a truck for a living. Unusually out on the road for 3 weeks or so and home for a few days. I will start experimenting with FLTK as this gui library has promise to be the gui for freebasic. I hope you will write about FLTK in your blog.

      Delete