Wednesday, January 13, 2010

Thursday, December 31, 2009

Eureka! SoapExtension problems solved! - Jan Tielens' Bloggings

This guy had my same problem. I'm recording this here for posterity's sake.

Eureka! SoapExtension problems solved! - Jan Tielens' Bloggings: "Maybe you've read my post about the problems I had while using a custom SoapExtension class. Thanks to an anonymous reaction, I found the sollution!! I was testing the webservice by using the default test page from Internet Explorer, but the testpage in IE uses the GET protocol, not the SOAP protocol. So there was nothing wrong with my code (I started believing I really sucked ;-), I only had to make a very simple test application. Thanks again to the person who submitted this tip!"

Wednesday, December 30, 2009

ASP.NET.4GuysFromRolla.com: Exception Handling Advice for ASP.NET Web Applications

ASP.NET.4GuysFromRolla.com: Exception Handling Advice for ASP.NET Web Applications:

Excerpt:
"The Crib Notes
My advice for handling exceptions in an ASP.NET application can be boiled down to the following guidelines:
  • Create and use a meaningful custom error page.
  • In general, do not catch exceptions. Let them bubble up to the ASP.NET runtime. Some cases where catching an exception makes sense include:
    • When there is a plausible way to recover from the exception by performing some alternative logic,
    • When a peripheral part of the application's workflow throws and exception and that exception should not derail the entire application, and
    • When you need to include additional information with the exception by throwing a new exception that has the original exception as its inner exception.
  • Log all exceptions to some persistent store and use email (or some other medium) to notify developers when an exception occurs in production. Consider using ELMAH or ASP.NET's built-in Health Monitoring system to facilitate this process.
Read on for a more in-depth look at these suggestions."

Tuesday, December 29, 2009

How to Make Your ASP.NET Third Party Component 10x Faster > Web/Cloud Applications Development Platform > White Papers

How to Make Your ASP.NET Third Party Component 10x Faster > Web/Cloud Applications Development Platform > White Papers:

