Category Archives: Programming

Everything about software development, architecture, etc.

How to push NuGet package to VSO feed v3

To push a nuget package to Visual Studio Online feed v3 use the following command: nuget.exe push MyPackage.1.0.0.nupkg -Source https://account.pkgs.visualstudio.com/DefaultCollection/_packaging/My_Feed/nuget/v3/index.json -ConfigFile nuget.config -ApiKey My_Feed The crucial part here is to include -ApiKey My_Feed, otherwise you’ll get 404 Not Found error. … Continue reading

Posted in Programming | Tagged , , | Leave a comment

How to map linking table for many-to-many relationship using Entity Framework 6

TL;DR: use synonym. As promised earlier to myself, I blog about interesting challenges and the ways I solved them. The other day, me and my team faced a limitation in EF6: you can either configure a linking table for many-to-many … Continue reading

Posted in Programming | Tagged | Leave a comment

How to convert Google API Service Account certificate to base64

Recently in Google Developer Console by mistake I generated a new SSL certificate for my project’s Service Account so had to convert it again from p12 file to base64 representation and store its thumbprint separately. Here’s how you can do … Continue reading

Posted in Programming | Tagged , | Leave a comment

Replacing the for loop with Seq.iter

Here’s the initial function in C#: public string BuildQuery(IEnumerable<KeyValuePair<string, string>> args) { var coll = HttpUtility.ParseQueryString(String.Empty, _urlEncoder); foreach (var arg in args) { coll.Add(arg.Key, arg.Value); } return coll.ToString(); } First I rewrote it in F# the following pretty na├»ve way, … Continue reading

Posted in Programming | Tagged | Leave a comment

How to make Beyond Compare the default diff and merge tool in Git

Here’s a brief summary of the official documentation: Don’t ask me why BC4 has the shortcut called BC3 still. Go figure. And happy merging! ­čÖé

Posted in Programming | Tagged | Leave a comment

TDD kata by implementing LINQ

I just discovered that what I’m writing right now is a new TDD kata. Very interesting and useful TDD kata. Interesting because usual C# developer uses LINQ extension methods on every day basis and it is interesting to re-implement by … Continue reading

Posted in Programming | Tagged , | Leave a comment

The Cult of Legacy

In our company’s software development devision due many reasons, most of them are hidden to me, we evidently do face The Cult of Legacy: You can discuss anything but not Legacy You can criticize anything but not Legacy You can … Continue reading

Posted in Programming | Tagged | Leave a comment

Your constructor smells

A code like the following looks as a “code smell” definitely: public ProductProvider( IProductDataProvider dataProvider = null, IProductDecorator decorator = null, IProductSearchCriteriaParser parser = null, IProductInventoryDataProvider inventoryProvider = null, IProductSessionDataProvider sessionProvider = null, IContentProvider contentProvider = null, IProductQueueProvider queueProvider = … Continue reading

Posted in Programming | Tagged | 1 Comment

Isolateware

After discussion with my colleague and considering the policies and practices adapted and used in our company towards globalization and isolation of software to write┬áand support, I want to try to formulate a software development methodology anti-pattern: A software called … Continue reading

Posted in Programming | Tagged | Leave a comment

“Black Hole” software anti-pattern

During digging into eCommerce5 codebase and discussing ongoing impressions with my colleague,┬á I just discovered a software design anti-pattern I called “Black Hole”. As a workaround I declare a rule: Any variables passed into constructor then should be available┬áthrough a … Continue reading

Posted in Programming | Tagged | 2 Comments