- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
c:> move C:\Windows C:\Linux c:> reboot
hmm, it doesn't boot anymore.. indeed I have converted Windows to Linux.
*disclaimer, this is just a joke, I am happily running Linux at home
Admin
All the more reason to use a robust existing library, most of which provide support for these types of quirks and poorly formed data. Most of these libraries that I know of provide support for arbitrary field and record separators along with support for handling many of the other issues common in messy csv data.
Can't wait to see what Amit comes up with when he is asked to parse XML. I imagine that the comments would be something along the lines of "Amit was correct in writing (his own feature-poor version of Xpath) from scratch...".
Bottom line kiddos, hopefully you aren't Tony, but don't be Amit.
Admin
It's not hard to see how a civilian user would expect that changing an extension name would change the file format. It's actually not that unreasonable a metaphor, and UI design has really trained the user to expect this sort of thing. We do make it too easy on users, and therefore they need to know less and less, and they fulfill that need admirably.
And since we're importing that sort of UI design into programming (visual this, auto-fill that), we're now training "IT professionals" to be as dumb as regular users. Funny story, yeah, but not surprising at all.
Admin
The main thing appears to be managing scheduled jobs. I once tried to get a program to run once a day on a server at a specific time. I was told that this was impossible. Eventually, I convinced them that it was, and the scheduled job runs as expected. But it took hours and hours to convince them of this.
Admin
I can believe that he thought changing the extension to PSV would magically convert the file. I've had a client change an extension from XLS to CSV thinking the same thing. When questioned about it, the response was, "What do you mean it doesn't work that way? I've been doing that for years!" facepalm
Admin
Awesome.
Admin
Baidu (http://www.theregister.co.uk/2010/06/29/baidu_software_developers/) is apparently looking for a few good westerners to fill out their ranks. I suggest Tony. He'll have there site running smoothly and gaining market share in no time!
Admin
Come to think of it, I wouldn't be surprised if this feature were added to future reditions of Excel. I'm sure someone in Redmond is reading this.
Captcha sino - equals zero, no?
Admin
A word of warning for everyone who has never been tasked with writing a (general) CSV parser. This is a minefield interspersed with toxic snake filled pitfalls in a room with walls moving inwards. Please excuse my clumsy english. There is almost no specification on what "CSV" means, other than that there are to be commas (or another seperator char). There are myriards of possible ways to specify encoding, escaping, validation special cases and bullshit rules that will bite you in the ass. Using an existing library for this will most certainly hurt you even more, as you encounter files that use stuff that no one has ever thought about. Don't even let me get started about interpreting semantics. You're better off using .xls files and parse them with poi or a similar library.
Admin
abigo: We're gonna need abigo boat.
Admin
TRWTF is you mistaking the help-desk position for a developer position!
Captcha: incassum
Admin
A lot of large bureaucracies have the special department for their incompetents. In the federal government, these departments are often referred to as turkey farms.
Admin
Admin
People can be that stupid and more. In one place, I did internal tech support. I remember once getting a request, along the lines of "How do I print in landscape?" or something. Anyway, this was the time of MS-Word and Clippy, I opened up Clippy and typed "How do I print in landscape?". After some stupid animation, it gave the correct answer right at the top. Some hours later, another request from the same person, same procedure, I type it into Clippy, and Clippy gives the right answer. Only one of the ten got the a-ha moment: "Hey, you're just typing what I ask into that help thing. I can do that!"
Admin
As I recall, Excel expects the .csv extension for any record separator. So, one makes PIPE separated files using the CSV File format menu option, choosing PIPE rather than commas.
Admin
Well, Tony kind of has a point.
Changing a file extension seldom does any good, so it arguably would have been logical to make Windows Explorer, maybe even REN to disallow or shun that. Instead a separate tool for that would have been made available or grave "are you sure" -warnings printed when trying to change the extension. That would have prevented so much morony in the world.
I also think that the government is doing great job keeping us safe!
Admin
There's two answers for you:
Oh, there most definitely are.
If you don't know who that person is in your office...
Admin
Tech Support is often over the phone. Users don't see how you solved the problem.
Did you show them how to use the Clippy help feature? You need to explain it to them once.
Then, and only then, can you confirm their the stupid ones.
Admin
FTFY
Admin
I was going to say that TRWTF was that the author of the article seemed to think we need to be told what a pipe is.
But no, the rest of the article was definitely TRWTF.
Admin
The funny thing is, I once had a mp3/"video" player that played .mtv files, and it turned out that the .mtv video format was just an mp3 with a load of JPEGs glued on the end.
Captcha: nulla - I'va dereferenceda nulla pointa!
Admin
File extensions are a staggeringly simple concept yet a concept that works beautifully. Windows users have ultimate control over registered file extensions, which gives them ultimate control over what file types get launched by what programs. If it ain't broke, don't fix it.
Admin
"bueraucratic"
Someone forgot to spell check here.
Admin
There are situations where renaming a file extension will cause something to magically work - if the extension was wrong in the first place, changing it to junk will case many programs' format auto-detector to kick in. (Say, your media player confused on which codec to use.)
That being said, I am the Tony of my office but changing the separator char in a parser someone else wrote is not rocket science. Even assuming you just renamed the extension, one look at the debugger would show your mistake without having to call someone else over.
Admin
How about memories of punctuation Nazis? To wit:
We don't share guys here. Are you sure you're at the right site, "Dick" Hertz?
Admin
Admin
It's quite valid for some XLS files. A CSV file renamed to XLS opens in Excel like any native Excel file. In those cases, you can indeed revert.
Of course, CSV->XLS always works and is far more useful. Especially if you need to write out Excel files for some reason... which coincidentally is the only reason I know that this works.
Admin
Admin
There's a reason I did that. There's a bonus joke in that, if you're clever. A stupid, immature joke, but a joke nonetheless.
Admin
Oh, patently false! File extensions are a hack. The name of the file (and the extension is clearly part of the name) should have no relationship to the data type of the file. It's nothing more than an ugly variation on Hungarian notation.
Before the days of metadata, it made sense, but in this modern era, we need a real type-system, not an ugly hack.
Admin
actually, before Mac OS X, all of the previous Mac OS's had the file type stored in file meta data, NOT in the file name.
implicitly linking file contents to (partial) file name was deemed ridiculous, up until NeXT was absorbed by Apple.
file type was file type, and file name was file name. neither had anything to do with each other.
Admin
This warning has existed since at least Windows XP. Explorer asks for confirmation whenever you try to change a file's extension, and warns you that "the file might become unusable". People ignore it. "Stupid computer, always questioning everything I do. Of course I want to change this file extension; I know what I'm doing."
In Vista/7, renaming a file in Explorer only selects the filename, minus the extension. This at least makes accidental extension changes much less likely, but won't slow down a determined idiot (assuming they managed to find the "display extensions for known file types" switch in the first place).
Admin
Oh yeah, sort of skipped that. Corrected above. Confirmed. Fixed typo, too. Getting lots done.
Admin
But that's doesn't even resemble a pipe! It's more like a long boat of 14 oars or a some king of exotic centipede.
Admin
TRWTF is that we're still using file extensions instead of storing file type information in the metadata for the file (and curse Apple for reverting to this horrible arcane practice).
Admin
But sometime it DOES work.
As an example take this data and save it in a file, test.html, when you double click on it, it is an html file. Now rename the file to test.xls. Magic. Its a spreadsheet file. Why shouldn't this work for everything?
Admin
Excuse me while I go hang myself.
Admin
And that was painful if you tried to work with files from PC machines or Internet. If I recall correctly, files from a non-Mac disk were either recognized as text or considered random blobs of binary data and downloaded files worked only if the server set correct MIME type and MacOS recognized it. Changing the file's type without touching contents wasn't easy, for reasons others have already described.
Admin
Admin
Right - hide information from the user. Promote stupidity, it works wonders.
(actually, UNIX was using metadata in files, probably before you were out of short pants, but we won't go into the magic numbers system, because you'll probably continue to whine)
Admin
File extensions were idiotic when IBM put them on their mainframes long before Microsoft was anything but a malevolent conspiracy between a couple college dropouts, and they're still idiotic today. Don't put metadata in the name. Just put the name in the name. Is that concept so hard to wedge through your brain?
Admin
I hope this was a joke, because otherwise you have rotten gorgonzola where your head should be.
No. That is an HTML file. Simply because both IE and Excel know how to import it means nothing.
Admin
When I open an image in GIMP and do a Save As and change the file extension from .jpg to .png, GIMP actually knows to change the file type from JPEG to PNG. I kind of doubt the guy in the article was familiar with GIMP but it's not really that idiotic of a concept.
Admin
If you like to fix broken windows the entire day, that is your problem. There are plenty to things to improve out there, enough to keep TI one of the biggest industries.
Admin
OK. Now where do I put the path?
Admin
Admin
You're an idiot.
... sorry, reflex response, that was supposed to be directed at Tony up there.
Admin
Sadly, I've worked with "developers" like that.
I can understand getting a "It's not working. :(" e-mail from a helpless customer (cannot know better) or a tester (whose function is to report a defect, perhaps characterize it, but certainly not to fix it).
But not from a developer... at least not before doing at least a modest effort to get it to run or to understand what could be making it blow up.
Admin
Admin
Tony lives up to all of my expectations of a CS graduate
Captcha: suscipit - It's too hard... suscipit and come back later