Saturday, November 03, 2012

Visual Studio 2010 best extensions

Developers are mostly lazy. Nobody wants to do the same things every day. Doing the same activities can be very boring and non productive. Of course modern IDE should have multiple funcionalities that can improve speed of coding and development but it's really hard to satisfy all users at once.

Below I present my favourite extensions to Visual Studio 2010. Working without them would be much slower and frustrating. This set isn't focused mainly to any of the Visual Studio project type but I've been using them mainly in web development - ASP.NET MVC and WCF projects.

CodeMaid

Visual Studio default formatting engine isn't the best solution out there. It is very unefficient when formatting mixed html and C# (Razor). This extension is trying to focus this problem. In my opinion it's definitely better than default engine but in the field of formatting razor views there are still some things to do and fix. But when it comes to formatting pure C# I think we can't find better solution.

Collapse Solution

Very small extension - it adds one option in solution context menu - when we can collapse all projects in solution. It can spare our time when we have solution with big number of projects inside.

Go To Definition

I've been working a long time with Java and PHP and for these technologies I've mainly used NetBeans IDE. I don't want to start a war which is better Eclipse or NetBeans but I've used to one feature when exploring code in NetBeans: CTRL + click on the identifier is opening definition of a class, interface etc. I don't know why this feature was mapped to F12 in Visual Studio. F12 is far far away from normal hands position - CTRL is better choice for this. This extension is simply adding CTRL + click functionality to the Visual Studio.

Indent Guides

When we are looking to code that is indented several times it's hard to tell which ending bracket is matching an opening bracket. This another simple exntesion fixes this problem by adding lines from opening to closing bracket. No more guessing!

ItalicComments

There is a best practise saying that code should explaing itself without the need of comments or when you think that something should be commented it's probably been bad written. Whatever the case might be everybody is working from time to time with comments. For quick distinction between code and comments this extension is making them italic. I know this is a little cosmetic change but I prefer it to look like that.

Spell Checker

Staying in comments topic they should be written in spoken language so I think they should have a spell checker binded to. This extension is doing this exact thing. I may be a pedantic person but I really don't like typos in ANY text.

VS10x Code Map v2

Making our way through big files (I know that classes with number of methods have bad metrics and etc.) can be frustrating. By default we have a selector with list of methods, fields and properties, but to select something we have to scroll through which isn't effective when we have a long list. Better solution is having this list opened all the time when we simply click one element on the it and we don't need to scroll at all. This extension adds code map window which simplifies exploring code. It has couple of useful configuration options which can help better organize showed code map.

VS10x Method Block Highlighter

Very simple extension which allows us to simply colorize code - it can be helpful when editing code in several places in one file at once.

VSCommands for Visual Studio 2010

The last but definitely not least extension on the list. Frankly speaking my favourite one. I really like "Locate in Solution" feature which is very helpful when we want to locate currently edited file in the solution explorer. I don't like this feature from Visual Studio because we can either turn this on or off - we don't have this on-demand localization - it's really annoying when solution explorer is jumping every time we change a file. Apart from this we can edit project and solution files - which can spare us having another editing tool.

Of course everybody have his or her own best practises and favourite extensions, but I feel comfortable working with mentioned set.


Friday, November 02, 2012

Interviews as a way to improve your skills

Living in IT world isn't easy. Staying in touch with most recent technologies and any updates from the IT world requires a lot of time and energy. How to quickly gain knowledge how to improve our skills to be more attractive? Solution is very easy: go to as many interviews as you can - to as many companies as you can. Of course I mean in the industry of our interest. There are a lot of free benefits from this:
  • we can quickly gain knowledge about what's new going on - what new technologies are currently mostly used, what key knowledge is important
  • we're getting used to stressful conversations about our carrier and personality - it would be no surprises later
  • we can take free tests on different technologies
Having all this three points we can quickly identify our weak points and in which areas we need to improve ourselves. Of course this technique is rather considered in long-term (a year or more) but can be very benefitial.

