I’ve been doing heavy refactoring over the last 48 hours to cope with epic VMware fail. One part of that has been the necessity to do something pretty tricky, and as it turns out, Apache Commons has a massive shortcut I thought I’d share with the rest of you. Imagine there are multiple tree branch paths and let KX equal the terminating value:
A.B.C.D.K1
A.B.K2
D.K3
I needed to merge these paths so that I ended up with one hierarchy:
A
|
|--B
|-- K2
|
|--C
|
|--D
|--K1
|--K3
I knew how to do this merge with linear performance, but I was trying to come up with a solution that was more optimal. It turns out Apache already has one, and it’s called Hierarchical Configuration. Basically you just do the following:
import org.apache.commons.configuration.HierarchicalConfiguration; HierarchicalConfiguration hc = new HierarchicalConfiguration(); hc.addProperty(“A.B.C.D”, “K1”); hc.addProperty(“A.B”, “K2”); hc.addProperty(“D”, “K3”);
The object will create new branches if the paths do not yet exist, but if they do, the values will simply be inserted into the appropriate location. This has been a massive timesaver and hopefully you all will find it useful as well.
Filed under: software development | Leave a Comment
Tags: hierarchy, java, merge
I did not find any good documentation on how to update a git submodule reference to the HEAD of a branch so I created some projects on github.com to illustrate how to do this in a straightforward manner. See https://github.com/akutz/SubHead to learn more.
Filed under: software development | Leave a Comment
So I farked up when I was building several MSI packages using the Microsoft Windows XML (WiX) Toolset. I broke a sacred covenant of MSI development and violated the component rules.
This would not normally be a huge concern since the members of the components, the files, are not going to change. However, I did run into an interesting issue. Because my company’s versioning scheme is MAJOR.MINOR.REVISION.BUILD where BUILD is a value auto-incremented by the build server, as far as MSI is concerned 4.0.0.123 is the same version as 4.0.0.187. And because our patch strategy is to simply release a hot-fixed MSI, we have to allow same-version upgrades.
Anyone familiar with MSI upgrades knows the dirty secret that allowing same version upgrades allows same version downgrades. Except these downgrades would result in files disappearing from the filesystem. After much research I determined the issue was because of my stupid decision to group multiple files into single Components. MSI was not applying the standard file versioning rules correctly, and thus during a downgrade the following steps were occurring:
- Version X is installed on a system and user attempts to install version X-1.
- The installer appears to calculate which Components need to be installed by version and date. It does not include the X-1′s Components because they are already on the system.
- The installer removes X’s Components from the file system.
- Finally, the installer chooses not to install X-1′s Components because the installer has already calculated that the Components on the filesystem, at version X, were newer.
I found myself in quite a pickle. How do I prevent same version downgrades when the only varying component of the version is the 4th component (which again, MSI ignores)?
Continue reading ‘Preventing Same Version Downgrades with WiX’
Filed under: software development | 1 Comment
Tags: custom action, msi, windows installer, wix
Grove-unmade
Last fall I waited in eager anticipation for my Grove Bamboo case. Simply put, Grove makes these wonderful, beautiful, bamboo laser-cut iPhone cases. In fact, they are now making one for the iPad as well. However, I must warn possible purchasers of the Grove cases that even through everyday use, your work-of-art case will likely fail within six months. Here is a picture of the bottom half of mine now:
One cannot argue that the Grove made iPhone4 case is nothing less than perfect. I have received more comments on how amazing the case is then I can count. However, for $89, a case should not fall apart after taking the bottom half of it off an on on a regular basis just so you can dock it or plug it into a car charger. That said, I may buy another one eventually, if Grove has strengthened their manufacturing process (and glue that holds the black trim to the bamboo). For now I’ll probably invest in a Vapor case that is all aluminum. Should help block the attenuation issues with my phone anyway.
Filed under: apple | 3 Comments
Tags: bamboo, case, grove, iphone4
I Love Balsamiq Mockups
Let me just say right off the bat, that I hate, hate working on Functional Specifications, and the reason for my loads of loathing is the user interface (UI). Managers want specifications to include screenshots of the UI, but as I’ve tried to explain, it is a chicken-and-the-egg situation. Do you want a specification, or do you want me to work on the UI?
The answer to this problem is usually creating wireframe mockups of the eventual UI. However, I’ve yet to find a mockup tool that I like. I’ve tried tools like Visio and OmniGraffle which are good tools, but they focus more on diagraming and process flow than wireframe design. Not to mention the aforementioned applications share a particular trait with an almost standard for creating mockups — Axure — complexity. The barrier to entry for these applications for doing something as simple as creating mockups is relatively high. I have longed for something simple, powerful, and straight-forward.
And then I found Balsamiq Mockups.
Filed under: software development | 3 Comments
Tags: balsamiq, emc, mockups, vmware, vsi, vsphere, wireframe
VSI 4.0, i18n, and Localization
At least one EMC customer has reported issues with running VSI 4.0 on a system with a non-English locale. Unfortunately that is to be expected. I mentioned in a tweet a few days ago that VSI 4.0 does not currently support non-English locales at this time, and I’d like to take the opportunity to explain why.
Filed under: software development | Leave a Comment
Tags: i18n, localization
i18n f4n
When designing EMC VSI 4.0, early on I made a decision that the entire core framework was going to be i18n compatible from the ground up. Unfortunately this led to colorful weekend. While this topic has been discussed time and time again, it’s so important that it bears repeating: just because your copy of Windows is set to use a different region’s locale doesn’t mean that you’re not still using good ‘ol en-US when it counts.
Filed under: software development | Leave a Comment
Tags: .net, currentculture, currentuiculture, i18n, localization
