Archives for programming

Trying to Dig a Little More In-Depth With Maven

I’ve been reading Maven: The Definitive Guide (affiliate link) as a Kindle eBook and finally got to the point of trying the first example project. The book had mentioned that maven might be installed on Mac OS X already (due to usage with some versions of XCode). Magically, it’s there: So far, I like the [...]

Java code to test if a string is a valid java identifier.

public class IdentifierTest {   /** * @param args the command line arguments */ public static void main(String[] args) { for(String arg : args) { boolean start = true; boolean validIdentifier = true;   for(byte b : arg.getBytes()) { if(start) { validIdentifier = validIdentifier && Character.isJavaIdentifierStart(b); start = false; } else { validIdentifier = validIdentifier [...]

Haskell resources

In order to reclaim some of our programming mojo that has waned from years of maintenance programming and meetings, a couple of us programmers decided to go and try to learn a completely new language–Haskell. I think this expedition was spurred by a blog post titled Great resources to learn Haskell. I’m as much a [...]

How I studied for the Sun Certified Java Programmer [SCJP] 6 Exam

Including an inline review of two SCJP study guides. Disclaimer: This is not a guide to passing the test with zero experience and no preparation. The SCJP exam will quickly expose lack of working knowledge. I have roughly 15 years of experience with programming in C and derivative languages, including about 1 year of Java [...]

Boxing of an Integer and conservation of space in Java

Apparently, boxing of an int literal initialization into an Integer class will result in two different objects being assigned the same space in memory if the number is 127 or smaller, but different spaces in memory if the number is 128 or larger. Take BoxTest.java: public class BoxTest { public static void main(String [] args) [...]

I love treating primitives as objects #ruby

#script to generate a .csv testing results file puts “Day,User ID,Action,Start Time,End Time” (1..28).each{ |day| puts “#{day},system,1. Load Step,hh:mm:ss,hh:mm:ss” puts “#{day},system,1a. Raw Data Load,hh:mm:ss,hh:mm:ss” puts “#{day},system,1b. Cube Build,hh:mm:ss,hh:mm:ss” (1..8).each { |user| (1..15).each { |report| puts “#{day},#{user},2. Report #{report},hh:mm:ss,hh:mm:ss” } } (1..5).each { |user| puts “#{day},#{user},3. Query,hh:mm:ss,hh:mm:ss” } }

Mobile Billing Meter

Billing Meter bit.ly link or Billing Meter tech0x20 link. This isn’t perfect. First of all, some connections are just too slow for a constant refresh rate of less than 20-30 seconds. Secondly, I think many mobile browsers have a refresh cut-off at which point they will ask you if you really want to keep refreshing. [...]

Two page mobile magic 8-ball

Two page mobile magic 8-ball Had to use random numbers to prevent caching of pages by mobile web browsers. It’s entirely possible that I made this workaround too complicated, as I had a file version problem on my local drive (I was updating the wrong file.) The first page uses a random number in a [...]

Mobile Web Browser Magic 8-Ball

Magic 8-Ball. I still want to be able to detect the whether mobile or not so that it will work (and be optimized) for where the user is coming from.

Ambi – an RPN programming language

Thanks to @ConstantineXVI for pointing this out… Ambi – an RPN programming language.  This language is implemented completely in Javascript.