• TeamCity,  Tips

    Fixing Cannot find module ‘sync-exec’ error with yarn install

    Error message: clientResources\node_modules\uglifyjs-webpack-plugin: Command failed. Cannot find module ‘sync-exec’ Reason: uglifyjs-webpack-plugin 0.4.6 defines this command  “postinstall”: “node lib/post_install.js” which looks like this [crayon-5bf0619944a79772817847/] So if your node instance is older than 0.10, it will fallback to require sync-exec . Unlike execSync which is a builtin module, sync-exec is, or was an old module that you have to install explicitly. If your node instance does not have that installed, boom!

  • Commerce,  Episerver,  ServiceAPI,  Tips

    ServiceAPI + Postman, a match in heaven

    No, it’s just a note-to-self. A lot of customers have been using ServiceAPI, and to great successes. We also have very good documentation here – of which largely thanks to my colleague Mark Hall. But what if you want to play around with ServiceAPI and don’t want to write app/build/run it yourself? The answer is simple: There are many REST Clients can do the job for you, and Postman is usually regarded as the best/most popular one. But, the documentation are for C# client, it can be quite confusing to use Postman to work with ServiceAPI for the first time (or times). If you are experienced with Postman, great! But…

  • Learning,  Life,  Random thoughts,  ranting,  Tips,  Uncategorized

    Choose your battles

    This is the third part of the series: How to survive and thrive – a series for new developers to become better at their jobs. You can read the first two parts here and here. In military, there is a term of “uphill battle”. That when you have to fight your way up a hill, when you enemy controls the top. It’s a very difficult fight and your chance of success is low. Any experienced military leader knows uphill battles are something you should avoid until there are no other options. That also applies with any jobs. Including programming. The truth is, you shouldn’t fight the battles you can’t win.

  • 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…

  • 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…

  • 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.

  • Random thoughts,  ranting,  Tips,  Uncategorized,  Writing

    What does it take to be a developer?

    No I’m not talking about becoming a “developer” like Bill Gates, or Mark Zuckerberg, or even someone less “famous” like Linus Torvald or Anders Hejlsberg. Man, I’d give up many things to become one of those. To become such successful developers, you must be extremely talented, extremely determined, and of course, a sizable amount of luck. I’m talking about an average human being, trying to become a person who can enjoy his work (and hopefully, provide his family with that work).  Somebody might think, it’s easy to be a developer today. Most problems can be found on the internet – by searching Google, or asking questions on sites such as…

  • Random thoughts,  recruitment,  Tips,  Writing

    Joel test scores are (somewhat) outdated – you should ask something else

    Joel test scores are widely accepted as the “12 golden checks” for interviewee to ask interviewer during an interview. They were originated by Joel Spolsky – and his blog was famous among developers, they were quite well-known – and have been popularized even more with StackOverflow (where Joel Spolsky is one of the founders). StackOverflow Jobs even have a check list for recruiters when they post their job vacancies. Here’s the list: Do you use source control? Can you make a build in one step? Do you make daily builds? Do you have a bug database? Do you fix bugs before writing new code? Do you have an up-to-date schedule? Do you have…

  • Commerce,  Episerver,  Tips

    Quicksilver – ServiceApi: fixing issues

    From what I heard, developers seem to love both QuickSilver – as a template – and ServiceApi – as a REST server – very much. Despite of being relatively new on the field, they are being used quite frequently – QuickSilver is the preferred choice for MVC template while many sites are using ServiceApi to update the catalogs. What’s about the combination of these two? Would it be the best-of-bread for Episerver Commerce. I would say yes, but after you have fixed the issue. The installation of ServiceApi.Commerce package to Quicksilver site should be easy and painless. Update the database and build the project, you should be expecting to have…

  • Commerce,  Random thoughts,  Security,  Tips,  Writing

    Never send me my password

    I’m not a security expert myself, not even close, but for more than once, I’ve been greatly concerned about the risks for having accounts in several websites. I wonder myself why did the developers there go with the decisions that bad. It’s already bad enough to use HTTP on your register/login page . It’s even worse when you send me my password in plain text. Either the one I chose or the one you randomly generated for me. And this has happened more than once. Each time, it raises my eyebrows higher and higher. I don’t want to rant here – but it takes great deal of ignorance or laziness, or both,…