Archive for September, 2008

Did GMail finally mess up?

I think GMail has made an error.

No, it’s not a big error, and yes, it’s still my favorite web-based email service.

But they still messed up with GMail Labs.

It’s a great idea, so far it’s giving off great fruit, and I would be a sadder person today if it did not exist. That said, I was kind of interested in how to develop for it. So I went to the Labs portion of my Settings page, scrolled to the bottom, and was told:

Looking for something we don’t have? Suggest a Labs feature or join the Gmail team and write your own!

Lame! There are probably hundreds of people who would love to get a development kit from GMail and write their own Labs features, host them externally, and suddenly POOF! GMail would have hundreds of plugins, and it would suddenly be just as awesome as Firefox or gedit or vim! I’m not saying GMail needs to release its source. All I’m saying is that they should release enough of it for developers.

FAQ

Q: How would this help Google?

A: It would make GMail much more powerful, giving it an edge over the competition.

Q: How would this help me?

A: It would provide you, the GMail user, with a much more powerful interface.

Q: Why do you keep using the phrase “much more powerful”?

A: Because it sounds better than “powerfuler”.

Q: That was a terrible answer.

A: And that’s not a question. Are we even?

Q: But, couldn’t you just submit a feature request?

A: Yes, but it’d have to be an exceptional idea for the official GMail staff to make it. Opening it up would provide a lot more people willing to code, which would make the good ideas happen too.

Q: What if this crashes GMail?

A: They already have the option to open GMail without Labs.

Q: What about privacy?

A: I’m sure there’s a way to give developers enough control to develop, but not enough control to feed them your personal information.

Q: What about Better GMail/Greasmonkey? (Thanks, Peter)

A: First of all, native is better than third-party. Second of all, a LOT of end users don’t know about/care about Better GMail/Greasmonkey. Third of all, Better GMail/Greasemonkey only works on computers you install it on, while what I propose would be universal for your account.

Share/Save/Bookmark

Comments (4)

TI-BASIC (Round Three) (Control Flow: If-Then-End)

Consider the following code:

1->A
If A = 1
Disp "A=1"

Let’s study it a bit. The first line just stores 1 as A. Standard stuff. The second line is freaky, and the third line just displays “A=1″. Standard stuff. Let’s go back to the freaky part. It introduces one of the more powerful commands in TI-BASIC: If. What it says, is that if A equals 1, to do something. The syntax isn’t nearly as remarkable as the code, just If [value][thingy][value]. Thingy can be anything from the ‘Test’ menu. =, <, >, etc.

Note: Due to the constraints of this keyboard, the less-than-or-equal-to sign will be written as <=, and the greater-than-or-equal-to sign will be written as >=. Also, the not-equal-to sign will be written as !=.

If you’re looking for ‘if’, it’s under ‘Ctl’, not ‘I/O’. And this is the first time we’re using ‘Ctl’…Yay! OK, digression over :)

If’s power comes from the fact that it introduces uncertainty into the program. This means the program can rocket off in a lot more directions, which means: Sweeeeeeet.

Since you handled that chunk of code so beautifully, let’s consider this one too.

Input A
If A=1
Disp "A=1"
Disp "Where is this?"

I hope you’re wondering if the ‘Where is this?’ line is part of the if statement or not. It’s not. The only command that’s conditional is the one immediately after the if line. Which is really useful for a code snippet like this:

If A=1
Disp "A is 1"
If A=2
Disp "A is 2"
If A>2
Disp "A is pretty big"
If A<1
Disp "A is pretty small"

That's a lot cleaner than the following method, which is also legal.
If A=1
Then
Disp "A is 1"
End
If A=2
Then
Disp "A is 2"
End
If A>2
Then
Disp "A is pretty big"
End
If A<1
Then
Disp "A is pretty small"
End

You’re probably wondering why that’s legal. It’s stinking huge! Which brings us back to our problem–if only lasts for a line. If-Then-End fixes that problem. Then means that all of the following instructions are only to happen if the statement is true, and End means that an end has been put to the conditional instructions. There’s no arguments required for Then or End (an argument is something that has to be put with it to make the syntax legal.) So let’s look at our ‘Guess!’ program again. Last time we’d gotten this far:

