Wednesday, September 9, 2009

Øredev videos (2008)



Tuesday, August 25, 2009

Advanced ASP.NET MVC


Learn how to extend the ASP.NET MVC framework with dependency injection, view engines, action filters, and more. We’ll see how to apply Test Driven Development and write unit tests with mock objects.


The WTFs of a non-relational design in a relational database

Here are some facts about the Vision system:

  • The data model comprised a single table named DATA.
  • The DATA table had 240+ columns.
this application was something new, and that the way it stored data and metadata in the database would revolutionize computing

You are in a world of hurt. It takes six months to train a new maintenance person and a database consultant," waving at me, "says that the simplest of reports can only be created with the greatest difficulty using the most low-level reporting tools." He stood up, walked to the white board, picked up a pen, and wrote:

"RUN LIKE HELL!"




http://www.simple-talk.com/opinion/opinion-pieces/bad-carma/

Monday, August 24, 2009

NDC 2009 Videos

Mark Nijhof has created a list of presentations from the Norwegian Developers Conference 2009, that featured some of the best speakers around in the field of software development.

Here are some selected presentations. For the full list, see Mark's blog.


Tim Huckaby
Jump into Windows Presentation Foundation! ...and Become Immediately Effective

Sql Antipatterns

Presentation by Bill Karwin (from the MySQL Conference & Expo)

Wednesday, July 8, 2009

Geotargeting With Google Webmaster Tools

Use Webmaster Tools to set geotargeting if it's not given by the TLD. E.g www.europe-for-australians.com.

Monday, July 6, 2009

Writing for the Web

Get rid of half the words on each page,
then get rid of half of what’s left

– Krug’s third law of usability

"Happy Talk Must Die" - Steve Krug, "Don't Let Me Think"

Some good resources for writing on the web and copywriting:

Charlie Morris http://wdvl.internet.com/Internet/Writing/
Jacob Nielsen http://www.useit.com/papers/webwriting/
Daniel Will-Harris http://www.efuse.com/Design/web_writing_basics.html

Copyblogger, Copywriting 101: http://www.copyblogger.com/copywriting-101/