Mainly we can easily get through the first step of recruitment in any company, beacuse it's rather being done by someone that can barely judge our true skills (no offence). Usually this first contact person we are speaking with, knows nothing about technology and IT. It's easy to pass this first step because it's mainly being done by recruitment and human resources companies.

Second (optional) step is harder - we are speaking (usually by the phone) with someone from our potential employer. It depends on company but mainly this person knows much more about candidate requirements and technology. But it's relatively easy to pass also this step. Of course we must have some knowledge about given topic, but mainly there are questions about what we've been doing in our previous company.

Last step is the most difficult one - we have an interview with technical person - lead programmer or somebody similar - master technical guru of the company / team. Here we have the essentials. We are being asked to solve difficult problems - we can identify where are our weak points. Typically we're taking some tests - we can check what we need to learn, and what we're really good at. After all, even when we've failed at some tasks we can ask questions about how it should be done and what is the answer.

Tests and questions are usually similar between companies, so it's easy to learn just by doing them. I had a situation that I had scheduled four interviews in a row in one day (the third step ones). First one was a disaster - I know that I really didn't fit to that position but I wanted to try for fun. I learned a good lesson from it, asked couple of questions and left unemployed but smarter. The next two interviews haven't gone as bad as the first but still I was not satisfied with the results. Before the last one I'd been after session of three exhausting recruitment sessions on which I'd learned a big set of new things and solutions. It's payed me a lot, because on this last one I've been asked similar questions to these from the three earlier (failed) conversations - it was just a piece of cake to asnwer to all of them.

One day of intense interviews can give you a lot of experience. It's really worth sending cv to big number of companies from time to time. Actually regular searching through job offers can even give you some knowledge about what capabilities are most wanted on the job market.

Wednesday, October 24, 2012

Cloud Computing definition

This time I'm gonna once more talk about Cloud and scalability. There are couple of misunderstandings in this topic, so I'll try to explain it.

Developing scalable applications is based on several techniques, but all of this techniques are connected in some way. They're all using compute power of distributed computers. One of the most popular solution is Cloud Computing which is a step forward from Fabric, Grid and Cluster Computing which are using distributed machines, but there are not scalable capabilites in them.

This new technique haven't growed up in one day. It's all about evolution. It all started from SOA (Service Oriented Arhitecture) - which is model of organizing software into loosely coupled separate components which are talking together through contracts. Many companies started to rebuild their solutions to work in that way. It's easier to build and maintain systems that have been built from few of smaller blocks. Another step of evolution were fast Clusters which are offering big amount of compute resources. But quickly it has turned out that these clusters are generating really big costs, so companies that owned them tried to found solution for this. This solution is today called Cloud Computing - which is renting compute and storage resources to other companies or even individuals.

Every successfull application sooner or later will have to face the "Internet scale". It is very important to prepare services for this effect. Applications must be scalable enough to serve millions of users in the same time. Developing this kind of applications isn't trivial, and there are many things that must have been taken into account by architects during planning architecture of whole system.

There are several models of cloud services and many vendors. It's hard to decide which company or which model would be best for current requirements. Cloud isn't solution for everything - there are some types of applications which would benefit from cloud solutions:
  • applications with big nonstructural data
  • streaming media content
  • SOA components
Autoscaling these types of applications can be very easy in the cloud. But first of all we need to define what the real Cloud is. There are many definitions of it but the most popular is the definition from NIST organization. Here are some key characteristics of Cloud Computing (cited from enclosured link):
  • On-demand self-service. A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider.
  • Broad network access. Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations).
  • Resource pooling. The provider’s computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand. There is a sense of location independence in that the customer generally has no control or knowledge over the exact location of the provided resources but may be able to specify location at a higher level of abstraction (e.g., country, state, or datacenter). Examples of resources include storage, processing, memory, and network bandwidth.
  • Rapid elasticity. Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear to be unlimited and can be appropriated in any quantity at any time.
  • Measured service. Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service.
