IS Department


Ruby Development in Visual Studio

Posted in Programming by Brian Russell on March 31, 2007

I just came across this add on (Ruby In Steel) which supports Ruby / Rails development inside Visual Studio.  I am going to install the free personal edition and update this post with my thoughts.

There is a free e-book on the site as well that covers the Ruby language.

Advertisements

Authentication in Ruby On Rails

Posted in Uncategorized by Brian Russell on March 28, 2007

Basic User Authentication In Rails – This article is great.  It covers everything you need to fully implement authentication in your Ruby On Rails sites.  What I like most about it is that it is a full step-by-step how to roll your own.  There are several other authentication engines out there, but this allows you to customize and tweak it to meet your needs, plus you know all the details of how it works.  Another bonus…unit tests are included in the article.

Editor for Ruby on Rails (and other languages)

Posted in Programming by Brian Russell on March 28, 2007

I have been toying around with either learning django or Ruby On Rails lately.  I have finally settled on learning Rails.  Both have their strengths and weaknesses (although not many weaknesses to be honest), but the two downsides I found were that django doesn’t have AJAX support included by default, and Ruby On Rails doesn’t have authentication and authorization support included by default.  I was thinking that Python would be a better ‘general purpose language to learn’, but the truth is I want to build web apps more than I want a general purpose language (after looking into Ruby the language, I can argue that it is also a pretty good general purpose language as well).  I found out that I can add authentication and authorization into ruby easier than I can add client side AJAX support into django.  I know that is some pretty weak decision criteria, but that is what I have…plus, I liked the concepts in the Ruby language just a bit more than Python.  The Ruby language had more ‘fun’ factor to me.

Now that I settled on a web framework (and a language), I needed a good editor.  Basically two editors kept coming up in my searches; RadRails and JEdit (the RadRails page isn’t displaying for me in IE, haven’t tried FireFox).  After digging into it some more, it seemed that JEdit was a very popular choice, and you can use it for more than just ROR.  It supports tons of pluggins, including Python in case I later try out django.  I am all for learning an application that I can reuse with other languages and on different platforms.

Since I picked JEdit, I then needed to set it up for ROR development.  I found this post that covers everything you need to do to get setup with intellisense, documentation, console window, etc for efficient ROR development.

I will continue to write about my learning in future posts.

Programming In Windows – Getting Started

Posted in Uncategorized by Brian Russell on March 26, 2007

(I have been trying to get this post written for a week or two now, but things keep getting in the way.  It wasn’t until Ben from DevelopmentNow wrote his latest post that I was re-inspired to finish this post.) 

I recently noticed just how easy it is to get everything you need set up to start development in the Windows world.  This post is aimed at helping others who are looking to get into development on the Windows platform, but just don’t know where to start.  Development itself is hard enough, but if you don’t know where to start, it makes it that much tougher.  Plus, I will show you how to do it without buying any software.  It is all free.

There are 3 things you are likely to need in order to develop software.  First is the application in which you write your code.  Second is some kind of database engine.  Third is source control.

The IDE

Lets start with number 1, the application you will use to write your code (commonly referred to as IDE or Integrated Development Environment).  There are many different IDE’s out there, but I am only going to show you one popular one to keep this easy and focused.  Microsoft offers ‘lite’ versions of their larger IDE free of charge.  Calling these versions ‘lite’ might be downplaying their functionality quite a bit, because these versions offer a lot of functionality.  What is missing are some high end tools that, frankly, I rarely use as a professional developer.  These versions are called the ‘Express Editions‘ from Microsoft.  When you get to that page, you will find a series of options to pick from.  I am going to assume you want to start out developing Windows applications, but you could pick Web Development just the same.

So it isn’t enough that we had to pick which type of applications we are planning to build, now we need to pick the language we are going to write our code in.  Since this article is aimed at new developers, I will help you decide.  VB or C#, you can eliminate C++ right away unless you know you need it.  So now we are down to two.  VB tends to be less cryptic looking to new developers, and has a good support structure on the web.  Pick VB unless you have your own specific reason not to.

So now you should have narrowed down the IDE to download and install (Visual Basic 2005 Express Edition).

The Database

There are many good free databases out there, but I am going to make it simple for you.  Since you are doing Windows development with the Express Editions of Visual Studio, you will want to use SQL Express for development.  SQL Express is a slimmed down version of SQL Server.  It is just like the above IDEs that I mentioned, very functional but missing the very high end features that most developers don’t need.

Luckily, there is only one version of SQL Express, no language choice needed.  There are two different packages you can download though, and I recommend the package that includes the Advanced Services.  It is a much larger download, but you get some important tools with it:

  • SQL Server Management Studio Express, a graphical management tool based on SQL Server Management Studio that makes it easy to manage and administer SQL Server Express databases.
  • Reporting Services, an integrated report creation and design environment to create reports.
  • Full-Text Search, a powerful search engine for searching text-intensive data.

Source Control
It is funny just how rare it is that anyone tells a new developer about source control.  Maybe there is a reason, just too much other stuff to learn.  Well, I don’t want to pass over this necessity of development.  If you have never used it, you will never think you need it, but trust me, you do.  Luckily it is very easy to do.

