I'm a huge fan of Git. Used properly, Git's branching system can be immensely powerful. In fact, it forms a core part of our engineering workflow at the office. By providing a healthy degree of isolation between different changes to the codebase, we can provide QA with a clean way to test various change sets in total isolation before we produce a release candidate.
This sounds rather nice until the realization that after we finally get a release candidate that we accept, somebody is left we the rather tedious job of removing all of the source branches from our repo.…
Just a quick Ruby tip today. If you use the Paperclip gem for image attachment with Ruby, you might have noticed the option to use a hash as part of your URL. Using this provides a simple way of creating a secret URL for your images. Rather than an easily predictable URL, a section of the URL created by hashing a secret key with a row from the database. For instance, the following code you might get a URL like /avatars/square/c2794196caf44b11b0b7b70cfd12ab88.…
In Linux you can make or restore an image of a drive with the dd command. For instance, creating a disc iso of a DVD could be done by specify the block device for the dvd-rom as the input file and a new file for the output file.
dd if=/dev/sr0 of=/home/jdoe/cdrom.iso Another frequent use would be to make a bit-for-bit copy of a disk as a backup.
dd if=/dev/sdb of=/dev/sdc What happens if you need to make a bit-for-bit copy of a drive to a remote machine though?…
In my first year of college, there was a festival of sorts on campus. It was a day designed to provide the college with goodwill and easy photo ops for the pamphlets they would use to lure freshmen the next year. Though only a side-effect in the sight of those organizing the event, it managed to provide those of us who would normally spend the entire day in class with a chance to stop and imagine what it would be like to relax.…
A fun idea came to me a while back: using x86 assembly, could I implement a basic if/else statement that runs arbitrary code without using any conditional instructions? If you care to try out the challenge, I'd recommend using a language that provides low level memory access and then taking a quick break from reading further.
Determining Inequality The first part of the problem that we need to consider is this: is there any way to tell that whether two values are equal without using the conditional operator?…
For anyone that attended my talk “Moving from Manual to Automated Builds” at Tech Mixer U, I'm posted the slides with extra notes and our full demo ant script.…
On any long running project of consequence, refactoring will happen. While usually this is a good thing, it can sometimes lead to the case where all references to a file are removed, but the file itself still sits in the codebase. Though not technically a problem in itself, this can cause a bit of unnecessarily bloat and confusion, not to mention unnecessary time spent updating these orphaned files to support future refactoring efforts.…
Refresher A few months ago, I started writing about my personal requirementsfor simplifying the process of using testing feature branches at work. I'd made quite a bit of headway, but never got around to posting an update. Thankfully, DavidRuttkadecided to remind me that the article needed some resolution. 1
In order to get everyone to buy into the concept of feature branches, the process of being able to test a feature branch needed to provide next to no overhead.…
If you really care about your sanity and the sanity of those around you, you probably start most projects by creating a build script of some description. 1 If you've compiled Java or .NET, or if you read the Ant primer then you're probably familiar with writing an XML based build script. Adobe Flex application can be built in the same way, with just a few steps.
Prerequisites Basic Compilation We'll start by creating a very basic build.…
Over time, I've started noticing a trend: as humans we have a great aversion to pain. Okay, that doesn't really make me a master of the human mind, but it's still a starting point. Hearing this, an appropriate response would be suprise: how could it have possibly taken that long for me to come to that realization? I suppose the real issue isn't that people don't like discomfort, but that I'm starting to see the things that people are willing to sacrifice just so they don't have to endure a little overhead now and then.…