Easy navigation and discoverability are very important aspects of website or application usability. The user should be able to easily dig deep in the content as well as to navigate to broader category of content.
I stumbled upon a site that has a "Back" link in a leaf level content page. As a user I thought it might be a way to go up and visit the related content or the parent category. Unfortunately, history.back() was used. And since I reached this page using a search or a direct link and opened it in a new tab, it led me nowhere.
The designer / developer assumed that the user will reach this page using a specific path and will open it in the same window and tab.
That was a very bad idea as the most of the content nowadays is reached using search engines. And you don't your visitors to leave your site back to Google after getting him to your site!!. Also the design is broken in case the page is opened in a new window or tab.
Maybe the rationale behind using this technique was to get the user back (within the site) to the location from where he got to the current page, be it direct navigation links or internal site search page. If so, a better implementation should be using HTTP referrer, or explicit query string value to indicate the source of the request.
Small details can make big changes in usability. Different scenarios should be taken into consideration when designing the navigation.
Monday, August 15, 2011
Saturday, July 9, 2011
PowerShell 32 and 64 bit have different execution policy settings
I use PowerShell to automate many repetitive tasks. And build automation is one of the areas I like most.
I faced a stiuation when I get this error with a PowerShell script running in visual studio project post build event:
I added this to the batch file that calls the PowerShell script:
And the result was:
After some research I found that since the machine is 64-bit, there were 2 versions of PowerShell, 32 and 64-bit. Again I edited the batch file adding :
And ran a build from visual studio, the result was:
This shows that the version invoked was the 32-bit version, while the version I used to Set-ExecutionPolicy was the 64-bit version. I determined the paths from start menu shortcuts to Powershell:
Windows PowerShell (x86): %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
And Windows PowerShell: %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
So I opened Windows PowerShell (x86) and executed:
And it worked.
So, did Visual Studio post build event call the 32-bit version because it's a 32-bit application?
I faced a stiuation when I get this error with a PowerShell script running in visual studio project post build event:
File XXX.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about _signing" for more details.I know this error is usually caused by an execution policy that denies execution of scripts. So I made sure the Execution Policy is set to RemoteSigned. But This did not work!!
I added this to the batch file that calls the PowerShell script:
powershell "Get-ExecutionPolicy -List"
And the result was:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined
After some research I found that since the machine is 64-bit, there were 2 versions of PowerShell, 32 and 64-bit. Again I edited the batch file adding :
Powershell.exe "Get-Variable PSHOME"
And ran a build from visual studio, the result was:
Name Value
---- -----
PSHOME C:\Windows\SysWOW64\WindowsPowerShell\v1.0
This shows that the version invoked was the 32-bit version, while the version I used to Set-ExecutionPolicy was the 64-bit version. I determined the paths from start menu shortcuts to Powershell:
Windows PowerShell (x86): %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
And Windows PowerShell: %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
So I opened Windows PowerShell (x86) and executed:
Set-ExecutionPolicy RemoteSigned
And it worked.
So, did Visual Studio post build event call the 32-bit version because it's a 32-bit application?
Wednesday, July 6, 2011
SSMS and Deleting all records from a self referencing table
Clearing all data from a self referencing table using SSMS can be tricky. Selecting all records in SSMS results grid and pressing DEL just won't work in many times.
Take the common example of Employee - Manager relationship:
If you try using SSMS results grid to delete all records, you may get this error:
Using the Query window and running:
Will work however.
The difference is that SSMS actually tries to delete row by row, which will violate the constraint. But when using a query to delete all records. SQL Serve is smart enough to clear all data.
Take the common example of Employee - Manager relationship:
If you try using SSMS results grid to delete all records, you may get this error:
No rows were deleted.
A problem occurred attempting to delete row 1.
Error Source: .Net SqlClient Data Provider.
Error Message: The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "FK_Employee_Employee". The conflict occurred in database "test", table "dbo.Employee", column 'ManagerId'.
The statement has been terminated.
Using the Query window and running:
DELETE employee
Will work however.
The difference is that SSMS actually tries to delete row by row, which will violate the constraint. But when using a query to delete all records. SQL Serve is smart enough to clear all data.
Friday, January 7, 2011
Failed to extract the cab file in the solution error in SharePoint
When deploying SharePoint solutions, you may encounter an error message like:
There are two reasons that I found causing this kind of error:
Failed to extract the cab file in the solution.(FYI, the wsp solution file is a cab file. just try to rename *.wsp to *.cab)
There are two reasons that I found causing this kind of error:
- Having some special characters in files names in the solution, in my case it was "(" and ")".
- Having two DLLs with the same name even if one is in the GAC folder and the other in bin folder, this happened in my case by mistake, but it's good to know anyway.
Saturday, January 1, 2011
Articles I read in 2010
New year, new list :)
Seems I'm good at keeping old habits, I've even created the draft of 2011's list sending this post.
2009 list can be found here
2008 list can be found here
2007 list can be found here
Seems I'm good at keeping old habits, I've even created the draft of 2011's list sending this post.
2009 list can be found here
2008 list can be found here
2007 list can be found here
- Using WS-Discovery in WCF 4.0
- Securing Application Pages in Windows SharePoint Services 3.0
- A Brief Introduction to Enterprise Metadata Management for Microsoft SharePoint Server 2010 Developers
- Defining Templates with jTemplate
- Bug Opportunity Levels
- 10 Usability Principles to guide you through the Web Design Maze
- 9 Useful Tactics for Paying Back Technical Debt
- Functional Programming for Everyday .NET Development
- Patterns in Practice: The Open Closed Principle
- Double Dispatch Pattern
- Why I Stopped Coding and Why I'd Start Again
- How To Enable Caching in SQL Server Reporting Services (SSRS)
- How Google sets goals and measures success
- Microsoft SQL Server vs. MySQL
- Lambdas in VC++ 2010
- Top 10 features of Windows Presentation Foundation (WPF)
- Scope in JavaScript
- Successful Agile Planning: An Iteration How-To, Part I
- Successful Agile Planning: An Iteration How-To, Part II
- T-SQL Best Practices – Parameter Sniffing
- OPTIMIZE FOR UNKNOWN - How could that possibly make any sense???
- 53 Ways to Become a Better Entrepreneur
- HTML to Image in C#
- 13 Things You Should Know About Statistics and the Query Optimizer
- Extend Your WCF Services Beyond HTTP With WAS
- Top 10 Features of SQL 2008 R2
- Extend Your WCF Services Beyond HTTP With WAS
- Tuples, Anonymous Types, and Concrete Types
- Can't return anonymous type from method? Really?
- XslCompiledTransform Slower than XslTransform?
- Improving CSS With .LESS
- 8 Signs of a Positive Leader
- Are You a Software Architect?
- Top 6 Myths of Transaction Logs
- How we can write on C# in Linux: Implementing PanelApplet to Gnome Desktop
- Get Performance Tips Directly From SQL Server
- 7 performance tips for faster SQL queries
- Programming 3-D In Silverlight 3.0
- Understanding LINQ's Deferred Execution
- Project Voldemort: Scaling Simple Storage at LinkedIn
- A Look At The New Features In The ADO.NET Entity Framework 4.0
- Pragmatic F# in Action
- An Introduction to Functional Programming for .NET Developers
- Seven JavaScript Things I Wish I Knew Much Earlier In My Career
- Expression Tree Basics
- If your product is Great, it doesn't need to be Good.
- Putting a base in the middle
- Manipulating Images with .NET Programs
- Top 10 Ways to Decide What Type of Startup is Right for You
- Getting Lazy with System.Lazy
- Top 10 MySQL GUI Tools
- The Rise of NoSQL Databases
- The Prolog Story
- Scala vs. F#: Comparing Functional Programming Features
- Tip To Boost Your Business
- Architecting TekPub - Moving from ASP.NET MVC to Ruby on Rails
- Precompiling LINQ Queries
- Exploring the Performance of the ADO.NET Entity Framework - Part 1
- Exploring the Performance of the ADO.NET Entity Framework – Part 2
- 10 Hidden Skills of Successful Freelancers
- How (and Why) to Stop Multitasking
- HTML Forms to AJAX Forms the Easy Way
- Top 10 Things That Annoy Programmers
- Four variants of agile development methods
- A Flexible Model for Data Integration
- CAREER PROS: Revitalize Your Career
- Going NoSQL with MongoDB
- Going NoSQL with MongoDB, Part 2
- Top 10 Reasons for Startup Failure
- Exploring the software behind Facebook, the world’s largest site
- The Three Counterproductive Messages of Software Development
- Best Practices for Hints and Validation in Web Forms
- ASP.NET Tutorial: Web.Config Transformation
- Speed Up Your Web Site with Microsoft Azure BLOBs
- Windows Azure Table Storage – Not Your Father’s Database
- View State Security
- Using SQL Membership with ASP.NET application
- Ideas Are a Commodity, It's Execution Intelligence That Matters
- Data at Rest vs. Data in Motion
- How Microsoft's Azure Stacks up Against Cloud Competitors
- 5 Python Pluses for the Enterprise
- An ASP.NET Developers Guide to Setting Meta Keywords
- Eight Questions To Ask Before You Start A Business
- An Inkling
- ISA vs TMG vs IAG vs UAG - Are you confused?
- How to Increase Query Speed With a Little Communication
- Is it Time to Switch to ELT?
- In defence of SQL
- Building A Secure AJAX Service Layer
- What I Learned from 10 Online Businesses
- SQL CLR Data Types and Performance
- Developing on Symbian, the World's Most Popular Mobile OS
- Sub query expressions vs. Joins.
- Batch Processing Millions and Millions of Images
- WPA2 vulnerability found
- ANSI PADDING, Trailing Whitespace, and Variable Character Columns
- C# Programming: Using Generic Factory Classes to Create Generic Exception Handlers
- To NHibernate or Not
- When To Use Open Source in the Enterprise -- And When To Avoid It
- In Defense of Not-Invented-Here Syndrome
- Inside SQLite
- Does Your Program Smell Like Bacon?
- Adventures in performance tuning on Google App Engine
- 10 Startup Commandments
- What Happened to Yahoo
- Finding Unique Non-Repeating Random Numbers
- How This Web Site Uses MongoDB
- Five Reasons to Keep NoSQL on Your Radar
- The false myth of encapsulating data access in the DAL
- Linking to the Previous Row
- Agile people still don't get it
- Fast Python templates on AppEngine
- Top 10 Tips For Marketing a Startup or Web Product
- Creating Effective Semantic Markup
- Hilo Update – Introducing “Hilo Annotator”
- Subversion vs. Git: Choosing the Right Open Source Version Control System
- Introducing the Microsoft Web Farm Framework
- 10+ ways to be more productive
- WTF you got against Silverlight?!
- Use Dropdown Login Boxes for a Faster Login
- Finding awesome developers in programming interviews
- Datastore lessons learned the hard way
- Implementing Policy Injection in ASP.NET Applications
- Software Engineer to CEO: How Mark Herschberg Became ZepFrog’s Top Exec
- Leaving .net
- HTML5: The Facts And The Myths
- PHP needs to die. What will replace it?
- why node disappoints me
- why node js excites me
- Design patterns have (mostly) flopped
- A Few of My Favorite App Things
- Self-Taught vs. Formal Developer Training: What’s the Difference?
- Unix’s Revenge
- A Check and Foreign Key Constraint Improves Query Performance
- Low Level Bit Hacks You Absolutely Must Know
- Unix vs. Microsoft Windows: How system designs reflect security philosophy
- Red Hat CEO: Software Vendor Model Is Broken
- Why PHP Is Fun and Easy But Python Is Marriage Material
- Using MySQL as a NoSQL - A story for exceeding 750,000 qps on a commodity server
- The Value of a Project Blog
- 30 lessons learned in computing over the last ten years
- 5 Innovative Uses of an API [Mashable Awards]
- Why Python?
- My programming journey
- Reflection is Slow or Fast? A practical demo
- In defense of transactional replication as an HA technology
- How to Turn Your Creative Brainstorm into a Completed Project
- You’re a developer, so why do you work for someone else?
- Under the ORM Hood: Revealing the SQL
- Breaking the Web's Cookie Jar
- Open ID Is A Nightmare
- jQuery AJAX calls to a WCF REST Service
- Is Symbian dead? And if so, who killed it?
- Common Security Mistakes in Web Applications
- 10 Usability Tips Based on Research Studies
- Why Free Plans Don’t Work
- Five Reasons You Haven’t Launched
- Novell acquired by Attachmate, sells some patents to Microsoft
- Why Startup Founders Should Stop Reading Business Books
- The Java crisis: what are Oracle, IBM, Google and Apache fighting over?
- Top 10 MySQL Mistakes Made By PHP Developers
- Is NoSQL for me? I’m just a small fish
- Web Application Configuration Security Revisited
- 10 Essential Tools for building ASP.NET Websites
- Windows Phone 7 UX – One Size Does Not Fit All
- Why we’re really happy with AppEngine (and not going anywhere else)
- A pragmatic approach to Google AppEngine
- Why the Windows Azure Nov 2010 SDK Rocks!!
- The DELETE statement in SQL Server
- Why you absolutely MUST write an API when you write your next app
- 10 Things to Consider Before Starting a Business
- Agile Techniques: When and How to Conduct a Code Review
- Java Trap, 2010 Edition
- Returning the Top X row for each group
- 4 Things You Need to Know About Designing a Database for the Cloud
- 12 programming mistakes to avoid
- Android vs iOS: A Developer’s Perspective
- 10 Considerations for Building a Startup Team
- Google, Chrome OS and the Big Picture
- The Dirty Truth About Web Passwords
- 5 Lessons We’ve Learned Using AWS
- The Duct Tape Architect
- Sandboxing: Welcome to the Dawn of the Two-Exploit Era
- Startup Insights: Putting a Product in the Marketplace
- Facebook: Why our 'next-gen' comms ditched MySQL
- 10 Things to Learn Next Year
- Pickle vs JSON — Which is Faster?
- AppEngine's Python Templates Benchmark Conclusion
- 5 Interesting Facts About Android
- 10 Predictions for Web Development in 2011
- MongoDB CTO on Foursquare’s Scaling Issues
- Microsoft and the Cloud: Year in Review
- Disk Is Cheap! ORLY?
Subscribe to:
Posts (Atom)