Why I believe software development should be like amazon kindle development

by Vahid 4. May 2011 09:10

Few weeks ago I got myself an Amazon Kindle to facilitate book reading and hopefully get back my reading habits. I am so amazed by the device that today I twitted “it’s my best gadget”. now there are very genuine reasons behind the twit.

it’s meant to be used to read books and it does it perfectly.

  • it has a great screen which is optimized for the reading.
  • does not hurt your eyes.
  • you can read books even in the direct sunlight.
  • it’s handy and light so very easy to carry with you
  • it’s got a long lasting battery life
  • bot built in dictionary which is extremely easy to use
  • has got a great search functionality
  • has got wireless connection so that Amazon can push the books immediately to the device
  • it’s very very easy to use

I have just mentioned couple of it’s great features. don’t get me wrong, I don’t work for Amazon and I am not doing any promotion for the Kindle. the moral of what I have mentioned above it that IT DOES WHAT IT IS SUPPOSED TO DO AT IT’S BEST.

I mean when I need a device to read books on it, I don’t need to have a million color screen with back light which would hurt my eyes and make them tired after couple of pages. yap I agree it would be good to be able to play 3d games on it BUT it requires changing the display type or maybe putting two different displays in the device –crazy but possible-. I would call either of them over engineering which will work against the device objectives. the same scenario is true with almost all characteristics of the Kindle.

now the reason I believe that software development and management should be done in the same way that Kindle development is done is:

  • before starting a new software project, the team should be clear about what they are going to do. i.e. they should know they going to create a book reading device or a gaming device
  • they need to focus on what they are supposed to deliver and how they can deliver it with the best quality. i.e. they need to focus on delivering a device on which reading the book is easy and it’s not important if you can play games on it.
  • they should keep the life as simple as possible not try to inject extra functionalities to the deliverables until and unless it’s absolutely required. i.e. I don’t need to have joy stick on the Kindle I’d rather have to buttons to navigate through the pages.
  • stop over engineering the project. gold plating and over engineering the deliverables most of the time will distract you from focusing on the core values of the project and very often will be your own headache cause you don’t know the impact it. i.e. Kindle does not come as a dual screen device on which you can watch movies and read books because this is not Kindle’s objective.
  • keep your solutions easy to use
  • and finally never give up improving the quality of the functionalities you provide

so these were some of my ideas on delivering software systems the same way Kindle was delivered. I strongly believe most of the software systems development fail either because of the ambiguity of the deliverables specifications or because of over engineering the solution.


General | Technical

Could not create the driver from NHibernate.Driver.OracleDataClientDriver error in NHibernate

by Vahid 5. April 2011 03:59

I have been playing with Nhibernate to connect to an oracle database using ODP.NET. first POC project which was a console application worked properly but as soon as I moved the codes to a Web Application for POC I started getting “Could not create the driver from NHibernate.Driver.OracleDataClientDriver” error. scratching my head and think about the failure where the same exact code was running in the Console application, tried so many ways but no result. everything was in place, Oracle reference, Nhibernate reference and configuration etc…

finally I just thought of giving a shot to marking the Oracle.DataAccess database to be copied locally in the property window and surprisingly it started working. now don’t ask me why but if you face the same scenario just mark your set Copy Locally property of Oracle.DataAccess to true.


SQL | Technical

Windows Server AppFabric

by Vahid 13. February 2011 05:15

if you have been involved in the enterprise application architecture and development, for sure you have also faced the memory constraint when designing the application. the thing is that as soon as you talk about enterprise application –I mean real enterprise application- you are talking about a huge amount of data being processed and traveling between systems.  that’s when you say oops, I need to take care of this, user and my hardware cannot afford these expensive operations each and every time a request comes in. then you start thinking about caching the information somewhere. ok, some out of the box caching –i.e. ASP.net Caching- is there but we are talking about huge amount of data and keeping them on the same server as the application server would be out. and that’s the time you say Valla to keeping the data in a database. you go ahead and do it but as soon as you run the first load test with few thousand concurrent users the “sh..t” word comes out. you see the bottlenecks connecting to database, you see the performance degrade and you see that you have made your business owner to spend some good amount of money for the database licenses but you are not getting the result you were after. exactly at this point of time you would wish that there was a technology to help you out with the situation and if you have heard of Windows Server AppFabric and know it, than you feel how much you are blessed.

