8Jul2008

The Problem
I recently had a problem. I am a software developer and as such I use source control. For this purpose I generally prefer Subversion. I have been keeping my source repositories on an external drive with the intention to back them up to another secure location periodically (yeah, that never happens). I looked into online subversion hosting, but it seems a bit pricey for my few meager projects. I have a web host, but they don’t host subversion repositories over HTTPS as I’ve used in other situations. What to do?
The Solution
Subversion over SSH to the rescue! I actually have shell access to my web host (I can login to the server via SSH) and doing some quick research I discovered that I can run Subversion through an SSH tunnel. Cool! So how might one set this up?
Setting Up The Server
Prerequisites for the server are that you can login to your server via ssh. Got that? Good. Now while logged into your (Linux) server make sure that subversion is installed using the following commands:
which svn
which svnadmin
which svnserve
9Jun2008
Cell phones are for the most part proprietary in their platforms. Sure you can write J2ME applications for them. BlackBerry phones also have an API which you can utilize to write custom applications. It’s the actual operating system though that you really can’t get too. Don’t care? Well, then this review isn’t for you. However, if you like to slice and dice things and hack your way to hardware euphoria then read on.
OpenMoko.com is building an open platform for cellular phones. Why? To support what they are calling ubiquitous computing. Ubiquitous computing means more than computing wherever you wander: It means knowing the locale, weaving seamlessly into the local fabric, and vanishing.
So how can you jump on the bandwagon and begin to help building the next open cellular platform? You’ll have to actually buy a Neo1973 phone (pictured above)… boo! Yeah, it would be nice to be able to get a software simulator so that you can poke around for free. Not only that but at the time of this writing they were sold out of the phones so you’d have to wait until they became available again.
The consumer hardware is reported to become available “by years end.” I certainly hope so. Why? Well, I’m not so sure I’ll be jumping on the OpenMoko bandwagon, but I fully support openness in technology and competition. Openness means that more people all over the world can participate and help to make better products. Competition means… cheaper for me! If you want to check out the hardware and software specs and see some more pictures of the new open phone (Neo1973) you can go here.
Permanent link to this post (275 words, 1 image, estimated 1:06 mins reading time)
5May2008

