Wednesday, August 25, 2010
 

Wired magazine had an article today, of which I only read the one-line summary, in which is reported the discovery of the Old World's smallest species of frog, found in Borneo. The summary line reports that the frog "grows to only 0.4 to 0.5 inches long -- about the size of a pea." This is odd because I don't think I have ever seen a pea that was even 0.4 inches across. Think of it: a pea that is 1/2 inches across. That would be some huge pea. Maybe they meant that the body of the frog, sans legs, was the size of a pea. That is not what they wrote, however.
Potpourris
8/25/2010 8:52:54 PM UTC  #    Comments [0]

Tuesday, August 03, 2010
 

There's indications that the performance of President Obama and the Democrats is not being looked on very favorably by the electorate at large.  If things continue as they have been moving so far, the Democrats may very well be swept from power in both the House and Senate.  Mind-boggling.  The only thing that looks similar to this in the past (in MY memory at least), is the sweeping from power of the Republicans in Reagan's second half-term.  Except that the Republicans only held the Senate at the time (I hope I'm remembering this correctly). 

See Michael Barone's article in the OC Register.


Politics
8/3/2010 4:37:03 AM UTC  #    Comments [0]

Friday, April 30, 2010
 

I just read Jeff Atwood's Coding Horror blog, where he asks the question "What Wrong with CSS?"  It seemed insightful enough to link to here -- I've had some pretty painful experiences with CSS.

What's Wrong with CSS?

 


Geek Speak
4/30/2010 11:48:49 PM UTC  #    Comments [0]

Friday, April 16, 2010
 

I started to go through Stephen Walther's ASP.NET Framework Unleashed by way of learning MVC for ASP.NET, but ran into some seemingly insurmountable problems.  Or one such, anyway.

I started with Chapter 2, Building a Simple ASP.NET Application, and managed to successfully create the very basic application, and I could insert a new item, and get a list of all items in the database.  Unfortunately, that is where my efforts ran off the rails.  Mr. Walther goes from that point into Chapter 3, where he discusses controllers and actions, but he never returns to the simple application.  I'm left wondering how to build a page that edits items, deletes items, and views the items.  From this point forward, he starts explaining the vagaries of MVC, and it looks very good.  Except for one thing: I wanted to find out how to do these other things.  It seems that it would have been simple enough.

At the outset, Mr. Walther indicates that in the second part of the book he will walk through creating an entire MVC applicaton: a simple blog app.  I tried to work into the chapters past the "simple" application that was never filled out to completeness, but got lost.  So, following the author's advice I skipped past everything in order to begin working with the blog application.  And I'm going to try to do this over the next week, but I have to say, finishing up the "simple" first app might have been better for me.

Yes, I know, I just a complainer.

One more complaint has to do with the MVC application template in Visual Studio 2010.  I started a brand new MVC app, and having created it (and its test app), it would not compile "out of the box".  The test project's code referred to the NerdDinner project that I was creating, but the project did not get decorated with a reference to the project it was supposed to be testing, oddly enough.  I had to go in and manually add the reference.  I would have thought that to be a given, but apparently this got left out.  Oh, well.


Geek Speak
4/16/2010 9:51:23 PM UTC  #    Comments [0]

Wednesday, April 14, 2010
 

I've been meaning to get "into" ASP.NET MVC for some time, and I finally got around to it in the last few days.  I went out and bought Stephen Walther's book, ASP.NET MVC Framework, and just to keep things new, downloaded the just-released Visual Studio 2010 and began to work though the examples in Walther's book.

This worked fine until I stopped to compare the code that VS2010 created for me, and compared it with that in the book.  Mostly the same, sort of, except for some syntax that appears wildly different.  Two examples:

Book: <%= Html.Textbox("Id") %>

VS2010: <%: Html.TextBoxFor(model => model.id) %>

What on earth?  I surmise from this that there has been some change with bound-field handling, but there are two syntactical elements here that I have never seen before. 

  • <%: 
  • =>

I've seen <%= before.  It's old school.  But what is <%:  ?  The answer turns out to be that this is a new expression for Html encoding.  <%: expression %> is the equivalent of <%= HttpUtility.HtmlEncode(expression) %>.  Amazing!  Some explanation HERE.

And what is this => thing?  More to the point, what is .TextBoxFor?  This turns out to be a new Html helper method, namely a Strongly-Typed HTML Helper Method.  See the explanation HERE.  And the =>?  This is something called a "lambda expression".  I've heard the term before, but I hadn't the faintest idea what it meant.  There is a Wikipedia article on Lambda Calculus that is relevant, if unfortunately completely impenetrable by yours truly.  MSDN fortunately has an article on C# lambda expressions HERE

That's what is fun about programming: always something new to learn!


Geek Speak
4/14/2010 4:03:24 PM UTC  #    Comments [0]

Friday, February 12, 2010
 

There I was, debugging an application using VS2008 and stepping through the code, and suddenly, when I press the F11 key to step into a method in another class, up pops this dialog box saying something like "No source available for the current location."  Options are to show disassembly (wow, that would help) and I think not to show disassembly.  Meanwhile, despite any breakpoints in the method I'm trying to debug -- that's logical, because if there's no source, then how can it breakpoint? -- it runs to completion and execution resumes at the next breakpoint in the code that I can see.

This is most perplexing, because the source code most emphatically exists -- I can see it -- and restarting VS2008 doesn't help, rebooting the machine doesn't help, and when I load another project and attempt to F11 into code in that one, it works just fine.

This last gives me a clue.  I'm not much for delving into the operating details of Visual Studio, but it seems to be that if I can step into code everywhere else except this one class, maybe there's something going on with the class, and not VS or the machine.  I then have this flash of insight: maybe it's the .PDB file for the assembly that is toast.  How to fix this, if true... hmmm.  I could edit it and force a recompile (I'm going to edit it anyway as soon as I can figure out why it isn't working right), but perhaps a similar problem might have occurred in some other assembly.  So the best thing to do under the circumstances is to force a rebuild of the entire Solution. 

I click on Build -> Rebuild Solution, and it goes through everything.  Now I try the debugging with the F11 Step-into, and BINGO!  It works.  Great, 'cuz I was beginning to get worried that I was going to have to use up some precious project time debugging Visual Studio!!  Thank goodness I am now back on track.  I'll be finished today, if all goes well, and ready to deliver to QA for testing!


Geek Speak
2/12/2010 6:50:01 PM UTC  #    Comments [0]

Thursday, February 11, 2010
 

It's time to register, Al Qaeda!  South Carolina now has a law on the books requiring subversive and terrorist organizations to register! 

http://rawstory.com/2010/02/south-carolinas-subversive-activities-registration-act-force/

It costs just $5 to register, so expense is not an excuse.  And what organizations are covered by the law?

"...every corporation, society, association, camp, group, bund, political party, assembly, body or organization, composed of two or more persons, which directly or indirectly advocates, advises, teaches or practices the duty, necessity or propriety of controlling, conducting, seizing or overthrowing the government of the United States [or] of this State."

I guess this means that the Libertarian Party must register or face a $25,000 fine.  Or maybe the Republicans.


You're Kidding, Right?
2/11/2010 4:27:29 PM UTC  #    Comments [0]

Tuesday, February 02, 2010
 

I thought it might be noteworthy to note that I am currently developing a replacement for the Inter-Agency Payment import system that my friend Paul Mehner developed while he was on contract here.  It's about time, as Paul wrote this in VB6 using the now-obsolete ADO RDS technology, and the application has started acting rather quirky over the past couple of years. 

I had my choice of technology to redevelop the application, and I decided to use Websphere MQ as the transport layer, and a Web Service for the business layer interface.  I am supposed to be finished by the end of next week, or at least, have delivered the application for QA testing by the end of next week.  I will be done well before that, in fact.

It's very much fun to be back in the coding saddle, I have to say.  Cranking out code is what I like best when it comes to work. 


Geek Speak
2/2/2010 8:05:43 PM UTC  #    Comments [0]