Computer programming isn’t just a great career, it’s also a lot of fun, so here are 3 easy ways you can get started programming today — even if you’re not an advanced user. Learning basic programming is not hard if you are interested in learning in the first place. It is very addictive.
#1: Get Started Programming Microsoft Word and Excel
At age 17, I got my first full-time job in a medical records department where I used a few quick scripts in Word and Excel to reduce the amount of work I had to do every day by almost four hours — impressing my boss and eventually earning me a promotion. I love this method because Microsoft Word and Excel wrote the programs for me — I only needed to make a few small changes.
Microsoft Office products use a programing language called Visual Basic or Visual Basic for Applications (VBA). It’s built into every edition of Microsoft Office for PCs, so you can use the same programs on any Windows computer without changing them — a major benefit if you write useful programs.
How To Get Started Programing in Word and Excel
Let Word and Excel write your program for you by creating a macro. I’ll use Word for an example here, but these steps apply to Excel as well. Go to Tools, Macro, and click Record New Macro. Choose a name for your Macro; you can also enter an optional description of the Macro. Then click the Ok button — you’re now recording the macro and a new floating toolbar should appear.Get Started Programing With PHP
Do whatever steps you want your program to do. One program I wrote for my former employer simply formatted the title of transcribed reports, so to create it, I ran the macro recorder, highlighted the title, changed the font, changed the size, and added bolding.
When you’re done recording the macro, click the stop-sign button on the macro recorder. (The button is a blue square on some versions of Microsoft Office.) You now want to test that your macro works, so hit Ctrl-Z to unto the steps you performed while recording the macro and then run your macro by going to Tools, Macro, Macros, and choosing your macro. If the macro does what you want, great! Save your macro by saving the document. You can also add your macro to the default document by using the Macro editor to add it to Normal.dot — the Microsoft Word Normal DOcument Template file.
If your macro doesn’t do everything you need, you can edit its code by opening the Visual Basic for Applications editor by going to Tools, Macro, and clicking on Visual Basic Editor. In this editor, you’ll be able to edit your macro. You can make obvious changes on your own, but to learn more you’ll need to consult a book or online tutorial about VBA.
#2: How to Start Programming With Batch Scripts
Have you ever wanted to tell Windows to run a simple series of commands when you click on just one button — for example, start your Web browser, email program, and chat client? Well, then there’s a simple programming method for you — batch scripts.
Open up Notepad and start typing commands — one command per line. For example, the xcopy command will copy files from one location to another. To figure out what commands you need to type, open the Windows command line by going to Start, Run…, and entering cmd. Anything that works on the Windows command line works in batch scripts. Many Windows commands are named after their programs — for example, Firefox is named firefox and Internet Explorer is named iexplore. So to start both Firefox and Internet Explorer, enter the following into Notepad:
Now save your file with a special extension. Go to File and click Save As. Name your file name.bat (you can replace name with anything, but make sure you keep the .bat). In the field Save As Type, choose All Files. Then click Save.
To run your batch file, find it on your Desktop or in Windows Explorer and double-click on it. A window may appear and then quickly disappear on some versions of Windows, but then you’ll see Firefox and Internet Explorer appear. Interested in a step by step tutorial about starting your programs automatically with a batch script. This is a great way to learn basic programming.
You can do much more with batch files — including interactive programming — so if you’re interested, consult a guide to Windows system administration or an online tutorial for batch scripts — and have fun!
#3: Get Started Programming With PHP — The Web’s Most Popular Language
What do WordPress, MediaWiki (Wikipedia/WikiLeaks), Joomla, Drupal, Moodle, Facebook, and Digg have in common? All of them use PHP, a scripting language developed for the Web which powers most of the top 1,000 websites.
PHP isn’t as easy to learn as basic VBA or batch scripts, but it’s far more powerful and can advance your career in many types of businesses. To install PHP on Windows, go to the PHP download page on PHP.net and download the “Windows binary.” Run this program like a regular installer.
To use PHP, you need to create a PHP script, similar to the batch script described above. Open Notepad and copy and paste in the following quick PHP script:
<?php echo “Hello, world.n”; $seconds = time(“now”); echo “It has been $seconds seconds since 1 January 1970n”; ?>
In Notepad, go to File and click Save As; choose your desktop folder and name the file test.php. In the Save As Type field, choose All Files and click Save. Now open the Windows command line by going to Start, Run…, and typing in cmd. On the command line, type php test.php. You should see the following output (the number of seconds will be different, of course):
Hello, world. It has been 1296435147 seconds since 1 January 1970
If you’ve ever used any of the websites listed in the beginning of this section, you’re already aware of how powerful PHP is. To learn more, grab a book on PHP or start reading through online PHP tutorials. If you need help, many large towns and cities around the world have PHP User Groups where you’ll find lots of friendly support.