I wonder how well this works. I tried making a control using Visual WebGui, but it was extremely expensive to load up a hundred of them on one page (yes, that's my requirement).

"The following document will explore the basics of enhancing 3rd party ASP.NET components performance by leveraging the Empty Client (an ASP.NET extension) pipeline.

1.1�What is the Empty Client?
This architecture is an emerging open source methodology which offers a different approach to architecting, developing and deploying AJAX applications. In order to shed some light on this methodology, we will compare it to the classic Thin and Thick (also referred to as Fat or Smart) client approach and to traditional AJAX structures. Empty Client offers a new balance between the Thin and Thick client approaches and a new channeling of the AJAX calls."
Reblog this post [with Zemanta]

Monday, December 21, 2009

Making Sense of ASP.NET Paths

Making Sense of ASP.NET Paths: "ASP.Net includes quite a plethora of properties to retrieve path information about the current request, control and application. There's a ton of information available about paths on the Request object, some of it appearing to overlap and some of it buried several levels down, and it can be confusing to find just the right path that you are looking for."

Tuesday, December 15, 2009

How to commit in Git when there are "suspicious patch lines" with trailing whitespace

Try the following:

1. Stage desired files using "git add" or "git add -p" or "git gui" or "git citool" etc.
2. Use "git commit --no-verify"

Actually, was this really worth a blog post? Since this blog acts to augment my memory, I guess it does.

Friday, December 04, 2009

Dynamic LINQ - Development With A Dot

Dynamic LINQ - Development With A Dot: "Included with Microsoft's .NET samples, which you can get here lies an hidden gem: a set of method extensions for IQueryable and IQueryable that allow execution of lambda expressions specified as strings, which is handy if you want to generate expressions dynamically."

Saturday, November 21, 2009

ASP.NET 2.0: Playing a bit with GridView "Sort Grouping"

ASP.NET 2.0: Playing a bit with GridView "Sort Grouping":

Thank the Lord!

"I am on bit experiment mood today, so I did a little tryout to see what it requires to add so called "sort grouping" into GridView. E.g when you have tabular data in GridView and you sort it based on some criteria, you'd want to better express those distinct items, based on which the grid is sorted. Here's a few screenshots of what I did, to demonstrate what I mean."

A few ASP.NET 2.0 GridView Sorting Tips and Tricks

A few ASP.NET 2.0 GridView Sorting Tips and Tricks:

From an old Scott Guthrie blog post from 2006. This seems to be exactly what I need to revamp the GridView that I'm working on! I'm also having good results with GaiaWare.

"I saw a few interesting posts today that talked about ways to implement some sorting tips and tricks with the ASP.NET 2.0 GridView:

Mike has a nice post that walksthrough how to implement custom bi-directional sorting with the GridView. Souri uses a similar approach to implement multi-column GridView sort semantics.

Teemu then has a cool post that shows how to implement 'sort grouping' where you can sub-group/band row values within the GridView:

Hope this helps,

Scott"

Monday, November 09, 2009

jQuery Performance Rules

Very useful! Here are the rules, with my personal favorites highlighted in bold:
  1. Always Descend From an #id
  2. Use Tags Before Classes
  3. Cache jQuery Objects
  4. Harness the Power of Chaining
  5. Use Sub-queries
  6. Limit Direct DOM Manipulation
  7. Leverage Event Delegation (a.k.a. Bubbling)
  8. Eliminate Query Waste
  9. Defer to $(window).load
  10. Compress Your JS
  11. Learn the Library

Git Recipe for magical, mysterious end-of-line problem with Git status

Ok. I really don't understand this. Occasionally file operations will result in Git complaining that some files are different when nothing apparently has changed. This weird recipe seemed to fix the problem in a way that I do not understand.

Problem
git diff shows the every single line of the file as changed, but git diff -w (i.e. ignore all whitespace) shows the file as changed, but shows no lines as changed.

Solution
1. Type this command to temporarily turn off CRLF automagical conversions:
git config core.autocrlf false; git config core.safecrlf false

2. Refresh the view in Git gui. There will be no changes indicated anymore.
3. Type this line to temporarily turn CRLF automagical conversions back on:
git config core.autocrlf true; git config core.safecrlf true
4. Possibly repeat more than once, staging and un-staging in the mean time. Like I said, it's a mystery.

NOTE: I've only done this once. I haven't tested it multiple times. I'm just posting it here for posterity's sake in case I need to try this recipe again.

Tuesday, October 20, 2009

Your Top Links about Web Site/AJAX Performance Performance, Scalability and Architecture – Java and .NET Application Performance Management (dynaTrace Blog)

Contains a list of AJAX frameworks. Dunno if there's an implicit endorsement here; it does seem to be non-Microsofty. This might be an interesting place to check out AJAX frameworks.

Monday, October 19, 2009

A generic way to find ASP.NET ClientIDs with jQuery - Rick Strahl's Web Log

A generic way to find ASP.NET ClientIDs with jQuery - Rick Strahl's Web Log: "I’ve been using a small hack to deal with the ASP.NET naming container morass that is so prevalent in client side development with ASP.NET. Particularly in Master Pages all server control IDs are basically munged because the master page place holders are naming containers."

At the end of the article is this gem that might help me optimize the Vendor Web page:
"ID lookups in a document are among the fastest lookups the DOM can perform."

A Quick Reference Guide to Microsoft Technologies (Cheat Sheets) | SolidDotNet.com

A Quick Reference Guide to Microsoft Technologies (Cheat Sheets) | SolidDotNet.com: "While working as a developer we all face some syntax problem , So in order to reduce that same redundant syntax search effort everyday Technology people had compiled very good single page handy sheets which contains syntax and common features of each technology which is also known as Cheat Sheets, And i think every developer should have them.

These Cheat sheets are normally one-page reference guide"

Inversion Of Control, Single Responsibility Principle and Nikola’s laws of dependency injection - VusCode - Coding dreams since 1998!

Inversion Of Control, Single Responsibility Principle and Nikola’s laws of dependency injection - VusCode - Coding dreams since 1998!: "Inversion Of Control, Single Responsibility Principle and Nikola’s laws of dependency injection

Today I stumbled upon the stack overflow question regarding using DI frameworks for classes with many dependencies where the example given and couple of answers have reminded me about a subject I want to post for a long time....

And the 3 questions related to this example are:

  1. How to avoid passing those common but uninteresting dependencies interfaces to every class?
  2. How do you approach dependencies that might be used, but may be expensive to create?
  3. How to build object graph of MyClass considering the fact that any of those dependencies can have their own dependencies etc."

Wednesday, October 14, 2009

Installing Debian Testing from Netinst or Business Card

  1. Install Debian kind of minimally, i.e. without Desktop. (I still did "standard install".)
  2. Reboot.
  3. Edit the apt configuration to point to testing:
  4. vi /etc/apt/sources.list
    :%s/lenny/testing/g
  5. Save the file.
  6. Run the following command to update the apt sources after aptitude update:
  7. aptitude update
  8. Run the following command to upgrade the system to testing:
  9. aptitude safe-upgrade
  10. Run the following command to install the desktop environment:
  11. tasksel install desktop
  12. Optional: run tasksel install again for file server and web server, which I need in my scenario for Git.

10 Tools to learn any foreign language for free

I actually found this on Twitter. http://twitter.com/analomba/status/4787514073

Friday, October 09, 2009

Foundations of Programming Ebook

I quote:

"I'm excited to finally release the official, and completely free, Foundations of Programming EBook. This essentially contains all 9 Foundation parts including a conclusion and some typical book fluff (table of content, acknowledgement and so on). A number of spelling errors were corrected, along with some small technical changes and clarifications - largely based on feedback, so thanks for everyone who provided it! Otherwise it's exactly the same as what's been posted here over the past several months.
Download it from http://codebetter.com/files/folders/codebetter_downloads/entry179694.aspx

Download the CodeBetter.Canvas Learning Application to see the foundations applied in practice:http://codebetter.com/blogs/karlseguin/archive/2009/09/01/canvas-gets-a-spark.aspx
 Foundations Of Programming

If the above link fails, you can also get it from http://www.openmymind.net/FoundationsOfProgramming.pdf

You can also download the raw .docx file fromhttp://openmymind.net/FoundationsOfProgramming.docx"

200 Page Manual on Inversion of Control (plus or minus 199)

How to IoC in 10 minutes. Ok, realistically this might take a couple of hours, but whatever.

I'll put "dependency injection" here too so the blog search, if it ever gets fixed, will find it.

Wednesday, September 30, 2009

Functional Programming for Everyday .NET Development

From MSDN Magazine, October 2009.

Object Hydrator - .NET test data project

This looks pretty cool. I discovered it through The Morning Brew blog, I think.
"Project Description
This project allows you to pass custom POCO's to it, and have it return an instance of the class populated with randomly generated data.

So basically, you create a class and decorate the property with the name of a Generator you want to use. Pass the object to the Generator and it returns it filled with data. The idea behind it is to use it to replace a database call to use in your UI. "

Thursday, September 24, 2009

Diffuse

Cool new (to me) diff/merge tool. Can merge any arbitrary number of files! How many other diff/merge tools can claim to do that?

Diffuse: "Diffuse is a small and simple text merge tool written in Python. With Diffuse, you can easily merge, edit, and review changes to your code."

Wednesday, September 23, 2009

Why Git?

Why Git? - great article by Ayende @ Rahien, with a very good discussion that follows. Also it's fairly recent -- 19 days ago.

Yet another Git versus Mercurial article

This one's well-written and the comments that follow are not shrill but intelligent. The author claims that Git is like MacGyver, while Mercurial is James Bond. (A commenter claims that Git is more like the A Team, but hey.) One commenter does a great job describing the attitude of the Git community towards Windows users. In a word, contempt. The thing is, I'm a power user who loves Git, and when I first examined it back in the fall of 2007, it just seemed like a better project for Windows. I'm wondering if I should reevaluate.

Tuesday, September 15, 2009

Dotnet Version Wiki

Dotnet Version Wiki: "The original data for this list was taken from Tom Glover's site , where you can download a tool (Free DotNet VersionCheck Utility) that automatically identifies what versions of the framework are installed. Tom kindly donated this existing list to seed this wiki.

Another resource you should be aware of is the CTP Build Finder which is based on some data that Brad Abrams and friends put together into BuildXml.xml . This data file links CTP releases of a few major products, showing compatible products, and is the data source that drives the CTP Build Finder..

Another list of service pack version numbers, Aaron Stebner's WebLog ."

Wednesday, September 02, 2009

How XML Threatens Big Data : Dataspora Blog

How XML Threatens Big Data : Dataspora Blog

Fascinating article. He talks about why XML is philosophically wrong for huge datasets ("Big Data"). I found this article while looking through an HR-XML blog.
"We had a deadline to meet (and, mon dieu, a 35 hour work-week). So we changed course. We hacked our Perl scripts to emit a flat tab-delimited format — “TabML” — which was bulk loaded into Oracle. It wasn’t elegant, but it was fast and it worked.

Yet looking back, I realize that XML was the wrong format from the start. And as I’ll argue here, our unhealthy obsession with XML formats threatens to slow or impede many open data projects, including initiatives like Data.gov.

In the next sections, I discuss how XML fails for Big Data because of its unnatural form, bulk, and complexity. Finally, I generalize to three rules that advocate a more liberal approach to data."

The truth about HR-XML

One guy says it's a bunch of BS. Another guy says it's a fig leaf to cover up for lack of interoperability. Finally, there's a former member of the HR-XML consortium who has some things to say about it.

Here's an older post by the same author: HR-XML Integration in Human Resources Software.

Overview of WCF from Microsoft Developer Network (MSDN)

Overview of WCF -Great article with links to articles on interoperability, which is something I've got to worry about with these legacy web services.

How to: Migrate ASP.NET Web Service Code to the Windows Communication Foundation

How to: Migrate ASP.NET Web Service Code to the Windows Communication Foundation -This is a comprehensive, 19-step procedure that's a bit more detailed than this post and also blessed by Microsoft.

creativeUI - How To: Create a Web Service with WCF

creativeUI - How To: Create a Web Service with WCF -- Seemingly quick and dirty explanation.

Tuesday, September 01, 2009

Converting ASMX to WCF Web Service - Stack Overflow

Converting ASMX to WCF Web Service - Stack Overflow: "I need to upgrade our web services to use WCF instead of ASMX. If the signatures of the web services stays the same, will existing clients that already call the ASMX service have to change anything on their end? Is there anyway to still use WCF but not force them to change anything?"

The answer is simple. I tried it and it worked. I did have to change the server binding config to be the custom binding created by svcutil.exe. But since that utility creates the configuration, it's basically a cut-and-paste job.

Friday, August 21, 2009

Configuring AnkhSVN revisited

Turns out they got rid of the Tools/AnkhSVN menu option. It's now integrated all over the place. The configuration I was looking for is in Tools/Options/Source Control. Never mind that I spent several hours hunting down the configuration by reading source code. Arg!

Thursday, August 20, 2009

Configuring AnkhSVN 2.1.7141.181 when the configuration dialog does not appear in Visual Studio

For some reason my Visual Studio does not display a menu option to configure AnkhSVN 2.1.7141.181, so below are the registry settings to configure it to use TortoiseSVN. But first, a list of the settings.

Setting NameDescription
MergeExePathPath of the executable used for merging, including all arguments.
DiffExePathPath of the executable used for diffing two files, including all arguments.
PatchExePathPath of the executable used for applying a patch, including all arguments.
InteractiveMergeOnConflictIf true, launch an interactive merge on a conflict. Default value is false.
FlashWindowWhenOperationCompletesIf true, window flashes when operation completes. Default value is false.
AutoAddEnabledIf true, new project files are automatically marked for adding to Subversion. Default value is false.

Following is a .reg file containing registry settings to use TortoiseMerge for all diff, merge, and patch operations:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\AnkhSVN\AnkhSVN\VisualStudio\8.0\Configuration]
"DiffExePath"="$(HostProgramFiles)\\TortoiseSVN\\bin\\TortoiseMerge.exe /base:\"$(Base)\" /mine:\"$(Mine)\" /basename:\"$(BaseName)\" /minename:\"$(MineName)\""
"PatchExePath"="$(HostProgramFiles)\\TortoiseSVN\\bin\\TortoiseMerge.exe /diff:\"$(PatchFile)\" /patchpath:\"$(ApplyToDir)\""
"MergeExePath"="$(HostProgramFiles)\\TortoiseSVN\\bin\\TortoiseMerge.exe /base:\"$(Base)\" /theirs:\"$(Theirs)\" /mine:\"$(Mine)\" /merged:\"$(Merged)\" /basename:\"$(BaseName)\" /theirsname:\"$(TheirsName)\" /minename:\"$(MineName)\" /mergedname:\"$(MergedName)\""

