• Learning,  Random thoughts,  ranting,  Writing

    The most important skill (of a good programmer)

    Being programmer(*) is hard. Being a good programmer is, of course, even harder. Unlike countless other jobs where the daily work is a routine, and being good at your job is to be efficient at that routine, being programmer is all about constantly learning and doing new things. Being a good programmer is about being fast at learning, and doing new things well. The process might stay for a while, but the content of the job is constantly changing. (If you keep doing same content over and over again, you are doing it wrong)

  • Commerce,  Episerver,  Order,  Performance,  SQL Server

    Optimizing T-SQL COUNT

    This is a continuation of my previous post about paging in SQL Server. When it comes to paging, you would naturally want to know the total number of rows satisfying, so you can display some nice, useful information to your end-users. You would think, well, it’s just a count, and a simple query like this would be enough: [crayon-5c624eb51e846542861570/] There should be nothing to worry about, right? Actually, there is. Let’s get back to the example in previous post – we have to count the total number of orders in that big table. [crayon-5c624eb51e853929984606/] Because ObjectId is the clustered index of OrderGroup_PurchaseOrder, I did expect it to be use that index…

  • ranting,  Scam

    Beware of unwanted subscriptions

    Updated December 23rd 2017: My wife talked with JustFab UK over the phone last week, and they told her to write an email to them. They promised to refund all of the monthly subscriptions, which they did, today. We are of course happy to get our money back, and I think JustFab UK appears to less “scam-y” then they does before , so I updated this post title to reflect that. Still, beware of your unwanted subscriptions. The original post as below: Later tonight I was checking my bank statements – to see how much I have spent and how much I still have in my account – well, for the…

  • TeamCity,  VisualStudio

    Fixing error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found

    When you build a project with MSBUILD Tools 2017 and getting “MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found” error, you probably need to update your MSBUILD Tools components. Download the latest version of MSBUILD tools from https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017, run it, choose Modify and then select “Web development build tools” and “.NET Core build tools”. If you are getting error CS8107: Feature ‘default literal’ is not available in C# 7.0. Please use language version 7.1 or greater. or error CS8107: Feature ‘leading digit separator’ is not available in C# 7.0. Please use language version 7.2 or greater. You need to add <LangVersion>7.2</LangVersion> to your project file(s). Unless you specifically set up your project, Visual…

  • Commerce,  Episerver,  Order,  Performance,  SQL Server,  Uncategorized

    The art of paging

    No this is not really “art” – I’m just trying to have a more clickbait title. It’s more about understanding what you have at your disposal and use them for your benefits – in this case – how new SQL statement can drastically improve your performance. In this blogpost we will look into paging feature of SQL Server. in Commerce we usually work with large set of data – millions of rows are fairly common, and it’s natural to load data by page. There is no point loading thousands, or even millions of rows in one go. First it’s not practical to display all of them. Second you’ll likely end…

  • Commerce,  Episerver,  Order,  Performance,  SQL Server,  Uncategorized

    Fixing a stored procedure

    At Episerver development team, we understand the importance of good performance. Who would not like a lightning fast website? We work hard to ensure the framework is fast, and we seize (almost) every opportunity to make it faster. You know in Commerce 10.2 we introduced a new cart mode – serializable cart, and it’s proven to bring great performance compared to the “old/traditional” approach. Our own tests showed an improvement of 3-5x times faster. But can it be even faster? Probably yes. And actually we did some improvements in later versions. In the scope of this blog post, we will just focus into a specific aspect – and to learn…

  • Commerce,  Episerver,  Random thoughts

    Lessons learned from a “boring” Black Friday

    This Black Friday, I was in a task force, ready to help high profile DXC Commerce customers to cope with a peak in traffic. It turned out to be boring – there was no moment I could be a hero and “save the day”. Things went surprisingly smooth, even for websites which were struggling with last Black Friday. I went home and was little dissatisfied, but deep down, I know it was a huge success. The hard work from us (Commerce development team), them (the partner development teams), and Managed Services has been well paid off. Use the latest version You have heard me saying this, and you will probably…

  • Catalog,  Commerce,  Episerver,  Performance,  SQL Server

    Please, rebuild your database indexes, now

    I will make it quick and to the point: if you are expecting a lot of customers visiting your site tomorrow (and you should) for Black Friday, you should rebuild your database indexes, now. On average, it will help you to serve more customers and they will be happier with a more responsive, faster website. On best cases it will help prevent catastrophes.

  • Catalog,  Commerce,  Episerver,  Tips

    Read only Catalog UI – part 1

    https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2015/6/read-only-catalog/ A while back, we had this question on World. It’s not uncommon to update the catalog data by an external system, mostly from a PIM – Product information management system. In such cases, it might not make senses to enable editing in Catalog UI. You might need the new UI for the other parts, such as Marketing UI, but you wouldn’t want the editors to accidentally update the product information – because those would be lost, anyway. Is there away to do it? Yes, there is.

  • Catalog,  Commerce,  Episerver,  Tips

    Beware of IContentLoader.GetChildren() for CatalogContent

    This is more of a self-to-note. If you are using IContentLoader.GetChildren<T>(ContentReference), one important thing to remember is this uses the current preferred language. Normally when you get children of a catalog, or a node, that would not be a problem, because a catalog entity – node or entry, will be available in every language supported by the catalog. So if you just want to get the children references, the language is not important. (Note that, if you just need the children references, IRelationRepository should be a faster, more lightweight way to go, but that’s another story). If you want to get children in a specific language – which is the most common…