as of now Windows Server AppFabric  consists of two components:

  • AppFabric Hosting Services: which I haven’t worked with in any project yet and is not in my focus in this post
  • AppFabric Caching Services: which is the one I have used and appreciate a lot

basically the caching services is exactly what we need in the situations like the one I talked about because:

  • we can keep the data available as long as we want
  • it’s in memory so it’s fast, very fast
  • we don’t need any database licenses
  • it’s easy to learn and worked with
  • if you need extra memory, just need to add an other machine to the nodes
  • the machines don’t need to have powerful processing power, RAM is needed

so I personally believe all of us need to start learning about this technology as it will somehow change the way we architecture our next applications by giving us to handle more data much faster. if you want you get stared with Windows Serve AppFabric, I would suggest to download the free training kit from Microsoft and get started today.


for quick guide about the installation you can refer to the following link:



.Net | Technical

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format

by Vahid 8. February 2011 11:32

I  had deploying an asp.net application to a windows 2008 64bit server. the application uses odp.net to connect to an oracle database. but when I tried to access it I kept getting an error saying:

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format”

pulling my hair for sometimes I couldn’t find any logical explanation for this as the dll named ‘Oracle.DataAccess’ was already there in the bin folder. but for some odd reason this was the problem itself. I had to delete the dll from the folder to have the application working.

I don’t have any explanation for this as of now but will update this post as soon as I figure out the cause.


.Net | Technical

First Tip On SharePoint 2010

by Vahid 29. December 2010 15:14

recently I got involved in a SharePoint project. I am not a SharePoint pro but I have the opportunity to work with some of best SharePoint professionals so I am learning as I go.

I thought it would be useful to share what I learn. although some of them maybe basic but I am sure they would help somebody out there who is just picking up on SharePoint.

So first tip would be on working with CSS files. you when I wanted to change something in CSS I was doing this stupid work of doing the changes and publishing the site/web part to see the result. because of the size of the project this was a time consuming task. but Mr. Z suggested a trick to work on the css file and change them in place where the changes would reflect without deployment.

here is the trick. Go to you 14 hive folder. it should be at the following address on your computer

C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\14

in the 14 hive find the css folder and in the folder find the css file you want to work on. open the file with you desired css editor and start editing the file. once done just save it and refresh you browser. boom here you go seeing the changes without deploying the file.

but remember to copy and paste the content of the css file into your development copy in visual studio when you are done with changes.


.Net | Learning resource | Technical

do we use silverlight when HTML 5 is out?

by Vahid 2. September 2010 05:26
This has been a question for me for sometimes. Although i knew silverlight is the future but i could never form a concrete answer to why silverlight is the future. till i came across the following blog post by the silverlight team. Make sure you read the post since it's written what is in most of our minds but cannot stated in words.




.Net | Technical

T4 to rescue and save you time

by Vahid 11. June 2010 05:56

till yesterday i had never used T4 for a real problem solving. i knew what it is but i did not know how great and easy it is.

in my current scenario i have a database table which contains options available for each property of 30 available properties of items to be added to the system. the table has almost 500 records.  in the item registration page i had to create a structure like this for each property:

<div id="div1" runat="server" class="row">
<asp:Label ID="SmartLabel13" runat="server" AssociatedControlID="" Text="Title of the property"></asp:Label>
<asp:DropDown ID="SmartDropDown1" runat="server">
<asp:ListItem Selected="True" Text="-----------" Value="">
<asp:ListItem Selected="True" Text="option 1" Value="option 1 value">
<asp:ListItem Selected="True" Text="option 2" Value="option 2 value">
<asp:ListItem Selected="True" Text="option n" Value="option n value">

