Prof Avery's weblog
dirt carrots for dust bunnies


CSU Fullerton Perl Powered Python vi Hacker

Geek News

del.icio.us bookmarks


Sat, Apr 30, 2005

Static models
To help you get started on Assignment 5, click here for a C version of the cup object. If you want to try other models, you can download the Perl script.

/var/spool/courses/csuf/2005/spring/cpsc465 #

Fri, Apr 29, 2005

Assignment 3
Click here for Assignment 3 and here for the 3AC syntax.

/var/spool/courses/csuf/2005/spring/cpsc423 #

No class tonight
Class is canceled tonight. I apologize for the short notice, but at least you'll have Friday evening free. Please start reading Chapter 6 for next week, and check back here in a few hours for Assignment 3.

/var/spool/courses/csuf/2005/spring/cpsc423 #

Wed, Apr 27, 2005

Assignment 5
Assignment 5 is available. I will post some code to help you get started this weekend.

/var/spool/courses/csuf/2005/spring/cpsc465 #

Mon, Apr 25, 2005

Today's Lab Exercises
Click here for the Function Point Estimation Exercise and here for details about today's project meeting.

/var/spool/courses/csuf/2005/spring/cpsc461 #

Tue, Apr 19, 2005

Optical Illusions
The optical illusion I mentioned in class is here, you'll probably want to collect the whole set.

/var/spool/courses/csuf/2005/spring/cpsc465 #

Example Lexical Analyzer
As you finish up working on the parser, if you're feeling shaky about your own scanner, you can grab lexer.zip.

This is a scanner generated by Flex, the GNU Fast Lexical Analyzer generator. You need the .c and .h files to compile a working program.

The file example.l is the Flex source file; you won't need this unless you want to change the scanner. The file lex.yy.c was generated with the command flex -l example.l.

Take a look at main.c to see how the lexical analyzer works. Call yylex() to get the next token. The value returned by yylex() will be one of the token types defined in y.tab.h. When yylex() finishes, the variable yytext will contain the corresponding lexeme.

/var/spool/courses/csuf/2005/spring/cpsc423 #

Mon, Apr 18, 2005

Lab Exercises
Click here for the Code Coverage Testing exercise and here for notes on the next project meeting.

/var/spool/courses/csuf/2005/spring/cpsc461 #

Wed, Apr 13, 2005

For Windows people
I used py2exe to generate Windows executable that you can run without installing a Python interpreter. Download generate.zip and unzip it, then run generate.exe. If this doesn't work (and it may not -- I haven't written a Python program for Windows in nearly five years), go over to ActiveState and download ActivePython.

/var/spool/courses/csuf/2005/spring/cpsc423 #

Test Generator
If you want to torture-test your parser, download this Test Generator written in Python.

While the code is a little complicated by the need to keep track of declared variables and indentation, really all it does is use the grammar the way Chomsky intended, in "reverse", to generate new programs.

Note too that while the programs are syntactically correct and obey the rules that I set down in the assignment for the use of identifiers, they're completely meaningless.

/var/spool/courses/csuf/2005/spring/cpsc423 #

I give up
I've updated the examples yet again. Sigh.

/var/spool/courses/csuf/2005/spring/cpsc423 #

Yet another syntax error
Turns out that the WHILE loop in the factorial example program is missing parentheses:

WHILE i < 9 OR i = 9 DO
should be
WHILE (i < 9) OR (i = 9) DO
You're only allowed to leave off the parentheses if there's a single expression (as in the fibonacci program). What can I can say? Writing programs without a parser to check them isn't easy.

/var/spool/courses/csuf/2005/spring/cpsc423 #

Tue, Apr 12, 2005

Assignment 4
I've posted Assignment 4. Since we discussed the assignment in class last Thursday, it shouldn't come as any surprise.

/var/spool/courses/csuf/2005/spring/cpsc465 #

Using Context-Free Grammars for Evil
Oh dear. You realize that you can use CFGs to generate text, and not just to parse it, right?

Behold SCIgen - An Automatic CS Paper Generator

Disclaimer: if you try submitting one of these to a class and you get caught, don't blame me.

/var/spool/courses/csuf/2005/spring/cpsc423 #

Mon, Apr 11, 2005

Lab Exercises
Click here for the Unit Testing Exercise and here for the project meeting agenda.

/var/spool/courses/csuf/2005/spring/cpsc461 #

Fri, Apr 08, 2005

Stupid Spammer Tricks
You've all seen those spam messages with subject lines like "Make $$$ Fast! libertarian expiation gonzo (xyzzy)". The spammers include nonsense words in an attempt to fool Bayesian filters. It doesn't work very well, but they still do it.

But here's a new twist. The other day I got a spam e-mail whose subject line included the word "quadric." Since we'd been talking about quadric surfaces in my graphics class just the other day, they almost got me to read their stupid advertisement.

I figured it was just a coincidence until yesterday I got one whose subject line contained "cryptanalysis." I gather they've taken to scraping web pages: when they decide to spam whomever@example.com, they first check to see if there's a www.example.com, then grab a statistically significant word from that page and use it in the subject line, hoping to fool you into opening it.

Clever, but not clever enough. Did I mention that both of the e-mails had already been automatically filed under "Spam?"

/var/spool/courses/csuf/2005/spring/cpsc433/misc #

The DNS Poisoning Attacks
As of this post, the latest update from SANS was here.

The attacks are serious enough that the Internet Storm Center has raised their Infocon level to "Yellow." I know this because the icon in my system tray has turned yellow and started flashing.

/var/spool/courses/csuf/2005/spring/cpsc433/misc #

Syntax Error
Ok, so how long were you going to wait before telling me that one of the example programs had a syntax error?!?

/var/spool/courses/csuf/2005/spring/cpsc423 #

Mon, Apr 04, 2005

Schedule Change
Please note that I've rearranged the Course Outline slightly. We will spend the entire week on metrics, covering Chapters 15 and 22, returning to Chapter 21 next week.

/var/spool/courses/csuf/2005/spring/cpsc461 #

Lab Session
Click here for today's Refactoring Exercise and here for the project meeting agenda.

/var/spool/courses/csuf/2005/spring/cpsc461 #



March 2021
Sun Mon Tue Wed Thu Fri Sat