Codeplex and SilverSurvey

by Jesse 24. April 2008 16:31
Based on some feedback I got -- I've decided "why not?" and tossed the survey engine I started up to CodePlex.  I'm not going to allow anyone to join in just yet, not until I get the basic stuff setup and there's going to be a nasty learning curve that I feel coming.  So far, I've got the db project up, along with the core project itself (its kinda nice having TFS again!) -- as soon as that's done and rollin', feel free to join in.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Visual Studio | Silverlight | C# | Coding | Tech | Linq

Unable to start debugging ...?

by Jesse 9. April 2008 02:47

Came in this morning and was smacked in the face with this... 

I'd been dorking around in the project in somewhat strange places so this wasn't a complete and total surprise.  I reset IIS, restarted the comp, went into the web.config and searched for red squigglies, rebuilt the solutions a billion times, cleaned the solution, looked at the error output, no help.  After a random web search and seeing suggestions that I've already tried, I go into the asp.net config settings within IIS for the particular app I'm working on (maybe I set it to v1.1? nope), click on the tabs and I get this surprisingly useful error.

...Debug cannot be parsed ..."On is not a valid value for boolean".  This also gives you a line number...gasp!  I jump into the web.config and sure enough on line 9 ....

custom error mode on, debug mode on ...how quaint ...thanks vstudio for not pitching a (useful) fit!  If you ever run across a strange cannot debug error, I suggest going into the asp.net config and clicking on the tabs!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Visual Studio | Misc | Weird

Selenium and the Kiss Theory

by Jesse 3. January 2008 03:17

I've been tasked with testing our ajax enabled admin site for a project we've been working on for a little while now.  Jim, the head dev, asked me to use this thing called Selenium to test it with since current unit tests wigs out with ajax items.  So off I go to figure this thing.  After a short learning curve, its not all that hard, but I DEFINITELY recommend some downloads to supplement.

If you're lucky enough to be like me and know absolutely nothing about how this thing works, don't worry -- it only took me ...2 hours? to get this running and firing off tests.  This should cut that down into a few minutes.  Before I send you off into the wild unknown, here's a market-less overview of what this thing is.  Selenium is a web unit tester that uses specifically formed html pages (tables, thats it) to run against your site.  That's it, thats all.  All you need is the site setup locally and this thing installed in another place, using the same IIS.  Now was that so bad?

Now for the meat.  Download this (its small, under 2MB), create a new IIS app and dump the zip file contents into it.  Wow that was hard.  Navigate your browser to your new IIS app/index.html and you should something like this.

Click the Selenium TestRunner, it'll bring you to another page, on the left, you'll see "Test Suite" and a link, click go, and a ton of stuff will appear.  At the top right, you'll see "Selenium TestRunner" in bold and "Execute tests" -- click the left most of those tests (this is run all) and wait a minute -- it'll rip though a ton of tests.  Most, if not all should pass (ideally, all pass).

Ok, great it works, now what?  Here's were I take everything on their site and ignore it.  "But what about all the functions, methods, blah blah?!?" I like to cheat and work more efficiently by letting software do the work and thankfully, they have and "IDE" for download as a firefox extension -- besides, reading the site its like reading msdn, yea its "cool" but 99.999999% of it you won't use.  Anyway, so now what?  That thing you just downloaded has ALL the stuff in it making it a million times easier to make this stuff work and now you can make tests to your hearts content, very quickly, which is great.

