Archive for March, 2008

Creating a Binary File Using a Ruby DSL

March 25th, 2008 | Category: Networking, Programming, Ruby, XML

So I used ruby to convert a simple hex string into a binary file in Converting hex to Binary in 4 Languages. Today I was trying to create a mixed ascii/binary file at work and created a little Domain Specific Language that has good possibilities.

NOTE: There is an expanded version of this script here: A Better Binary File Generator DSL in Ruby
Read more

Comments are off for this post

Why C Switch Statements Should go the way of the GOTO

March 15th, 2008 | Category: C, C#, Programming, Ruby

The venerable C switch statement keeps showing up in other languages presumably because the people who write new languages are familiar with C and don’t really think about it.
Read more

2 comments

PI Day!

March 14th, 2008 | Category: Uncategorized

This isn’t strictly computer engineering, but at least it is math. Today, 3/14, is PI Day!. Enjoy.

Comments are off for this post

Embedding Rhino Part I: Parsing Command Line Arguments in JavaScript

March 11th, 2008 | Category: Java, JavaScript, Programming

Rhino is a JavaScript/ECMAscript implementation in Java. Using the new java1.6 scripting API you can now easily embed JavaScript into your Java applications. I thought I’d try writing yet another implementation of the net_tool application using Rhino. Originally this was going to be a single article, but it turns out to be a two-fer.
Read more

Comments are off for this post

Converting hex to Binary in Java Too

March 05th, 2008 | Category: Java, Programming

So apparently the hex to binary in 4 languages portion of this web page is what gets the most google hits and who am I to argue? So without further ado, hex to binary in Java as well…

Read more

Comments are off for this post

Writing a Wordpress Plugin

March 02nd, 2008 | Category: JavaScript, PHP

As an experiment I wrote a WordPress plugin that turns [wikipedia]c++[/wikipedia] into c++.

Read more

1 comment