creating 50 of these snippet and adding almost 12 list item for each of them along with setting the control names and property title and also AssociatedControlID of each would have taken me at least a day. i thought i could benefit from T4(Text Template Transformation Toolkit which is used for code generation) to save myself some time. so i started creating a T4 file to do this and vala… 15 minutes later i had it done. i have to say that, it was the first time that i actually was using T4. i cannot believe how easy it is to use it. the following few lines of code saved me at least a day by generating around 1000 lines of code:

<#@ template language="C#" debug="True" #>
<#@ output extension="txt" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Data" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #> 
<#@ import namespace="System.Data.SqlClient" #>
string catName=string.Empty;
int i=50;
System.Data.SqlClient.SqlConnection cn=new  System.Data.SqlClient.SqlConnection("data source=.\\sqlexpress;integrated security=true;database=Irizzle");
SqlCommand cmd=new SqlCommand("select * from IRZ.Lookupvalues order by Category",cn);
SqlDataReader dr=cmd.ExecuteReader();
<asp:ListItem Text="<#= dr["Name"].ToString()#>" Value="<#= dr["Code"].ToString()#>" />
<div id="div<#= dr["Category"].ToString()#>" runat="server" class="row">
<label for="drp<#= dr["Category"].ToString()#>"><#= dr["Title"].ToString()#></label>
<Irizzle:SmartDropDown ID="drp<#= dr["Category"].ToString()#>" runat="server">
<asp:ListItem Selected="True" Text="-----------" Value=""/>
<asp:ListItem Text="<#= dr["Name"].ToString()#>" Value="<#= dr["Code"].ToString()#>" />
<#    i++;}

i am sure T4 can save you and your companies hell lot of time. what i am wondering about is why not so many people talk about this great feature.

Tags: , ,

.Net | Technical

Have you heard about .LESS which Improves CSS

by Vahid 21. April 2010 08:57


If you are also involved in web development as part of your day to day job(sure most of us are), you know that dealing with css is inevitable. css is so important that everybody has to consider it; from the application architects to graphic designers.

Recently in the following blog post i read about .LESS library which was totally new but interesting for me. 

".LESS is a free, open-source port of Ruby's LESS library. LESS (and .LESS, by extension) is a parser that allows web developers to create style sheets using new and improved language features, including variables, operations, mixins, and nested rules. Behind the scenes, .LESS converts the enhanced CSS rules into standard CSS rules. This conversion can happen automatically and on-demand through the use of an HTTP Handler, or done manually as part of the build process. Moreover, .LESS can be configured to automatically minify the resulting CSS, saving bandwidth and making the end user's experience a snappier one. "  

If you want to know about .LESS for css, you can go through the same blog post which I went through:



Tags: ,

Technical | Tools

Waht is new in silverlight 4.0

by Vahid 21. April 2010 05:39

i have found a perfect blog post from mr. tim heuer on new features in silverlight 4.0. it's definitely worth going through his post.



.Net | Learning resource | Technical

Differences between asp.net web Site and asp.net Web Application

by Vahid 10. December 2009 06:05
Have ever wondered what the differences between 2 types of asp.net web projects in visual studio 2005 (asp.net web site project and asp.net web application project) are?Well personally I had some idea here and there about the differences but when I found the following tables from MSDN which describe the differences in an organized way, I thought of sharing them with you.Just one important thing is missing and this is:In asp.net web application project we can assign a static port number for your internal web server whereas in asp.net web site project we are restricted to use the dynamically assigned port number. Static port number assignment functionality comes handy in many situation starting from an automated testing.The following table lists Web project options or tasks and indicates which project model best implements those options.

Option or Task

Web Application Projects Web Site Projects
Need to migrate large Visual Studio .NET 2003 applications X  
Prefer single-page code model to code-behind model   X
Prefer dynamic compilation and working on pages without building entire site on each page view (that is, save file and then simply refresh the page in the browser).   X
Need to control names of output assemblies X  
Need to generate one assembly for each page   X
Need stand-alone classes to reference page and user control classes X  
Need to build a Web application using multiple Web projects X  
Need to add pre-build and post-build steps during compilation X  
Want to open and edit any directory as a Web project without creating a project file   X
The following table helps you select a project type by describing some of the key differences between Web application projects and Web site projects.