I am in Minneapolis, MN this week for business so I’m not sure how prolific my posting will be. So I thought I’d just drop in a quick note to say, “Happy Monday!” It’d be happier if I were back in my home office, but oh well. In the mean time you can check out a previous of mine relating to travel and work - Code On The Road? Work Portability Review. Have a great week!
Permanent link to this post (77 words, 1 image, estimated 18 secs reading time)
21Apr2008
Anyone who has been in software engineering can most likely recognize the old project triangle. The basic premise to this triangle is that in software engineering you may pick only two of the tips of this triangle.
- You can create software quickly and cheaply but it will suffer quality.
- You can have high quality quickly but it will be expensive.
- You can also high quality cheaply but it will take a long time.
Now I do not believe that these are absolutes, but the reality lies somewhere in the middle. As you pull on two of the points of the triangle the third draws closer to the center thus keeping the sum of the angles to 180° (remember high school geometry?).
There have been many good discussions on this topic include this one (Lean and the Project Triangle). I’ve also recently seen some discussion about adding a fourth point into the mix in articles such as this one (The Iron Stool). This article is basically saying the points in the original triangle correspond to Time, Resources and Functionality. He then adds the fourth point as Quality. Though on a very granular level of software engineering you can separate functionality and quality into two separate points I do not think that they should be for the spirit or intent of the project triangle. Instead I would say that functionality and quality would be on the same point as they are both “qualities” or “properties” of the software being built.
So what do you think about the project triangle? Have you even heard of this nonsense before? I’ll leave you with one of my favorite software engineering quotes from a very good friend of mine. He said, “if you want it real bad… you’ll get it real bad.”
Permanent link to this post (296 words, 1 image, estimated 1:11 mins reading time)
8Apr2008
Here is the situation. You are writing a program in Java. You need to access data in a Microsoft SQL Server via stored procedure and the data has an XML field. A what field? SQL Server 2005 introduces a new datatype for XML. It is essentially a blob field that you can perform XML operations on. For the Java program though, it doesn’t really care about that functionality and can just access it to write it out to a file (or process it inline).
JDBC Support
First off you are going to need to check your JDBC driver documentation thoroughly for which operations it supports. There also seems to be some variation in the actual implementation. For example, I tried used Microsoft’s own JDBC driver in my project but it caused a strange SQL Server error to be thrown when writing back to an XML field. I could not get around it (at least not in a timely fashion) so I switched to using the JTDS JDBC driver (go open-source!).
The Stored Procedure
Let us say that the stored procedure in SQL Server looks something like this:
CREATE procedure [GetSomeData] (@NumberParameter int, @NumberParameter2 int=NULL)
AS
BEGIN
SELECT IDField, SomeText, LargeXMLField, DateTimeField
FROM dbo.SomeTable
WHERE @NumberParamter=NumberFieldID
END
… » This is a preview of Calling A Stored Procedure In Java With A Blob Field
. Read the full post (360 words, estimated 1:26 mins reading time)
4Mar2008
In the original posting, Conditional Statements And Comparison Order, I brought up a coding style used by some software engineers that struck me as odd. The practice of placing a constant value first in a conditional comparison. For example:
if("Some String" == aVariable) {
// Do some stuff
}
...
Listing 1
I never liked the way this reads in code and put forth the question, “why?” Well, this week I finally received an answer to that question. Some developers use this style in order to prevent an accidental assignment within a conditional. So if you forgot one of the equals like this:
if(aVariable = "Some String") {
// Do some stuff every time, because the assignment returns a value
}
Listing 2
So instead of having a bug entrench itself into your code somewhere that it may be hard to trace, this would just cause a compiler error (or runtime error in the case of scripting languages).
Well, I still don’t like it. What do you think?
Permanent link to this post (141 words, estimated 34 secs reading time)
12Feb2008
I apologize ahead of time for this soap box, but I have just read the nth forum posting with a response like this. I have been a fairly flexible software engineer for the majority of my career and this means that I use many different programming languages. What language do you need? If I do not know it already I can get up to speed fairly rapidly. After all good engineering is good engineering; the rest is just semantics.
That said… when switching to a new language you occasionally need to know how to do something. For instance you are trying to find out how to create a switch statement or create enumerations or some other feature that you are used to in your native language. So inevitably you ask the masses via some programming forum. This is response I absolutely hate!
XYZ feature isn’t in my language because it’s not needed. An array will handle anything in the world that you ever wanted to do. Yada-yada-yada (translation - I’m superior).
Why would you even post something like that? It is NOT helpful to anyone but your own ego. If the requested feature is not in the language why not simply state that fact. Then if you wanted to actually go the extra mile you might suggest an alternative method for accomplishing the same thing. If you really wanted to be nice you could even include a snippet of code to demonstrate the solution. I have no comprehension of why anyone would want to belittle another human who is asking an honest question and seeking help. There is nothing noobish or wrong with that. They are simply looking to improve themselves, which we should all try to encourage.
Can’t we all just get along?
Permanent link to this post (294 words, estimated 1:11 mins reading time)
12Dec2007
I am working on some legacy code that is currently in VB.NET running on the .NET 1.1 Framework. I went to add a property to a class and received this error:
Property without a 'ReadOnly' or 'WriteOnly' specifier must provide both a 'Get' and a 'Set'.
Seriously? So I have to tell you that it is ReadOnly in addition to the fact that I did not provide a Set procedure? Talk about annoying. At least it works properly in C#.NET. Well, that’s it for today’s rant and I will not get off of my soapbox. Though it wasn’t really that much of a soapbox.
Permanent link to this post (104 words, estimated 25 secs reading time)
30Nov2007
Alex Iskold over at AdaptiveBlue.com wrote a very good article for any startup companies wanting to get their feet wet in the software market. Very well written and user-friendly guide titled… well it’s the same as I titled this post.
Software Engineering Tips For Startups (the real article)
Permanent link to this post (49 words, estimated 12 secs reading time)
26Oct2007
I am not a huge .NET fan, but I am mature enough to overcome my personal likes and dislikes in a professional setting and use whatever is needed. I recently ran into a situation programming in C# that I needed to create a method that took it’s parameters by reference. Why would you want to do that? Well, a parameter passed by reference is… well a reference to the original memory location of the variable. This means that when you pass a parameter into a method by reference any changes made to the parameter within that method are preserved when the method goes out of scope. Ok, now we have that out of the way.
To create a method which takes a parameter by reference in C# you simply use the ref keyword in front of the parameter declaration. Easy! To illustrate this point I will use the standard swap method.
public void swap(ref int x, ref int y) {
int temp = x;
x = y;
y = temp;
}
To call this function I would have initially done the following:
int x = 5;
int y = 10;
swap(x, y);
… » This is a preview of Passing Parameters By Ref In C#… WHAT?
. Read the full post (438 words, estimated 1:45 mins reading time)