Contact info.
 
My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
JetBrains recently announced that IntelliJ IDEA will be open-sourced and have an Apache 2.0-licensed version with the release of 9.0.

Those who've been reading My Secret Life as a Spaghetti Coder for a long time will know I totally love IDEA.

I haven't written software in Java for quite some time, and I don't normally do "news" posts, but I know enough of you are into Java, Groovy, and Scala to make this worth your while if the $249 was pricey enough to force you into using lesser Java IDEs. Now you don't have to.

Get it and I don't think you'll be disappointed. But don't wait until 10.0. As Cedric Beust pointed out (and I'm inclined to agree), "IDEA going opensource means that it will now slowly die."

I hope not, of course, but one has to wonder.

Hey! Why don't you make your life easier and subscribe to the full post or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!



I'd like a codometer to count all the lines of code I write during the day. It should keep track of lines that get kept and lines that get removed. I don't know what that information would tell me, but I'm curious about it. It should probably work independent of the IDE, since I often use several during the day.

I'd like it if not only you would stop stealing my focus, but also provide updates in the corner of the screen. When I've put you in the background, you should let me know when you're done processing so I can come and click the "next" button. On top of that, give me an option to have you click next automatically for me.

Like 'considered harmful' being considered harmful as a cliché, I'm starting to have a distinct distaste for website or product names of the class e-removr. Or ending-vowel-removr when the last letter is an 'r'. The first time it seemed refreshing and perhaps a bit cute. By now, I'm starting to wish someone would flush them down the shittr. (Well, the names at least.)

Someone found a set of bicycle pedals that fit under the desk for me. Excellent to be able to get a little exercise while I do my morning blog-reading. I couldn't find one the last time I looked, but I did this time. I'm not sure if mine are the same, or how it will work, but I will let you know when I do.

Today is December 5th. Have you sent me your code for the contest?


Since the gift buying season is officially upon us, I thought I'd pitch in to the rampant consumerism and list some of the toys I've had a chance to play with this year that would mean fun and learning for the programmer in your life. Plus, the thought of it sounded fun. Here they are, in no particular order other than the one in which I thought of them this morning: More...