[HKEY_CURRENT_USER\Software\AnkhSVN\AnkhSVN\VisualStudio\9.0\Configuration]
"DiffExePath"="$(HostProgramFiles)\\TortoiseSVN\\bin\\TortoiseMerge.exe /base:\"$(Base)\" /mine:\"$(Mine)\" /basename:\"$(BaseName)\" /minename:\"$(MineName)\""
"PatchExePath"="$(HostProgramFiles)\\TortoiseSVN\\bin\\TortoiseMerge.exe /diff:\"$(PatchFile)\" /patchpath:\"$(ApplyToDir)\""
"MergeExePath"="$(HostProgramFiles)\\TortoiseSVN\\bin\\TortoiseMerge.exe /base:\"$(Base)\" /theirs:\"$(Theirs)\" /mine:\"$(Mine)\" /merged:\"$(Merged)\" /basename:\"$(BaseName)\" /theirsname:\"$(TheirsName)\" /minename:\"$(MineName)\" /mergedname:\"$(MergedName)\""

Here is the file AnkhDiff.Tools.cs that contains all the settings. Look for the functions GetDiffToolTemplates(), GetMergeToolTemplates(), and GetPatchToolTemplates().

When putting these into the registry by hand, make sure to change all single quote with a double quote. (There must be code in AnkhSVN that already does this.)