Also see William Strunk, Jr. (Classic from 1918 http://www.bartleby.com/141/strunk5.html

Sunday, June 28, 2009

Video interviews with Uncle Bob aka Robert C. Martin

Software guru Robert C. Martin has some really interesting views on being a software professional and TDD: A developer that is not testing his code is like a doctor that doesn't wash his hands before examining the patient.

Wednesday, June 24, 2009

10 UI Design Patterns You Should Be Paying Attention To

A great article from Smashing Magazine on some of the most useful UI design patternsSmashing Magazine
  1. Lazy Registration: Allow user to check out the site before requiring registration-
  2. Progressive Disclosure: Show what's relevant now, hide details and reveal when requested.
  3. Forgiving Format: Allow different input formats, like ZIP or Address in the same input field.
  4. Clear Primary Actions: Emphasize the primary action (e.g "Save") and de-emphasize the secondary (e.g Cancel).
  5. Breadcrumbs: Show the path to the current information (e.g Shop > Laptops > Toshiba).
  6. Account Registration: Improve user experience by letting users register, only neccessary information.
  7. Required Field Marker: Clearly label required fields.
  8. Steps Left: Clearly show current steps in a registration sequence.
  9. Subscription Plans: When a product or service is provided, give different options to the user. Highlight what you want to sell.
  10. Hover Controls: Hide tools until objects are hovered (e.g show Edit button when an editable list is hovered).

Friday, June 19, 2009

Thursday, June 18, 2009

Custom Font Size in AdSense

From the Google AdSense Blog (June 17th 2009):
We're now happy to announce the launch of a [-] feature you've been asking for -- the ability to change the font size of the text in your ad units. You can now select from small, medium, and large font sizes for ad units [-] ... the actual font size will vary for each format size, font face, and user-specific settings such as browsers and operating systems.

WebmasterWorld discussion: Font Size Mania

Wednesday, June 17, 2009

Econsultancy.com: Cool and usable

I stumbled upon an article at Econsultancy.com today, and immediately enjoyed the design and usability on their site:
http://econsultancy.com/blog/081-a-10-point-checklist-for-landing-page-designEconsultancy.com
  • Main menu opacity looks good
  • Balloons.. cool header
  • Tweet this: Promoted social bookmark, highly visible
  • Not just tags - also topics and sectors (main site categories)
  • Related content
  • HTML / formatting in comments
  • Nice footer. Notice search and extra footer with copyright / privacy policy
  • "Popular" box: Tags, authors, sectors, topics
  • Author info with Twitter and LinkedIn links
  • Content: Pyramid - main point early, then details (conversion intent)
  • Content: List - advises divided into short points, easy to scan

Friday, June 12, 2009

Why Cal Henderson Hates Django


Cal Henderson, the Flickr guy, gives one of the funniest presentations I've seen, at least in the nerdy sphere. Watch, and learn :)




Funny Presentation Recipe

  1. Be hung over and mention last night
  2. Use funny images from Flickr, with funny text
  3. Swear (a lot)
  4. Be a cocky, rich dude
  5. Use irrational logic (e.g founder has a big beard, these guys must be serious)
  6. Show a stupid, funny graph
  7. Get serious in the end

Tuesday, June 9, 2009

Util Classes Must Die

Using a lot of static methods in utils classes will make your application procedural rather than object oriented.

Util classes cause problems with / violates:

* OO in general: Code is not object oriented
* Testability: Static is hard to test
* Inheritance: You can not extend a helper class
* Polymorphism: Helper class can not derive from an interface / base class
* Cohesion: Several responsiblilties in a class breaks the single responsibility principle
* Encapsulation: Helper methods are procedures

Anti-Patterns and Worst Practices – Utils Class

Chris Missal blogs about Anti-Patterns and Worst-Practices, and mentions the utils class as an indicator of lazyness and lack of domain knowledge:
[...] know that there’s probably a better way. Since the problem I see with Utility classes is that they’re usually just a collection of a whole bunch of stuff that doesn’t really belong together, they probably exist for common reasons.

Are Helper Classes Evil?

Nick Malik has written two articles about the subject, and calls the helper classes an extraordinarily bad idea that should be avoided most of the time. Malik shows how helper classes breaks completely with object orientation (encapsulation, behavior) and several OO pronciples.
[-}the notion of functional decomposition is so easy that we drop to it when we come across an algorithm that doesn't seem to "fit" into our neat little object tree, and rather than understand the needs, analyze where we can get the best use of the technology, and place the method accordingly, we just toss it into a helper class. And that, my friends, is laziness.
What about making reusable code? Here's what Nick has to say about it:
The largest reusable code base that all your developers are already using is the .Net Framework. The vast majority of the framework uses instantiated classes, not static helper classes (there are exceptions, unfortunately). So, the need for reuse is NOT a good argument for helper classes.
http://blogs.msdn.com/nickmalik/archive/2005/09/06/461404.aspx

Helper Classes Are Evil

Eric Lee from Microsoft Game Stuidos takes a similar stand against the helpers in his blogpost Helper Classes Are Evil:
I very much dislike them in an OOP design because inevitably they becomes a dumping ground for all kinds of things that don’t relate to each other at all in the problem domain. It’s an attractive nuisance, to use a legal term. [-] a real adherence to OOP means that you’ll have lots and lots of small, single-purpose classes.
Next time you're tempted to put code into a helper class, take a step back and think for a second. Will this code violate OO and OO principles? Probably. What does the helper methods do? Can you design this so that the code is placed in a separate class with data and behavior? Don't be lazy. Try to understand the problem domain and come up with an object oriented solution rather than a lazy, procedural one.

So, must helper classes die? Let me paraphrase Nick:
I don't believe that software practices qualify in the moral sphere, so there is no such thing as evil code.

Saturday, June 6, 2009

Jeremy D. Miller: The Joys and Pains of a Long Lived Codebase (Video)

In this presentation recorded at QCon SF 2008, Jeremy D. Miller shares lessons learned while developing a project over 5 years. He talks about his mistakes, what to avoid and how to design, code and test better.

http://www.infoq.com/presentations/Lessons-Learned-Jeremy-Miller

Sunday, May 24, 2009

Clixpy


Clixpy is a web usability testing tool. It’s very easy to install, just by pasting a few lines of JavaScript code in your site’s HTML. When users browse your website Clixpy traces everything they do and then plays it for you, giving you the opportunity to extract any information you may need.

Seth Godin:Tribes



Seth Godin argues the Internet has ended mass marketing and revived a human social unit from the distant past: tribes. Founded on shared ideas and values, tribes give ordinary people the power to lead and make big change. He urges us to do so.

Monday, May 4, 2009

Video: Learning from StackOverflow.com

Presented by Joel Spolsky, known for Fog Creek and his blog JoelOnSoftware.com.



YouTube Description:
Until recently, searching for help on highly technical programming problems has been a mess. A lot of what the search engines found was old discussions in forums, where you have a lot of wrong answers and out-of-date answers that you have to sift through yourself. You also found a lot of answers at sites that were hidden behind a pay wall, which uncloaked themselves for Google and then demanded membership fees to see the answers. More
The 9 issues mentioned in video:
  1. Voting: Override by best solution
  2. Tags: Smart tags, what you can maybe answer
  3. Editing: Edit your own and other people's entries
  4. Badges: No money, status
  5. Karma: No money, status
  6. Pre-search: Previously asked questions
  7. Google is UI: Google search important traffic source
  8. Performance: ASP.NET, C#, Jquery, Sql Server, Dell
  9. Critical Mass: "Empty restaurant syndrome"

Video: Don Norman: The Design of Future Things

In this talk, Don discusses his latest book, The Design of Future Things, which is about the increasing intrusion of intelligent devices in the automobile and home with both expected benefits and unexpected dangers.

Cool Presentation Template (Google Docs)

Cool presentation template, embedded from Google Docs (Get started, create your own)

A Few Good Resources on "Search"

Faceted search enables users to navigate a multi-dimensional information space by combining text search with a progressive narrowing of choices in each dimension.

http://en.wikipedia.org/wiki/Faceted_search



Flickr: Faceted Navigation











Yahoo Design Pattern Library

UI design patterns: What the user wants to accomplish, and when to use each pattern.

SEARCH
Search Pagination

NAVIGATION
Breadcrumbs
Links
Alphanumeric Filter Links
Tabs
Module Tabs
Navigation Tabs

BROWSING
Page Grids
Pagination
Item Pagination
Search Pagination

SELECTION
Auto Complete
Calendar Picker
Carousel

RICH INTERACTION
Drag and Drop
Drag and Drop Modules
Invitation
Cursor Invitation
Drop Invitation
Tool Tip Invitation
Hover Invitation
Transition
Animate
Brighten
Collapse
Cross Fade
Dim
Expand
Fade In
Fade Out
Self-Healing
Slide
Spotlight

SOCIAL
Ratings & Reviews
Architecture of a Review
Rating an Object
Vote to Promote
Writing a Review
Reputation
Competitive Spectrum
Named Levels
Numbered Levels
Identifying Labels
Points
Collectible Achievements
Ranking
Leaderboard
Top X
Sign-in Continuity

Sunday, May 3, 2009

How to create tabs with jQuery UI

Tabs are a space saver that are welcome on almost any site. This how-to shows you step-by-step how to quickly integrate them into your site using the jQuery UI.

Full article: http://tanguay.info/web/index.php?pg=howtos&id=21

Saturday, May 2, 2009

The Future of C#

Anders Hejlsberg is a Technical Fellow in the Developer Division. He is an influential creator of development tools and programming languages. He is the chief designer of the C# programming language and a key participant in the development of the Microsoft .NET framework.
http://channel9.msdn.com/pdc2008/TL16/

Google Documents List Data API

The Google Documents List Data API allows client applications to upload documents to Google Documents and list them in the form of Google Data API ("GData") feeds. Your client application can request a list of a user's documents, and query the content in an existing document.

Find Tables With Foreign Key Constraint in Database

SELECT f.name AS ForeignKey,
OBJECT_NAME(f.parent_object_id) AS TableName,
COL_NAME(fc.parent_object_id,
fc.parent_column_id) AS ColumnName,
OBJECT_NAME (f.referenced_object_id) AS ReferenceTableName,
COL_NAME(fc.referenced_object_id,
fc.referenced_column_id) AS ReferenceColumnName
FROM sys.foreign_keys AS f
INNER JOIN sys.foreign_key_columns AS fc
ON f.OBJECT_ID = fc.constraint_object_id

/*** Script all Foreign Key Constraints ***/
/*** The Result Set can be used to copy constraints to your testing DB or to keep on hand in case of errors. ***/
SELECT
‘ALTER TABLE ‘+FK.TABLE_NAME+
‘ ADD CONSTRAINT ‘+C.CONSTRAINT_NAME+’ FOREIGN KEY’+
‘(’+CU.COLUMN_NAME+’) ‘+
‘REFERENCES ‘+PK.TABLE_NAME+
‘(’+PT.COLUMN_NAME+’)’ ForeignKeyScripts
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK ON C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE CU ON C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME
INNER JOIN (
SELECT i1.TABLE_NAME, i2.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS i1
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE i2 ON i1.CONSTRAINT_NAME = i2.CONSTRAINT_NAME
WHERE i1.CONSTRAINT_TYPE = ‘PRIMARY KEY’
) PT ON PT.TABLE_NAME = PK.TABLE_NAME
–WHERE PK.TABLE_NAME IN (’Table1′, ‘Table2′)
–WHERE FK.TABLE_NAME IN (’Table1′, ‘Table2′)


Friday, May 1, 2009

Microsoft .NET Framework 3.5 Commonly Used Types and Namespaces

This poster shows the commonly used types and namespaces in the 3.5 Framework, including WPF, Windows Forms, ASP.NET, Communications/Workflow, Data, XML, LINQ and Fundamentals.

The poster also shows what's new with the .NET Framework 3.5 and .NET Framework 3.0, what's available in the .NET Compact Framework 3.5 and what's planned for implementaiton in Silverlight 1.1.

Format is 90 x 70 cm, so it's best suited for printing and not reading on your laptop.

Download (via Microsoft.com)

Poster is created by Paul Andrew , Kit George and Brad Abram.

Source: Paul Andrew

Thursday, April 30, 2009

Pitfalls for Startups Driven by Software Developers

1) Putting your needs above the customer
2) Not clarifying your business idea
3) Not marketing yourself
4) Not branding yourself
5) Not managing your money
6) Not knowing who your customers are
7) Not acting in a professional manner

