... you go and do stupid shit like making it difficult as all hell to convert a date-containing String to a Date. Java, I shouldn't need a Calendar and Scanner in addition to the String and Date. Why can't you be like your older sister, Objective-C? SHE knows this move. Usually won't even make me tell her what format the date's in, she just figures it out, and she never makes me write my own scanning, or, worse, RegEx routines. Java, I need you right now, but as soon as this project is over, I'm going to leave you for Objective-C. Again. If it wasn't for your too-sexy web application frameworks, I wouldn't even be using you. There, I said it. I only love you for your WebObjects. Oh, I didn't mind you at first. You had your quirks, but Garbage Collection teh new hawtness. Only when it took three or four different, inconsistently-named classes to get you to read and write from and to files, did I wonder if there was something missing. As the years went by, more of your quirks kept appearing, and for a while I avoided you altogether. I said it was because I was taking a break from programming, but really, I was cheating on you with Objective-C. But then... then I saw you had gone and gotten yourself a pair of web frameworks to enhance you: EOF and WebObjects. They made you irresistible. So I came back to you. And for a short time, there was bliss. But now, Java, you're really pissing me off. I don't know how much longer I can stand it. EOF and WO, especially with the Wonder framework, are amazing. But they can't hide your flaws completely, Java. Your Standard Library - your very heart and soul - SUCKS ASS. We may be stuck together for the duration of this project, and maybe one more, but after that, we're through. Sincerely, O2C
What IDE do you guys use for The Java? IntelliJ IDEA is awesome. The Java is powerful! Actually I think I still prefer C++, it's just so much more brutal. On the other hand, plain old C is even more brutal, but I'm not a fan of that. Also... why not just write code to do string->date by hand? Seems like it wouldn't take more than a couple minutes. Also, have you tried: Code: [I]DateFormat.parse(String s).[/I]
Plain-old C is gorgeous. She just lets you do whatever the hell you want to with her, and she doesn't exactly raise a finger to help. But if you fuck up, and it's guaranteed to be your fault since you told her exactly what to do, boy, she lets you know it. Meanwhile, never trust Java. She's a sneaky bitch that'll sleep with your best friend to get back at you for leaving the seat up.
Eclipse. Why? WOLips, and since WO is all I'm using Java for, I'll use the IDE where the tools for WO are. If I'm not working in Obj-C for fun or C++ for work, I tend to write in C-ish C++. I love the simplicity of C, but there's just a bit too much boilerplate for simple things, so I use C++ for those, and C for everything else. Oh, and DateFormat.parse() was deprecated a while ago, and is not in Java 1.5.
Oh Christ, not Eclipse. I don't think I've ever seen that thing work well. We get to use it for development on the Linux side of things in my classes, and it's just a train wreck. On brand new dual-core machines with like 4 gigs of RAM, I can out-type the text rendering in Eclipse sometimes. Something is seriously busted there, and we have yet to figure out what.
My annoyances with Java are to the point where I don't mind Eclipse anymore by comparison. Except for the fact that it's a resource hog, seems to be written in a version of Java that had a mark-and-sweep GC, and chooses the most inopportune moments to actually do so (such as in the middle of figuring out an auto-completion), it's really not so bad.
I'm an old C and C++ guy, and, though I briefly flirted with Java and almost settled on Visual Basic, I've found my new home: C# I did my first project in it this year and I'm very, very pleased with it. *puts on flameproof suit to ward off the anti-Microsoft slings and arrows*
Eclipse is the suck. Jetbrains IntelliJ IDEA is really, really awesome. Of course, a commercial license will cost you six hundred bucks But you can get it free if you are using it for only open source projects though.
C# is nice, it's really similar to Java though. Somebody once said: "There are only two kinds of programming languages: those that people always bitch about, and those that nobody uses."
Visual C#'s parser is well and truly moronic. Code: int x = 0; int y; while(1) // or even substitute a do-while here { ... x = 5; ... break; } while(...) { ... y = x; } Of course, y will be 5 at the end of this block of code. VC# throws a warning however, something about cannot read from unassigned local variable. It's mostly harmless, and it appears to work as intended, but the parser should know better than that. Even gcc gets this right on the C/C++ side of things.
Never experienced that issue... are you sure you didn't just do this? Code: int x; Rather than: Code: int x = 0; If that was the case, I'd say it isn't too crazy to throw a warning. In either case, IntelliJ is absolutely diabolically good at telling you (without being annoying) when your code is unnecessary. In other words, it's good at finding out when conditional things will always we true/false etc. Or when you have a redundant variable or something like that. In the case of a loop such as the first one you provided, it'd give you a little notification saying that you should just drop the while since it really doesn't do anything. (always is true, breaks after first loop, might as well not exist).
I don't have the exact code snippet, as I later found that the particular method I was using there was no good, so I changed it, but I'm pretty sure it did that (and yes, there was a conditional for the break). I wrote up a blog entry about it when it happened, and that's what I copied the code above from.
SPARC assembly kthx. MIPS ain't bad but register windows are the COOLEST, SPARC has 'em, MIPS doesn't.