JosephHermens.com

print

About Me

Hi, my name is Joseph Hermens, thanks for visiting my personal website. I've put this site up to showcase some of my programming work, link to my other personal sites, share my opinions about all sorts of things, and provide my contact information. Be sure to check out the quotes page, I think that there are a lot of good thoughts there.

Well, about me, I graduated in December of 2006 with a bachelors degree in computer science from Southern Adventist University in Tennessee. I started graduate school in September of 2007 at Oregon State with the intention of getting a masters degree in programmin systems, but I soon decided that I wanted to do something more physical and tangible with my life. The rapid changes in the software industry, high project failure rates, and outsourcing are all bothersome, but mostly it was getting too difficult to find meaning in endless lines of code and research papers. So I dropped out of grad school after the first semester, got my general contractors licence, and started a construction business with my oldest brother. We have mostly been roofing this summer and I'm loving it, see Hermens Brothers for some pictures.

I don't regret having spent huge amount of time and money going to school, it was a good experience and I still enjoy programming as a hobby and for part-time, rainy-day work. It is also nice to have a career to fall back on in the event that I fall off a roof, as long as I can still type... I hope to retain my knowledge of computer science and programming skills, maybe I'll get tired of the beautiful Oregon weather someday and opt for a desk job again.

Personal Sites

  • Facebook - still not sure I'm into this social networking revolution, but if you are, here is the link to my page.
  • Picasa Web Album - just some pictures of me, the place I call home, and my pet rabbit Una.
  • My Google Library - this page lists a few of the book I own and have reviewed.
  • College Graduation - this site has some information about my graduation in December 2006 and a few pictures from my time at school in Tennessee.
  • Hermens Brothers - this is the site for the construction business I started with my brother Josh.

Professional Sites

A collection of sites that I have created or worked on in collaboration with other developers. See more details under "Code" / "Web Sites"