5 ways to answer managers' unfair software test, QA questions

5 ways to answer managers' unfair software test, QA questions: "About 20 years ago Tom DeMarco defined the unfair software question with his article, Why does software cost so much?. DeMarco claims it is not a question at all, but an assertion or a negotiating tactic. These questions also come up in software testing. Here are a few of my favorites:
'Why didn't QA find that bug?'
'Why is QA always the bottleneck?'
'Why do we have so many bugs?'
'What can we do to improve throughput from QA?'
'Are we done testing yet?'

Taken at face value, these may appear to be fair questions. But let's look at the assertions that are hidden inside of them:

'QA should have found that bug.'
'QA is the bottleneck.'
'We have too many bugs.'
'Testing is taking too long.'
'Testing should be finished by now.'"

Sunday, August 16, 2009

Can't connect to F5 Firepass using OneCare

This was really irritating until a coworker mentioned that he couldn't connect with OneCare. All my previous Google searching was for naught.
"I found a solution that worked for me. In One Care, select Change Settings. This will open the Windows Live OneCare Firewall Advanced Settings. Select Ports and protocols tab. Then, select Add... this will open the POrt and Protocol Information page. Enter a Name in the Name text box. I entered "F5 VPN Port". Select TCP from the TCP or UDP drop down control. For port range, enter: 44444 to 44444. For the Connections, select: Outbound. For Scope, select Internet."

Wednesday, August 12, 2009

How to create a global error handler for your application

From Microsoft. Reminds me to include things like Request.Form and Request.QueryString in the log. Interestingly, they also include Exception.TargetSite and Exception.Source, which I hadn't considered before. Both might be useful.

Tuesday, August 04, 2009

10 best practices for successful project management | 10 Things | TechRepublic.com

10 best practices for successful project management 10 Things TechRepublic.com: "Given the high rate of project failures, you might think that companies would be happy to just have their project finish with some degree of success. That’s not the case. Despite the odds, organizations expect projects to be completed faster, cheaper, and better. The only way that these objectives can be met is through the use of effective project management processes and techniques. This list outlines the major phases of managing a project and discusses key steps for each one."

Friday, July 31, 2009

How to display an assembly in the "Add Reference" dialog box

How to display an assembly in the "Add Reference" dialog box: "When you are developing a class library, you may want Visual Studio .NET to list your library in the Add Reference dialog box on the .NET tab without the user having to browse for it.

This issue is not resolved if you install your assembly to the global assembly cache, because the Add Reference dialog box is path-based and does not enumerate the components from the global assembly cache."

Use Case/Project Management Stuff

Some musings/notes.

OpenUP -- their developer and tester stuff is cool. Also the risk management, and the prioritization (like kanban). The Powerpoint was very good.
Use Case structure -- see the wikipedia article for things to include.

Alistair Cockburn's points:
  • Structure use cases with goals.
    • Non-functional requirements can be attached to goals.
  • Goals have levels - high, low, overarching, short-term detailed, etc.
  • Include Stakeholders and Interests - helps separate the wheat from the chaff
  • Levels:
    • Brief - 2-4 sentences, for instance in a spreadsheet cell
    • Casual - a few paragraphs
    • Fully dressed - long template, include stakeholders, minimum guarantees, postconditions, business rules, performance constraints, etc.
  • Alternative behaviors are more important than the main scenario!! For instance, they reveal subtle requirements.
  • Do not use UI elements!
  • His resources, templates, etc.
Long use case structure, probably for the detailed view:
  • Name
  • Version
  • Goal - very important
  • Summary
  • Actors
  • Precondition
  • Triggers
  • Basic course of events
  • Alternative paths -
  • Postconditions
  • Business Rules
  • Notes
  • Author and Date
Iconix talks about Robustness Analysis

Wednesday, July 29, 2009

Shrinking ViewState when using dynamic controls in ASP.NET

"For 'static' controls (meaning controls declared in your .ASPX page) the ViewState carries VERY little overhead, if any at all. Though for Dynamically Created controls the situation is a bit different. Very often when you create Dynamic Controls this is a three phase run:
  • Instantiate the Controls
  • Set its values
  • Add it either directly or in-directly to the Page object
"IF you follow the EXACT same steps in the given sequence as the above list, then your ViewState object will be SIGNIFICANTLY reduced in size! This is also true for ALL WebControls and not only Gaia Ajax Widgets.

"The reason is that when your dynamically created Controls are being added to the page object then its complete lifecycle will execute which means that among other things the ViewState 'IsDirty' flag will be set to TRUE. When the ViewState IsDirty flag is set to true, then all properties you modify afterwards will have its values stored in the ViewState object. If you however set those properties BEFORE adding the Control to the Page object then the ViewState will not be dirty for those properties and values."

Scott Hanselman's Computer Zen - Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows

Scott Hanselman's Computer Zen - Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows: "Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows"

http://www.connectionstrings.com/

Is what it says. Cool!

Monday, July 13, 2009

dave^2 = -1: An introduction to the SOLID principles of OO design

He makes this stuff more comprehensible than Robert Martin, who is the creator of the acronym.

dave^2 = -1: An introduction to the SOLID principles of OO design: "I would be very hard pressed to go passed [sic] Robert 'Uncle Bob' Martin's SOLID principles as the single most useful tool for helping me with OO design. Some people seem to have a natural talent for OO design and thinking, and have an innate understanding of these principles without requiring the SOLID formalism. I, on the other hand, find them indispensable.

"Unfortunately the names used in the somewhat-cryptic 'acronym of acronyms'[1] don't exactly lend themselves to being easily learned (Bob Martin and Scott discussed how this came about on a Hanselminutes episode on SOLID, which is well worth a listen). I thought I'd post my interpretation of the principles as a refresher for myself, and as an introduction for anyone trying the learn the terminology."

Wednesday, July 08, 2009

Visual WebGUI: Web UI Development - RIA Platform / Framework

Very, very cool! A few bugs, but it's open source!

Web UI Development - RIA Platform / Framework: "Developing new Rich Internet Applications (RIA) has never been so fast and simple due to Visual WebGui's drag & drop, near zero coding Development Experience. The rapid web development well suited for building small applications UI in a matter of hours as well as very complex and large applications in a very short time. Visual WebGui allows you to use your existing .NET skills and development patterns since it is based on proven desktop & web technologies. It simplifies web development by flattening the development process into a single layer and empowers front-end design with an intuitive visual WYSIWYG Form designer which lets you use any WinForms, ASP.net and Silverlight controls."

Wednesday, July 01, 2009

Microsoft StyleCop : Introducing StyleCop on Legacy Projects

Microsoft StyleCop : Introducing StyleCop on Legacy Projects: "In this article I’ll describe a technique for doing a slow, staged rollout of StyleCop over your existing codebase. This technique has been used successfully by multiple teams within Microsoft, allowing them to adopt the tool in a controlled manner without generating a lot of noise up front. The general idea is to enable the tool for all of your solutions, but disable the tool from analyzing all pre-existing C# files. This provides the following advantages:"

Tuesday, June 23, 2009

Peter Van Roy: Programming Paradigms for Dummies

To quote Lambda the Ultimate:
This chapter gives an introduction to all the main programming paradigms, their underlying concepts, and the relationships between them. We give a broad view to help programmers choose the right concepts they need to solve the problems at hand. We give a taxonomy of almost 30 useful programming paradigms and how they are related. Most of them differ only in one or a few concepts, but this can make a world of difference in programming. We explain briefly how programming paradigms influence language design, and we show two sweet spots: dual-paradigm languages and a definitive language. We introduce the main concepts of programming languages: records, closures, independence (concurrency), and named state. We explain the main principles of data abstraction and how it lets us organize large programs. Finally, we conclude by focusing on concurrency, which is widely considered the hardest concept to program with. We present four little-known but important paradigms that greatly simplify concurrent programming with respect to mainstream languages: declarative concurrency (both eager and lazy), functional reactive programming, discrete synchronous programming, and constraint programming. These paradigms have no race conditions and can be used in cases where no other paradigm works. We explain why for multi-core processors and we give several examples from computer music, which often uses these paradigms.
The concurrency stuff looks interesting.

40+ Essential Front End Web Developer Cheat Sheets | tripwire magazine

There's a ton!

Monday, June 22, 2009

Thursday, June 11, 2009

Steve Smith and SOLID

Since I missed Steve Smith's presentation at the last .NET SIG, and there is nothing posted (yet), here's a link to the SOLID principles that he was talking about।
[6/22/09 update: here's the link to his presentation.
And a link to Uncle Bob.]

Saturday, June 06, 2009

Rio by Vice Magazine




Ask any self-respecting carnivore what to eat in Rio, and they’ll tell you about the rodizios. A rodizio is more than just a meal, it’s an elaborate battle of wits between you and the doe-eyed service staff, as they waft meat under your nose. You indicate your desire to stick or twist with a doublesided card; green meaning “feed me” and red meaning “get away from me, peasant.” Also, when in Rio, don’t forget to find a juice bar, and ask for an açai smoothie. It might look like something Barney the Dinosaur would leave in the toilet, but the Amazonian berries served with ice eradicate all traces of a hangover you got from drinking too much Brahma beer in approximately 30 seconds.



For a true carioca sleeping experience, head in search of the notorious love motels. Paid by the hour, motels are as ubiquitous and well-frequented as churches, with each one even given an individual star rating for their level of service. For a dollar or two per hour, you get your bog-standard plastic sheets and herpes on tap, but if you want to quite literally splash out, the five-star deluxe motels have heart-shaped water beds, sex harnesses, a hot-tub fit for a futebol team and gimp-suits on room service.



Forget hanging out, spend as much time and money as you can buying as much cheap tat as you can get. It’s best to avoid the enormous identikit shopping malls, and take to the streets if you want some weird stuff. Also, look out for the dudes selling racks of bootleg funk carioca CDs. The thrift shops of Lapa are the place to go for the Bonde Do Role look. You can also put together a nice collection of vintage Playboys, which, if you’re lucky, will have had just one careful owner.



In the south zone, there’s a small handful of underground clubs, such as Moo, Dama De Ferro and Fosfobox where you can join an invariably tattooed and bisexual crowd in watching big name DJs or, if you’re really lucky, Madoninha. She’s a blonde dwarf who sings literally translated renditions of Madge classics, such as “Como uma virgem. Oh!” If you want to learn more about “ginga”, the fluidity and movement of Brazil, watch the short film Movimento at brahma.com

Thursday, June 04, 2009

Quality Circles and Communication -- brief synopses

Useful information for my job.

Very important point regarding the essence of Kaizen (emphasis added):
Much of the success of Kaizen came about because the system encouraged many small-scale suggestions that were cheap and quick to implement. They also came from shop-floor employees - who had a detailed appreciation of the benefit each change might make to the process concerned. By implementing many small improvements, the overall effect was substantial.

Their communication link has the following important point on communication, which point may have been missing from the communication team project charter:
Co-ordination of departments, teams and groups - e.g. making sure that marketing, production and administration know what each other is doing, when and why

Tuesday, May 19, 2009

Tuesday, May 12, 2009

Multiple IE Versions revisited

I wrote a while back about installing multiple versions of IE on your computer. Since IE 8 came out, I went back to the site to see if it had been updated. It hadn't, but a commenter on the site posted this link: http://finalbuilds.edskes.net/iecollection.htm

I haven't tried it yet, however.

Sunday, April 26, 2009

Using Script# with ASP.NET

Random notes on this topic.
  • Follow instructions here on wiring up the control, specifically the parts about implementing IScriptControl, and overriding OnPreRender() and Render(). However you *must* make one crucial change, or else you'll break ALL javascript on the page.
    • You must change this line as follows:

    • Before:
          var descriptor = new ScriptControlDescriptor("namespace.class", this.ClientID);
      After:
          var descriptor = new ScriptControlDescriptor("namespace.class", someOtherControl.ClientID);
      The problem is that user controls do not, per se, have an associated HTML control, so it's necessary to place the control's contents inside a Panel. If you do try to create a descriptor using "this", the un-handled error resulting from the $create() call on the client will cause all page-initialization-related Javascript that runs after that point to fail, thus breaking the page in a big way.

