Reading about Computer viruses and malware

Reading about malware today…. I thought to share a few points I learnt. I hope it is beneficial for the reader of this article. It is a good start for me to understand what is computer virus?

a virus is basically a computer code embedded in a file that penetrates a computer for unauthorized data destruction or data distortion or data copying. But if the virus is just small code that embedded into a program – how it can spread so quickly and make such a destruction ? The answer is self-replication.

Continue reading →

Single Responsibility Principle

I am reading great book at the moment titled Clean Architecture A Craftsman’s Guide to Software Structure and Design and I ask myself, is there anything I can apply from this book… i think the answer is yes! As ServiceNow professionals, can we learn anything from Single Responsibility Principle for example? I think yes again.

But first, what is Single Responsibility Principle?

Continue reading →

AJAX again

Hello Friends

Today I am writing again about AJAX – I actually wrote back in 2014 a blog post about this very same topic but it seems that I really like this topic so I thought to write about it again.

before getting into the weeds, quick recap of two concepts

Synchronous is real-time communication method where each party receives messages instantly and requestor needs to wait for the request to be complete.

Asynchronous  is a communication method of exchanging messages between parties in which each party receives and processes messages whenever it’s possible to do so, rather than doing so immediately upon receipt. requestor immediately continues with its work without caring for the immediate result.

When to use GlideAjax ?

Continue reading →

Escalation Rules

When you are in almost any HR project, you got asked this question – How i can escalate HR cases? if you are new to human resource service delivery, you would think about this requirement in terms of SLA, but in HRSD, escalation doesn’t mean the same thing!

In HRSD, escalation process is to assign HR cases to HR agents with the appropriate skills. Continue reading →

Translation – Messages

If your system is going to be used in multiple languages you might need to think twice before you hard code any message for your backend users or Service portal users.Hard coded messages don’t get translated automatically when a user changes languages, in this case what you need to do is to add the message that you want to display on sys_ui_message table which contains your original message as well as the translations for informational messages, confirmation messages, error messages, and other types of system messages. Continue reading →

ServiceNow® Knowledge Management

I was reading a book about effective ITSM, there was part in the book talking about how many knowledge management initiatives fail to address the people, cultural and procedural elements also how some organisations think about knowledge management as FAQs.

as we all know that knowledge management is much more than FAQs! it is the systematic identification, capture, dissemination and use of information for the benefits of your organisation.

ServiceNow actually makes it easy to implement effective knowledge management that enables organization to addresses the main objectives of knowledge management.

so what are the objectives of knowledge management? Continue reading →

How to sum two or more currency values?

function onSubmit() {

var Price1 =parseDecimal(g_form.getValue(‘u_price’)); // Call parseDecimal function
var Price2 =parseDecimal(g_form.getValue(‘u_price_2’));// Call parseDecimal function
var Total = Price1 + Price2 ;
g_form.setValue(‘u_total’,Total);//populate total field by the sum of Price1 and Price2

}

function parseDecimal(d) {

// Remove currency and any potential any undesirable character
d=d.replace(/[a-zA-Z\!\@\#\$\%\^\&\*\(\)\_\+\-\=\{\}\|\[\]\\\:\”\;’\\?\,\/\~\`]/g,””);

// Loop through the currency and replace the comma
while (d.indexOf(“,”) != d.lastIndexOf(“,”))
d=d.replace(/\./,””);

return parseFloat(d);

}

Singleton Design pattern

The importance of this pattern is coming from the fact that There are many objects we only need one of, like objects that handle
preferences and registry settings, objects used for logging.
In fact, for many of these types of objects, if we are to instantiate more than one time we will run into all sorts of problems like incorrect program behavior, overuse of resources.
lets how we can constract a class that can work as Singleton . in order to write this class you need to follow these steps Continue reading →