Resharper

Ok, so I know the blog-o-sphere is covered with these kinds of posts, but I just had to say how amazed I am with ReSharper. It’s amazing! In a way it’s not really amazing at how much ReSharper does, it’s more amazing how much Visual Studio doesn’t do. It’s ridiculous.

Maybe it’s because I was born and raised on Eclipse, but I expect my IDE to do a lot for me. Code generation, refactoring, file renaming, unit tests: i want it all. Visual Studio does… not much. I finally got it running on my Vista box this morning (a pain), and I was shocked at how little Visual Studio let me do. I was talking to Tom and Shey while was getting my development environment setup, and the conversation pretty much went like this?

James: Can I do this?
Shey: No.
Tom: Get ReSharper.
James: What about this?
Shey: No.
Tom: Get ReSharper.

I’m sure you can see where this is going. I’ve been kind of paying attention to dialogs as I coded through the day (I started an open source project I hope to release soon so I could get back in the C# groove), and almost all the ones that are actually useful have the ReSharper icon in the upper left (good marketing btw).

In short, as far as I am concerned, Visual Studio without ReSharper is pretty much worthless.

PS- In my sickest most depraved daydreams I envision coding C# inside Eclipse with all it’s goodness. Actually, that desire reduced significantly as the day progressed (post-ReSharper installation), but I still think it’d be neat.

BTW- ReSharper won’t find your unit tests if your class isn’t explicitly marked public. It doesn’t give very helpful warnings to that effect either. Just so you know. It just says, “No unit tests found in file”. It makes sense, but neither Tom nor I caught it at first.

BTW2- No static members in interface declarations in C#? Seriously? I must be trying to do things the Java Way. I have ILoggerFactory, which SimpleLoggerFactory implements. Currently I have to instantiate SimpleLoggerFactory then call simpleLoggerFactory.GetLogger(this.GetType()). Any suggestions?

On Democracy

So Visual Studio 2008 is out, and by all accounts it is pretty bling-tastic. LINQ is getting a lot of press since it’s release late last year. I just finished reading this article over at SD Times, and I wanted to comment.

Democracy is slow. Technology moves fast. I’m not sure they’re a good mating. I’ve heard it claimed that a negative part of Microsoft’s development platform is that it is constantly changing. Java hasn’t changed very much. They added some stuff in 5 and 6, but nothing like what MS is doing in every incremental revision of .NET. .NET is really impressive these days. It’s not one language that’s impressive, or one technology, or one tool, but the entire platform. There’s a lot of new technology that is put together really well.

I think this is due to the fact that there is someone, somewhere in Microsoft with “vision”. Maybe not just one person, but at least some smallish team leading development efforts. Java has implemented this sort of open democracy JSR proposal process, but I’m not convinced democracy belongs in software development. I feel that someone or a small group with a passionate vision can create new innovative things, while a large democracy oriented team just sort of takes so long that it’s always playing catch up. It’s probably “safer” to have a democracy, but taking risks is an important part of progress.

Maybe I’m wrong. What are your thoughts? Are there software projects where democracy created very innovative things that I’m not considering?

On Exceptions

Since I just upgraded WordPress (It’s like it dreams of being as secure as bind or sendmail), I could write another article on why wordpress sucks, but that is boring and everyone has so instead I’ll write something about exception handling.

Code based on examples from sun javadocs on exceptions

try {
  doStuff();
} catch (ArrayIndexOutOfBoundsException e) {
  // Die Violently
} catch (IOException e) {
  // Die Violently
} catch (PuppyOnFireException e) {
  // Gasp in horror
} catch (MilkLeftOutOvernightException e) {
  // Become Annoyed
} catch (SuperNovaException e) {
  // Die Violently
} catch (BirdFluException e) {
  // Die Violently
} finally {
  // Oh make it stop make it stop!
}

Eww… I’m not impressed. There are some ideas floating around, and I’m sure I’m not the only one who has come up with this, but it seems like we already have a compressed syntax for these things. I present Case’d Exceptions:

try {
  doStuff();
} catch (e) {
  switch ArrayIndexOutOfBoundsException:
  switch IOException:
  switch SuperNovaException:
    // Die Violently
    break;
  switch PuppyOnFireException:
    // Gasp in horror
    break;
  switch MilkLeftOutOvernightException:
    // Become Annoyed
    break;
} finally {
    // Oh make it stop make it stop!
}

Ok now everyone argue about Fall Through and how horrible it is. And the syntax could probably be cleaned up.

It’s interesting, Python kind of irritates me with it’s “whitespace as syntax” (I was tempted to write “nonsense”), but I think it’s just because I’m getting old and grumpy. I actually tend to favor syntax with fewer {}’s all over the place. They’re not magical. In fact they’re kind of ugly and noisy and gross. There’s not a significant line savings with Case’d Exceptions, but to me it does look marginally cleaner.

And after all, cleanliness is next to godliness… and kittens… or something.

Coming soon: a blog entry on how the JVM handles polymorphism. Why? Because I got my ass thoroughly handed to me on an interview question on exactly that topic. Ow.

PS: I still frown on the following, I’m just lazy, and in this case it does make things a little less ridiculous:

try {
  // I hate when brackets are on the same line as syntax/code
}

Thesis/Dissertation AntiPatterns - EPS Files

So you’re writing your brilliant thesis in LaTeX, and very probably you are converting your figures and images to EPSfiles. That’s what I did, because nothing else would… you know… work.

Problem:
I deleted the originals. I figured “Meh, it’s just a format conversion I can convert it to anything later.” That was apparently wrong. I have all these figures, and for some reason this journal I submitting them to wants them in the most bizarre format (write your document in word, include all figures as separate files in CMYK format as TIFF files). That may not sound bizarre, but it’s very bizarre to me. I blame it being a bioengineering journal and I am used to computer science journals (who almost uniformly want LaTeX and pdf documents).

Anyway, I have been unable to convert these figures out of EPS to anything. I don’t know why. I guess if I had Photoshop I might be able to, but nothing I’ve tried can perform the task. ImageMagick pretends to, but I just get blank (but correctly sized???) images.

Moral: Keep your original files when you convert to eps. You’ll need them later. Regenerating them is a huge waste of time and in some instances may be impossible.

Domain Specific Languages: The New DSL

Everyone is blogging about Domain Specific Languages these days. Even beyond DSLs there are a lot of languages these days to care about. C++, C#, VB, ASP.NET, Java, Ruby, Python, PHP. The list goes on and on! Programmers need to know more languages than even the most freakish polyglot savant.

Sometimes we like this. This is where DSLs come in. Sometimes it’s so much easier to express a concept in one language than another, especially if your language was designed for one specific task. But it’s becoming next to impossible to use all these different languages simultaneously without a huge amount of glue code being written.

Have you ever been to a multilingual house? People change languages in mid-sentence, using words which more closely reflect the concept they’re trying to communicate regardless of its language. They use words which come more easily to them.

Imaging being able to choose your language in mid-program, in mid-method even. Yes, projects like Ruby on the JVM and on the .NET CLR and similar languages on virtual machines are nice, but trying to bridge the JVM to the .NET CLR or, heaven forbid, native code is painful at best. We have all these languages, but sometimes we have extant code which needs to be utilized. This is still very difficult to do.

Maybe all the old code will have to die. It lacks metadata. It’s much closer to the hardware than anything running in a virtual machine. Can a virtual machine expose enough functionality that we no longer need to drop down below it to do nitty gritty things?

My perspective is warped I suppose, I have to interface with hardware components. Actual real-world hardware components, and it is terribly annoying. What’s more annoying is I know how difficult the problem is.

I hate when I only have problems and no solutions.

Online Backup Throwdown, Part 3?!

I thought it was over, but then David Friend, CEO of Carbonite had to go and make some good points that I felt it only fair I should recognize.

Carbonite and Mozy target fundamentally different sets of users. Mozy feels more “Power User-y” because it has more knobs and buttons and whistles, but Carbonite’s interface is much simpler. I think that was one of the factors that made me a little miffed when I was trying to use it was that it didn’t explain why it wouldn’t backup files on my external drive, the menu just simply wasn’t there. It made me feel like something was wrong.

I claimed Mozy’s interface is “way better”, but in truth it’s way better for me. If I were to setup a backup software on my mom’s or dad’s computer (which I have been considering), I would definately go with Carbonite, for the same reason that I prefer Mozy: the buttons and knobs (or lack thereof). Carbonite also has a faster restore time, which would probably confuse my parents less. (”I can’t get to my file backups for how long!? Why? Why aren’t they in the tubes?”), I don’t know how long the restore time is in Mozy, I haven’t had a chance to use the restore part yet, but from what I understand there is some waiting involved.

A critical part of my needs though is backup of my external drive, because I bought my computer with a really wimpy drive in it because I got a good deal and I just use my external drive for all my storage. I don’t have a 200GB mp3 library, I just have my photos on it and my documents. I need to back that up. Carbonite can’t (currently) do that, so to me it’s an unacceptable option.

So Spin The Choice and make your own decision as to which feature set you need and which backup service is best for you. I know several people using each service, and all of them are happy. I don’t know anyone who has Mozy or Carbonite who isn’t happy with it. People who aren’t happy are those that don’t do backups and lose lots of data. So I think it’s well worth having one, whichever one. Both make backing up your data retardedly easy.

Me? I currently feel dirty for spending upwards of $8 on a jar of super fancy pineapple salsa.

Online Backup Throwdown, Part 2

Update: Please also read part 3 before you make your online backup service selection.

In my previous entry on this topic, I described my problems with online backup services Carbonite and Mozy. Interestingly enough, both companies contacted me with regards to my post.

Carbonite’s CEO David Friend (or rather, I suspect, a PR firm masquerading as David Friend Update (Oct. 27, 2007): it was not a PR firm but actually David Friend, CEO of Carbonite. My bad.) commented on my blog in reply to my complaints. You can view the exchange here. I can understand not supporting backup from network drives, but I have a great deal of difficulty understanding the choice to not support backup from external drives. External drives are not uncommon with home users.

Thankfully Mozy does not suffer from these shortcomings. Bryan Fultz from Mozy contacted me directly offering me support on getting my Mozy installation to function. That impressed me a great deal.

It made a big impression on me that Carbonite was more concerned with their image than with backing up my files, while Mozy was more concerned with troubleshooting my installation and getting my data backed up.

Today, Mozy won one more paying customer.

BTW- Now that Mozy is setup and functioning, I can safely say from personal experience that the interface is way better than Carbonite’s.

Carbonite: FAIL, Mozy: ON NOTICE

Update: Please also read part 2 and part 3 for my complete take on online backup services.

Ok, so I’m a little OCD at times… especially when making purchases. It took me almost an hour to pick out a pair of cowboy boots when I was at Allen’s Boots in Austin last time my partner and I went on vacation. I am picky. I like things to be nice and to live up to my expectations.

I’ve been waffling between Carbonite and Mozy for like a week. It’s 5$/mo, in the grand scheme of things it doesn’t really matter. If one sucks I can switch. But that’s me. I try to minimize these tendencies, but sometimes I just can’t let go.

Here’s the breakdown of what I learned before I got into either.

Mozy

  • Better client
  • Has varying levels of service (Free/Home/Business)
  • Recently bought by EMC
  • 5$/mo, 60$/year

Carbonite

  • Cheaper (50$/year)
  • Bad Logo
  • Single level of service

This is what I’d heard inferred from the blogs, reviews, and company websites. I flip and flop, and actually create my Mozy account, download and install the software, only to at the last minute change my mind and uninstall it without configuring it and decide I want Carbonite. I was scared by the EMC acquisition a little. I thought they might want to make it more corporate and less home user friendly. This was compounded by their already tiered pricing schedule. I don’t understand how a business needs to pay $0.50/GB/mo but a home user has a flat rate. A larger business would probably use more yes, but a home business is probably going to use about the same as a home user. It seemed a bit lawyer-y to me, and with the acquisition by EMC I only foresaw that getting worse.

So I installed Carbonite, set it up, and then went to go try to back up my external 500GB drive. That’s when Carbonite FAILED. They don’t support backing up external and/or removable drives. They just don’t. The application (which is kind of annoying and only seems to exist as an explorer extension. I couldn’t find any interface which let me just select folders and see what folders are already selected) simply didn’t register my external hard drive as something it could back up. Then I checked their support website (which for me at this exact moment is generating errors instead of search results about 4 out of 5 times I try to search) and found this customer support article. They don’t support backup of external devices.

“Check back soon for a Carbonite service plan that will allow you to back up your external drives.” Yeah I probably won’t.

Bad Carbonite Logo

Ugly!

And another thing, unrelated to their performance as a backup service, but perhaps of their performance in the marketplace: their logo is ugly. It’s this weird lock that looks like a 3rd grader drew it. A backup service’s logo should instill feelings of “Your data is safe. You have nothing to worry about. We are rock solid and hardcore.” This logo makes me feel like “Your data will be colored on and hung on the side of the refrigerator.”

Ok, then I did a system restore to get all that crap off my computer and then installed Mozy. Straight out of the install, it says it can’t connect to the service. I check, the service is running. It simply won’t connect. Shey says check my firewall, I add the program according to the Mozy support article on firewalls. Still no go. I have to disable my windows firewall in order for it to work. That’s awesome.

So right now I am not a happy camper. I just want to backup my data. I think I can get Mozy to work with a little more futzing with firewall settings. I was planning on paying for it, but for right now, I’m just going to back up my doc files and use the free version until I’m sure it’s not completely worthless.

I know one thing for certain. Neither of these services is nice, and neither of them have lived up to my expectations.

New Java Plugin!?

*sigh*

So there is this interview over at JavaLobby with Ken Russell discussing the new Java browser plugin. Go ahead… go read it… I’ll wait…

*waits*

Ok, they’re just now writing a new browser plugin for java? I have a friend (a user, not a programmer) who absolutely swears java is horrible because of his experience with it. Everytime I hit a webpage with a java applet, my browser freezes for like 20 seconds, and maybe 1 out of 5 times the entire thing will just crash. Unfortunately experiences such as this are many people’s primary experience with java. They see a java logo on a webpage, and their browser freezes/crashes. Great PR.

I’m excited about a new plugin, but I’m excited about it from a user perspective. I think it is personally too little too late. The idea that java inside a browser is horrible is already firmly entrenched. There would have to be some huge killer app(let) necessary to convince the world otherwise.

Imagine if they had rewritten the browser plugin back when they should have. Imagine a YouTube powered by java instead of flash.

But now? It’s already been done. Java is doing something that’s already been done by everyone else a couple generations ago. Java is behind the curve, yet again.

Light Microscopy Automation Library Needs Developers

Developers Needed:

LMAL - Light Microscopy Automation Library

LMAL is an Open Source Java library for the automation of common tasks performed on a standard light microscope including such features as slide scanning, autofocus, spectral image acquisition, Z-stack image acquisition, and time-lapse capture. It aims to provide a standard API for manipulating microscope hardware irrespective of manufacturer and provide a standard framework on top of which light microscopy applications and experiments can be designed and executed.