Showing posts with label Software development. Show all posts
Showing posts with label Software development. Show all posts

Saturday, 30 October 2010

There are strong reasons to believe that Silverlight is dead?

Follow latest changes in MS top team and considering facts described in this article, there are string reasons to beliveve that Silverlight is dead or dying. ... or no... let read the post carefully ... is is dying everywhere?

.. but do not rush to through away. Consider also facts and thought described here.

PS: it is interesting that it is also believed that dynamic languages are lacking the public attention and so is under the danger

Friday, 22 October 2010

On incorrect attitude of being agile

Another interesting article that races important questions: "Bad attitudes of Agile".

First of all the common believe into the self-organising leads a lot of people to a believe that managers are not needed any longer. Well, although it is partly true, self-organising is an important aspect of been agile, still there is no points to underestimate the role of manager and its duties, which can be fulfilled by people under different labels (names).
1. The leadership role. Somebody need to draw the line following which we arrive to the success and encourage the team in difficult times
2. The secretary or administrative role. We all would like to be self-organised, but don't want to be organising meetings, keeping notes and putting together a budget. Hey, we are developers and that is what we will be doing - is the biggest mistake to make as it produces a chaos instead

Secondly. The iterational development leads us to a believe that there is no end date (we are done right after everything is developed). We easily forget that each iteration should be a ready to deliver software, especially basing on the fact that several iterations in the beginning will not be such. So instead of saying: there is a deadline with a varying content we say - no deadline

Finally the motto "all are equal and no docs" are clearly over prioritised. We cannot build a document in the beginning especially the full one, since we don't know how the prioritisation will be during, what will be added or skipped, how we change the project after each demo. But it doesn't mean we should not keep the track of made decisions and do not doc the functional behaviour of the software. How we later can test it or let know customers how to use without it? Regarding testers. Well everybody is equal and this system is a socialism. In fact "some persons are more equal than others" :) - practically the software engineering skills and much more rare than software testing skills and therefore it is sometimes impractical to make all tests unless we luck testing resources. So we need testing and we need a constant testing of being in development and released software to guarantee a certain level of quality

Saturday, 9 October 2010

Software architect role in agile projects

Discussing the role of software architect we need to consider the following:

In the agile development we are moving away from the waterfall method. This means that we have no way to build the full architecture of the system in the beginning phase since we have no basis for this, no specification to follow, no full description of features that will be implemented and no time to be spent on this task.

In the result we are urning around the process of building the architecture - from the concept in the beginning to the periodic refactoring after x iterations and the constant control of what is happening in the system, monitoring of problems developers are dealing with due undecided or new gaps in the architecture.

All this (but in the more structure way) is described in this article, and presented  here.

TDD is great for some project, but in many it gives just a false feeling that errors are under control

Comments following "Agile Ruined My Life" post

TDD is great, for SOME things. In other cases it can just add hassle and has the danger of providing a false sense of security. If I come across a project that does nothing but TDD and sees that as the only validation of their work that is necessary (this happens very often) I can pretty much guarantee I can find higher level functional, flow and integration cases that break the carefully constructed classes.



TDD is good for braindead simple crap programming where you have a well defined set of requirements and need to slog through them. I used it today when I needed to write about 30 java classes to fill in the functionality of an app I had built. That allowed me to both ensure that I had all the details working and test the framework itself and ensure it did everything I intended it to do correctly.

Now the core of the app itself involved juggling about 50 complex files at the speed of vim with multiple teardowns and rewrites over the course of a few days. Lots of experimentation and learning. Any tests that I would have written would have broken irreparably within minutes. It was a purely creative endeavor. You cannot do that with TDD and if you try you will spend weeks refactoring tests and not seeing the forest for the trees.
By far the best thing TDD has brought to the table is test frameworks though. Having a nice place to throw all your throwaway assertions on acid is awesome and really does add to the confidence level even if it affirms that you just broke an assumption you intended to break.



TDD - is a very popular technique nowadays. Unfortunately there is very little number of tools that are universal. Therefore it is necessary to clearly identify for yourself - where the tool should be used and can save a project from failure and where appliing the tool can be either pointless or even harmfull.

Thursday, 7 October 2010

Are we close to the dot agile crash?

