Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | RSS2 | Atom | Backend

Archive for 2010-01

time-wasting methods.

/* verbose java masturbation: */
public class Foo {
  private int foobar;
  public void setFoobar(int value) {
    foobar = value;
  }
  public int getFoobar(){
    return foobar;
  }
}
/* much less annoying: */
public class Foo {
  public int foobar;
}

Hal Canary | Computers & Code | 2010-01-17 22:23:38 UTC
Permanent Link |
Comments Off (but feel free to email)

What am I doing?

It turns out I don’t actually have class today. The classes are Monday, Wednesday, and Thursday — but the Monday and Wednesday classes are every week, while the Thursday class is only the last week of the semester, to make up for the fact that the semester begins on a Thursday.

I did pick up my textbooks today. They are just as heavy and expensive as they always have been.

* * *

What am I doing? I am considering where to apply for a master’s program in computer science. In the mean time, I am taking the undergraduate classes at the local university that I would need anyway once I go to grad school. I’m still working full time at the bookstore.

* * *

I’m taking two classes: Algorithms and Digital Systems.

Digital Systems — Covers data paths, controllers, memory systems, and register transfer level design, as well as finite state machine design, classical logic design, and storage element design. Hardware and software tools for digital system analysis and synthesis are explored. Textbook: Roth & Kinney, Fundamentals of Logic Design (0495471690).

Algorithms — The design, implementation, analysis, and application of a range of computer algorithms are explored. Function order of growth and amortized analysis are used in analyzing algorithms. A review and extension of data structure topics including stacks, queues, trees, graphs, lists, sets, hash tables, and heaps are covered. Algorithm design strategies such as divide-and- conquer, the greedy method, and dynamic programming are studied. Textbook: Kleinberg & Tardos, Algorithm Design (0321295358).

* * *

Not a bad plan, considering that I made the decision to do this three weeks ago.

Hal Canary | Life | 2010-01-07 13:37:24 UTC
Permanent Link |
Comments Off (but feel free to email)

Printing a text file

Printing a text file is one of those basic things you never think about. Unless you are me. I like to play with the variables and make that printout look good.

#!/bin/sh
# Print a UTF-8 document to the default printer
# Written by Hal Canary 2009-12-23.
#DTPD# Dedicated to the Public Domain.

# Configurable Options
font="Monospace 11"
#font="Serif 11"
#font="Sans 11"
paper="letter"
b_margin=0.25
t_margin=0.25
r_margin=0.25
l_margin=0.75

# convert inches to PostScript points
b_margin=`echo "( $b_margin * 72 ) / 1" | bc`
t_margin=`echo "( $t_margin * 72 ) / 1" | bc`
r_margin=`echo "( $r_margin * 72 ) / 1" | bc`
l_margin=`echo "( $l_margin * 72 ) / 1" | bc`

exec paps --font="$font" \
  --paper="$paper" \
  --bottom-margin=$b_margin \
  --top-margin=$t_margin \
  --right-margin=$r_margin \
  --left-margin=$l_margin \
  "$@" | lpr
#EOF#

Hal Canary | Computers & Code | 2010-01-07 13:22:40 UTC
Permanent Link |
Comments Off (but feel free to email)

Copyright 1997-2011 by Hal Canary.
mailto: h3 at halcanary dot org
http://halcanary.org