Disp "Guess!","","(GPL) 2008", "T. Macdonald"
#Note that going from the outline to the implementation there was a better idea--putting 'Guess!' and the GPL on separate lines.
Input "Guess:".G
#Oh no! We don't know how to make a random number!
#Oh no! We don't know how to say if the number is too big or too small!
#(That's why the tutorial's not done. Stay tuned.)

And now we do know how to say if a number is too big or too small!
So
#I'm not copying all the code, we'll pick it up here:
Input "Guess:", G
If G<R
Disp "Too small!"
If G>R
Disp "Too big!"
If G=R
Disp "You win!"

Unfortunately, that’s really all we can do with that, as of right now.
Next time we’ll talk about Else.

Assignment: Write a program that will ask the user for his age, and then will classify them as “Kid” (12 and under), “Teenager” (13-19) or “Adult” (20+).

Share/Save/Bookmark

Leave a Comment

Word Procesors continued: OpenOffice.org Write vs. MS Word vs. Google Docs vs. Zoho Writer vs. Abiword

OpenOffice.org Write, MS Word and Google Docs are all covered in depth in my previous post. So remember that Google Docs was good for quick, portable, multiple-computer stuff, OpenOffice.org was good if you were a fan of either the F or the LOS in FLOSS, and MS Word was the best, assuming you had the money and operating system.

But there’s still more word processors–Abiword and Zoho Writer. Observations:

  • Abiword is the fastest of the three ‘desktop’ entries. Even more so if you’re already running GNOME (with its GTK+ libraries)
  • Abiword has an interface that looks remarkably like Word 2003.
  • Abiword doesn’t excessive amounts of auto-formatting–which I like, since frequently Word/Write and I don’t see eye-to-eye on how things should be.
  • Zoho has a slight edge over Google Docs in features–but loses a lot in speed. Typing lag, anyone?
  • Abiword feels more ‘polished’ than Write. Don’t ask me how, but it just does.
  • Abiword doesn’t seem to have outline numbering. Which is a shame.
  • Abiword doesn’t support built-in drawing.
  • Write does.
  • Write actually does a much better job of imbedded pictures than Word.

Summary:

If you have the money (and proprietary immunity), Word remains king.

If you don’t have the money, or have a thing about open-source, then:

Use Abiword for general stuff. It does normal things faster and better than Write.

Use Write if you need the extra features it provides. You probably don’t, but it’s there.

As far as the online ones go, use Google Docs for online stuff. Zoho has a few more features, but it’s probably not worth it unless you’re some kind of extreme online power-user. And I can assure you that you’re not.

I don’t see any benefit to using the offline versions of Google Docs/Zoho over the other three. Unless you knew you were going to have Internet at the beginning and end of your document-writing session, and knew that you wouldn’t in the middle. Or something. Go figure.

Share/Save/Bookmark

Comments (1)

TI-BASIC (Round Two-and-a-Half) (More with Input)

The somewhat astute among us have noticed that in Round *, there was the following line of code:

Input "Guess:",G

And that I haven’t explained how that works.

The pretty astute among us have also noticed that when they run a program such as the following:

Input G

All that’s shown is a question mark, and it’s not very visually appealing.

The quite astute among us have already realized that the way to get rid of the ugly question mark, and replace it with something more attractive is to put the attractive message in quotes, follow it with a comma, and then tack the variable name to the end of it.

Those who are not feeling very astute should be please that the astute have shared their thoughts, and we’re all back on a level playing field.

Finally, the EXTREMELY astute people are saying to themselves “It is such a drag when there’s like four variables that the user has to put in, and I have to make four Input statements. Four! Can you imagine? Surely there’s an easier way.”

Meet Input’s big brother ‘Prompt’. (TI-BASIC is very family-oriented. Output is Disp’s big brother, Input is Prompt’s little brother, Else is If’s big broth–oh, we haven’t gotten there yet. Round three is coming.)

Prompt is great for math. Take the Pythagorean Theorem:

Prompt A,B
A^2+B^2->D
sqrt(D)->C
Disp C

Which will display:

A=?
B=?
(The solution, which depends on the input)

So Prompt is just a quick and easy way of getting a bunch of variables inputted. Would I use it for games, or polished programs? No. Do I use it for quickly making a program that’ll do a mathematical formula? Always.

Share/Save/Bookmark

Leave a Comment

TI-BASIC (Round *) (Special Bonus Edition)

I’ve been thinking, and I realized it’d be nice to add another goal to the TI-BASIC series. So I’m adding a sample program.

About the program: It’s called ‘Guess!’ (I am really creative), and it’s been around since I was in the fifth grade, in one form or another. It consists of guessing a number from 1-100, and being told if it’s too big or too small, and then guessing again, and being told again, etcetera, until you guess the number.

Technical description: Before you make a program, it’s a really really really really really really really really good idea to know exactly what you want it to do. So here’s the ‘outline’ (remember that # and everything after it is a comment):

Guess! (GPL 2008 T. Macdonald) #Title and license (GPL is sort of like a Copyright)

Guess: #User guesses a number

Too big! #If the number’s too big

Too small! #If it’s too small

You win! #If the user guesses it

And that’s it. Believe it or not, the minute it took to write that saved a lot of wasted coding.

So let’s implement what we already know:

Disp "Guess!","","(GPL) 2008", "T. Macdonald"
#Note that going from the outline to the implementation there was a better idea--putting 'Guess!' and the GPL on separate lines.
Input "Guess:".G
#Oh no! We don't know how to make a random number!
#Oh no! We don't know how to say if the number is too big or too small!
#(That's why the tutorial's not done. Stay tuned.)

Share/Save/Bookmark

Leave a Comment

FTP Managers Filezilla vs. gFTP vs. Nautilus

Since I’m a webmaster, I obviously need to upload things. When I was on freeservers.com (very bad), and Geocities (pretty bad), there was a little web-based ‘File Manager’, which did all the uploading and manipulation of my files. It was bad. Slow, non-intuitive, clumsy, you name it.

So one of the many reasons I’m now on andrewmin.com is that I can use FTP (File Transfer Protocol) to upload things. Dreamhost has ‘WebFTP’, which is marginally better than the ‘File Manager’s. So I just use (much, much) better third-party apps to do it instead. I’ve used three. Filezilla, and Whirlpool (just kidding, Filezilla, gFTP and Nautilus–I felt like messing with the people who don’t read the title) (Note to self: If FLOSS app is ever made, name it Whirlpool :) )

(Edit: I actually made Whirlpool….)

In keeping with the style of this blog, I’m just going to spill my thoughts out (in a concise way, I hope (!) )

  • Nautilus is beautiful.
  • Filezilla is functional. Sure, it has a GUI, but it has a GUI to be functional, not to be pretty.
  • gFTP is very similar to Filezilla, except you might convince me it’s prettier. It’s probably personal preference.
  • Assuming Nautilus is your File Manager, it’s very nice–the FTP server is just like another drive. It even shows up when you hit ‘Browse’ in something.
  • This means that you can open up a webpage in your IDE, and when you hit save it’ll be uploaded.
  • I haven’t clocked it, but I think Filezilla and gFTP are faster than Nautilus.
  • Filezilla works in Windows.
  • Nautilus and gFTP don’t.
  • You’ve probably noticed by now that Filezilla and gFTP are very similar. The three main differences are:
  1. Operating System compatibility.
  2. The way you use it. Filezilla is drag and drop–very easy and intuitive. gFTP is a bit more complicated–you select a file(s), and then hit the “->” button to copy it to the server. Which is actually safer….
  3. gFTP has a really easy interface for getting files off “FTP, FTPS (control connection only), HTTP, HTTPS, SSH and FSP” websites (quote from the official site). It even has preloaded bookmarks of common ones–such as Debian and SuSE.
  • If you have this much time to spend reading about FTP clients, than you’re probably fine with either one :)

Summary

