Hey all!
Its time for a new Challenge. But before that, last weeks answer. Well the answer could have been summed up by saying just traverse in reverse and return the second node . There were a few interesting answers among them Jonathan Gilbert’s who was the first to answer correctly:
This seems pretty simple to me. An [...]


Continue Reading...

I used to love using Digg, reading, submitting and digging. But no more! From now on I HATE them. I know Hate is a strong word, but hear me out and understand why I used this strong word.

On Friday the 13th of June I tried to submit one of my articles to Digg and I got the following error message:

This URL has been widely reported by users as being regularly used to spam Digg’s submission process and cannot be submitted at this time.

Weird I though to my self, probably just a glitch and right away I wrote an E-Mail to the Digg Support, here it is:


Continue Reading...

This is a guest post written by John Daniel-Trask from Mindscape.

Mindscape have released a major upgrade to their LightSpeed domain modelling / ORM tool. Version 2.0 includes a visual model designer integrated into Visual Studio, LINQ support, and the ability to access multiple databases concurrently. LightSpeed is a small, fast domain modeling tool which uses convention over configuration to perform object-relational mapping without the need for complex mapping files.

In the past it’s been necessary to code LightSpeed models explicitly in C# or Visual Basic, but the new Visual Studio-hosted designer enables a more data-centric approach: developers can drag tables from Server Explorer and LightSpeed automatically creates the models for them. Developers can also add validations and tune performance parameters such as caching and lazy/eager loading through the designer. The designer also supports a “round-tripping” approach whereby changes to the database can be applied incrementally to the…


Continue Reading...

job-interview

During the Job Interview Challenge Series we are running here at Dev102.com, we usually get some comments from readers who think that the quality of a specific question is not good. Here are some of those comments:

  1. I hate interview questions like this, as it’s just a race to see who gets the a-ha moment first“.
  2. “This is not a good interview question. What does it tell you about someone’s engineering ability? Little. It’s a brain-teaser; either you get it or you don’t”.
  3. Really enjoying the problems so far but I’m a little disappointed with this one. I prefer ‘thinking’ problems to ‘research’ ones“.
  4. Isn’t this an awfully language-specific question?“.
  5. If you presented this problem in an interview and made me an offer, I’d turn you down“.

On the other hand, many readers provided answers to the questions and enjoyed participating in those challenges. Some thought that the questions are very good:


Continue Reading...

image

The question in the title does not refer to the actions you take when you are about to exit your application, issues like logging, closing file handles, freeing unmanaged resources and so on. It does literally refer to the exit action itself:

  • Do you use Application.Exit or Environment.Exit?
  • Where do you call the exit method?

The idea for that post came to my mind after I had to solve a weird bug where pressing the Exit button led to a freeze in an application that I work on. It turned out that I was not using the proper Exit method although I was aware to the fact that there are 2 possibilities. Sometimes, when you are in a middle of a coding momentum, writing a lot of code, you can miss the little details. Those will come back to hunt you later on,  and the most difficult thing about it is that everything was functioning fine for about a year before the bug showed his ugly face.

Lets first understand the difference between the 2 Exit methods:


Continue Reading...

That’s it, the 9th post of the series of programming job interview challenge is out and alive. 19 readers provided answers to job interview challenge #8, Pieter G was the first to provide a correct answer:

The fastest way I can come up with is to generate a finite state machine at initialization. The transitions between states would be defined by the records you look for in the pattern and one transition for an unmatched record. When the machine enters the goal state is should send the notification (how to most quickly do that I leave to someone else). When reaching the goal state the machine should not terminate but continue (else we may miss a occurrence).

You can see more details about the solution in those blog entries:


Continue Reading...

How would you like your WPF application to have a Context Menu like this:

Context Menu Example

Well, It is not so hard. Here is how you do it:


Continue Reading...

Every one of us, software developers, experienced situations where the .Net Framework could not locate an assembly and ended up facing the TypeLoadException. These failures usually happen due to an assembly deployed to the wrong location or a mismatch in version numbers or cultures. A quick way to check what went wrong is to open the module window (Visual Studio) during debugging but that may be sometimes impossible or inconvenient because:

  • We may not have Visual Studio installed. 
  • We installed the product in the customer site and we don’t have the code available.
  • It is some third party assemblies which causes the problems.

Luckily, there is an assembly binding log viewer which displays information that helps us diagnose why the .NET Framework can not locate an assembly at run time. This tool is called


Continue Reading...

Software errors, are so prevalent and so harmful that they cost the U.S. economy an estimated $59.5 billion annually. There are many examples of very serious and detrimental software errors such as:

softwareErrors Obviously, we would like to deliver a “bug free product” to our customers, but unfortunately, this is an un achievable goal. While some errors can be very easily eliminated, other are very evasive. What are the measures taken into consideration when we decide if an error is evasive or not? Lets create a list of software error parade and talk about it:


Continue Reading...

The eighth post of the series of programming job interview challenge is out. 68 readers provided answers to job interview challenge #7 and most of them had the correct solution. As rvh mentioned, the trick here was to understand that the round table has a symmetric shape and: Actually this algorithm isn’t limited to just a round table. It will work with any shape that is symmetric with respect to both x and y axes. I couldn’t describe the correct answer better than Yoav Zobel, as he was the first one who also formally proved his algorithm:

The Correct answer (as provided by Yoav Zobel):


Continue Reading...