En Garde – Untapped Type Power

I was teaching an introductory Java class the other day. We were covering some of the basic methods available to handle some common tasks. Among the items I showed them was the Integer.valueOf() method. In Java, valueOf() simply takes a String representation of an integer and returns the strongly-type value of that integer. I wanted my students to know it existed, and I, of course, pointed out a common pitfall. If you pass valueOf() a String that is not a valid representation of an integer, you will see a runtime exception. I paused after I pointed it out in class for a second. I asked, “Why on earth are we allowed to pass in a String value that doesn’t represent an integer in the first place? I have no idea.”

I don’t think my students quite took my meaning, but I do think the question is valid. Java and C# style object oriented programming (OOP) includes a way to make sure function (or method) parameters meet requirements: the type system. We’re told we should use it from the time we’re beginners at these languages.

So why does almost no one actually follow the best practices for preventing runtime failures at compile time? Continue reading “En Garde – Untapped Type Power”

Wizards & Warriors & Wheels

Eric Lippert has a very nice series outlining some common pitfalls of solving a seemingly simple problem in C# (and object oriented programming in general), that of encoding end-user requirements into the type system via inheritance. I thought it was very though provoking and well done. In the end, the solution he comes up with left me nonplussed, so I wanted to ponder on it here.

Continue reading “Wizards & Warriors & Wheels”

GovMoneyDirect Benefit Cards

I want to make a proposal. I propose we give every adult a government benefits card, along with a matching money account it can make payments from. Let’s call it the GovMoneyDirect benefit card. Now, all government benefits will flow through this card, with cash deposited once per month. You’re not allowed to transfer money out of the GMD account; you can only spend the money in that account directly at a business. We should probably also make a rule that the benefits can’t be spent online (that’d be a little too private). And when I say all government benefits, I’m talking about social security, supplemental security income, veteran’s benefits, food stamps (SNAP), WIC benefits, unemployment benefits, housing subsidies, energy assistance, the earned income tax credit, child tax credit, and all appropriate tax expenditures (other deductions and credits). This should represent just about the sum total the government is giving almost all US citizens in direct aid that isn’t strictly healthcare-related. Continue reading “GovMoneyDirect Benefit Cards”

Dropping Dropbox Part III

Last we left off, I was in search of a new solution for secure cloud storage, given that the last product I’d picked turned out to be less than ideal. Since one of my main complaints was the unreliability of the Tresorit clients, I decided to look again at finding a way to use one of the big-name services. That means I need a way of encrypting my files locally before sending them over to the enemy.

Continue reading “Dropping Dropbox Part III”

Dropping Dropbox Part II

Looking back over my post on dropping Dropbox, I feel a tinge of shame. There is so much hope in that post. It turns out that while the pace of software development has quickened and the quantity of app alternatives is increasing, the quality of those choices might not be keeping up. Making a piece of software might be easy, but making a good piece of software remains difficult. I won’t apologize for my starry-eyed optimism, but I’ll at least relate my less-than-ideal real-world experience in searching for a new cloud storage provider.

Continue reading “Dropping Dropbox Part II”

Jitterbit Logging and Error Notifications #Boring #SomeoneHasToDoIt

I got a question from Veronica in the comments of the Jitterbit Best Practices post asking about specifics on logging and error handling.

Out-of-the-box Jitterbit actually provides decent default logging and notifications, but the details can be really lacking. It does require a bit of tinkering to get exactly the information you want recorded or sent out exactly how you want it.

Continue reading “Jitterbit Logging and Error Notifications #Boring #SomeoneHasToDoIt”