If you have Windows, use Filezilla. If you have Linux but not GNOME (and use Thunar or Konqueror or something) don’t mess with Nautilus, just investigate FTP with your own File Manager. If you do have GNOME, then use Nautilus, unless you’re the type to upload a LOT of files at one time, infrequently, or you just want a slight edge in speed.

As for Filezilla vs. gFTP…make your own decision. If FTP managers were more popular in general, that would probably be a flame war comparable to GNOME/KDE or Vi(m)/Emacs.

In short, this pretty much boils down to appearance vs. function, which I can’t hope to compare :)

The solution? Do what I do–use both. Nautilus for editing, Filezilla/gFTP for adding.

Share/Save/Bookmark

Comments (3)

“Editions” of Ubuntu

As you know, I run Ubuntu.

As you also (probably) know, I’m a student, and a Christian.

So you might think that it would make sense for me to be running edubuntu (Ubuntu for students) or Ubuntu Christian Edition (Ubuntu for Christians.)

But I don’t.

No, it’s not because I have something against it. And I think I’ll get the same support from the forums no matter which edition I’m running. And quite frankly I think it’d look awesome to have a fish in my circle of friends (the colored circle logo thing.) It’s because quite frankly I think it’s worthless to get a new 700MB iso and install a new operating system (with all the headaches of transferring files) just for a couple of packages I could just as easily get from Synaptic, and which I probably don’t need anyway. Edubuntu has all these great ‘learning tools’ (And Ubuntu Christian Edition has all these great Christian tools), but when it comes down to it–Am I really going to spend time playing some contrived game which reinforces my equation-solving skills? Do I really need a virtual rosary? (Heck, I’m not even Catholic). I think it’d be very worthwile to have ‘Bible Study Software’ on my computer, but I can just tack it onto my existing Ubuntu installation, on an as-needed basis. Computers get bloated enough–why bloat them more?

As for my fishy circle of friends? I’m sure there’s a simple theme change available.

Share/Save/Bookmark

Leave a Comment

IDE Fight: Geany (ooh) vs. gedit (What!?) (Don’t worry–it’s close)

In my Python pursuits,I’ve used three IDEs to write the code. Geany, IDLE, and gedit (aka ‘Text Editor’ in Ubuntu) (OK, OK! I know gedit’s actually a text editor! But I’m using it as an IDE! Calm down!)