One of the best articles I have recently read - "Agile Ruined My Life". The situation, from my point, is very like described and greatly reminds to me our position before the dot com crash - the idea by itself is very good, but we were trying to make it work too fast without properly thinking, using wrong tools and with a lot of people who factually lied consuming the idea, not developing that.

Saturday, 2 October 2010

Simple rules to remember binding business objects to UI in xaml in .Net 4.0

A post for those who are novice in xaml, binding and .Net 4.0

Remeber that
1. variables cannot be bind in xaml, only properties, so when we write in xaml something like
Text="{Binding MyVar, Mode=TwoWay}

we need to remember to write declaring the classs: instead of


Public MyVar as integer

the following

Public Property MyVar as integer

although

2. You will need to push a notification if you want UI to be updated updating the business object, so use OnPropertyChanged (link) and so writting the full notation (with Get and Set) instead of the short notation we seen above.

3. Don't forget that you either need to rebind lists, or use instead of simply collections like lists and dictionaries an observablecollection etc (link)


Slightly more advance
1. Don't foget that you can use converters binding a property to UI to represent, for example, a boolean value as a picture


<controls:ChildWindow.Resources >
        <loc:RO_FavImageTypeConverter  x:Key="FavConverter" />
    </controls:ChildWindow.Resources>
....

<Image Source="{Binding Favorite, Converter={StaticResource FavConverter}}"/>



Public Class RO_FavImageTypeConverter
  Implements IValueConverter
 
  Public Function Convert(ByVal value As ObjectByVal targetType As TypeByVal parameter As ObjectByVal culture As Globalization.CultureInfoAs Object _
  Implements System.Windows.Data.IValueConverter.Convert
 
    If value Is Nothing Then Return Nothing
    Dim bIsFav = DirectCast(value, Boolean)
    If bIsFav Then
      Return Utility.ImageHelper.GetImageSource("Resources/favor_yellow.png")
    Else
      Return Utility.ImageHelper.GetImageSource("Resources/favor_grey.png")
    End If
 
  End Function

PS: you can easily find in net how to apply the converter in xaml. Besides Utility.ImageHelper.GetImageSource is just illustrative - you will need to write your own code

2. Notice that you can use converter parameters. For example:


Text="{Binding Amount, Mode=TwoWay, Converter={StaticResource nmbFormat}, ConverterParameter='n0'}"


but be aware that nature of them is quite static. I mean that you can pass (bind) a property to that, but unfortunately you cannot bind two properties in the effective two way interaction.

Consider for example a simple case: you have a class, which contains an amount and a format to be applied on the amount in UI. you can bind Amount as above, but then you bind the number format, as the parameter is static. OK, you can change it by using the valueconverter as in the item 1 above, to get the entire instance of the class into the convertion function to read both amount and the number format, but then you will lose the two way nature of binding: the convert back will get a number enter, for example, into a text box, but were after convertion it will go? into the entire class? obviously it will not work any longer since you have no reference to the instance to which the inputted property should be placed to. If two way need to be working bind a simple property to make it automatically routed to the right places within the binded instance to be updated following UI update.

Saturday, 4 September 2010

Simple conclusions from P!=NP battle

All this battle around P!=NP paper can give to an ordinal student a very important hint.

It is nearly clear that there will be a huge demand for algorithms considering NP problems and inventing algorithms that can solve it faster - obviously not as fast as a P problem ... but each, even simple improvement can lead to a huge improvement (in total) on such complex tasks. Besides we still will have to consider
1. Heuristic approaches as those will still be demanded
2. Finding and isolating classes or subclasses of tasks (problems, graphs) which can be solved in P

Saturday, 14 August 2010

End of story II

In continue the previous story. The worst thing about that fact is that you cannot really rely on Google since the technology their are offering on the market can be closed at any moment. They are so new, so modern and so risky to follow.

Here is a short story of such fact a Google graveyard.

Thursday, 5 August 2010

End of story

A quickly ended history of one well-known and widely marketed technology - Google wave.

Wednesday, 28 July 2010

Another interesting topic for a master work

Here is another, interesting, unusual and for some people risk-free theme for a master work in SE.

One more interesting article on the same topic

Saturday, 24 July 2010

Friday, 16 April 2010

Distinguished lectures

I join to fans of this lecture :) RailsConf 09: Robert Martin, "What Killed Smalltalk Could Kill Ruby, Too"

