Archive for September, 2008

TI-BASIC (Round One) (Getting Started, Disp)

I’ve decided to make a tutorial/guide thing for TI-BASIC (that’s the programming language on Texas Instruments calculators) because….well, I want to. Hopefully people find it useful.
Before we get started with the mechanics of TI-BASIC, it’s important to say a few general things about programming:

1. There’s four main things that happen in a program. Input is what the user puts in. Output is what the calculator spits back out.
Control flow is what the programmer uses to adjust the ‘flow’ of a program (programs are ‘read’ from top to bottom, so you need to specifically state when it shouldn’t be), and finally ‘operations’ (I just made that term up) that let you modify the input and output.
2. It’s very important to know what you want a program to do before you make it. It’s no good to say “I want it do check my answers for math class”. You need to say “I want it to ask me for two numbers, add the two numbers together, and then display the result.”
3. Thinking is required. All of it doesn’t just come naturally, sometimes you need to sit down and think out what the best way of doing something is.

So, that said, let’s start with–well, how to make and run a program on your calculator.
Turn your calculator on (a lot of this is easy.) And press the PRGM on it. If you have a TI-86/85, press F2 (Edit), and type in a new name for your program. If you’re using a TI-80/81/82/83/83+/83+SE/84+/84+SE, scroll over to the “Create New” tab, and type in a new name. (Note: I didn’t include TI-89s in the list because I don’t have one. If you send me one, I’d be more than happy to include it in this guide :) After you type in the name, and press ENTER, you’ll see a screen that says
PROGRAM:A NAME
:

Where A NAME is the name you typed in.

Pressing QUIT will exit the Programming screen, save the program, and return you to the home screen all in one.

So now that that’s taken care of, let’s write a simple program. There’s a tradition among programmers to always use “Hello World!” as a first program. So
open up a new program and call it HELLO. Now let’s take a moment and think about this. You want the program to say “Hello World!” when it’s run. That’s output. There’s no input necessary. You don’t need to control the flow, because the calculator doesn’t need to react differently to anything, and finally, since there’s no input, no operations need to take place.

So press the PRGM button again. You should see a menu labelled Ctl, that has stuff like If, While, For, End, etc. Scroll over one, to the I/O menu, and select the Disp option. Disp stands for “Display”, and is the command to display something on the screen. After the Disp, type in: “Hello World!”. Now your calculator knows to display something, and it knows the thing to display is ‘Hello World!’.


PRGM: HELLO
:D isp “HELLO WORLD!”

Run the program by quitting, hitting PRGM, and selecting ‘HELLO’. This’ll paste something onto your home screen. Press ENTER to run the program.


prgm_HELLO
HELLO WORLD!
Done

Round two: Basic BASIC input and math.

Leave a Comment

Is Ubuntu for you?

So I’m a little bit bored waiting for people to get back to me on my Python help thread, so I decided that I’d write this. It’s another one of those tip-of-the-iceberg topics, but whatever.

First of all:

Reasons to use Ubuntu:

* You don’t need an anti-virus program, but it’s more secure than Windows with an anti-virus program
* It’s FLOSS (OK, that doesn’t matter to most of you)
* It uses RAM more efficiently
* I don’t have numbers, but I’m convinced it’s faster
* It has workspaces
* It’s very nice for programmers. Built-in support and the like. So you just need a good text editor, and you can compile.
* On text editors (a small point, I know): It ships with gedit, which is like notepad, except with tabs and plugins (think Firefox), and therefore better. You can also get other ones, which have their pros and cons
* It’s a lot easier to get software. There’s three different methods, arranged here with easiness at one end, and speed at the other:

Add/Remove Programs (nice GUI, only executable programs) | Synaptic Package Manager (nice GUI, includes stuff like media codecs and language packs) | The Terminal (no GUI, super fast)

