Displaying posts tagged with

“programming”

Craig 1, Hacker 0

When you purchase a product from our website, you click on a link to download it. The link appears to be legit — just a regular link to a file on our server. But it’s not. The file does not actually exist. We intercept the link and parse it to determine what to download to […]

Braces and Indenting: You’re Doing it Wrong

Java, C++, Objective-C, and C# all use braces ( { and } ) to delineate the beginning and end of blocks of code. Over the years, several styles have evolved, with the worst of them dominating the literature. Once you see The Light you’ll wonder how we ever let this get out of hand. Before […]

Objective-C Memory Management

Perhaps I’m showing my age, but I’m getting awful tired of language designers trying to improve on C/C++ memory management. Just for review, here’s how memory management should work: void foo() { // x is created on the stack. It is deallocated at the end of // the block/function and therefore its lifetime matches its […]

On Open Source License Agreements

While I’m a fan of all the open-source code available on the Internet these days, I sure wish they paid more attention to the licensing agreements to which they require us to agree when we use their code. They’re just confusing. Most just go along with them, but it bothers me enough that I try […]

Implementing Interprocess Locking with SQL Server

I suppose everyone does this and I just haven’t heard about it. I don’t get out much, so it seems cool to me. When we redesigned our company website (www.laridian.com) a couple years back, I needed a way to automatically update best-seller lists, new releases, and other dynamic data on the site without relying on […]

QuickVerse/Parsons Technology History

I wrote this article back in 2002 to tell the history of my writing of QuickVerse and my time at Parsons Technology. I always intended to keep it up-to-date but never got beyond what you see here. Some people read this and accuse me of living in the past. Those people can go sit on […]

Handy SQL Server Snippets

There are a few SQL Server tasks I do infrequently and always forget the syntax. I’m going to start collecting them here. ALTER TABLE ExistingTable ADD NewColumn INT NOT NULL DEFAULT(0) WITH VALUES This adds a new column with a default value of 0, and populates existing rows with 0 in the new column. ALTER […]

Fixing Mac OS X 10.7 “Lion”

Apple has a bad habit of hiring kids who have no concept of what came before them. This article helps you undo some of the changes they inflicted on Mac OS X in their attempt to make it “better”. Reversing the Scrolling Direction In 10.7, using the MacBook trackpad or the scroll wheel on your […]

Parcelable

General Description An object that implements the Parcelable interface can be “flattened” for inter-process communication or, as is the case most of the time when I use it, for placing in a Bundle (which is a Java associative array or dictionary). The documentation makes this seem a lot harder than it is. The sample code […]

Externalizable

Introduction Java supports two techniques for object permanence: Serializable and Externalizable. These two are related but different. Serializable is more automatic and less flexible. Externalizable is less automatic but more flexible. Serializable is rumored to be slower in some implementations than Externalizable. Because Externalizable gives me a lot more flexibility, I choose to use it […]