I was with the EMVPs, and that was a fantastic experience

If there is anything I regret being an Episerver employee, is that I can’t be an EMVP – the gang of awesome Episerver developers which their contributions are widely recognized by the community (I don’t consider myself to be “awesome”, but I try (to be)). The EMVPs can be seen as the evangelists of Episerver frameworks and technologies, they spread their wisdom, experience and best practices to help developers build better solutions, and they give valuable feedback to us to build better frameworks.

EMVP Summit is one of special treat Episerver gives to EMVPs, as a recognition for their contributions, and also a chance – directly than ever – for Episerver to listen to the feedback from their distinguish developers. As a software engineer in Commerce development team, I was sent to team up, to talk, to discuss and to socialize with the EMVP (after winning a small competition with my two teammates, and getting a grant from my wife ūüôā ).

(more…)

Debug .NET memory dump with WinDBG – crash course. Part 1

If you ask me what had¬†I been doing the last two weeks – then the answer is I was pulling my hairs. ¬†A customer had a problem with their site as the memory hiked up after catalog¬†imports and stayed there “forever” – and in the end it slowed the site down. I jumped in and almost regretted that decision – had to spent days ¬†messing around with WinDBG and memory dumps. In the end – I found the problem and it was fixed. A lot of hairs were loss in progress, but I learned something about WinDBG – and that’s what I’m sharing today.

WinDBG is probably the most famous tool for debugging stuffs on Windows. Out of the box, it only works with native applications, aka assembly and such – but lucky for us, there are plenty of extensions to allow it to work with .NET application. The “standard” SOS and more advanced extension SOSEX. SOS is included in WinDBG, while you can download SOSEX from here¬†(for 64 bit) or here¬†(for 32 bit)¬†. Download the zip file and extract the dll somewhere.

WinDBG comes with the Windows SDK, not the standard .NET framework, so you’ll probably need to install it separately from here

(more…)

Episerver Commerce CustomerContact Events

This post was inspired by this question: http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2016/9/commerce-manager-contacts-events/

and is an excerpt from my book: https://leanpub.com/proepiservercommerce

You might notice the lacking of events in some parts of the system. We have events for catalog system, for order system, for prices and inventories changes, but that’s not enough. You might want to have events Рor at least Рthe ability to know when something happens. For example, when a customer contact is changed, or edited, or deleted, it would be very nice to do some extra actions.
Sending emails, updating external systems, etc.

Such events are not available out-of-box, so we have to implement our own. How? We don‚Äôt have¬†ICustomerContactService (or something similiar) interface where we can write our implementation¬†to replace the default service (and even if there is, it would be a big task to do so). So there‚Äôs no¬†‚Äúordinary‚ÄĚ, framework-way to do that.¬†However, CustomerContact is built on Business Foundation system, and BF, at its core, is all above¬†extensible and pluggable. We don‚Äôt have ICustomerContactService interface, but we have IPlugin
who can do the same, and even more. As we learned in previous chapter, CustomerContact is just another EntityObject and all operations are still done via BusinessManager.Execute(Request) Рeven we have some nice wrapper methods to make working with it easier. And when Execute(Request) is called, it also runs all registered IPlugin modules.
(more…)

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.

But everything comes at a cost.

As powerful and flexible as it is, Git is also complex and easy to mess up. It can be your best tool,  but it can also be your worst nightmare, when something goes wrong.

(more…)

The beauty of new promotion system

This is going to be a relatively short post. If you are using Episerver Commerce 9, you probably know that we are working on a new promotion system. It’s still BETA, but some of our customers already use it, and from what I heard they are really happy with it.

One of the reasons we create a new promotion system is the old one is not developer-friendly. Have you ever tried to create a promotion in old system, by code?

This is an “simple” example of how to create a new campaign and a couple of promotions:
(more…)

StackOverflow – a missed opportunity

Back when I was young and mostly stupid, I discovered StackOverflow. The site struck me hard. There were a lot of “Wow” moments for a third year student. I still remember the first time I asked the first question, then even think about the questions to ask (so I can gain some precious reputation – yeah, I was young and stupid, remember?), and the first time I tried to answer a question myself.