Tuesday, April 07, 2009

GWT Designer, ScriptSharp, Ext JS

Some AJAX things I've been eyeing. Microsoft AJAX just isn't good for certain things, although it's nice.

Monday, March 30, 2009

Asp.Net Session Timeout control

Works with AJAX too.

This is pretty cool. It truly is just something you drop onto the page and configure.

http://weblogs.asp.net/latishsehgal/archive/2008/08/29/asp-net-session-timeout-control.aspx

The blog post describes an important change, but he documents it rather poorly. The changes he describes must be made to the “Timeout.js” script.

Saturday, March 07, 2009

NYTimes: Job Losses Hint at Vast Remaking of Economy

History happens in slow motion. This article looks like it's eerily foreshadowing the future. We go about our lives, worried about the situation around us, but the world is the same for the most part. After 9/11, everyone talked about how everything would change, yet the world continued as it did before. Irony did not die. But I think that the changes happening now will dwarf the post-9/11 changes that everyone was predicting at the time.
From The New York Times:

Job Losses Hint at Vast Remaking of Economy
By PETER S. GOODMAN and JACK HEALY

With unemployment at 8.1 percent, some economists believe that a wrenching restructuring is under way....

http://www.nytimes.com/2009/03/07/business/economy/07jobs.html

Thursday, March 05, 2009

Building Composite Data Bound Controls in ASP.NET

Describes how to build a CompositeDataBoundControl, overriding CreateChildControls() and so on.

Monday, February 23, 2009

Wednesday, February 11, 2009

How to determine iPhone firmware version

This didn't work for me. Brought up tons of diagnostics, but no version.
"How do I find out what firmware version my iPhone is?

You don't actually need to know this in order to unlock your iPhone with us, as our software works with all current iPhone firmware versions, but to check yours - simply dial *3001#12345#* then press the call button, compare your Modem version to the table below to find out your firmware version:

1. 04.04.05_G - OTB 1.1.4 iPhone
2. 04.03.13_G - OTB 1.1.3 iPhone
3. 04.02.13_G - OTB 1.1.2 iPhone
4. 04.01.13_G - OTB 1.1.1 iPhone"

Monday, February 09, 2009

ASP.NET AJAX partial update does not work with xhtmlConformance tag in web.config

What a pain! I spent hours troubleshooting this.

I converted a .NET 1.1 application to .NET 2.0. The web.config had this section:
  <system.web>
...
<xhtmlConformance mode="Legacy"/>
...
</system.web>

When I removed the xhtmlConformance tag, it began working again.

Tuesday, January 27, 2009

Temporal Data Techniques in SQL

Timestamps, holidays, etc., written by a member of the SQL-92 standards committee. Maybe coulda used this at Rockwell!

Monday, January 19, 2009

THE PALM PILOT AND THE HUMAN BRAIN

Interesting...

Part I.

and Part II.

Jeff Hawkins' web site is here: http://www.onintelligence.org/

Microsoft Naming Conventions

"The general format for a namespace name is as follows:

<Company>.(<Product>|<Technology>)[.<Feature>][.<Subnamespace>]

For example, Microsoft.WindowsMobile.DirectX."

Sunday, January 18, 2009

Economy Made Few Gains in Bush Years

"President Bush has presided over the weakest eight-year span for the U.S. economy in decades, according to an analysis of key data, and economists across the ideological spectrum increasingly view his two terms as a time of little progress on the nation's thorniest fiscal challenges."

And yet there are those who will worship Dubya until the day they die. How can you take seriously any supposedly religious person who believes that Dubya was sent by God? Maybe he was sent by God to punish us for something -- like to punish us for voting Republican.

Friday, January 09, 2009

Developing a use case document, looking for guides or software to help

On StackOverflow.com, someone asked about a good reference guide and templates for writing use cases. The person with the best answer talked about Alistair Cockburn, and mentioned this document as well, which I haven't read yet: http://www.bredemeyer.com/pdf_files/functreq.pdf

Thursday, January 01, 2009

Friday, December 19, 2008

My first WSCF web service project. Contract first, code later.

We're using WSCF (Web Services Contract First) 0.7 at work, and this guy published a review of an earlier version (0.5). He loved it except for the following, which might be different in 0.7, but I haven't checked yet:
"So far using WSCF for building the web service is quite a success. But I did not use it for building the consuming client. My main problem was that every roundtrip of the contracts requires deploying (plain copy) the generated wsdl and the accompanying schema's to the client code. Instead I created just a server project which included the contract schema's. One clean and independent project. As all info needed by a consumer of the service is in the wsdl all the consuming client application needs is a reference to the wsdl. Which is exactly what add web reference in VS does. Having updated the service all I need to do in the client project is Update Web Reference. However, the proxy generated by WCSF does offer some nice extra's. It returns the data (when the option in the wizard is set) as a collection, the VS web reference just sees an plain array. I also have to set the service endpoint (the URL with it's location) by hand. The latter is something I'll have to do anyhow, as it will be read from a config file. And I can live with the arrays as a trade off for a cleaner development process. This is a point where WSCF could be improved."

Monday, December 15, 2008

LINQ support on .NET 2.0

Oh thank god!!!

I'm working in a shop with ancient servers which run only .NET 2.0, so this is a wonderful thing to know about. Woo hoo!

Here's what he has to say:
  1. "Create a new console application
  2. Keep only System and System.Core as referenced assemblies
  3. Set Copy Local to true for System.Core, because it does not exist in .NET 2.0
  4. Use a LINQ query in the Main method. For example the one below.
  5. Build
  6. Copy all the bin output to a machine where only .NET 2.0 is installed
  7. Run"


