On this page

Could not open connection to SQL Server - Named Pipes Provider, error 40
making some order in the hardware mess!
Israelli Bloggers group in facebook.
What am i doing to become a better developer ?
TDD approach - Does redefining application purpose necessary?
BDD : TDD - Introduction
Automating development process
Another bug bites the dust - complete guide to a road of happiness
.Net framework - open source
Web services - The underlying connection was closed

Ads

Navigation

Search

Categories

Clouds

Sql Server (5) .Net (16) .Net 2.0 (2) C# (3) @ff Topic (5) Architectural solutions (9) ASP (1) BDD (5) Blog related (8) database (2) Development process (8) Facebook (1) job interviews (1) Lessons (5) Life (12) Microsoft (5) IIS 6 (2) SPS (sharepoint server) (3) Drivers (1) Internet Explorer (2) Windows 2003 server (1) NightDuck (2) Performance (5) Security (9) Sql Server 2000 (4) Study (2) TDD (1) Threading (3) Under the hood (1) Web (1) Web services (1) XSS (6)

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 63
This Year: 0
This Month: 0
This Week: 0
Comments: 33

Sign In
Pick a theme:

 Tuesday, January 01, 2008
Tuesday, January 01, 2008 8:16:06 AM (GMT Standard Time, UTC+00:00) ( Sql Server )

i'm making some cool Linq presentation for my upcoming lecture in 888.
when installing visual studio 2008 and sql server 2005,
a funny error came accross when i tried to connect to the SQL server through the visual studio(on vista):

Could not open connection to SQL Server - Named Pipes Provider, error 40

a few configuration modifications need to be done in the sql server server surface area such as enabling the named pipes, and granting admin priviliges to the worker user.

the second(and most important) is on the server name field you need to specify the sql server instance (for the connection string).

Enjoy.

 

Comments [0] | | # 
 Saturday, December 29, 2007
Saturday, December 29, 2007 10:35:20 AM (GMT Standard Time, UTC+00:00) ( @ff Topic | Life )

it's going to be an off topic post,
so if you are seeking for some cool code topics & examples, this is not the post fo you...

lately i found myself surrounded with overdozed hardware and rigs,
i currentlly own :

1 workstation
1 HTPC
1 downloads server
1 laptop
1 Huge CRT
1 Huge LCD.
1 KVM switch
1 Router
6564536 Wires (Help ?)

Ok, this is alot of hardware, do i really need all of this ?
so, what am i planning to do ?

1. get rid of the HTPC rig, and the CRT screen (a new computer for my mom...)
2. convert the workstation to an HTPC (this includes some minor hardware changes)
3. work mainly from my cool new laptop
4. work wireless as possible to get rid of these nasty wires.
5. install all the rigs with proper hardware

this is lots of work to be done.....

 

Comments [0] | | # 
 Thursday, November 29, 2007
Thursday, November 29, 2007 8:20:02 PM (GMT Standard Time, UTC+00:00) ( @ff Topic | Blog related | Facebook )
I've created an israelli bloggers group on facebook.
if you have a blog and you are from israel, send me a request to join the group :)

Comments [0] | | # 
 Thursday, November 22, 2007
Thursday, November 22, 2007 1:41:53 PM (GMT Standard Time, UTC+00:00) ( Life )

Months after shani tagged me for this issue, it's time to pick up the glove, and write a post about it.

a little note on that matter,
i think that if a developer whats to become better, he should aknowelange it mentally to always strive for self improvement.

Things I should do.
to answer that question, i must ask myself what are my goals, where do i see myself in 3-5 years ?
well, as far as i remmember myself, my goal was always to become a solution Architect, the dude that can design "dreams" to reality.
to achive that, you must work your way from the buttom, get femilier with all the bits and bites, design practices, practice software development and after few years in the field, emerge your own opinion about software development process, devolopment methodoligies, and create new consepts.
once you have done all that, you can start becoming an architect.
after defining that, lets ask this question again :
What things should i do?

  • read alot about development methodologies, and when/where to apply them (Scrum like development is not always suitable for every organization)
  • upgrade my skills to current technologies (.Net 3.5)
  • Apply new learnt stuff to daily tasks