Source Control is a way of checking in and out your files and maintaining a history of those files for future reference.  Imagine you write some great code, you then find something wrong with it (we call them bugs) and you have to go in and start trying to figure it out.  Maybe you re-write a bunch of that great code just to find the bug.  You find and fix the bug eventually, now you run your application and realized that you changed a lot more code than you thought because something else is broken, but at this point, you don’t remember every change you made so you don’t know where to start looking.  Source control will help you out in this area.  First, because you should be saving your work into source control often, you will have full history of each change you made.  Second, source control allows you to quickly take an old version of a file and compare it to the file you have currently been working with.  You will easily be able to see the differences and find what you need.

Another benefit of source control is that you are free to experiment with your code, and if it doesn’t work out, you can revert back to the last version you checked in and start over from that point in time.  It is taking snapshots every time you commit your changes, and you can roll back to those any time.

Enough soapboxing, let me show you how to get started.  I am going to recommend SVN (or Subversion) for your source control software.  Even better than that,  I am going to recommend a site I recently started using called Unfuddle.  Unfuddle gives a small free account that includes source control with SVN, plus it gives you project management features as well.  Since you probably have some application in mind you want to build (why else would you want to learn this stuff), you will probably want to manage that application as it is being built.  Unfuddle allows you to create tickets for yourself (I call them reminders or tasks of what I have left to do).

In order to use their hosted Subversion repository, you will need a client application to download and upload your source code.  For that I recommend Tortoise SVN.

Source control is needed, but maybe not right away.  You don’t need it for running through tutorials, but once you start a real project, start using it immediately.

Learning (and finishing this long post up)

OK, all the tools are laid out.  I will recap (you should download):

Now, after you get setup with the above, you will need to learn what to do.  I recommend these sites to get started:

Learn Windows Development

Learn SQL Server Express

Learn TortoiseSVN

Learn Subversion

Django Tutorials

Posted in Programming by Brian Russell on March 23, 2007

I have been finding myself falling away from the “MS” development tree more and more lately.  Last week it was dedicating some time to Ruby On Rails and this week I have been looking into the Django web framework which uses Python as its base language.  The Django web framework really enables you to get up and running with dynamic web sites as quickly as possible.  After going through the documents, I can easily see how it could eliminate some of the tedious work needed in todays complex web applications.

I read through the 4 tutorials on the Django site.  Here are the links to them and what they cover:

  • Tutorial 1 –  Getting started with a new project, creating a simple model (objects to interact with), then playing with it to learn some of the built in features.
  • Tutorial 2 – Moves into the built in admin functionality and starts to show how easy it is to customize it.
  • Tutorial 3 – This one gets into the URL parsing functionality and introduces views.
  • Tutorial 4 – Finishes up the view talks and gets into optimization.

The tutorials were good, but don’t stop there, go on and read more about the template language here.

If you don’t have any experience with Python, you should read their Python For Beginners page.  It has all the resources you need to get started including tutorials.

Right now I am kind of split between the two frameworks, Rails and Django, I think I am just going to have to decide on one and go forward with the learning cycle.

Stuff (I am too lazy to think of a title for these links)

Posted in Programming by Brian Russell on March 22, 2007

Ten things learned in ten years as a software developer – I thought this list was right on.  If you are a developer, read it.

Open letter to Scott Guthrie – Have you used testing in the new Team System editions of VS?  It sucks!  I think I gave it an honest effort, but just give me NUnit and I think things will be fine.

GUIDs, SQLMesh, Semantic Web Will Fail, and Ands

Posted in Programming by Brian Russell on March 21, 2007

Programming stuff today…

GUID’s or Auto Incrementing ID’s – Jeff Atwood posts about using GUID’s instead of auto incrementing ID’s in the database.  He links off to this post which goes into more detail.

Why the Semantic Web Will Fail – I have always felt that the Semantic Web is just too idealistic for my life time.  I would be happy if it existed, and I hope I eat my words, but I believe along the lines of this guy.

SQLMesh – Allows you to search your database schemas (including stored procedure and trigger contents).

Difference between & and && – Some more programming knowledge for you to learn. 

Better Web Application Framework

Posted in Uncategorized by Kevin Colyar on March 21, 2007

Very good video by Sean Kelly at NASA discussing and comparing Zope/Plone, Ruby on Rails, Turbogears, Django, and J2EE.

http://video.google.com/videoplay?docid=6297126166376226181

.NET Guy asks, “Why Learn RoR?”, Ruby on Rails Security, SCIgen

Posted in Uncategorized by Kevin Colyar on March 21, 2007

Why Would a .NET Programmer Learn Ruby on Rails?
http://www.infoq.com/articles/Netter-on-Rails

Ruby on Rails Security
http://manuals.rubyonrails.com/read/chapter/43

Section of the Ruby on Rails manual dealing with SQL injection, cross-site scripting, etc.

Just For Fun:
SCIgen – An Automatic CS Paper Generator
http://pdos.csail.mit.edu/scigen/

“SCIgen is a program that generates random Computer Science research papers, including graphs, figures, and citations. It uses a hand-written context-free grammar to form all elements of the papers. Our aim here is to maximize amusement, rather than coherence.”

Creating Thumbnails Of Images In .NET

Posted in Programming by Brian Russell on March 13, 2007

I came across this post on how to Create High Quality Thumbnails with .NET.  Since we are currently starting a project that will require this type of functionality, I thought I would post the link here for easy retreival.

Next Page »