Some Useful T-SQL DateTime Functions

Example:

----First Day of Last Month
SELECT DATEADD(mm,-1,DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0))

----Last Day of Last Month
SELECT DATEADD(ms,-3,DATEADD(mm,0,DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)))

Monday, April 20, 2009

Most Interesting .NET StackOverflow Questions


1 - Visual Studio Optimizations
2 - Hidden .NET Base Class Library Classes
3 - Is DateTime.Now the best way to measure a function’s performance?
4 - Most wanted feature for C# 4.0 ?
5 - Hidden Features of ASP.NET
6 - Visual Studio debugger tips & tricks for .NET
7 - Most Useful Attributes in C#
8 - What is the most useful .net library you’ve found?
9 - Entity Framework vs LINQ to SQL
10 - Most Useful .NET Utility Classes Developers Tend To Reinvent Rather Than Reuse

http://blog.sb2.fr/post/2009/01/02/Most-Interesting-NET-StackOverFlow-Questions.aspx

Thanks again to Brian for link!

Similar lists in other categories, such as design patterns, layering, domain driven design etc. would be nice.

MVVM (model-view-view model) example with Silverlight

Code Project: 
Exploring a Model-View-ViewModel Application; WPF Password Manager, Cipher Text

 http://www.codeproject.com/KB/WPF/ExploringWPFMVVM.aspx