Things I want to do

  • Write a book on software development (it won't be published in the next year)
  • create a perfect development process (is it possible ?)
  • enter the BDD world.

Things I won't do
as much as it is tempting to leave what i am doing now, and persue my dream becoming a solution architect,
the next few years seems as a good time to gain more expirience at the development section before advancing to the next level.

Tagging this dude :
 
Micky Shriber

Comments [0] | | # 
 Monday, November 19, 2007
Monday, November 19, 2007 7:32:59 AM (GMT Standard Time, UTC+00:00) ( Development process | TDD )

In the last few weeks, i was doing a deep dive into some development methodologies such as TDD, BDD, and scrum.
what was bothering be about the TDD approach is the concept of designing for testability.
in early stages of my research, i spoke with Nati, a good friend of mine that practicing TDD in his team,
he told me that in order to write practice TDD it is imperative to write testable code.
What is testable code i asked ?
Well, this is not a simple question to answer, roy Osherove has even written a book about that,
from changing the design of your application, like using MVP to an "Inherit & Override" practice .
all these practices make your TDD life easier, but we need to ask ourselves one simple question :
"What is the purpose of your application ?",
seems like a stupid question to raise, but due to the noticeable progress of the software industry towards TDD blindly,
this may affect the software performance/Quality "Just" for making our code testable.

I came across Eli Lopian's article about Stop Designing for Testability, which confirms my concerns about the issue, i Totally agree with him.
testable code has an added value, but must we not forget the real purpose of the application, which is to run best in production environment.

This post is a sort of a reply post to nati's post - Testable code, is it worth it ? regarding that matter.

Testable application is certainly an added value to the development process and to the business as one,
but we must be careful not to make it the main issue of the application.
a great example of how TDD should be done is the TypeMock.Net tool, which allows you coding TDD without affecting the performance and OOP design of the application, in my opinion, this is the way to go the TDD way.

What do you think about this matter ?

Comments [0] | | # 
 Friday, October 26, 2007
Friday, October 26, 2007 9:40:09 AM (GMT Standard Time, UTC+00:00) ( Development process | BDD )

The last two weeks I'm doing a deep dive into development automation process, which should save allot of time.
a big part of a development process is testing, and as of that many methodologies emerged such as TDD(Test driven development) and so.
The main purpose of these test driven methodologies is to produce a better quality code by creating a set of tests and then write a testable code.

What is BDD?
Behavior-driven development (BDD) is an evolution of test-driven development (TDD) and acceptance-test driven design,
and is intended to make these practices more accessible and intuitive to newcomers and experts alike.
It shifts the vocabulary from being test-based to behavior-based, and positions itself as a design philosophy.

let me explain it in a more explicit way:
as a newcomer to the TDD like process, I found myself asking questions like :
How vastly my tests should me?
Where do I start?
How do i integrate the TDD process with the rest of the development process?
How to write a testable code?
What would be the impact of it?
How do I justify it to the stakeholders?

often stakeholders aren't eager for process changes especially if they are unfamiliar with the new techniques,
cons seems to be having a greater impact on a decision process rather than the major advantages, even if they are insignificant comparing to the advantages.

In what way does the BDD elevate the TDD process?
To answer that question, let's put aside the code writing and the testing process and focus on the entire development process.
Often technical person and a business person speak in "different languages", even analysts and developers sometimes suffer from misunderstandings.
Behavior driven development is a technique that designed to eliminate ambiguity and miscommunication between people on different roles.

this technique comes to solve one basic thing : how do i write a process requirement in a way that would be understandable to all the development personnel, and ensure that the implementation covers the requirements.

To answer the question "where do I start?" ask yourself "what is the next most important thing that the system does not do?"
This question should get you started.

Lets define our requirements in the following template :
As a [role]
I want [
Feature]
So that [
Benefit].

Defining requirment in this way answers a few important questions:

  • Who is the stakeholder for the given request (this is the person that should care about the wanted feature)
  • What is the needed functionality?
  • What would be the benefit from this specific feature?

Note that when these specific questions answered, you can see which features are more important (and which are not relevant at all).
this way interaction with all the development related personnel will be in "the same language".

Developing scenarios that could happen due to given requirement!
i find the word "scenarios" or even "specifications" more pleasant than "Test" for some reason,
no matter how you look at it, success of these "scenarios", which are situations or a set of rules that must be handled in a specific way, are viable to the success of your project/product/feature development.

Ok, this is all great, but how all this relates to TDD ?
glad you asked this question, i see it in a very simple way:
If the system fulfills all the acceptance criteria, it's behaving correctly.

To summarize all this,
i would say that BDD is a way to produce an idea for a requirement into an implemented, tested production ready code.

stay tuned for the second part about writing scenarios, development tools and more.

Comments [0] | | # 
 Wednesday, October 17, 2007
Wednesday, October 17, 2007 10:15:49 AM (GMT Standard Time, UTC+00:00) ( .Net | Architectural solutions )

As part of a development process, deployment, if handled wrong, may consume much of your precius time.
my goal is to automate as much as possible the deployment process.

I've read recently a post by Chris Burrows, which talks about "Setting Up Your Build Environment with TFS".
I strongly suggest paying him a visit, it contains many insights about the process.

he talks about :

  • Continuous Integration
  • Dependency Replication
  • Automated Unit Testing and Code Coverage
  • Automated Deployment
  • Build Verification Tests
  • Deployment Verification Tests
  • this post is more as a question than just plain info,
    How do you practice these subjects ?
    Which tools/templates/methodologies do you use to elevate your process ?

    Comments [0] | | # 
     Saturday, October 13, 2007
    Saturday, October 13, 2007 12:29:56 PM (GMT Standard Time, UTC+00:00) ( Lessons | Development process )

    I'm sure that if you reading this blog, you have encountered a bug or two (at least).
    Now, as you know, often you have to solve bugs of other people that have been fired/left/not available at the moment or just frustrated from it and need a fresh pair of eyes to look at it.

    So, you need to deal with the bug, just you and him, like a dual,
    What do you do? , how do you confront this mysterious daemon?
     
    Most of the people that inherit a bug, clueless regarding his data, try to confront with it straight forward.
    Ask a common developer how would he handle a bug, 9 of 10 answers will be "debug".
    well, i think it's wrong, it's like knowing that there is a giant brick wall and still running at full speed right in to it.
    (unless you are "The Hulk", it won't work)

    here is how I'm dealing with a bug :

    • Bring it to your own game court - whenever you have a situation, it's always happens in some environment.
      it's crucial to know it as it was your own place.
      suppose you have a .Net Web application running on a windows server 2003, you need to know damn sure all the environment laws regarding it.
      thing like how IIS handle requests or how security configurations should be, are vital to your diagnosis of the problem.
    • Understand the symptoms right - i have a TV series that i watch , called "House", it's about a brilliant diagnostician doctor that works mostly in unconventional ways and solves the most bizarre cases by doing that.
      i tend to refer this TV series as an educational show on how to handle strange cases and how to approach them.
      on one of it's episodes they had a brilliant dialog:
      - "House, the patients kidneys are shutting down"
      - "Great, we have another symptom"
    • Write it down - get yourself a notebook or even a giant white-board to write all these symptoms that you have found, it should be right in-front of you all the time until you have solved the case.
    • Ask yourself What can cause it ? - preferably do this out loud, ask your self that question regarding each symptom that you found, maybe even with a team , that could confirm it or deny your theories.
    • What was changed ? - this is the most important question that you need to ask yourself.
      things does not go wild on their own,if it worked before and now does not, then something is changed.
      this would be our biggest clue to solve the problem !
      this could be an environmental change, a change in the situation that the application handles or a coding change,
      each one of these can cause a problem, we need to understand which exactly is it.
    • Develop a theory - this is the fun part, now you have all the data that you need to solve this bug.
      you know how the environment behaves, you have the symptoms to the problem, things that was been changed, and possible causes to our symptoms.
      now you need the sit a few minutes and think what is the reason that fits to all our gathered data.
    • Blind tests are the devil - most of them will give you nothing and consume much of your precious time, Get a theory that you think that fits the symptoms and then test it, not the other way around.
    • Develop a solution to the problem - after we have our theory and we tested it, we need to develop a solution that fixes the problem, this is the easy part.

    for example, here is a problem that i have encountered almost a year ago:

    8007000e System resource exceeded
    Microsoft OLE DB Provider for ODBC Drivers error '8007000e'
    [Microsoft][ODBC Microsoft Access Driver] System resource exceeded.

    lets try to follow these guidelines and solve the problem:

    Bring it to your own game court - this is a windows environment that runs an asp web application based on Microsoft access.
    Understand the right symptoms - we have a database that denies any further connections due to resource limits.
    Write it down - take a moment to look at those symptoms.
    Ask yourself what can cause it - it could be an environmental cause, like connection limits are not enough, or coding mistake that suffers from not closing an opened connection.
    What was changed ?  - code wasn't changed, all system configurations was not changed, traffic to your site is doubled.
    Develop a theory - since the traffic was doubled, the connections are doubled as well, and thus reaching to the connection limit of our application.
    why the application does not clearing the connection resources ? - because the code that opens them does not close them, thus the connections piled up and reaching the connection limit way before the recycling process started.
    Test it - recycle the connection pool, simulate traffic that won't be in the connections limit(simultaneously), but can be piled up to reach the limit.
    Develop a solution to the problem - if you are intrested for this solution , you can check out my post about it

    Comments [0] | | # 
     Saturday, October 06, 2007
    Saturday, October 06, 2007 9:21:42 PM (GMT Standard Time, UTC+00:00) ( .Net | Microsoft )

    Microsoft is going to publish it's source of .Net framework under a referance licience ,
    According to this post of scott Gu , i will be intergated in the new Visual studio 2008.

    check out this Podcast that Scott Hanselman and Shawn Burke recently recorded.
    Not sure what this move will cause, but it's defenatly sounds cool.

    maybe it will kill the Mono-project, or maybe give him some strong boost, time will show...

    Comments [0] | | # 
     Sunday, September 30, 2007
    Sunday, September 30, 2007 2:30:05 PM (GMT Standard Time, UTC+00:00) ( .Net 2.0 | C# | Web services )

    recently i encountered some errors with web services regarding webService response.

    the full Exception that was thown was :
    "Server was unable to process request. -> the underlying connection was closed: A connection that was expected to be kept alive was closed by the server"

    hmm, not a very nice exception.
    digging a little in , i found few reasons that may cause that error.

    • idle time on the client side is greater than on the server side.
    • network issues that prevent the Keep-Alive feature from being committed. (firewalls, proxies and so...).

    what is this KeepAlive feature :
    this "great" feature actually keeps the connection between the WebService client and server open for a defined amount of time,
    thus enhancing WebService interaction performance by eliminating the need to open a new connection each time.

    unfortunately, the time for that window is not synchronized between the client and the server.
    this situation creates a problem, on which the client may think that the connection is still open, but the server closed it.

    so, what can be done so solve that matter ?

    • ensure the reasons above would not happen
    • disable the KeepAlive feature.

    since, ensuring that our time is not greater than the one on the server side is impossible when dealing with 3rd party services,
    not even mentioning the 3rd party network configuration, the optimal solution for this issue will be disabling the Keep-Alive feature.

    how can we do that ?

    when adding a web reference with visual studio 2005, it automatically generates a file called reference.cs which is used as a proxy to the web service on the server.
    this is the place which we should do the "fix".

    there are 2 ways to prevent this certain problem from happening :

    since our "proxy" is being generated each time we update our web reference, we would not want the change to be made in the reference.cs file, since it can be overridden the next time we will do "update web reference"

    what we can do, is use the "partial class" feature that presented in .Net 2.0 framework to solve this issue.

    namespace theNamespaceOfYourServiceAsStatedInTheReferenceFile
    {
    public partial class MyService
    {
    /// <summary>
    /// this method overides the base getWebRequest,
    /// thus preventing the KeepAlive feature
    /// </summary>
    /// <param name="uri">the given uri</param>
    /// <returns>the needed web request with the disabled keep alive feature</returns>
    protected override System.Net.WebRequest GetWebRequest(Uri uri)
    {
    // Do the base class operation and obtain the specific web request
    System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri);

    // do the keep alive handling
    return Utils.DisableKeepAlive(webRequest);
    }
    }

    now we need to decide how we are going the disable it(write the DisableKeepAlive in our utils)

    /// <summary>
    /// This method should disable the keep alive feature
    /// </summary>
    /// <param name="w">the needed HttpWebRequest</param>
    /// <returns>Disabled HttpWebRequest</returns>
    public static HttpWebRequest DisableKeepAlive(HttpWebRequest w)
    {
    // Set the keep-Alive to false, thus for not using it
    w.KeepAlive = false;


    // the second way
    w.ProtocolVersion = System.Net.HttpVersion.Version10;

    return w;
    }

    thats it, now we have successfully disabled the KeepAlive feature

    Comments [0] | | #