Wednesday, April 9, 2008

Presentation about JavaScript

I had to give a presentation for Dr. Borie's programming languages group. He asked me to present JavaScript since some of us talk about it an awful lot. When I sat down to work on the presentation, I had some decisions to make. Should I use Beamer, Keynote, Open Office, or an alternative? Well, I just wasn't in the mood to write LaTex, so no Beamer. Keynote won Al Gore a Nobel Prize, but type-setting a programming language is a nightmare. OO has ugly fonts and suffers the same type-setting issue. So, I made the obvious decision...

I wrote my own presentation framework. Here's the presentation and if you go to the end you get the links to the individual files.

Now, my one big complaint about JavaScript isn't a complaint about JavaScript at all, but rather a general complaint against all browser-writers out there. No offense guys, but stop sucking! JavaScript in Firefox and Mozilla is incredibly slow. Strangely, it's much faster in Internet Explorer, but we all know how awesome that browser is. Add Konqueror, Safari, and Opera into the mix and you have a cacophony of different language features, nuances, nit-picks, DOM-interfaces, event-models, ... headaches. Building a website that works for everyone can be an altogether unpleasant endeavor.

That said, if you're not using Firefox on a Mac, I make no promises about how this presentation will work. It's about 850 lines of pretty, tight JavaScript (well, the framework is pretty). It sort of works in Safari (the JS works fine, the CSS not so much). It works well in Firefox in Windows, but the fonts in Windows... well... you know. I haven't tried it in IE, but I can only imagine how awesomely that will proceed since event handling works differently. Oh well.

I'm thinking about making this a little bit better. I'm fairly pleased with it as is. I would like for it to be more flexible, easier to build presentations, and well, prettier, but other than that it's not too bad. The code that you see in the presentation is (well, most of it is) live code which is displayed via the aFunction.toString() method call.

Yes, this presentation is rather terse, but Merlin Mann and Steve Jobs both emphasize the importance of what the speaker says, rather than dense text on a PowerPoint slide. Here's a comparison between the Gates and Jobs school of presenting. I vote for the latter.

Silly Greeks.

I was walking along to the library today and this was on the sidewalk:



I don't know if there was any malice in this. I think it was just pure, unadulterated stupidity. BTW, it's "Greek Week". That's a gamma and a rho. Although the gamma sure does look like a hangman game.

Monday, April 7, 2008

Woes of updating.

I've been using Linux for about 8 years now. Not a long time compared to some, but long enough. I've been using a Mac for almost two years now. During this time I've learned a bit of a lesson. Linux is a great, great thing and I love it. But DAMNIT! Why does updating have to suck so much ass? Granted, I do self-flagellate since I run Gentoo (and Ubuntu on a home box -- slightly more reasonable).

That said, updating went fairly smoothly this time, except that being able to post from Blogger died. I'd solved this problem once before, but I had to rediscover the solution. Oh, and just good advice: don't etc-update and then give it -5 (the mv -i one).

So, if when posting things from Blogger you get:
Unable to connect to SFTP server: YOURSERVER.com (Auth fail)

and in you SSH access logs you see:
Did not receive identification string from 64.233.178.XXX

then, in your config file: (/var/ssh/sshd_config for me)
PasswordAuthentication yes

Since this allows tunneled clear text passwords you definitely need to make sure that this account is just for the blog and not anything important (i.e. don't give your blog user sudo). Then man ssh-keygen for a more secure alternative for your own authentication method.

Saturday, April 5, 2008

Friend you!



Permalink


Merlin Mann is a writer for 43 Folders and occasional contributor to the Macworld and Popular Science magazines. He's also the guy who brought us the Google Tech Talk: Inbox Zero.

On another note, I've recently become addicted to Project Euler. This site has a huge list of problems (right now 188) which can be solved with a clever solution in under 1 minute of computational time. Some of the problems are terribly easy to solve via brute-force, but the real challenge is coming up with that clever, under-one-minute solution. Oh well.

In the last two weeks I've written 700 lines of C++, 1800 lines of Java, and 900 lines of JavaScript (this is not including solutions to Project Euler problems). The bulk of the C++ and Java are for CS 434: Project 2. I'm helping Dr. Richard Borie design his projects for the compilers course. It's been a while since I've written a compiler from scratch, so doing it again was reinvigorating.

Anyway, more later.

Labels:

Tuesday, April 1, 2008

This makes me all the happy.



Permalink


I heart this with all my hearts to heart.

BTW, I should be posting some cool things within the next few days.

Powered by Blogger

Subscribe to
Posts [Atom]