Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, December 21, 2007

trying out ruby

Last weekend was a slow weekend. It was really nice for a change. On Friday, Jason (from work) sent me a link to some demos of ruby on rails. He had been talking about ruby off and on for some time now - usually in the capacity of comparing developers.

I didn't want to be the kind of developer who had nothing to offer to a discussion about C# vs Ruby any longer, so I decided to heed his suggestion and spend some time with Ruby. So I spent nearly all weekend with Ruby and what have I got to say? Not much aside from a superficial evaluation.

I spent a lot of time getting the environment squared away. The actual Ruby on Rails install was simple. However I tried to configure it to work with Microsoft SQL Express. This was a bad idea. The reason this is a bad idea is the same reason the RoR motto is "convention over configuration." When you install RoR, you can see clearly that it plays well with MySql. Instead of going with the flow, I decided to travel upstream for several hours. Just like my analogy, I didn't get far. Right. So. Install MySql and things work like a charm.

Once I got the environment settled, it was time to get down to work. RoR installs with a small, super-powered notepad clone with some syntax highlighting. It's pleasant if you're into painful and tedious opening and closing of files. Otherwise I recommend an IDE I discovered, Aptana Studio, where I was able to start making sense of things.

So what amazingly stunning web sites did I produce? I walked through the tutorials I found online and attempted to apply them to the concepts I've been considering for my side project, ScoutOffice. Let's just say I'm not rushing out to become a Ruby developer. I'm still struggling with getting the relationships between various models right.

Despite my troubles and apparent inability to learn a language quickly, Ruby on Rails does have some interesting characteristics:

Drink the Kool-Aid. If you can swallow the quirky and debatable conventions Ruby on Rails prides itself on, it is truly amazing how quickly things can "just work." I was able to develop all CRUD actions within mere minutes provided I used MySql, named my data table as a plural, used an integer as the table primary key identity, and properly cased things. If you don't mind sacrificing a debate in best practices, this could be your language!

Ruby can make the bad web UI guys look really bad, really easily. It has this nifty scaffold feature which (I'm sure no real Ruby developer uses that) creates web forms for you on the fly. However the layout and style leaves a lot to be desired. That's great if you know how to modify those things easily. For those of us who struggle with Microsoft Paint, we're screwed. Ruby has a way of showing how bad one's UI skills a re in an instant.

So I have a pretty superficial opinion of Ruby on Rails at this point. It has a lot of merits, but I'm about to give up my day job. I do think I'll be revisiting it however and I haven't ruled it out as a possible avenue for ScoutOffice to go down.

Wednesday, November 21, 2007

ScoutOffice revisited

It's been four months since my (first?) update about ScoutOffice. It's really hit a snag which I'm trying to deal with but seems to be a large deal breaker. Let's see if I can explain this in English.

image The BSA launched a software platform called ScoutNET in 1999. It was supposed to be revolutionary and answer our Scouting prayers and probably dispense candy to small children. It failed to do any of those things (I'm still waiting for my M&Ms). However it's still around. It manages to provide some level of backbone on a national level I guess. Councils can submit and request reports from it. Local units are supposed to be able to recharter with it. Yadda yadda.

From best I can tell, back in 1999 and 2000 the BSA allowed only four software vendors access (and subsequent certification) to a ScoutNET api which facilitates the communication between local units and their respective councils.

Since then, two of those vendors have stopped supporting their products leaving two to choose from.

My unit is slowly getting on the technology revolution (they think this Internet thing may be around for a while). And of course I want to gallop and sprint through and make cool stuff happen. I want to frolic (yes and perhaps prance) in the fun of writing software for them! But this stupid ScoutNET certification. /grumble

I've scoured the net trying to figure out what this api is. It looks like it's not publicly available. I'm currently grappling with the idea of writing something that simply imports/exports similarly to the remaining two certified vendors, but that's a hack and it's going to be painstakingly hard.

I just want to the BSA to get off their 1930s attitudes and catch up already.

Wednesday, November 14, 2007

xkcd compiling shirt

I showed Anne this comic and she was quite unimpressed. I can't blame her really. It's not like I'd understand some comic about teaching. However I told her I wanted the shirt (second down) inspired by the comic and she knocked me! I do agree that geek shirts with random obscure and technical jargon isn't usually my style, but comon'... they're sword fighting!

Perhaps Santa or the birthday fairy will remember this since I don't think Anne was taking notes.

Thursday, July 12, 2007

ScoutNet .. err... I mean ScoutOffice

One of the current side projects I'm working on is developing a website for my Boy Scout Troop. Scouting is defiantly and dismally in the stone age. It's pretty depressing. So I started working on this website. I think it should cover both the public-facing aspects as well as be a record keeping tool.

I've actually started and stopped work on the project several times over the past few years. That's the thing about my side projects... they rarely make it to completion. It's a nice fad for a period of time, but the novelty eventually wears off and some new obsession takes its place. Hopefully I can be a little more committed to this one.

I would like to continue reporting my progress in my blog. Sort of a development diary. I love those YouTube videos that show someone's progress building a huge Lego structure over time. The closest approximation to that I can make (without opening the project source and having it make much less appeal to a reader) is here I suppose. Perhaps someday the project will merit its own site.

So one of the first things to conquer is the tool set. I've been fighting with them for a day or two. I have a few major requirements:
  • stay legit (don't pirate),
  • WYSIWYG (or at least the Cassini developers' web server) web form editing,
  • and have the ability to unit test the most code possible.
I started with Microsoft Visual Web Developer Express. It covers the first two requirements. However it does not (or I have not found a way to) compile the site into dlls. What's the problem? You can't unit test a project that can't create dlls. At least that's how NUnit works. Perhaps there's another free .NET unit testing platform that can somehow negotiate web projects.

I fired up Microsoft Visual C# Developer Express. This would give me the first and third requirements. I was even able to publish the class library dlls into the web project! However it was really a sloppy mess and it didn't feel right.

While doing some reading I stumbled across sharpDevelop, a free and open developers' IDE. It said it offered WYSIWYG form development and the ability to compile web projects. I could sense my dreams coming true. Boy I was off! I run it for the first time and instantly feel like I'm using a horrible knock-off. It has integrated NUnit testing and some other nice features. However upon closer examination, I see it does not do web form development - it does windows form development. I merely dabble in ASP.NET. I need some WYSIWYG or Cassini action!

So back to the Web Dev/C# Dev I went. I fought with the solution and project files for a good while. I managed to get them into locations I can cope with. I have the web form editing and the unit testing. All is well with the world.

Two other issues presented themselves while working last night however. I needed to name the solution! Naming a solution often correlates to the name of the "product" itself. I really wanted to name it ScoutNet (a la Terminator movies) however BSA actually has a (really crappy) platform called that (don't worry - we're in no danger). With that name taken, the next best thing I could think of was ScoutOffice. It's only a matter of time before Microsoft comes knocking on my door (/eyes).

The other issue I found was a bit more technical. I started working on membership functionality first. I wanted to create new users. And I was trying to be slick and override the System.Web.Security.MembershipProvider since that's supposed to be an easy route to insta-membership functionality. It is pretty slick, but it requires I use the System.Web.Security.MembershipUser. Ok, so I make my user a child of that. But by doing so, I set up the dependency that all of my lower tier projects need System.Web. That's just not acceptable. So I guess I'll be writing the membership functionality by hand.

Since this is sort of the inaugural post regarding ScoutOffice, if there are any readers out there let me know what you think. If you have any features that you think would be cool to add pass them along.