that is how it should be done



WTF per minute metric :) superb

Thursday, 21 January 2010

VS 2010 Beta 2 installer

A nice dialog I got installing VS 2010 Beta 2



PS: Actually Silverlight 3 SDK installation failed causing this dialog

Tuesday, 29 December 2009

Popularity of programming languages

Have a problem to pick up a programming language to learn?

First of all decide, what area you are most interested in (embedded dev: C, C++; commercial: Java, C#, VB, PHP etc; Logical: LISP etc) and then follow the programming languages popularity chart below (which was compiled by TIOBE Software).



The more a language is in use the higher the probability you will find a workplace if you know it.

As usually there is an exception for persons who are smart and brave enough to follow it: the less a language is common (spread among devs) the higher salary gets the persons who knows it... but there is a high risk that you will not find a company interested in hiring you (especially in such a small country like EE)

PS: Ideally you should know 2-3 language from TOP-10.
although you are likely to be a professional in only one of them using it constantly.

Saturday, 12 December 2009

Fair rate for .Net devs outsourcing functionality development: Estonia and USA case

How would you answer the following question "What is a fair rate for .Net devs (per hour or per man-day) in Estonia and USA if a project lasts circa 2 months?" Comment: that is an amount one company would pay to another company, so the last one will have to pay all taxes. We are not talking about a salary that devs would get into their bank accounts. Moreover here we are talking here about one-time work. Not a long-term cooperation or stable income for the dev company.

Obviously the answer depends on the involved devs level. An experience from our company when we had the maximum number of developers – abilities of devs to generate correct code were varying circa 3-15 times, i.e. one dev was able to produce a code in one day, while another will do the same code in 3 man-days or even 3 man-weeks.
It also depends on time-frame. The faster result should be delivered the more costly it will be to produce. If there is no rush, then professional consultants will not be involved, so the price will drop sufficiently.

What answeres do we have at the moment?

1. quote " I work in a startup. Think 1-3 person teams who release v1.0 in 4-6 months. In this scenario, $5k or $10k goes a long way towards bringing a product to fruition. $10k can pay for a senior offshore developer ($15/hour) full-time for 4 months (so 120$ man-day)"

My comment: seems that „indian universal devs' are involved here – sometimes they even offer to write a code solving NP != P problem in a week :)


2. USA – well it depends on the dev level - from 50 to 75$ an hour (s 400-600$ a day), but sometimes miracles happen also by having 120-180$ an hour.

3. My friends recently did a project of 40 man-days. For a company they have very good relationship with. The cost was 2500 ЕЕК per day - so 240$ per day. The price was fixed for functions which were estimated including risks, so I would rate it as 240 - 320$ per day in other cases. An important fact – it was outsourced so, that the work-force was involved basing on a free schedule, so they could work on the main workplace doing extra when they willing to spent their time on it (although a deadline was also set).

4. It used to be 500-800 EEK an hour in Estonia some time ago. Not sure how much it is at the moment. Here I talk about highly qualified devs. You can find a student for 100EEK as well, but obviously the quality will be different as well as the time required to build the desired functionality. So here we get again circa 400-600$ per day.

5. Europe company got a rate from my friends - 500$ per day. They are a bit in rush, so they easily accepted that.

.. what answeres do you know? Could you share those with us?

Friday, 11 December 2009

WCF: limits

Today I have lost a half of the day trying to understand a problem occurring when a .Net client was communicating to a server talking via WCF - when the posted byte array size was over circa 2MB.

Both client and server looked to be fine in term of limits:

Client
moWsHttpBinding = New WSHttpBinding(System.ServiceModel.SecurityMode.None) moWsHttpBinding.MaxReceivedMessageSize = Integer.MaxValue
moWsHttpBinding.ReaderQuotas.MaxArrayLength = Integer.MaxValue
moWsHttpBinding.ReaderQuotas.MaxStringContentLength = Integer.MaxValue
moWsHttpBinding.MessageEncoding = WSMessageEncoding.Mtom
moWsHttpBinding.ReaderQuotas.MaxBytesPerRead = Integer.MaxValue
moWsHttpBinding.ReaderQuotas.MaxNameTableCharCount = Integer.MaxValue
moWsHttpBinding.UseDefaultWebProxy = False
moWsHttpBinding.BypassProxyOnLocal = True
moWsHttpBinding.ReceiveTimeout = New TimeSpan(20, 0, 0)
moWsHttpBinding.SendTimeout = New TimeSpan(20, 0, 0)


Server (from web config - omitting a lot of detals on how they are bounded)
<wsHttpBinding>
<binding name="NoneBind" messageEncoding="Mtom" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

<security mode="None" />

</binding>
</wsHttpBinding>


... and as usually a solution was simple and laid outside of this code (and actually well known for me from asp.net development experience): you have to add into web.config something like:
<system.web>
<httpRuntime maxRequestLength="131072"/>
</system.web>

to increase the limit to circa 128MB.



which makes me wonder why remaining binding settings disallow to overcome this simple general one.

Monday, 9 March 2009

How to serialize ADODB.Recordset in order to use it with WCF


It is easy to find that, unfortunately, ADODB.Recordset cannot be posted from client to server using WCF. The reason is simple: it is not serializable. The following code allows you to overcome this problem.

1. Without having to serialize using xml, so sufficiently increase the size of data flow in WCF.

2. Without having to convert it into Datatable - you will have quite a perfomnce problem converting it back from a DataTable to ADODB.Recordset in case on the client you (somekind old code) like to consume still ADODB.Recordset

This sample is written using VB.Net and implementing in any other language should be straight forward


'Imaging that rs is a ADODB.Recordset already existing in your code

Dim ret() As Byte
Dim aStr As Object = CreateObject("ADODB.Stream")

rs.Save(aStr, 0) ' 0 is ADODB.PersistFormatEnum.adPersistADTG)
Return aStr.Read(aStr.Size)

Dim binFormat = New System.Runtime.Serialization.Formatters.Binary.BinaryFormatter()

Dim oStream As New System.IO.MemoryStream()
binFormat.Serialize(oStream, rs)
oStream.Flush()
oStream.Position = 0

ret = oStream.ToArray() ' now ret is the byte array and you can post it via WCF


On the client side the following code as an example can be used. Imagine that QueryBypassAsByte is the function that returns the earlier formed byte array over the WCF call


Dim res() As Byte = proxy.QueryBypassAsByte()
Dim oStr As New ADODB.Stream()

'' read back into the stream...
Dim resRecordset As New ADODB.Recordset()
oStr.Open(System.Reflection.Missing.Value, ADODB.ConnectModeEnum.adModeUnknown, ADODB.StreamOpenOptionsEnum.adOpenStreamUnspecified, "", "")
oStr.Type = ADODB.StreamTypeEnum.adTypeBinary
oStr.Write(res)
oStr.Position = 0

resRecordset.Open(oStr, System.Reflection.Missing.Value, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, -1)


Now the resRecordset object contains ADODB.Recordset and you can either consume it or pass it further into any old code.

Saturday, 6 December 2008

Ubiquitousness

Ubiquitous: precisely this word is used to describe one of the most popular topics in the computer science nowadays: ubiquitous systems.

Wikipedia gives the following definition: that is a model of a human-computer communication when the information is processed by different local midget computers integrated into objects around us. This concepts extend the standard human- computer interaction we used to dealing with desk- or laptops. It is called a "post-desktop" evolutional cycle of information technology when we move first from mainstreams to personal computers and now to AI embedded into everywhere to serve our depending on the current request and context. Of course we started to move that way long time ago, after we god mobile phones, PDAs and so forth that could be integrated and can help us to get or post information ...

BUT ...

This paradigm is actually something bigger than that. It breaks out from the complexity of using all those systems and defines that communication should be transparent and even seamless for the human.

A typical example is so called „smart house”, which is able to recognise movement of a human and turn on/off lights along his/her path, react on voice commands or prepare the house for owner’s return from the office by increasing the average temperature in the house, turning on TV on the channel the owner likes etc).

The following terms are used very often with „ubiquitous systems”: Context-aware systems and RFID.

Thursday, 6 November 2008

Microsoft & gadgets

A link I recommend you to read on MS Vista sidebar: Is Microsoft serious about gadgets?