Web Application Project Web Site Project
Project definition Similar to Visual Studio .NET 2003. Only files that are referenced in the project file are part of the project, are displayed in Solution Explorer, and are compiled during a build. Because there is a project file, some scenarios are more easily enabled: You can subdivide one ASP.NET application into multiple Visual Studio projects.You can easily exclude files from the project and from source code-control. Web site projects use the folder structure to define the contents of the project. There is no project file and all files in the folder are part of the project. This project type is desirable if you have an existing folder structure representing an ASP.NET application that you want to edit in Visual Studio without having to explicitly create a project file.
Compilation and build outputs The compilation model for Web application projects is very similar to that in Visual Studio .NET 2003. All code-behind class files and stand-alone class files in the project are compiled into a single assembly, which is placed in the Bin folder. Because this is a single assembly, you can specify attributes such as assembly name and version, as well as the location of the output assembly.Certain other applications scenarios are better enabled, such as the Model-View-Controller (MVC) pattern, because they allow stand-alone classes in the project to reference page and user control classes. The Build command compiles Web site projects only to test them. To run Web site projects, you deploy source files and rely on ASP.NET dynamic compilation to compile pages and classes in the application. Alternatively, you can precompile the site for performance, which uses the same compilation semantics as ASP.NET dynamic compilation. The ASP.NET dynamic compilation system has two modes—batch mode (the default) and fixed-names mode. In batch mode, many assemblies (typically one per folder) are produced when precompiling the site. In fixed mode, one assembly is produced for each page or user control in the Web site.
Iterative development To run and debug pages, you must build the entire Web project. Building the entire Web application project is usually fast, because Visual Studio employs an incremental build model that builds only the files that have changed. You can configure build options Visual Studio 2005 for when you run the site: build the site, an individual page, or nothing at all. In the last case, when you run a Web site, Visual Studio simply launches the browser and passes to it the current or start page. The request then invokes ASP.NET dynamic compilation. Because pages are compiled dynamically and compiled into different assemblies as needed, it is not required that the entire project compile successfully in order to run and debug a page.By default, Visual Studio completely compiles Web site projects whenever you run or debug any page. This is done to identify compile-time errors anywhere in the site. However, a complete site build can significantly slow down the iterative development process, so it is generally recommended that you change the build project option to compile only the current page on run or debug.
Deployment Because all class files are compiled into a single assembly, only that assembly needs to be deployed, along with the .aspx and .ascx files and other static content files. In this model, .aspx files are not compiled until they are run in the browser. However, when used with Web Deployment Projects (a downloadable add-in to Visual Studio 2005), the .aspx files can also be compiled and included in a single assembly for deployment.Each time you deploy the single assembly produced in this model, you replace the code for all pages in the project. Both .aspx files and code-behind files can be compiled into assemblies using the Publish Website command in Visual Studio. (Note that the Build command does not create a deployable set of assemblies.) The updateable publish option supports compiling only code-behind files while leaving .aspx files unchanged for deployment. The default mode for precompiling produces several assemblies in the Bin folder, typically one per folder. The fixed-names option produces one assembly per page or user control and can be used to create deployable versions of individual pages. However, the fixed-names option increases the number of assemblies and can result in increased memory usage.
Upgrade from Visual Studio .NET 2003 Because the Web application project model is the same as in the Visual Studio .NET 2003, upgrade is generally simple and will usually not require any restructuring of the application. The compilation option for Web site projects is significantly different than Visual Studio .NET 2003. A conversion wizard is available to upgrade existing Visual Studio .NET 2003 Web projects to Web site projects. For any reasonably complex Visual Studio .NET 2003 projects, manual fix-up is usually required after the conversion. For most scenarios, it is preferable to upgrade existing Visual Studio .NET 2003 projects to Web application projects in Visual Studio 2005.

Tags: ,

.Net | Learning resource | Technical