[-] article uses the WPF Password Manager, Cipher Text application as fertile ground for exploring the WPF UI Design Pattern, Model-View-ViewModel or MVVM. The application sports many cool features and some WPF goodness.

Microsoft: 
WPF Apps With The Model-View-ViewModel Design Pattern


Topics:
Patterns and WPF
MVP pattern
Why MVVM is better for WPF
Building an application with MVVM
WPF, data binding

Thanks, Brian for links!



Thursday, March 5, 2009

Wednesday, March 4, 2009

Custom file types: How to assiciate files with apps in Windows

Wouldn't it be nice to have your own file type for your enterprise application? E.g a custom xml file with metadata for your documents. This CodeProject article shows how it works:

http://www.codeproject.com/KB/dotnet/System_File_Association.aspx

InfoQ: AOP - Myths and truths

Video showing pragmatic usage of Aspect Oriented Programming in real-life projects.

http://www.infoq.com/presentations/AOP-Myths-and-Realities

Presentation by Ramnivas Laddad

AOP: INotifyPropertyChanged

Better binding with PostSharp and INotifyPropertyChanged
http://richardsbraindump.blogspot.com/2009/02/aspect-oriented-programming.html

SyntaxHighligter: Nice code formatting on your blog/site

http://alexgorbatchev.com/wiki/SyntaxHighlighter

Tuesday, March 3, 2009

How to check if the current user is administrator

bool isAdmin = new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);

Frameworks and DDD: Keeping the Model Clean

How to avoid pitfalls and preserve a clean domain model while using frameworks. 

Tim McCarthy is is the author of .NET Domain-Driven Design with C#: Problem-Design-Solution



REGSVR32 VS REGASM

REGSVR32 : This is used for registering a COM based DLL:

REGASM: This is used to register a .NET Assembly for COM Interop:

Thursday, February 26, 2009

Continuous Refactoring vs Refactor Mercilessly

Good ideas need to have a name. Uncle Bob refers to the boy scouts' rule, "Leave the campground cleaner than you found it". The "Pragmatic Programmer" authours say "Fix the problem, not the blame". Fowler's advise is to refactor any time the code smells.

Google shows that there are
3 660 hits for "Refactor Mercilessly"
2 040 hits for "Continuous Refactoring"

So even if I like "Continuous Refactoring" best, I guess "Refactor Mercilessly" won.

More important, I will try to make this a part of my autopilot programming: Whenever I stumble upon something that smells like crap, I will go ahead and fix it right away. Instead of blaming, commenting or apathetically ignoring the code.