* Did I mention everything’s free?
* It has freakin’ awesome community support (the main one being ubuntuforums.org) Anything you want to do, and don’t know how (or any problem you have), just post a thread and you’ll have mobs of people solving your problems. And it’s all free. And there’s no creepy music while you wait for an answer, like there is with 800 numbers.
* If that scares you, Canonical (the parent company) sells ‘professional’ support.
* You hardly need to do maintenance. I already said there’s no need for anti-virus/spyware programs. There’s also no need to defragment, since it uses a filesystem that…well…won’t really fragment, and when there’s updates available, you’ll just get a little red arrow in the taskbar to let you know. Visible, but unintrusive.

OK, enough propaganda. Let’s hear the other side:

Reasons to not use Ubuntu:

* There’s not as many programs available. Mac users also run into this–people just write things for Windows since it has the biggest market share. There’s programs like Wine that let you run some Windows-only programs, but there’s no way of avoiding it–there’s just not as many.
* It’s different. You might need to learn new things.
* Since the majority of other people use Windows, networky kind of stuff (though possible) is more difficult.
* In the same vein as the program statement, there’s not as many drivers. When I installed Ubuntu, my sound didn’t work. It turned out to be an easy fix (a check box was checked when it wasn’t supposed to be), there’s some people who have obstinate hardware with no driver available. Which is a problem. The best way to deal with this is to use the Live CD (runs the OS off a CD, so your computer isn’t permanently changed), and seeing what works and what doesn’t.
* It requires trust in the open-source movement. Some people get scared knowing their software was built by people using their free time, and not getting paid.

This is somewhat cursory, I was just trying to hit the main points. I’m sure more pros and cons will emerge in the comments.

(NOTE: This used to be the series ‘Windows to Ubuntu’–covering installation and adjustment as well as this post. However, I realized that HEAPS of people have written installation guides, and that mine was no better, and that adjustment can’t just be covered in a blog post. But I liked this particular post, so I’m keeping it)

Leave a Comment

OpenOffice Writer vs. MS Word vs. Google Docs

This is just the tip of the iceberg.

But so far, what I’ve noticed:

* OpenOffice doesn’t have the same kind of quality as stuff like Firefox, Pidgin–heck: Ubuntu, gedit, the GIMP, etc. I guess it’s a pretty big project.
* OpenOffice is slower than Word. This is true, I read about it somewhere, where they clocked it.
* OpenOffice really doesn’t have any killer features that Word doesn’t…except being open-source and having plugins.
* OpenOffice has much more intuitive auto-formatting, and much more intuitive menus.
* I’m used to Word, so the intuitive menus, while more intuitive, were also foreign.
* Google Docs lacks a LOT of the features OO and Word have. Duh.
* Word can’t deal with odt format. Which is sort of annoying, and would take Microsoft about half an hour to make happen. [Expletive deleted]
* Google Docs (being webbased) is GREAT for that quicky school paper that you do half of in study hall and half at home. Otherwise it’s:

1. Open processor-heavy program (OO or Word)
2. Type
3. Save
4. Open browser
5. Go to email
6. Log in
7. Compose Mail
8. Attach document
9. Send
10. Close browser
11. Close OO/Word

As opposed to:

1. Open browser
2. Go to Google Docs
3. Type
4. Save
5. Close

* Don’t forget to run Google Docs in full-screen mode. Do you really need your addres bar/tabs?
* Word is expensive. Google docs is ‘FS’ (Free Software). OpenOffice is FOSS (Free Open-Source Software).
* OpenOffice has great community support
* Google Docs has the Google Help Center (complete with videos)
* Word has the Office Assistant (that annoying paper-clip fellow)

Conclusions:

Use Word if you have money and want a feature-rich environment. (The only part you care about in FOSS is the last S)

Use OpenOffice if you don’t have money, or if you’re a big FOSS supporter

Use Google Docs for something quick, easy and portable.

Don’t use Google Docs if you don’t have Internet (duh…)

Comments (1)