Stefano Tommesani

  • Increase font size
  • Default font size
  • Decrease font size

Castle on the hill of crappy audio quality

E-mail Print PDF

As the yearly dynamic range day is close (March 31st), let's have a look at one of the biggest audio massacres of the year, Ed Sheeran's "Castle on the hill". First time I heard the song, I thought my headphones just got broken, it's really that bad. So let's measure the Dynamic Range (DR) of the track:

CastleHillDR

Here is how the DR value is computed:

In order to determine the official DR value, a song or entire album (16 bit, 44.1 kHz wave format) is scanned. A histogram (loudness distribution diagram) is created with a resolution of 0.01 dB. The RMS – an established loudness measurement standard – is determined by gathering approximately 10,000 pieces of loudness information within a time span of 3 seconds (dB/RMS). From this result, only the loudest 20% is used for determining the average loudness of the loud passages. At the same time, the loudest peak is determined. The DR Value is the difference between the peak and the top 20 average RMS measurements (top 20 RMS minus Peak = DR). (from TT Dynamic Range Meter documentation)

 

Necessary evil: testing private methods

E-mail Print PDF

Some might say that testing private methods should be avoided because it means not testing the contract, that is the interface implemented by the class, but the internal implementation of the class itself. Still, not all classes were designed with testability in mind, so real life compromises sometimes demand such a trick.

When writing unit tests in C# with MSTest, the PrivateObject class lets you easily call private methods:

  1. [TestMethod]
  2. public void TestLPRead()
  3. {
  4.   var Logger = A.Fake<ILogger>();
  5.   var Telemetry = A.Fake<ITelemetry>();
  6.   DefaultDataModel DM = new DefaultDataModel(Logger, Telemetry);
  7.   PrivateObject obj = new PrivateObject(DM);
  8.   List<LPRead> ReadsList = (List<LPRead>)obj.Invoke("GetReads");

In the code above, a PrivateObject instance is created passing an instance of the class to be tested

  1. PrivateObject obj = new PrivateObject(DM);

then the invocation of the private method, that would be

  1. List<LPRead> ReadsList = DM.GetReads();

if the method were public, becomes

  1. List<LPRead> ReadsList = (List<LPRead>)obj.Invoke("GetReads");
Last Updated on Sunday, 29 January 2017 22:39
 

I am right and you are wrong

E-mail Print PDF

Objectivity3Have you ever convinced anyone that disagreed with you about a deeply held belief?

Better yet, have you changed your mind lately on an important topic after discussing with someone else that did not share your point of view?

Let's face it, if the topic of the discussion is not trivial, it is far easier to just keep repeating our (obviously bullet-proof) reasons and wonder why others don't just recognize our view as being the "correct" one. And we have proof that, the wider the gap between our own views and those of someone who disagrees with us, the stronger the impact of Naïve realism, and so we find no phenomenological trace of self-interested bias in the way we have considered the pertinent arguments.

Last Updated on Wednesday, 28 December 2016 15:47
 

How Commercial Insight changes R&D

E-mail Print PDF

The CEB's Commercial Insight is based on three pillars:

  1. Be credible/relevant – Demonstrate an understanding of the customer’s world, substantiating claims with real-world evidence.
  2. Be frame-breaking – Disrupt the customer’s current logic, revealing an underappreciated aspect of the customer’s environment or a flawed assumption.
  3. Lead back to your unique strengths – Refer customers specifically to areas where you outperform competitors

Points #2 and #3 are critical to avoid the commoditization of solutions, the worst scenario for suppliers, as the buyers are satisfied with a limited set of functionalities shared among several products of competing companies and trigger a price-based war. The CEB research shows that most times suppliers are asked for a proposal when the internal process is around 57%, usually very close to an official RFP, where the the project already has shaped up and it is increasingly difficult to steer it to the strong, distinguishing features of the product.

57-percent-stat

If you think this is bad, think of all the projects that are not even reaching 57% as the average 5.4 subjects involved in the purchasing decision are not agreeing and moving the project forward:

Demand-Gen-2_Forbes

Last Updated on Sunday, 25 December 2016 23:32
 

Windows Forms smells funny, but...

E-mail Print PDF

In the "2016 .NET Community Report" just released by Telerik, the answers to the question "What technology would you choose if building for Windows Desktop?" were as follows:

WinFormsWPFUsage

So roughly half of new desktop developments would be based on Windows Forms, a technology declared dead multiple times. The Telerik report states: 

This is somewhat surprising when you consider Windows Forms is under maintenance mode,with no new features being added. For larger organizations, which may havelonger iteration cycles or legacy OS requirements, Windows Forms remains aviable platform for building desktop applications.

Last Updated on Thursday, 07 April 2016 16:05
 

Say goodbye to "it does not happen on my PC!" with Azure

E-mail Print PDF

AzureLogoIt is not easy to monitor how our code behaves on a vast array of different machines. A myriad of different configurations can lead to errors that are difficult to reproduce and even more difficult to anticipate. And when the customer calls complaining about a crash, provided information on what lead to the problem is often incomplete or misleading. Fortunately, remote telemetry of software applications is here to help and is going mainstream even in the desktop area. Let's see how easy it is to monitor a desktop Windows application using the new Azure Application Insights service: this article on the Azure site explains all the necessary steps. Summing up, here is what we need to do:

  1. create an Application Insights resource in the Azure portal
  2. make a copy of the Instrumentation key, as we will need it later in our app
  3. add one of the following NuGet packages: Microsoft.ApplicationInsights.WindowsServer for the full set of functionalities, including performance counter collection and dependency monitoring, or Microsoft.ApplicationInsights that includes the core API only
  4. initialize the TelemetryClient object in your app
  5. set the intrumentation key in the code of the app: TelemetryConfiguration.Active.InstrumentationKey = " your key ";
  6. insert telemetry calls, like TrackPageView, TrackException etc.

For additional reference on these steps, check out the official ApplicationInsights repository on GitHub.

Last Updated on Saturday, 12 March 2016 15:01
 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  4 
  •  5 
  •  6 
  •  7 
  •  8 
  •  9 
  •  Next 
  •  End 
  • »


Page 1 of 9
View Stefano Tommesani's profile on LinkedIn

Latest Articles

Castle on the hill of crappy audio quality 19 March 2017, 01.53 Audio
Castle on the hill of crappy audio quality
As the yearly dynamic range day is close (March 31st), let's have a look at one of the biggest audio massacres of the year, Ed Sheeran's "Castle on the hill". First time I heard the song, I thought my headphones just got
Necessary evil: testing private methods
Some might say that testing private methods should be avoided because it means not testing the contract, that is the interface implemented by the class, but the internal implementation of the class itself. Still, not all
I am right and you are wrong 28 December 2016, 14.23
I am right and you are wrong
Have you ever convinced anyone that disagreed with you about a deeply held belief? Better yet, have you changed your mind lately on an important topic after discussing with someone else that did not share your point of
How Commercial Insight changes R&D 06 November 2016, 01.21
How Commercial Insight changes R&D
The CEB's Commercial Insight is based on three pillars: Be credible/relevant – Demonstrate an understanding of the customer’s world, substantiating claims with real-world evidence. Be frame-breaking – Disrupt the
Windows Forms smells funny, but... 07 April 2016, 15.38
Windows Forms smells funny, but...
In the "2016 .NET Community Report" just released by Telerik, the answers to the question "What technology would you choose if building for Windows Desktop?" were as follows: So roughly half of new desktop developments would

Translate