Now we switch gears a bit because as you will discover, its a ROYAL PITA to figure out what the controls are named and you WILL need this info.  So instead of hunting though that notepad, may I suggest you try this, IE Dev Toolbar.  Using this is easy and here's your learning curve.  After you've downloaded this go into IE and (if you don't have menu bar showing, you shall suffer) click view, Explorer Bar, IE Developer Toolbar and you'll get this at the bottom of your IE. 

You're only really worried about the first two buttons which are "Select Element by click" and "Refresh".  Basically if selecting by click isn't working, click the refresh button and it works.  To get this to work, click that first button and click something on a webpage you want to know.  The middle box will be populated and look as such.

You're only worried about "Name" which in this case is "connspeed" which you can double click on and copy/paste.  Now to bring all this together.  Go into firefox, click tools, Selenium IDE and close firefox.  You'll get this very uninteresting looking thing which is about to make your life easier.  Under "Command" in the big box, click the top most row (there's one there, believe me) and all the other controls below become active.  Oh and for the sake of blog, I'm only doing a SHORT example, open a page, type some stuff, click a link (google search).  This'll seem cumbersome at first, but its the fastest way I've found so far, so stick with me on this.

Where it says "Command/Target/Value" click the dropdown arrow and look for "open" (or just type it, it'll autocomplete), type in the base URL for your site and leave value blank.  Click the row below the command you just created (trust me again, there's one there) and now hunt for the "type" command (or again, type it) and here's where IE dev comes in handy -- open up google, and click the "Select By Element" button, click on the search text box.  You'll find its name is simply "q", so in the target column, type in Q and set your value for blog.rileytech.net.  Finally, we want to click the search button, so we give it another command of "click" with the target being the "Google Search" button which name value is "btnG".  Your result should look something like this.

Now save as html into the directory where you copied the Selenium files over earlier and remember the filename.  Only one final step to make this puppy work, you need a test master file of sorts -- its sole purpose is to house links to the tests you just created.  No more, no less.  So fire up your favorite html editor, create a table that looks something like this (or just copy this and save it)

<html><body><table><tr>
<td>Test Suite</td></tr>
<tr><td><a href="./mytest.html">google test</a></td></tr>
</table></body></html>

Go back into Selenium, Selenium Test Runner and type in the url for your newly created master file and it should come up nicely.  Run it like you did the other tests and away you go.  Other useful commands are "verify" commands which you'll find there's a nice collection of them, along with "assert" (assertCheck is a good one).

Wow that was a long post.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | Visual Studio | C# | Coding | Design | Architecture

Telerik hates me

by Jesse 29. November 2007 03:01

I always manage to get the fun ones.  Infragistics, Telerik, they all hate me.  Well, thats half true, I can force the Infa controls to do stuff most of the time -- haven't figured out how to make these Telerik.  So I'm working with winforms RadTreeView.  Seems simple enough.  Has a object-ed datasource  along with various things like "datamember" "displaymember" etc, all the things you'd expect.  Checkin out their site, you can use business objects, datasets, datatables, all sorts of junk -- what could possibly go wrong?

Well, we have one already in use, works just fine but we had to manually build the "nodes" for the control.  I think its a royal bastardization BUT it works.  So, thinking I'm mr. slick, I toss in a collection (a list) into the datasource, tell it that "object.property" is where the goods are and ...build, load, nada.  Hmm ok, soooo lets try a dataset.  I try using a helper class that serializes the thing into a nice neat dataset and ...nada again.  Hmm ok fine.  I'll build it by hand, using the nodes as cumbersome as it is -- nada.  Now, throughly confused, I think to myself "why not toss it into the one that works? see what happens" -- all the above methods work ...in the existing view.  Undecided

I've left a post on the Telerik site hoping for a reply along the lines of "hey, you're a dummy, all you have to do is this" and presto, it'll work ...but until then, I'm con-freaking-fused.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | Visual Studio | C# | Coding

New .Net map

by Jesse 5. November 2007 01:46
I was taking a look @ the asp.net site today and came across a new namespace poster for .Net 3.5!  Warm up that big printer if you got one.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | Visual Studio

XSD problems? …hack it

by Jesse 12. September 2007 04:38

@ the office over the past few days, I’ve been embedding myself into the wonderful world of XML. In this happy land, things are …well, usually happy, until you get a crappy XSD file. Technically, the xsd is valid so you can use it and generate a class and what not by using XSD.exe /stuff. It was irritating, because this did not allow nulls, at all, anywhere and after we discovered that hey, guess what, we have no idea if any of the data will ever show up …soooo knowing that we have no choice, we neeeeeeed those nullables (I think in xsd land they’re called nillables or something or other)

Anyway, here’s a quick dirty snippet of code you can use to generate a cleaner xsd. And yes, its THAT easy.

System.Data.DataSet dataSet = new System.Data.DataSet();
dataSet.ReadXmlSchema(”C:\\mycrapXSD.xsd”);
dataSet.WriteXmlSchema(”C:\\myprettyXSD.xsd”);

Use your XSD.exe to generate your class, and as another “gotcha!” — you’ll probably see an array of an array, something like Item[][]; Rid yourself of one of the [] and all will be good in the world.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | Visual Studio | C# | Coding

Silverlight 1.0 Released

by Jesse 5. September 2007 04:19
Well, its official, silverlight is out which is good. I’m currently working a new item for CodeMash and we are deciding on which version we are going to use. Now that 1.0 is released and not beta/RC/whatever, this should help out. For whatever reason, I can’t seem to get the aspnet Futures to latch onto Visual Studio 2008. Later on I’ll see if I can’t clear this up.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | Visual Studio | Silverlight

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Like the description says, at my core, I'm a scientist and engineer.  I came from humble beginnings on a 486DX2 Packard Hell playing doom2 on IPX to in a small time retail shop and got into hardware (ISO layers FTW!) and it was all downhill from there.  I'm infinitely curious about almost everything and always wanting to know.

Some of the stuff I'm currently into/researching...

Sitefinity

Ninject

Subsonic

Java

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's, their brother nor their dog's view in anyway.  At all.  Ever.

© Copyright 2007-2008