So only when we have all of this mentioned above elements we can name our solution as a Cloud.

Tuesday, October 23, 2012

ScrumBut

There are a lot materials about agile software development. Tons of books how quick software development can be. But how it really looks inside? How does it look from the developers perspective?

In most cases it looks as like that:


Agile teams are mostly working with Scrum, because it's really easy to implement it, and it's really easy to work with. But to be honest neither do I or any of my developer fellows know a single company that is really implementing it fully. Of course everybody has a daily meetings, but sometimes there are exceptions to this rule, everybody knows that we need to do retrospective, but not every time, etc. It's really a fact, that most companies have customized version of Scrum. There's even a name for it: ScrumBut (http://www.scrum.org/ScrumBut). It's really funny that laziness of some managers and developers has gained its own name.

Scrum isn't the only methodology that is being badly customized. It is a really common way of doing software. I think that there are some explanations for this strange fact. Firstly we do have two worlds meeting here - managers and IT. Developers have their own language and they really don't see the need of managing them - people don't like to be controlled and monitored all the time (daily meetings may have this discomfort of impossibility to hide that we've done nothing productive today) and from the other perspective we have some strange dressed guys that have been doing something all day long, and we even can't tell what was it exactly...

Finding a solution for this problem isn't very easy. Mostly there are communication problems - managers have zero knowledge about IT, and developers have zero knowledge about project management. Both sides are very different and both sides need to cooperate together. It would be great when both sides can think about the other camp and how to make life of both sides easier.



Tuesday, March 06, 2012

Submit is not a function

When you see something like this in your JavaScript console beware. It took me a little while to find out what the problem was. But the problem is really simple. Let me explain.

After doing something the user is redirected to the page on which there is a form and one button (just in case if somebody is not using JavaScript). But for the greater part of users I've added some script to click this only one button on a page.

I was trying to do something like this:
<script type="text/javascript">
    $(document).ready(function(){
    document.forms["vm_paypal_form"].submit();
});
</script>
with no success. I was getting this strange message "Submit is not a function".

Trying several combinations - maybe something doesn't exist. Maybe I've mixed mootools and jQuery too much. But at last I've found a solution and I hope that my post will help somebody.

In the form I had (I've got this form from the Internet) an input of type "submit" which name was (?!?) "submit". Very strange in my opinion - so in fact when I was typing .submit() the browser was treating this input as a function - and that's the reason of this creepy error.

So watch out and try to avoid copying forms from the Internet.

Wednesday, February 29, 2012

Cloudbursting

Today I want to write something about cloud computing and cloudbursting especially.

First thing that is worth mentioning is fact that there are several models of using the cloud in general. Everybody knows and understands what the public cloud is - everybody can use resources as much as they want from public share. Even individuals can buy some resources.

But not everybody is happy in this model - there are some companies that doesn't want to share physically their data with other companies. Of course the data stored in data centers are much safer than every other place, but it's very difficult to convince some people to this new model of computing.

Anyway, we have in major two types of clouds: public and private. In public cloud the resources are being shared between everybody and in private cloud we don't share any physically machine or data with nobody.

But there are some situations when this is not working. Because of financial limitations private clouds are in usual smaller than public massive cloud solutions. So sometimes when they need more compute power they're forced to use public cloud to cope with some unpredictable workloads. It's called "cloudbursting" - really fancy name that in my opinion hides really good fears from using the public cloud.

So cloudbursting is using public cloud to outsource some computing out of our own cloud solution. It shouldn't be used too much, because that would mean that our private cloud isn't powerful enough and / or we're loosing too much time for developing cloudbursting solutions which can be nontrivial. So if this bursts are happening too often it is a first signal that something is wrong with architecture of our services. It should happen only on spikes of load.

Cloudbursting is a first step to moving whole company to the public cloud.