It has been a long time since those days.

I still use StackOverflow, even at this very moment. But it’s on demand, instead of browsing it everyday as a habit. I search for a question, read the answer, possibly vote it up, then leave. Sometimes, when I have absolutely nothing to do, I try to review the suggested edits from other users. And that’s it.

I don’t entirely leave StackOverflow, I just don’t actively use it any more.

(more…)

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 StackOverflow. Some might even jokingly define “programming = copy and paste answer from StackOverflow”, but we all know that, it takes more than that.

I’ve been trying to answer that question. I’m not a great developer by any mean. A decent, at most (My boss has been saying that I’m doing a very good job, I truly hope he’s not just being nice). It’s been 14 years since I get into programming, 10 years since I made the final decision to be a programmer, when I chose the faculty at my university¬† and 6 years since I began my professional career as a developer. It’s been all natural to me – what does it take to be a decent developer?

(more…)

Articles software developers should read, at least once

… if not twice.

These days, almost every software developer¬†has a blog – so it’s sh*tloads of content around the Internet. Truth is, the good, accurate, long-lasting contents are hard to be found. Most contents are supposed to be obsolete very soon – and it’s OK, because many contents are for a very specific situation in a very specific time. But can we have a collection of the precious contents that are useful not only today, this week, this month, but ten years from now?

This is supposed to be a definitive collection of great contents that will be helpful for your entire career as a software developer. It’ll be updated frequently, with new link as I found it.

The Log: What every software engineer should know about real-time data’s unifying abstraction (Jay Kreps)

Logging is essential to every serious software system. But it’s not easy – getting it right can be indeed hard, especially in real-time. This article provides a deep knowledge about the concept.

http://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (Joel Spolsky)

It’s been 26 years since Unicode was introduced and still, not all people can get it right. This article gives you – as the tittle suggests – a minimum knowledge about Unicode, and how to not get it wrong.

http://www.joelonsoftware.com/articles/Unicode.html

What Every Programmer Should Know About Memory (PDF) (Ulrich Drepper)

This is a pretty low-level paper, you will learn about how memory works at hardware level. Still interesting and useful. Who knows someday you’ll have to get your hands dirty with some memory stuffs?

(more…)

Microsoft Build 2016 – impressions and thoughts

I was lucky enough to be able to attend this year Microsoft Build conference. Almost 5000 tickets were sold out in just 1 minute – according to Microsoft. And that was with a pretty hefty price – 2195 USD for 3 days conference.

rsz_sam_0576

At the registration

Yes I’m pretty excited. This conference is for developers so Microsoft intends to shows their most exciting technologies for the year ahead.

One thing I was most disappointed about is this year Microsoft gives no hardware as gift. Instead, they gave us an Azure account. I haven’t checked it, but it is supposed to value at $1000 or so (It is an account for some of the Code Labs, it’s not a gift from Microsoft). Last year, it was a HP x360 Spectre laptop, and the year before that attendees got an Xbox One (which was 499$ at the time) and 500USD credit in Microsoft Store. Microsoft explained that they want offer a “deeper technical experience” instead. I don’t know if they’ll deliver that promise, but a hardware gift would be really nice. I did hope for a HP Elite X3 this year. Lesson learned: Never set your expectation too high.

And today the show starts.

(more…)

The free courses of computer science and programming

One of the most wonderful impacts of Internet is it makes many knowledge freely available. You can still attend the courses from the best universities in the World, without having to spend a bunch of money to get into US. You can now access the precious contents from the other half of the world. Of course, it’s still far from effective as when you come to classes,¬†having friends and assignments, for real, but it’s undeniably a huge benefit.

The knowledge is yours!

Introductory courses:

MIT 6.00.1x: Introduction to Computer Science and Programming Using Python
MIT 6.00.2x: Introduction to Computational Thinking Data Science
MIT 6.00: Introduction to Computer Science and Programming
Harvard CS50(x): Intensive Introduction to Computer Science

(more…)