/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/ delimiter $ CREATE FUNCTION get_keyword_id(_keyword CHAR(16)) RETURNS INT UNSIGNED DETERMINISTIC BEGIN DECLARE _id INT UNSIGNED DEFAULT 0; SELECT id INTO _id FROM words WHERE keyword LIKE _keyword; if _id = 0 then INSERT INTO words(keyword) VALUES(_keyword); SELECT id INTO _id FROM words WHERE keyword LIKE _keyword; RETURN _id; else return _id; end if; END; $ (deftemplate ask(slot title) (multislot question)) (deftemplate response(slot title) (slot answer)) (deftemplate info(slot title) (slot true)) (deftemplate solution(slot animal)) (deffacts start-program (ask (title flies) (question Does it fly)) (ask (title lays_eggs) (question Does the animal lay eggs)) (start)) (defrule init ?start <- (start) => (retract ?start) (printout t 'Animal Identification Program' crlf crlf)) LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; USE ieee.std_logic_signed.all; ENTITY alu IS PORT(inputA, inputB : IN STD_LOGIC_VECTOR(31 DOWNTO 0); aluOp : IN STD_LOGIC_VECTOR(2 DOWNTO 0); result : OUT STD_LOGIC_VECTOR(31 DOWNTO 0); zero : OUT STD_LOGIC); END alu; ARCHITECTURE arch OF alu IS SIGNAL result_temp, result_and, result_or, result_add, result_sub, result_slt : STD_LOGIC_VECTOR(31 DOWNTO 0); BEGIN result_and <= inputA AND inputB; result_or <= inputA OR inputB; result_add <= inputA + inputB; result_sub <= inputA - inputB; result_slt <= "0000000000000000000000000000000" & result_sub(31); WITH aluOp SELECT result_temp <= result_and WHEN "000", result_or WHEN "001", result_add WHEN "010", result_sub WHEN "110", result_slt WHEN "111", X"00000000" WHEN OTHERS; zero <= '1' WHEN (result_temp = 0) ELSE '0'; result <= result_temp; END arch; digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'. hex = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | digit. number = integer | decimal. integer = digit, {digit}. decimal = digit,{digit},'.',{digit}. word = letter,{letter}. if(char >= '0' && char <= '9' || char == '.' || char == '-' || char == '+') { temp = char; while(next() && (char >= '0' && char <= '9' || char == '.')) temp += char; if(/^(\+|\-)?[\d]+$/.test(temp)) addValue(parseInt(temp)); else if(/^(\+|\-)?[\d]*\.[\d]+$/.test(temp)) addValue(parseFloat(temp)); else throw new Error('Invalid number: '+temp); } VAR width = 100% VAR height = 100% TAG body { width:[width]; height:[height]; overflow:hidden; } TAG html : body; // html inherits all of the properties assigned to body TAG div; // an empty declaration that can be inherited by a Class or Id to add a tag type to the declaration ID content : div { TAG div { border:solid 1px rgb(0,0,10%); } CLASS first : div { padding:5px; background-color:#FFF; margin:5px; } CLASS second : first { // inherits all of the properties assigned in `first` margin:5px; border:none; TAG h3 { margin:{top:0; right:0; bottom:5px; left:0;} } TAG a { padding:2px 5px; } ACTION hover : a { background-color:#DDD; } // actions are applied to the element they are nested inside } ID abs { position:absolute; background-color:#0F0; text-align:center; padding:10px 0; TAG div { width:200px; left:350px; top:35px; z-index:2; } TAG span { width:200px; left:500px; top:60px; z-index:1; display:block; } } } namespace NetScan { public delegate void ErrorEventHandler(object sender, Error error); // delegate used by OnMessage event public delegate void MessageEventHandler(object sender, Message message); // delegate used by OnMessage event public delegate void UpdateDisplayHandler(object state); // used by update event to tell GUI to refresh stats // main class used to start the application class Run { static void Main(string[] args) { new Run(); } public Run() // constructor { Application.Run(new GUI()); } } } LCtrl & Up:: Send {PgUp} LCtrl & Down:: Send {PgDn} LCtrl & Left:: Send {Home} LCtrl & Right::Send {End} ^h:: IfWinNotExist WinHugs { Run C:\Program Files\WinHugs\winhugs.exe WinWait WinHugs WinActivate WinHugs Send :cd c:/code/Haskell{Enter} Send :l } else WinActivate WinHugs return try { $data = new HTMLData(); $db = new Database(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); include 'data/'.$service.'.data.php'; if(function_exists('serviceMain')) call_user_func('serviceMain', $action); else if(function_exists($action)) call_user_func($action); else throw new ScriptException('undefined action \"'.$action.'\"'); $data->execute(); } catch(UserException $e) { echo $e->toClient(true); // ClientInfo::AddError($e->file, $e->line, 'UserException', $e->message, $e->toString(true)); } catch(Exception $e) { echo $e->toString(true); // ClientInfo::AddError($e->file, $e->line, 'ConnectionException', $e->message, $e->toString(true)); } <body onresize="window.onResize();" onload="window.init();"> <a href="./" id="home_a"> <img id="logoText_img" src="images/logo_text.png" alt="Artist's Circle" /> <img id="logoBack_img" src="images/logo_back.png" alt="Logo" /> </a> </body> table { border:solid 1px #000; } th { background-color:#EEE; text-align:left; padding:3px 5px 3px 5px; vertical-align:top; white-space:nowrap; empty-cells:show; } td { padding:3px 5px 3px 5px; vertical-align:top; empty-cells:show; } tr.e td { background-color:#FFF; } tr.o td { background-color:#EEE; } tr.h { font-size:20px; } td.c { text-align:center; } td.r { text-align:right; } td.n { white-space:nowrap; } td.m { vertical-align:middle; } table.list_table thead th, table.list_table thead td { font-weight:bold; text-align:left; border-bottom:solid 1px #DDD; } table.form_table tfoot th, table.form_table tfoot td { text-align:center; border-top:solid 1px #DDD; padding-top:10px; } table.form_table tfoot a { padding:2px 5px; font-weight:bold; } _number::Parser Float _number = (_neg <|> (try _float) <|> _int) where _neg = do { char '-' ; v <- (try _float <|> _int) ; return (-v) } _float = do { a <- option "0" (many1 digit) ; char '.' ; b <- many1 digit ; return $ read $ a ++ "." ++ b } _int = do { x <- many1 digit ; return $ read $ x } _digits::Parser String _digits = many1 $ satisfy isNumber (DEFINE (Count numbers) (COND ((NULL? numbers) 0) ((= (CAR numbers) 0) (+ 1 (Count (CDR numbers)))) (ELSE (Count (CDR numbers))) ) ) function onLoad() { var elements1 = [ {n:'linkHandle_div',a:'left'}, {n:'link_div',a:'width',p:'left'}, {n:'content_div',a:'left'}]; initResize('linkHandle_div', elements1); } function getOffsetHTML() { var doc = (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body; var style = getStyle(doc); return (temp = parseInt(style.width)) ? Math.round((getWidth() - temp) / 2) : 0; } bag_to_set([], []). bag_to_set([Head | Tail], Set) :- member(Head, Tail), bag_to_set(Tail, Set), !. bag_to_set([Head | Tail], [Head | Set]) :- bag_to_set(Tail, Set), !. #include<list> #include<iostream> #include<vector> using namespace std; const int HUMAN = 1; const int COMPUTER = 2; class Nim { public: Nim(int numTokens, int playFirst); ~Nim(); void displayTokens(); bool isOver(); bool find(int token); void makeMove(int token, int newToken1, int newToken2); void undoMove(int addToken, int removeToken1, int removeToken2); int chooseMove(int player, int & bestPile, int & newPile1, int & newPile2); void runComputer(); void runHuman(); int currentPlayer; private: list<int> tokens; }; .text .globl __start __start: la $s0, float_a addi $s1, $s0, 16 # number of elements in float_a * 4 + the address of the array add $s2, $s0, $zero # starting point for loop i fori: slt $t0, $s2, $s1 beq $t0, $zero, endi # s2 is the loop index of i * 4, breaks when loop gets to the end of the array addi $s3, $s2, 4 # s3 is the loop index of j * 4 package astroids; import java.awt.Color; import java.awt.Polygon; import java.awt.Point; import java.awt.Graphics2D; public class Astroid { int direction, radius, speed, spin, spinTotal; double scale; Point center; } for num as int, element in zip(range(10), fib()): print "${num + 1} => ${element}"; print ''; gen = i * i for i in range(5); for item in gen: print item print ''; arr = array(gen); for item in arr: print item def transfer(inputPath, outputFolder, exclude = []): tempPath = outputFolder+splitdrive(inputPath)[1] if(exists(tempPath) == False): os.makedirs(tempPath) filePath = join(outputFolder, splitdrive(inputPath)[1][1:].replace('/', '_').replace('\', '_')) #include <conio.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define ICON_SIZE 5 #define MAX_NAME 7 /* Max Length of an icons name */ #define NUM_ICONS 5 /* Max Number of icons that can be read */ #define PAUSE_TIME 1000 typedef struct /* structure that holds an icon */ { int x, y; /* location on the console where icon will be dsiplayed */ char name[MAX_NAME]; int fcolor, bcolor; char pixels[ICON_SIZE][ICON_SIZE]; } icon_t; void animate(icon_t *icons, int num_icons); void display_icons(icon_t *icons, int num_icons); void move_rocket(icon_t *rocket); void move_tic(icon_t *tic, int state); void move_wink(icon_t *wink, int state); void pause(int delat); int read_icon(FILE *file_p, icon_t *icon); class Lexer def initialize() @tokens = Hash.new() end def classify(token) if(@tokens[token] == nil) if(token =~/\A[a-zA-Z][a-zA-Z0-9]*\z/) @tokens[token] = "Identifier" elsif(token =~/\A[0-9]+\z/) @tokens[token] = "Integer" elsif(token =~/\A[0-9]*\.[0-9]+\z/) @tokens[token] = "Real" else @tokens[token] = "Error" end else puts "dupliacte token: "+token end end def displayAll() puts "Tokens:" @tokens.each { | key, value | puts key+" is "+value } end end /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/ delimiter $ CREATE FUNCTION get_keyword_id(_keyword CHAR(16)) RETURNS INT UNSIGNED DETERMINISTIC BEGIN DECLARE _id INT UNSIGNED DEFAULT 0; SELECT id INTO _id FROM words WHERE keyword LIKE _keyword; if _id = 0 then INSERT INTO words(keyword) VALUES(_keyword); SELECT id INTO _id FROM words WHERE keyword LIKE _keyword; RETURN _id; else return _id; end if; END; $ (deftemplate ask(slot title) (multislot question)) (deftemplate response(slot title) (slot answer)) (deftemplate info(slot title) (slot true)) (deftemplate solution(slot animal)) (deffacts start-program (ask (title flies) (question Does it fly)) (ask (title lays_eggs) (question Does the animal lay eggs)) (start)) (defrule init ?start <- (start) => (retract ?start) (printout t 'Animal Identification Program' crlf crlf)) LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; USE ieee.std_logic_signed.all; ENTITY alu IS PORT(inputA, inputB : IN STD_LOGIC_VECTOR(31 DOWNTO 0); aluOp : IN STD_LOGIC_VECTOR(2 DOWNTO 0); result : OUT STD_LOGIC_VECTOR(31 DOWNTO 0); zero : OUT STD_LOGIC); END alu; ARCHITECTURE arch OF alu IS SIGNAL result_temp, result_and, result_or, result_add, result_sub, result_slt : STD_LOGIC_VECTOR(31 DOWNTO 0); BEGIN result_and <= inputA AND inputB; result_or <= inputA OR inputB; result_add <= inputA + inputB; result_sub <= inputA - inputB; result_slt <= "0000000000000000000000000000000" & result_sub(31); WITH aluOp SELECT result_temp <= result_and WHEN "000", result_or WHEN "001", result_add WHEN "010", result_sub WHEN "110", result_slt WHEN "111", X"00000000" WHEN OTHERS; zero <= '1' WHEN (result_temp = 0) ELSE '0'; result <= result_temp; END arch; digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'. hex = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | digit. number = integer | decimal. integer = digit, {digit}. decimal = digit,{digit},'.',{digit}. word = letter,{letter}. if(char >= '0' && char <= '9' || char == '.' || char == '-' || char == '+') { temp = char; while(next() && (char >= '0' && char <= '9' || char == '.')) temp += char; if(/^(\+|\-)?[\d]+$/.test(temp)) addValue(parseInt(temp)); else if(/^(\+|\-)?[\d]*\.[\d]+$/.test(temp)) addValue(parseFloat(temp)); else throw new Error('Invalid number: '+temp); } VAR width = 100% VAR height = 100% TAG body { width:[width]; height:[height]; overflow:hidden; } TAG html : body; // html inherits all of the properties assigned to body TAG div; // an empty declaration that can be inherited by a Class or Id to add a tag type to the declaration ID content : div { TAG div { border:solid 1px rgb(0,0,10%); } CLASS first : div { padding:5px; background-color:#FFF; margin:5px; } CLASS second : first { // inherits all of the properties assigned in `first` margin:5px; border:none; TAG h3 { margin:{top:0; right:0; bottom:5px; left:0;} } TAG a { padding:2px 5px; } ACTION hover : a { background-color:#DDD; } // actions are applied to the element they are nested inside } ID abs { position:absolute; background-color:#0F0; text-align:center; padding:10px 0; TAG div { width:200px; left:350px; top:35px; z-index:2; } TAG span { width:200px; left:500px; top:60px; z-index:1; display:block; } } } namespace NetScan { public delegate void ErrorEventHandler(object sender, Error error); // delegate used by OnMessage event public delegate void MessageEventHandler(object sender, Message message); // delegate used by OnMessage event public delegate void UpdateDisplayHandler(object state); // used by update event to tell GUI to refresh stats // main class used to start the application class Run { static void Main(string[] args) { new Run(); } public Run() // constructor { Application.Run(new GUI()); } } } LCtrl & Up:: Send {PgUp} LCtrl & Down:: Send {PgDn} LCtrl & Left:: Send {Home} LCtrl & Right::Send {End} ^h:: IfWinNotExist WinHugs { Run C:\Program Files\WinHugs\winhugs.exe WinWait WinHugs WinActivate WinHugs Send :cd c:/code/Haskell{Enter} Send :l } else WinActivate WinHugs return try { $data = new HTMLData(); $db = new Database(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); include 'data/'.$service.'.data.php'; if(function_exists('serviceMain')) call_user_func('serviceMain', $action); else if(function_exists($action)) call_user_func($action); else throw new ScriptException('undefined action \"'.$action.'\"'); $data->execute(); } catch(UserException $e) { echo $e->toClient(true); // ClientInfo::AddError($e->file, $e->line, 'UserException', $e->message, $e->toString(true)); } catch(Exception $e) { echo $e->toString(true); // ClientInfo::AddError($e->file, $e->line, 'ConnectionException', $e->message, $e->toString(true)); } <body onresize="window.onResize();" onload="window.init();"> <a href="./" id="home_a"> <img id="logoText_img" src="images/logo_text.png" alt="Artist's Circle" /> <img id="logoBack_img" src="images/logo_back.png" alt="Logo" /> </a> </body> table { border:solid 1px #000; } th { background-color:#EEE; text-align:left; padding:3px 5px 3px 5px; vertical-align:top; white-space:nowrap; empty-cells:show; } td { padding:3px 5px 3px 5px; vertical-align:top; empty-cells:show; } tr.e td { background-color:#FFF; } tr.o td { background-color:#EEE; } tr.h { font-size:20px; } td.c { text-align:center; } td.r { text-align:right; } td.n { white-space:nowrap; } td.m { vertical-align:middle; } table.list_table thead th, table.list_table thead td { font-weight:bold; text-align:left; border-bottom:solid 1px #DDD; } table.form_table tfoot th, table.form_table tfoot td { text-align:center; border-top:solid 1px #DDD; padding-top:10px; } table.form_table tfoot a { padding:2px 5px; font-weight:bold; } _number::Parser Float _number = (_neg <|> (try _float) <|> _int) where _neg = do { char '-' ; v <- (try _float <|> _int) ; return (-v) } _float = do { a <- option "0" (many1 digit) ; char '.' ; b <- many1 digit ; return $ read $ a ++ "." ++ b } _int = do { x <- many1 digit ; return $ read $ x } _digits::Parser String _digits = many1 $ satisfy isNumber (DEFINE (Count numbers) (COND ((NULL? numbers) 0) ((= (CAR numbers) 0) (+ 1 (Count (CDR numbers)))) (ELSE (Count (CDR numbers))) ) ) function onLoad() { var elements1 = [ {n:'linkHandle_div',a:'left'}, {n:'link_div',a:'width',p:'left'}, {n:'content_div',a:'left'}]; initResize('linkHandle_div', elements1); } function getOffsetHTML() { var doc = (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body; var style = getStyle(doc); return (temp = parseInt(style.width)) ? Math.round((getWidth() - temp) / 2) : 0; } bag_to_set([], []). bag_to_set([Head | Tail], Set) :- member(Head, Tail), bag_to_set(Tail, Set), !. bag_to_set([Head | Tail], [Head | Set]) :- bag_to_set(Tail, Set), !. #include<list> #include<iostream> #include<vector> using namespace std; const int HUMAN = 1; const int COMPUTER = 2; class Nim { public: Nim(int numTokens, int playFirst); ~Nim(); void displayTokens(); bool isOver(); bool find(int token); void makeMove(int token, int newToken1, int newToken2); void undoMove(int addToken, int removeToken1, int removeToken2); int chooseMove(int player, int & bestPile, int & newPile1, int & newPile2); void runComputer(); void runHuman(); int currentPlayer; private: list<int> tokens; }; .text .globl __start __start: la $s0, float_a addi $s1, $s0, 16 # number of elements in float_a * 4 + the address of the array add $s2, $s0, $zero # starting point for loop i fori: slt $t0, $s2, $s1 beq $t0, $zero, endi # s2 is the loop index of i * 4, breaks when loop gets to the end of the array addi $s3, $s2, 4 # s3 is the loop index of j * 4 package astroids; import java.awt.Color; import java.awt.Polygon; import java.awt.Point; import java.awt.Graphics2D; public class Astroid { int direction, radius, speed, spin, spinTotal; double scale; Point center; } for num as int, element in zip(range(10), fib()): print "${num + 1} => ${element}"; print ''; gen = i * i for i in range(5); for item in gen: print item print ''; arr = array(gen); for item in arr: print item def transfer(inputPath, outputFolder, exclude = []): tempPath = outputFolder+splitdrive(inputPath)[1] if(exists(tempPath) == False): os.makedirs(tempPath) filePath = join(outputFolder, splitdrive(inputPath)[1][1:].replace('/', '_').replace('\', '_')) #include <conio.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define ICON_SIZE 5 #define MAX_NAME 7 /* Max Length of an icons name */ #define NUM_ICONS 5 /* Max Number of icons that can be read */ #define PAUSE_TIME 1000 typedef struct /* structure that holds an icon */ { int x, y; /* location on the console where icon will be dsiplayed */ char name[MAX_NAME]; int fcolor, bcolor; char pixels[ICON_SIZE][ICON_SIZE]; } icon_t; void animate(icon_t *icons, int num_icons); void display_icons(icon_t *icons, int num_icons); void move_rocket(icon_t *rocket); void move_tic(icon_t *tic, int state); void move_wink(icon_t *wink, int state); void pause(int delat); int read_icon(FILE *file_p, icon_t *icon); class Lexer def initialize() @tokens = Hash.new() end def classify(token) if(@tokens[token] == nil) if(token =~/\A[a-zA-Z][a-zA-Z0-9]*\z/) @tokens[token] = "Identifier" elsif(token =~/\A[0-9]+\z/) @tokens[token] = "Integer" elsif(token =~/\A[0-9]*\.[0-9]+\z/) @tokens[token] = "Real" else @tokens[token] = "Error" end else puts "dupliacte token: "+token end end def displayAll() puts "Tokens:" @tokens.each { | key, value | puts key+" is "+value } end end