Latest Entries »

I wrote this library so I don’t have to keep track if I should use HttpRuntime.Cache, AppDomain.CurrentDomain.SetData, HttpContext.Current.Session, or a Dictionary…now I just use GlobalCache or UserCache.  It also makes unit testing a webapp a snap, because if you use IGlobalCache/IUserCache in your code, you just inject the Windows-based cache in your unit test setup.

You can download the solution with dlls here: Universal Caching solution

A breaking change in ASP.NET 4.0 causes a javascript error to be thrown on a page if a query string has a “potentially unsafe” character, such as an apostrophe in a last name.

You’ll see the error (possibly only while debugging): “A potentially dangerous Request.QueryString value was detected from the client” when passing the special character in a query string in a button click or a jqgrid’s FillGrid postData BuildGrigArgs function.

The fix is easy:  set the behavior back to ASP.NET 2.0 in the web.config with this line in the system.web section right below your </compilation> tag (the requestPathInvalidCharacters parameter here blocks everything except a single quote):

 <httpRuntime requestPathInvalidCharacters="&lt;,&gt;,*,%,:,&amp;,\" requestValidationMode="2.0" />

And in your pages be sure you don’t encode the parameter in the MVC code in your javascript (i.e. you’ll need to use <%= instead of <%: for those parameters that need special characters). 

For example, this:

    function BuildPreviousArgs() {

            var args = new Object(); 

            args.FilterLastName = "<%: Model.FilterLastName %>"; 

            return $.param(args); 

        } 

Has to be changed to this:

    function BuildPreviousArgs() {

            var args = new Object(); 

            args.FilterLastName = "<%= Model.FilterLastName %>"; 

            return $.param(args); 

        }

If you want to be able to ctrl-c/v to copy-paste in Octave, ditch the Octave.exe command window and download the open source Console2 from SourceForge.

Follow Scott Hanselman’s instructions for installing Console2:

http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.aspx

Once you’ve installed Console2, here’s how you add an Octave window:

  1. Open Settings (right-click on the window and go to File, then Settings), then go to Tabs, and Add a new tab.
  2. Change the new tab’s title to Octave.
  3. Set the Icon to the Octave icon (e.g. the default location would be C:\Octave\3.2.4_gcc-4.4.0\bin\octave.ico).
  4. Set the Shell to the Octave exe (e.g. the default location would be C:\Octave\3.2.4_gcc-4.4.0\bin\octave-3.2.4.exe)
  5. Set the Startup dir to your homework project folder (such as C:\stanford_machine_learning\mlclass-ex1).

That’s it! Now in your Console2 window, go to File, New Tab, Octave and you’re off and running.

Scrum in one page

Here is the Scrum agile method summarized in one page:

How the Scrum method works:

  • There is one Product Owner (e.g. a business analyst) for each project and he/she creates a prioritized wish list called a Product Backlog.

    • The backlog is an ordered list where the most urgent item is #1, the second most urgent item is #2, etc.

    • The Product Owner is the only person who can change the priority of items in the Product Backlog.

  • During Sprint Planning, the team (i.e. developers, testers, and dbas) pulls a small chunk from the top of that wish list (i.e. the most urgent items) and decides how to implement those pieces.

    • This chunk of the Product Backlog is called the Sprint Backlog.

  • The team has a fixed amount of time, a Sprint, to complete its work (usually two to four weeks) and meets each day to assess its progress (daily scrum).

  • During the sprint, the Scrum Master keeps the team focused on its goal and removes impediments to productivity.

  • During the sprint, the Product Owner can change priorities in the Product Backlog, but cannot change priorities to the Sprint Backlog.

    • The Product Owner is the go-to person for the team to get clarification on functionality or usability.

  • At the end of each sprint, the work should be code-complete, tested, and ready to deploy to prod.

    • Items not completed are put back into the Product Backlog, to be finished in a later sprint.

    • Therefore the sprint deadline is never extended to finish items or for any other reason.

  • The sprint ends with a Sprint Review and Retrospective

    • Sprint Review is where the sprint’s progress is demoed and discussed with the product owner (and ideally, the customer).

    • Sprint Retrospective is where the team discusses ways to improve productivity and eliminate pain.

      • Rule #1 of the retrospective is that no person or part of the organization is allowed to be blamed for problems. Processes allow people or parts of the organization to be inefficient, therefore the discussion focuses on how processes can be changed to improve the situation or remove impediments.

      • The best improvements are taken from the retrospective and implemented in the next sprint.

  • As the next sprint begins, the team chooses another chunk of the product backlog and begins working again.

  • The cycle repeats until enough items in the product backlog have been completed for a prod release or a deadline arrives. However, work can be stopped at anytime and finished items can be deployed to prod in a short amount of time in a fully workable and tested state.

(This is a summary of the Scrum Framework in 30 Seconds – yes, a summary of a summary)

Are you a bad developer?

In an argument, are you more interested in winning than learning?

Do you spend more effort trying to prove you’re right rather than finding a solution to a problem?

Do you spend more time getting others to do your work rather than helping others solve their problems?

Are you lavish with abuse and stingy with positive-feedback?

Are you only nice to others as long as they agree with you?

© 2012 Robert Corvus