I recently found a great feature in one of the editors I've been using for coding in Ruby , SciTE: it will export to HTML! Now, no more non-color coded Java and Ruby, and no more surfing the web all day to find a colorizer online that I can easily strip out to put in my template. I really like Notepad++ (for quick edits), which is based on SciTE (or Scintilla), but it doesn't seem to have the same feature. Check it out if you need code coloring in any one of 30 languages (plus, like Notepad++, it's also super-small/fast for loading when you only need to do a quick edit).


I'm sure other editors/IDEs have this, and I'm sure plenty of people know about it already, but I stumbled on it by accident the other day and I wanted to share for those who may be in the dark:

To write   in CFEclipse, you simply need to hit Ctrl-Enter (on a Windows machine, anyway).

It's already been a great help!


As I'm finishing up a Ruby on Rails project today, I've been reflecting on some of the issues we had, and what caused them. One glaring one is our lack of automated tests - in the unit (what Rails calls unit, anyway) test and functional test categories.

The "unit" tests - I'm not too concerned about, overall. These tests run against our models, and since most of them simply inherit from ActiveRecord::Base (ActiveRecord is an ORM for Ruby), with some relationships and validation thrown in (both of which taken care of by ActiveRecord). In the few cases we have some real code to test, we've (for the most part) tested it.

What concerns me are the functional tests (these test our controllers). Of course, Rails generates test code for the scaffolds (if you use them), so we started with a nice, passing, suite of tests. But the speed of development in Rails combined with the lack of a convenient way to run tests and the time it takes to run them has caused us to allow our coverage to degrade, pretty severely. It contributed to very few automated tests being written, compared with what we may have done in a Java project, for example.

Of course, there were some tests written, but not near as many as we'd normally like to have. When a small change takes just a couple of seconds to do and and (say, for instance) 30 seconds to run the test, it becomes too easy to just say, "forget it, I'm moving on to the next item on the list." It definitely takes a lot of discipline to maintain high coverage (I don't have any metrics for this project, but trust me, its nowhere near acceptable).

Well that got me thinking about Coldfusion. I notice myself lacking in tests there as well. I'd traditionally write more in Coldfusion that what we did on this Rails project, but almost certainly I'd write less than in an equivalent Java project. And it's not just less because there is less code in a CF or Rails project than in Java - I'm talking more about the percent of code covered by the tests, rather than the raw number. It's because there is no convenient way to run them, and run them quickly.

For Rails development, I'm using RadRails (an Eclipse plugin), so at least I can run the tests within the IDE. But, there is no easy way to run all the tests. I take that back, there is, but for some reason, it always hangs on me at 66%, and refuses to show me any results. I can also use rake (a Ruby make, in a nutshell) to run all the tests via the console, but it becomes very difficult to see which tests are failing and what the message was with any more than a few tests. Couple this with the execution time, and I've left testing for programming the application.

In Coldfusion, it takes quite a while to run the tests period. This is due partly to the limitations of performance in creating CFCs, but also to the fact I'm testing a lot of queries. But at least I can run them pretty conveniently, although it could be a lot better. Now, I've got some ideas to let you run one set of tests, or even one test at a time, and to separate slow tests from fast ones, and choose which ones you want to run. So, look out in the future for this test runner when I'm done with it (it's not going to be super-sweet, but I expect it could save some much-needed time). And then the next thing to go on my mile-long to-do list will be writing a desktop CF server and integrate the unit testing with CFEclipse... (yeah, right - that's going on the bottom of the list).


Selenium is an incredibly easy tool you can use to set up automated tests for your web applications. However, if you're like me, you might wince at the thought of having to learn yet another technology - and put it off for the time being due to the "curve" associated with learning it.

To combat that feeling, I created a screencast - starting from download and going through creating an automated test suite. In about 6 minutes, you can have some automated tests for your application to run in just about any browser. The time it saves in manually re-testing is well worth the minor investment you make in getting automated tests. So, check it out. More...


Before I come across as knocking it, I want to say that people whose opinions I value tell me this is probably the best IDE for Java development. It certainly looks awesome, from the few times I've seen it in use. I haven't used it myself, since developing in Java is mostly but a (somewhat masochistic) hobby of mine, and it's a bit pricy for that purpose. But one thing about IntelliJ IDEA that I've come to loathe is this, I presume a default for files it creates:

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Sep 25, 2005
 * Time: 11:35:06 AM
 * To change this template use File | Settings | File Templates.
 */

Why is this wonderful? Because, as a developer looking at someone else's code, I want to know exactly what IDE they used to create it, and more importantly I like the clutter it provides. Seriously, I know you can change the template, but isn't this a cheap marketing ploy? If I didn't hear so many other good things about it, seeing this would certainly turn me off.


I've recently converted to using CFEclipse (whose website is down at the time of posting). I downloaded it sometime in September or October 2005 to use on my new laptop since I didn't have a license for Dreamweaver.

At the time, I only had 256 MB RAM in the laptop (now its 2 GB), so I quickly threw it away (CFEclipse, not the laptop) and started using Notepad for when I had to edit CF files, and generally shied away from doing any Coldfusion development on that machine.

Since that time, on my other home computer and the one at work, I've been using Eclipse for Java development (and more recently, the Ruby and RADRails plugins for Ruby and Rails development). So in the last couple of weeks I'd say, Dreamweaver has started to annoy me.

I was still using the first Dreamweaver MX version, so that might be the problem, but when doing anything with the file system it started to hang on me. And, since I had been using Eclipse more consistently for other languages, it was even worse because I had a constant reminder of how crappy Dreamweaver was. To be fair, I don't know if they've made the newer versions any better, but I'm not planning to try it unless someone tells me I just have to try it out.

In any case, because I was so sick of it, I got CFEclipse up and running. And is it ever awesome. The first thing I love about it is the Methods View, among other things listed at ColdFusion Developer's Journal. But that's not all! I've discovered two (probably unintended) "features" it offers:
  • When working on large files (I first noticed it on about one about 40 kilobytes), it gets slooooooow. Slow like "you could type 4 or 5 lines of code before it gets done with the first line" slow.
  • When working on even larger CFCs, the Methods View stops showing the methods and appears as it does in a .CFM file
So why is this good? Because if you are ever working on CFCs that large, your components quite likely have more than one responsibility. The annoyance is enough for you to hunt down the extras, pull them out, and make new components out of them. Design by Annoyance - whatever works, right?

And if you're thinking that its machine related, I'm on a 2.8 GHz CPU with 1 GB of RAM. Not bleeding edge, but certainly adequate.



Google
Web CodeOdor.com

Me
Picture of me

Topics
.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and C++ (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (75)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (7)
Windows (1)
With (1)
YAGNI (10)

Resources
Agile Manifesto & Principles
Principles Of OOD
ColdFusion
CFUnit
Ruby
Ruby on Rails
JUnit



RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner