I’ve had a handful of coding challenges to do in short space of a week and have seen a lot of variability. Some employers as you to write a program that does something like converting numbers to words – this is a short algorithm and could be done in under 100 lines. I’ve been praised for a good clear design and readability, but at other times have been rejected because they wanted to see design patterns and more “OO principles” applied. However, in the development industry – all unnecessary “overkill” code is a waste and should not be done without a good reason.

I’ve had other challenges asking for console input/output, which didn’t emphasis on if they wanted TDD (which should be the case by default).

A good problem gives a business situation rather than asking to write a program that does something. A shopping cart with an addition issue of applying offers – buy X and get X or Y at a discount or free. Z% discount on a product or a category, etc… seems to be one of the most common challenges.

I get asked this question a lot in interviews, and it’s one of those wooly type questions that people like to ask and get a predictable rehearsed response back.

Until very recently, I didn’t know what the response should be, after all, isn’t everything complex until you understand it?

The interviewers are probably reflecting on their own systems which may look simple, but may have grown over time. The best response is to take any project you’ve worked on, and talk about the number of different sub-components that were there, how you looked at it from a high level view from a clients perspective, and the low level from a developers perspective.

A few month ago, I decided to update my certification and sit for MCSD: Web Apps exams.

In UK, it’s not a must have. There are a lot of great developers that are not certified. However, any candidate that goes
through the recruitment process has to prove to non-devs (HR, recruiters and hiring managers) that he is worth the time and effort to be considered as an added advantage (rather than a filter) for an interview.

Job seekers that go to meetups, events and talk don’t necessarily have to flash their MCSD certificate for the added advantage.

Overall, I think if you’ve got the time, it’s a nice challenge to do.

In order to prepare for the exams these are the PluralSight courses I did:

Working with Single Page Apps (SPA), and listening to how John Papa explains it, I’ve become a huge fan of Durandal, and whole-heartedly feel it’s the future. It’s inevitable, that infinite scrolling will have to be implemented.

3. If the infinite scroll is no longer infinite, to not to raise events.

Interestingly, the two variants of I’ve seen are loading based on page – where a page contains a fixed number of items, However, it’s counter intuitive to define a page, as a page no longer exists in infinite scroll, but rather number of elements the user is able to see, thus, an item based scroll seems more intuitive.

Another common issue I’ve seen is working with percentage.

Let’s say a screen displays 20 items, and the window holds 100 items. Each time the person scrolls 80% we load a 100 more. It works fine for the first few scrolls, however, lets say the user is viewing 1000 more, and has reached 800, loading a 100 more might be unnecessary as he is not entirely near the end.

Scrolling is not too daunting to build – esp with Breeze as it is aware of line and we can write skip(numberOfItemsLoaded).Take(numberOfItemsToLoad)

My implementation involved letting Durandal add scroll event on document load, which unbound the scroll event, load more information and attach the event again. This is necessary as the event could be raised when the user is scrolling through the lower parts of the page causing a few multiples of item sets to be loaded.

Agile development processes are practiced either at grassroots where all people in the organization or sub-group play an active part in improving, following practices, and contributing to the processes. The alternative is to do what everyone else is doing (Drone-driven-development), or resisting change and sticking with age old practices, tools, and thus development speed, and user feedback and cycles.

Using job aggregation websites and forums, I analysed the quality of jobs, and requirements in UK, UAE, India – primarily because I know people working in these countries and the time spent to research each country is large. If anyone want to help me in refining the criteria and and expand the list of countries, I’m more than happy to work together.

UK is in an ideal position to focus on true innovation and development and lead the way for others to follow. Not being platform specific they can exploit newer innovations rather than rely on vendor to supply approve supported modules and changes.

UAE is a SAP based economy. With C#/Java holding a very small proportion of the economy compared with SAP, and of the C#/Java jobs, a miniscule have agile listed as their requirements. UAE is likely to rely entirely on vendor products and development abroad rather than innovate and develop locally. This is likely to be the more expensive way in the long run, but the premium is noticeable.

India, like UK has a high number of C#/Java jobs as compared to SAP. However, Java holds a significant market share.

My thoughts:

I’ve generally seen companies eventually isolate and remove SAP, and other large systems as it’s expensive and fewer developers are are available, and consultants are required to maintain them which become more expensive as the technology gets out of date. There has been some effort to enhance SAP, however, it is a follower rather than a leader when it comes to innovation.

Biztalk is perhaps the most interesting product implemented by Microsoft. I’ve personally worked on many projects involving Biztalk. In many, I introduced and integrated Biztalk, in others, I implemented replacement for parts of it.

Problems primarily range from stability, finding people who know it at least to the level where Biztalk databases is corrupt, or loosing messages, and trying to look at the deep dark internals to find out where things went wrong.

Companies are sold Biztalk through slick offerings and presentations showing how simple and great it is from the business perspective, along with success stories such as in Thetrainline.com by Cap Gemini and Pershing by Microsoft . However, there are no follow-up stories if Biztalk is continued to be used, expanded, frozen or decommissioned after a few months or a few years of use.

Some companies eventually find less value, however, others fight to keep it in by looking for Biztalk experts that know how to firefight, or create roles such as Biztalk Lead (so leading a team of Biztalk developers?) – which might be trying to patch issues with the software rather than fixing them. This generally happens in large public bodies in small countries where the HR is centralized, but is not necessarily limited to it.

Biztalk is considered as a bloatware by a lot of Developers (not all), and there isn’t a shortage of companies adopting and removing Biztalk, and looking for viable alternatives. A blog by Biztalk MVP is an interesting read, and if adopting Biztalk, or getting rid of it, a question asked on stackoverflow was interesting as well.

Biztalk isn’t the only product going down this route. If the product offers drag and drop development to a certain extent, it’s worth having a second look.

As books on C#5.0 (using .Net 4.5 framework) are being released, I remember during the pre-.Net 4.0 dates the awesome amounts of gymnastics that were done around the simplest design pattern – the Singleton.
Some involved double checking (in and outside the lock), setting up Memory Barriers. Most of this discussion can be read here. Finally System.Lazy came about and the rest was history.

I wonder wonder what’ll the most popular feature in that C#5.0 uses with .Net 4.5

With time in some code bases containing a mixture of old code over a decade may end up with a lot of files and thousands of unit tests. The project may not have been refactored and a lot of technical debt has built up. Visual Studio may start of complain and give Out Of Memory Exception and not run your unit tests. A quick fix is to add a registry entry as pointed out here.

In my years of experience, the most common repeat offender I’ve seen is the excessive use of IF Statements. As a result. I’ve joined the Anti-IF Campaign.

It results in code that is hard to change, maintains, and does not use composition, inheritance, or design patterns to write meaningful code. It is just a code that runs. I’ve spent hours trying to find out bugs in if statements written in butterfly form (nesting going 3-5 levels deep). Try adding a feature to an If statement at the 3rd level which goes down 5 levels. This won’t give you much confidence that it won’t have unintended side effects.

There are some examples in which it may be hard to get rid of such as Mark Needam pointed out unless some overkill solution is applied (Attributes, Validation blocks), but the other common offenders can be removed.

The disadvantages is both – processA and ProcessB will be evaluated, possibly making the process inefficient. In 2008, If method was introduced, and direct casting is not necessary. So this can be changed to:

if (expression == something), processA, ProcessB)

Scenario #3

Avoid If at the start of a method and end if near the end. If should not span the whole method.

Scenario #4

If you have nested if’s, see if there are better alternatives. This makes maintenance and manageability of the code difficult. Excessive if’s points towards procedural code, thus should be limited (but not necessarily entirely avoided).

Scenario #5

public void MethodA() {
if (condition1) // note first line is an if
{
50 lines, nesting goes down to three level
}
else if (condition2)
{
similar issue as above
}
else if (condition3)
{
similar issue as above
}
}

This is probably bad design, and could be replaced by various patterns to make life easier.