I’m kind of developing a love for the bullet form of review, since it keeps things concise. Also note that this is not very technical, it’s just what Timmy-the-end-user likes and dislikes.

  • I used IDLE for about five minutes. I didn’t like it. Don’t ask why, it’s the same feeling I had when I tried KDE. The gut-reaction, pseudo-phobia, I-can’t-deal-with-this moment. I’m sure it’s great, I just don’t like it. Case closed.
  • Geany is definitely…bigger than gedit, and it’s written with an eye to programming, not text editing. As such:
  • Geany: When you open a new document, it has a nifty GPL license already put in.
  • Geany: It has the all-powerful ‘Execute’ button, which is definitely faster than executing it with the Terminal.
  • Geany: I’m not quite sure how sound the ‘Execute’ button is, it seemed a bit buggy to me, but that may just be a hallucination.
  • Geany: When you type an if/while/for/etc., it’ll automatically indent. Which is kind of cool.
  • Geany: Speaking about those, it has the ability to ‘fold’ ifs/whiles/comments/fors. So you can just minimize them into one line to save screen real estate. Which is also kind of cool.
  • Geany: There’s variable auto-completion. So if you have variable user_input, just type in user, and a menu will show up asking if you want to autocomplete. It’s actually really intuitive.
  • Geany: Wikipedia calls it ‘cross-platform’. So it runs on every major OS except for Macs.
  • Both: They both have syntax highlighting.
  • Both: They both have tabs.
  • gedit: gedit’s lighter/faster/smaller.
  • gedit: gedit has plugins (read: Stinkin’ AWESOME!!. So with plugins (easily addable from Edit=>Preferences|Plugins), some of the highlights are that you can:
  • gedit: Have a Python interpreter chilling in the bottom of your screen. Which is HANDY.
  • gedit: Mass indent/unindent (Nice if you add or remove an extra level of control flow)
  • gedit: On the lame side, you need to have a Terminal running to execute your entire program. Though you should be executing less often with the interpreter.
  • gedit: Since we’re on the lame side: It only runs in ‘Unix-like systems’. Sorry, Windows people! (I wouldn’t be surprised if there’s some kind of workaround, though that’s outside of the scope of this post)

Conclusions:

Don’t use IDLE (haha, just kidding. But I really don’t have anything else to say about it).

Use Geany if you want to feel like the editor knows what you’re thinking (variable autocompletion, auto-indenting), or if you execute your program like crazy.

Use gedit (which I personally prefer) if you want speed, an interpreter, or handy tools (aka plugins).

Really though? They’re both great, I’ve used them both, and the easiest way of knowing is to code in both of them and make an executive decision.

Share/Save/Bookmark

Comments (2)

TI-BASIC (Round Two) (Basic BASIC Input…and Math)

If you have a program that consists solely of displaying things, and it’s not some kind of thrilling narrative or story, then you have problems.
What you need is input.
So here’s how to do it:

Input X
Disp X

Wasn’t that tricky? When you run it, you’ll get a question mark (as in, “Yo! What do you want to input?”) and when you type something in (numbers only, for now), it’ll name the input ‘X’. Then you just ask it to display X.

(Input is in the same menu as Disp, if you’re having trouble finding it. Typing in I then N then P…etcetera, won’t work)

Now let’s do something (somewhat) useful:

Input L #L for length
Input W #W for width
Disp L*W

(NOTE: Everything after a # is a comment. Do not type it into the actual program, it’s just me explaining why I wrote a particular line the way it is. So what you should type in is:)

Input L
Input W
Disp L*W

There’ll be a ‘?’. You type in a number (length of rectangle). There’ll be another ‘?’. You type in another number (width of rectangle). It displays the product of the two numbers (area of rectangle).

In terms of function that ends our lesson on Input. However, I find the ‘?’s pretty ugly. Especially when you have several. So here’s the syntax for pretty-fying them.

Input "Length:",L
Input "Width:",W
Disp "Area is:",L*W

Here’s the output:

Length:3
Width:2
Area is:
                6

One more thing: the ‘Input’ function only accepts numbers. This can be lame if you want the person to, say, type in their name. (What’s your name? 1337)

The TI-86 has a different function called “InpSt” (Input String), which lets the user input a string of letters, not numbers. However, I’m pretty sure that the TI-83/84/80 families do not have this. Darn.

That’s all you need to know about Input to succeed in life :)

Now let’s talk about math. (Don’t worry, it’s a bit more interesting than normal math.) We’ve already touched on it, and the best way of explaining it is giving a sample program.

(Note: I’m going to use ‘->’ for the Store key throughout this entire guide. The Store key has Sto> written on it (the > is filled in though) and is used for assigning values to variables.)(I’ll also use sqrt() for the square root sign)

This program will solve for the hypotenuse of a right triangle.

Input "A:",A
Input "B:",B
A^2 + B^2->D
Disp "C squared is:",D
sqrt(D)->C
Disp "Hypotenuse is:",C

So the moral of the story (erm, program, I mean) is that you can do math with variables in programs.

Share/Save/Bookmark

Leave a Comment

TI-BASIC (Round One-and-a-Half) (Fun with Disp)

We touched on the Disp command in Round One. I’ve since realized that in my quest for simplicity, I didn’t say very much about it. So here are a few things (Every other line is the Disp command, and the other lines are the output)
Disp “2+2″
2+2
Disp 2+2
4
Disp “2+2″,2+2
2+2 (aligned left) [new line] 4 (aligned right)

Disp 2+2,2+2,2+2,3+2

4 [new line]4 [new line]4 [new line]5 [new line]

Output(1,1,”Hello World!”)

(Note: This is not Disp. This is Disp’s big brother Output. Output let’s you ‘plot’ the output on the screen. So the ‘1,1′ means that it puts the output in the first column and the first row.

Hello World!

So now you should have a better handle on the syntax

Share/Save/Bookmark

Leave a Comment