• Commerce,  Episerver,  Promotion

    How to check if a coupon was successfully applied

    When a customer add a coupon to his/her cart, it’s nice and best practice to show to him/her if the coupon has been applied successfully, or if it was an invalid/not applicable code. How can you do that? In old promotion system When old promotion system run, each successfully applied promotion will be presented by an instance of Discount, which has a property named DiscountCode – this is the coupon used for the promotion (it can of course be null if the promotion requires no coupon).

  • Life,  ranting,  Tv

    Why did I leave HBO (Nordics). Spoiler: it sucks!

    As most of us, I spend a fair chunk amount of my free time to watch movies and TV series, and as most of us, on Netflix. While Netflix has some very good content, and they have been adding great original TV series (House of Cards, Daredevil, Stranger Things, Narcos, just to name a few), those have not been enough for me. I want to watch Games of Throne, The Wire, The Sopranos, Silicon Valley etc, but sadly, they are pretty HBO-exclusive, so to watch them, I have two options: either buy the discs (Very expensive), or subscribe to HBO (much cheaper). Fine, I decided to suspend my Netflix for a…

  • Configuration,  Tips,  VisualStudio

    Fixing Visual Studio 2015 after update 3

    In case you did not notice, Microsoft released Visual Studio 2015 Update 3 a couple of days ago. I immediately jumped in because I have high hope for better stability – VS2015 update 2 has been crashing more open than I would like. When I updated my VS on my work computer, all went well and it worked right after that without any problem. However when I finally updated my VS on my home computer, problem appears. Everytime I try to open a solution, it crashes! Rendering my VS2015 totally useless. It’s not a problem I can ignore, and I would avoid reinstall it, unless it’s the last resort. Digging in…

  • gaming

    The best trailers of E3 2016

    E3 is undoubtedly the biggest gaming event of the year – where companies show off their best games and hardware for the next year. And as other gamers, I pay my close attention to this event, waiting to see what will be my next game. It’s worth noting that I am highly selective – I only play 3-4 games a year, max, so I need to decide carefully what to play and what to skip. But it won’t hurt to watch the trailers, right Titanfall 2, EA Titanfall was a great game. It might not be a legendary game, but it was fun. It’s unsurprising EA and Respawn game were going…

  • gaming,  Tips

    Things I wish I knew before playing The Witcher 3: Wild Hunt

    The game was released 1 year ago – still – it’s a masterpiece to be played. If you’ve never played it, play it now – it’s easily one of the best games in years, if not decades. The storyline with twists will keep you thinking in a while (no decision is clearly better or worse, and your choices will definitely make impacts on the ending), while the graphic is still one of best in any games, and the gameplay will keep you excited. If you played it – it’s now time to replay it, with new expansions, Heart of Stones and Blood and Wine. They are some of best expansions…

  • Git,  Leanpub,  Learning,  Tips,  Writing

    Git in easy steps – branch

    This is the third part in a series Git in easy steps – the basic Git in easy steps – amend and stash Git in easy steps – branch Then what is a branch in Git, actually? A branch in Git is simply pointer to the hash of a commit (which will be the HEAD commit of that branch), and a name of your branch, of course. That means creating a branch in Git is extremely cheap and is almost instantous. If you worked with some other VSC systems before, such as Team Foundation Server, branching will involve copy entire of the repository – including all and every folders and files. That…

  • Git,  Leanpub,  Learning,  Writing

    Git in easy steps – amend and stash

    This is the second part in a series Git in easy steps – the basic Git in easy steps – amend and stash Git in easy steps – branch Fixing your commit: Sometimes, you make a mistake committing something. A file can be missing, or the indentation is not perfect, or you had a typo in your commit message. If you are using some other source control softwares such as Team Foundation Server you’re done with that. The only option you have is to check in another change set to fix your previous one (in case you have a typo in your commit message, be done with that). Git is so much…

  • Git,  Leanpub,  Learning,  Writing

    Git in easy steps – the basics

    This is the first part in a series Git in easy steps – the basic Git in easy steps – amend and stash Git in easy steps – branch Why Git Extensions. The war of version control systems was over. Git has won. And that is not an over-statement. CSV, SVN, TFS were the past. Mercurial was close, but GitHub put the end of it. The popular of open source platform makes Git an unambiguous choice for almost every developer in the field . Even BitBucket, the service which once known for Mercurial, supports Git for now. If you start a new project today, Git should be your first and foremost…

  • Git,  Learning,  ranting,  Tips,  Uncategorized

    Learn Git in … 30 days

    Recently I stumbled on a tutorial named Learn git in 30 minutes. While there is nothing wrong with that tutorial, it’s actually pretty accurate, and clear and easy to follow – thumbs up to the author about the writing – I have great concerns about how should we learn Git. Git is not that easy. Don’t get me wrong, Git is a great tool, perhaps the greatest developers’ tool since C language. Where I work at, we switched from Team Foundation Server to Git two years and a half ago, and I’ve never looked back – Git does things right where TFS did wrong. It really helped my life, as a developer, easier.…

  • SQL Server,  Tips

    Unable to import .bacpac files exported from Azure

    Update: I found a faster, more reliable way to import, here Today when I tried to import a .bacpac file from a customer, I ran across this issue: Could not load schema model from package. (Microsoft.SqlServer.Dac) —————————— ADDITIONAL INFORMATION: Internal Error. The internal target platform type Sql120DatabaseSchemaProvider does not support schema file version ‘2.6’. (File: D:\supportcases\something.bacpac) (Microsoft.Data.Tools.Schema.Sql) I’m using SQL Server 2014, Developer edition. Searching for the error returns no matched result. However, as the file was exported by Azure v12, we can assume Microsoft should have done something to support the latest version (2.6) in Management Studio.