[Update Apr 2 2009: This didn't work for me because our server was using .NET 2.0 without SP1. Instead, I used the excellent LINQBridge.]

Tuesday, November 25, 2008

Monday, November 24, 2008

Google Advice for writing testable code

From Miško Hevery's blog:

Warning Signs

  • new keyword in a constructor or at field declaration
  • Static method calls in a constructor or at field declaration
  • Anything more than field assignment in constructors
  • Object not fully initialized after the constructor finishes (watch out forinitialize methods)
  • Control flow (conditional or looping logic) in a constructor
  • Code does complex object graph construction inside a constructor rather than using a factory or builder
  • Adding or using an initialization block

Flaw #2: Digging into Collaborators

Warning Signs

  • Objects are passed in but never used directly (only used to get access to other objects)
  • Law of Demeter violation: method call chain walks an object graph with more than one dot (.)
  • Suspicious names: contextenvironmentprincipalcontainer, or manager

Flaw #3: Brittle Global State & Singletons

Warning Signs

  • Adding or using singletons
  • Adding or using static fields or static methods
  • Adding or using static initialization blocks
  • Adding or using registries
  • Adding or using service locators

Flaw #4: Class Does Too Much

Warning Signs

  • Summing up what the class does includes the word “and”
  • Class would be challenging for new team members to read and quickly “get it”
  • Class has fields that are only used in some methods
  • Class has static methods that only operate on parameters"

LINQ Reference Documentation

From Charlie Calvert's Community Blog:

"The LINQ documentation created by Microsoft is available both inside Visual Studio, and for free via the MSDN library found on the WEB. Here are some important pages from that documentation that can help you navigate through the online reference material that Microsoft has prepared for LINQ developers:

· The Root MSDN Library Page: http://msdn.microsoft.com/en-us/library/default.aspx

· .NET Development: http://msdn.microsoft.com/en-us/library/aa139615.aspx

· .NET Framework 3.5: http://msdn.microsoft.com/en-us/library/w0x726c2.aspx

· System.Linq: http://msdn.microsoft.com/en-us/library/system.linq.aspx

· System.Data.Linq: http://msdn.microsoft.com/en-us/library/system.data.linq.aspx

· System.Xml.Linq: http://msdn.microsoft.com/en-us/library/system.xml.linq.aspx

· Code Generation: http://msdn.microsoft.com/en-us/library/bb399400.aspx

· More on Joins: http://msdn.microsoft.com/en-us/library/bb311040.aspx

· For more information on the operators, see the section of the online help called “The .NET Standard Query Operators.” It is written by Anders Hejlsberg and Mads Torgersen. The URL is http://msdn.microsoft.com/en-us/library/bb394939.aspx

I would not suggest using these references materials as a primary means of learning LINQ. However, if you have a book or other guide to LINQ development, then this reference material can be a useful addendum to that text. If you understand in a general way how LINQ works, but need answers to detailed questions, the links provided here may sometimes help you find answers."

Saturday, November 22, 2008

Money-Saving Meal Plans at Whole Foods

Advice for constructing a menu for the week, from Whole Foods. Kind of a cool idea!

Wednesday, November 19, 2008

How To: Use Impersonation and Delegation in ASP.NET 2.0

Has an API to login as a different user. See also this link: How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA

And this link: Encrypting configuration files using protected configuration, to avoid the dreaded "The RSA key container could not be opened" error. It tells you to encrypt using this command:
aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"

So, for example, to encrypt user identity (in one line):
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pa "NetFrameworkConfigurationKey" "ASPNET" -pef system.web/identity C:\Inetpub\wwwroot\SimpleEmailWebService


The relevant code is this:
    // From http://msdn.microsoft.com/en-us/library/ms998351.aspx

public class NativeWindowsSecurity
{
// Declare signatures for Win32 LogonUser and CloseHandle APIs
[DllImport("advapi32.dll", SetLastError = true)]
public static extern bool LogonUser(
string principal,
string authority,
string password,
LogonSessionType logonType,
LogonProvider logonProvider,
out IntPtr token);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool CloseHandle(IntPtr handle);

public enum LogonSessionType : uint
{
Interactive = 2,
Network,
Batch,
Service,
NetworkCleartext = 8,
NewCredentials
}

public enum LogonProvider : uint
{
Default = 0, // default for platform (use this!)
WinNT35, // sends smoke signals to authority
WinNT40, // uses NTLM
WinNT50 // negotiates Kerb or NTLM
}
}

Saturday, November 15, 2008

CSU Library Research Databases

  • EBSCOhost Research Databases: Menu of databases provided through EBSCO Publishing.
  • Business Source Complete (1886- some full text): Index, abstracts, and full text covering scholarly business journals on management, economics, finance, accounting, international business and much more.
  • Wall Street Journal (1984-): Contains full text articles from the Wall Street Journal from January 2, 1984 through today's issue. Browse issues, or search for terms in citation, abstract, or article text.
    • Use keyword search on:
      • your company
      • supply chain
      • logistics
      • quality
      • strategy
      • etc

Wednesday, October 29, 2008

VS 2008 Nested Master Page Support

Scott Guthrie has this to say about VS 2008 Nested Master Page Support:
"The good news is that VS 2008 fully supports nested master pages, and makes using them super easy. Going forward I recommend that almost all ASP.NET projects should advantage of this feature - since it can add tremendous flexibility to the UI of your projects."

Also mentions Open Source Templates.

Tips for Nested Master Pages and VS 2005 Design-Time

From Scott Guthrie. He has sample code to get around the problem of nested master pages not being editable in the visual designer. (Emphasis added.)
"One of the cool advanced features of the new Master Pages feature in ASP.NET 2.0 is the ability to nest them. For example, you could define a top-level master-page called “MainMaster.master” that defines a common logo header and footer, and defines a content-placeholder for the page called “content”. You could then define two sub-masters beneath it – one that provides a two-column layout model for the content (“TwoColumnMaster.master”), and one that provides a three-column layout model (“ThreeColumnMaster.master”). These two nested-master pages could then use the MainMaster.master file as the root master, and only adjust the layout within its content section (each would fill in the "content" placeholder and in turn add their own content-placeholders for sub-pages within it). The benefit of this approach is that if a designer ever changed the logo or top-level design of the site, they only have to update one file (MainMaster.master) and then have every page on the site automatically pick it up regardless of what master file they were based on.

"This nested model is pretty cool and powerful, and allows arbitrary levels of nesting. The only downside is that VS 2005 only supports nested master page editing in source-view, and doesn’t support it in the WYWSIWYG designer (note: obviously it does support editing them when the master-pages are not nested). "

Tuesday, October 28, 2008

Cool way to style HTML forms using CSS

Interesting article at Webmonkey. Uses things I've never heard of, including <fieldset> and <legend> tags, and using unordered lists and stylesheets to style the forms.

Saturday, October 25, 2008

CMS Ratings

This article publishes ratings of many different open source CMS systems.

Thursday, October 16, 2008

jQuery and ASP.NET AJAX UpdateRegion

When using jQuery with Microsoft ASP.NET AJAX UpdatePanel controls, you need code similar to this, in a script tag in the UpdatePanel. Otherwise events are fired multiple times, and event.preventDefault() does not work.

    // Necessary for update regions.
    Sys.Application.add_load(WireEvents);

    function WireEvents() {
// my jQuery "ready" event stuff goes here.
    }

Normally, of course, you would do the following:

    $(document).ready(function{} {
// my jQuery "ready" event stuff goes here.
    });

Tuesday, October 14, 2008

Google hosting javascript libraries

The AJAX Libraries API is a content distribution network and loading architecture for the most popular open source JavaScript libraries. By using the Google AJAX API Loader's google.load() method, your application has high speed, globaly available access to a growing list of the most popular JavaScript open source libraries including:

Wednesday, September 17, 2008

Applied Software Project Management - Test Plan and Test Cases

Applied Software Project Management - Test Plan and Test Cases: "The goal of test planning is to establish the list of tasks that, if performed, will identify all of the requirements that have not been met in the software. The main work product is the test plan. There are many standards that can be used for developing test plans. The following table shows the outline of a typical test plan. (This outline was adapted from IEEE 829, the most common standard for software test plans.)"

There's also this Wikipedia link, which gives an outline of the IEEE 829-1998 test plan outline: Test Plan

Thursday, September 04, 2008

Install multiple versions of IE on your PC | TredoSoft

Install multiple versions of IE on your PC TredoSoft: "It is not difficult to follow the instructions and get any version of IE running in standalone along side other versions. Most of you probably know of evolt's archive of Internet Explorer which has them readily packaged in ZIP files. Now suppose you want to download them all. An installer that would conveniently automate the whole process would be great. Thanks to this comment for the idea. "

Friday, August 22, 2008

Testing on Mobile Devices using Emulators « klauskomenda.com

Testing on Mobile Devices using Emulators « klauskomenda.com -- Has a list of emulators with photos of the emulators.

Mobile Web Developer’s Guide Part I

Mobile Web Developer’s Guide Part I
-- excellent guide to designing mobile web apps! Includes how to think of page flow, how to think about the options available to a mobile user, the market segment breakdown to phone types (in 2007), the choice of WAP, WXHTML, etc., and recommendations and best practices.

Mobile Emulators | dev.mobi

Mobile Emulators | dev.mobi: "The following emulators are very usful for testing mobile applications without incurring data charges.
The dotMobi one is pretty cool!

Gloger_TototaScrum-170706.pdf (application/pdf Object)

Toyota Way mapped to Scrum (pdf)

CodeProject: 100% Reflective Class Diagram Creation Tool. Free source code and programming help

CodeProject: 100% Reflective Class Diagram Creation Tool. Free source code and programming help

Simple graph drawing algorithms too!!!

Thursday, July 31, 2008

Microsoft Virtual Labs

TechNet Virtual Labs: "Quickly evaluate and test Microsoft's newest server products through a series of guided, hands-on labs you can complete in 90 minutes or less. You can use TechNet Virtual Labs online immediately, free. Start by selecting the lab you're interested in from the list below."

Also this link, which appears to be more inclusive: http://www.microsoft.com/events/vlabs/default.mspx

They only work in Internet Explorer.

Tuesday, July 22, 2008

Migration: Convert A Java Web Application To ASP.NET Using JLCA

Migration: Convert A Java Web Application To ASP.NET Using JLCA: "The JLCA is a tool used to convert a Java application into a C# application. The tool has shipped with Visual Studio® since Visual Studio .NET 2003. Currently in version 3.0, the JLCA is included with Visual Studio 2005 and is also available as a free download from the JLCA home page.

Version 3.0 includes enhancements to convert Java artifacts, such as Servlets and Java Server Pages (JSPs), as well as rich-client applications that use Swing or the Abstract Windowing Toolkit (AWT). In practice, the JLCA provides a very good place to start a conversion, but it will not successfully complete the entire process. So don’t expect this to be completely hands-free—you will still need to do some manual resolution of converted items after using the tool."

Monday, July 07, 2008

How safe is instant messaging? A security and privacy survey | The Iconoclast - politics, law, and technology - CNET News.com

How safe is instant messaging? A security and privacy survey | The Iconoclast - politics, law, and technology - CNET News.com: "The number of interested parties eager to listen in on your online conversations, including what you type through instant messaging, has never been higher.

It's trivial to monitor unencrypted wireless networks and snatch IM passwords as they flow through the ether. Broadband providers and their business partners are enthusiastically peeking into their customers' conversations. A bipartisan majority in Congress has handed the FBI and shadowy government agencies greater surveillance authority than ever before."

Humanist → Why Make Erlang a Functional Language?

I like this page. It gives great rationales, and therefore insightful descriptions, of the core Erlang features.

Humanist → Why Make Erlang a Functional Language?: "I’ve heard the argument many times. People “don’t like Erlang’s syntax so [they] don’t like Erlang.” I, for instance, didn’t understand the block terminator syntax when I was first learning Erlang, so I asked Yariv Sadan about it:"

Here's the accompanying reddit discussion: http://www.reddit.com/r/erlang/info/6p74v/comments/