Tuesday, March 6, 2012
GOTO, really?
Nice code sample from our friends at Microsoft.
Tuesday, February 7, 2012
/usr/bin/dd --progress
I really wish dd offered a --progress option, similar to scp or rsync. Do you know how long it takes to write 8GB to a micro-SD card? Neither do I, and apparently I won't find out until it's done (assuming it's not in some silent error / input state)...
Friday, February 3, 2012
Non-deterministic Compile Errors
Okay, this was a good one. You know the feeling when you're compiling code, and the compiler spits out some ridiculous error message, and you look at the code and you look and you look and you KNOW that it's right. It MUST be a bug in the compiler...right? I mean, maybe? Just this once?
Or maybe it's your filesystem! I'm building a large code tree on an embedded system, where I'm running the OS and local storage off a micro-SD card, and damned if I'm not seeing non-deterministic build results. I'll get a compile errors like "`unsignet’ undeclared", check the code, and find that it actually does say "unsigned" -- it slipped a bit while reading the source. Then I'll run "make" again, and it'll get a few files further down, then die with "stray '\3' in program". Doesn't really instill confidence in the hardware...
Or maybe it's your filesystem! I'm building a large code tree on an embedded system, where I'm running the OS and local storage off a micro-SD card, and damned if I'm not seeing non-deterministic build results. I'll get a compile errors like "`unsignet’ undeclared", check the code, and find that it actually does say "unsigned" -- it slipped a bit while reading the source. Then I'll run "make" again, and it'll get a few files further down, then die with "stray '\3' in program". Doesn't really instill confidence in the hardware...
Friday, January 20, 2012
Anchors away :-(
I think I hate any site that actually uses HTML header tags (h1, h2, h3 etc) but doesn't provide corresponding <a name="foo"> anchors so you can conveniently link into a lengthy document.
For that matter, why doesn't a modern browser like Firefox provide those automatically? If you link to foo.html#References, and foo.html doesn't have an explicit <a name="References"> tag but does have <h3>References</h3> buried somewhere down near the bottom, how hard is to figure out what the caller is trying to do? Sheesh.
(Probably some other browser does do this, and the feature just hasn't become standard yet. I'm hoping.)
For that matter, why doesn't a modern browser like Firefox provide those automatically? If you link to foo.html#References, and foo.html doesn't have an explicit <a name="References"> tag but does have <h3>References</h3> buried somewhere down near the bottom, how hard is to figure out what the caller is trying to do? Sheesh.
(Probably some other browser does do this, and the feature just hasn't become standard yet. I'm hoping.)
Friday, January 13, 2012
Graphical Google
Programmers already know how hard it is to Google certain bits of programming syntax (operators like "===", "and", etc), but fortunately most of the things we need to lookup end up being nice, unique function names (SetupUninstallOEMInf, etc).
On the other hand, it turns out that Googling LabVIEW functions is just about impossible, if you're trying to figure out what "graphical squiggle FOO" represents :-( Short of taking a screenshot, cropping to the icon in question, then doing a Google Images search for similar images (I haven't quite gotten to that level of frustration yet), you really have to know what the doohickey is called before you can search on it. And if you knew what it was called, you wouldn't be searching.
Anyway, I'm slowly coming to appreciate that perhaps there is a place in this universe for LabVIEW (if not in my heart, in particular), but it does require a change in learning styles...
On the other hand, it turns out that Googling LabVIEW functions is just about impossible, if you're trying to figure out what "graphical squiggle FOO" represents :-( Short of taking a screenshot, cropping to the icon in question, then doing a Google Images search for similar images (I haven't quite gotten to that level of frustration yet), you really have to know what the doohickey is called before you can search on it. And if you knew what it was called, you wouldn't be searching.
Anyway, I'm slowly coming to appreciate that perhaps there is a place in this universe for LabVIEW (if not in my heart, in particular), but it does require a change in learning styles...
Thursday, January 5, 2012
Slow adoption of legitimate torrents
It's kinda cool that this is the first job I've had where I'm expressly allowed by IT to run a BitTorrent client on the company network, for use in pulling-down large ISO's (primarily Linux distributions for testing under virtualization). Actually being able to leave Transmission running on my Mac Dock is pretty neat, and I'm impressed that my employer's IT staff came to the rational conclusion that a bit of upstream traffic was a reasonable exchange for the massive improvement in downstream retrieval.
However, that adds to my frustration when stuck trying to download large DVD-sized (4GB+) ISOs from the likes of Microsoft and National Instruments (LabVIEW) who have not come to the same conclusion, and still expect you to pull down such huge files via point-to-point mechanisms. Anyone who's used browser-based downloads on such a scale knows too-well the pain of a broken connection 3.9GB into a download, many of which "cannot be resumed" and leave you with a useless .part file.
Of course, some vendors are happy to fill that gap with proprietary executable "download managers" which claim support for resuming broken connections. However, such managers are almost always provided as Windows-only executables and have several problems:
However, that adds to my frustration when stuck trying to download large DVD-sized (4GB+) ISOs from the likes of Microsoft and National Instruments (LabVIEW) who have not come to the same conclusion, and still expect you to pull down such huge files via point-to-point mechanisms. Anyone who's used browser-based downloads on such a scale knows too-well the pain of a broken connection 3.9GB into a download, many of which "cannot be resumed" and leave you with a useless .part file.
Of course, some vendors are happy to fill that gap with proprietary executable "download managers" which claim support for resuming broken connections. However, such managers are almost always provided as Windows-only executables and have several problems:
- All my machines are laptops, e.g. designed to be closed, moved around, shifted between IP networks, and periodically go to sleep (none are high-uptime server-class desktops).
- My "best" machine for downloading large files is a Mac, making .exe download managers futile. While I can run Windows in a VM, I'm bouncing between different Windows VMs and snapshots all day, and being stuck running a single one just to maintain a download obstructs my flow.
- Many download managers (and many websites) decide to be "clever" and automatically detect what operating system your browser is based on, and therefore auto-select what version of their software you must wish to download, and then refuse to allow you to alter their selection. I've actually encountered several products which refused to allow me to download a Windows version from a Mac browser, or vice-versa.
- Yes I know about "wget -c" and so forth, but not all download sites expose a canonical, persistent URL (too many are based on session cookies and dynamically generate redirection URLs from .asp logic and whatnot).
- Torrents aren't just more robust, they're demonstrably faster. I'd far rather pull the contents from a few local seeds on adjacent networks than rely on a single pipeline from the primary vendor.
All in all, it would be so much simpler if legitimate software vendors would make increased use of powerful, reliable, standards-based tools like BitTorrent to distribute their larger (>1GB) offerings. With easy SHA1 and MD5 checksums, there's no real risk of malfeasance, so...what's the obstacle?
Subscribe to:
Posts (Atom)