Mike Griffiths, Author at ProdSens.live https://prodsens.live/author/mike-griffiths/ News for Project Managers - PMI Sun, 23 Jun 2024 16:20:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://prodsens.live/wp-content/uploads/2022/09/prod.png Mike Griffiths, Author at ProdSens.live https://prodsens.live/author/mike-griffiths/ 32 32 Launching GitLoop AI codebase Assistant and code reviewer for GitHub PRs, commits, issues and more… https://prodsens.live/2024/06/23/launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs-commits-issues-and-more/?utm_source=rss&utm_medium=rss&utm_campaign=launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs-commits-issues-and-more https://prodsens.live/2024/06/23/launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs-commits-issues-and-more/#respond Sun, 23 Jun 2024 16:20:18 +0000 https://prodsens.live/2024/06/23/launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs-commits-issues-and-more/ launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs,-commits,-issues-and-more…

I’m excited to announce new features for https://gitloop.com, a project I’ve been working on for months. GitLoop now…

The post Launching GitLoop AI codebase Assistant and code reviewer for GitHub PRs, commits, issues and more… appeared first on ProdSens.live.

]]>
launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs,-commits,-issues-and-more…

I’m excited to announce new features for https://gitloop.com, a project I’ve been working on for months.

GitLoop now not only scans and understands your entire codebase but also helps with new issues and reviews your changes directly on GitHub. Here’s what you can expect:

Deep Analysis: Personalized AI assistance for codebases.

Automated Reviews: GitLoop automatically reviews your pull requests and commits.

Custom Reviewing Configs and Prompts: Tailor the review process to fit your specific needs.

Conversational Insights: Get conversational explanations on why changes are necessary.

Issue Assistance: When a new issue is created, GitLoop is ready to help based on its deep understanding of your codebase.

Check it out here: https://www.gitloop.com and give me your feedback.

GitLoop won’t replace the invaluable human interactions essential for mentoring and teaching juniors. Instead, it provides helpful hints to ensure no important details are overlooked.

The post Launching GitLoop AI codebase Assistant and code reviewer for GitHub PRs, commits, issues and more… appeared first on ProdSens.live.

]]>
https://prodsens.live/2024/06/23/launching-gitloop-ai-codebase-assistant-and-code-reviewer-for-github-prs-commits-issues-and-more/feed/ 0
What’s A Book You’d Love to Read Again for the First Time? https://prodsens.live/2023/10/13/whats-a-book-youd-love-to-read-again-for-the-first-time/?utm_source=rss&utm_medium=rss&utm_campaign=whats-a-book-youd-love-to-read-again-for-the-first-time https://prodsens.live/2023/10/13/whats-a-book-youd-love-to-read-again-for-the-first-time/#respond Fri, 13 Oct 2023 02:24:21 +0000 https://prodsens.live/2023/10/13/whats-a-book-youd-love-to-read-again-for-the-first-time/ what’s-a-book-you’d-love-to-read-again-for-the-first-time?

Tell us about a book that truly stuck with you and why you’d want to experience that initial…

The post What’s A Book You’d Love to Read Again for the First Time? appeared first on ProdSens.live.

]]>
what’s-a-book-you’d-love-to-read-again-for-the-first-time?

Tell us about a book that truly stuck with you and why you’d want to experience that initial read all over again.

Follow the CodeNewbie Org and #codenewbie for more discussions and online camaraderie!

The post What’s A Book You’d Love to Read Again for the First Time? appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/10/13/whats-a-book-youd-love-to-read-again-for-the-first-time/feed/ 0
How Do You Find Balance? 🍵🌊 https://prodsens.live/2023/09/17/how-do-you-find-balance-%f0%9f%8d%b5%f0%9f%8c%8a/?utm_source=rss&utm_medium=rss&utm_campaign=how-do-you-find-balance-%25f0%259f%258d%25b5%25f0%259f%258c%258a https://prodsens.live/2023/09/17/how-do-you-find-balance-%f0%9f%8d%b5%f0%9f%8c%8a/#respond Sun, 17 Sep 2023 07:24:27 +0000 https://prodsens.live/2023/09/17/how-do-you-find-balance-%f0%9f%8d%b5%f0%9f%8c%8a/ how-do-you-find-balance?-

Welcome to Code Chatter, your go-to series for conversational coding insights. What makes this series of questions different…

The post How Do You Find Balance? 🍵🌊 appeared first on ProdSens.live.

]]>
how-do-you-find-balance?-

Welcome to Code Chatter, your go-to series for conversational coding insights. What makes this series of questions different from all the others? Well, truth be told, not much, but they’re still thought-provoking and fun. Join us as we explore the coding world, one witty question at a time.

Share a personal challenge you’ve faced in balancing your coding career with your mental health. How did you overcome it, and what advice would you give to others facing similar challenges?

Follow the DEVteam for more discussions and online camaraderie!

The post How Do You Find Balance? 🍵🌊 appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/09/17/how-do-you-find-balance-%f0%9f%8d%b5%f0%9f%8c%8a/feed/ 0
Have You Ever Felt Intimidated to Ask ‘Basic’ Questions? https://prodsens.live/2023/08/11/have-you-ever-felt-intimidated-to-ask-basic-questions/?utm_source=rss&utm_medium=rss&utm_campaign=have-you-ever-felt-intimidated-to-ask-basic-questions https://prodsens.live/2023/08/11/have-you-ever-felt-intimidated-to-ask-basic-questions/#respond Fri, 11 Aug 2023 08:24:35 +0000 https://prodsens.live/2023/08/11/have-you-ever-felt-intimidated-to-ask-basic-questions/ have-you-ever-felt-intimidated-to-ask-‘basic’-questions?

Sometimes, coders feel hesitant to ask questions they perceive as basic. Share a time when you overcame this…

The post Have You Ever Felt Intimidated to Ask ‘Basic’ Questions? appeared first on ProdSens.live.

]]>
have-you-ever-felt-intimidated-to-ask-‘basic’-questions?

Sometimes, coders feel hesitant to ask questions they perceive as basic. Share a time when you overcame this hesitation and asked a question that turned out to be valuable to your learning process.

Follow the CodeNewbie Org and #codenewbie for more discussions and online camaraderie!

Image by Freepik

The post Have You Ever Felt Intimidated to Ask ‘Basic’ Questions? appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/08/11/have-you-ever-felt-intimidated-to-ask-basic-questions/feed/ 0
Learn about the difference between var, let, and const keywords in JavaScript and when to use them. https://prodsens.live/2023/06/02/learn-about-the-difference-between-var-let-and-const-keywords-in-javascript-and-when-to-use-them/?utm_source=rss&utm_medium=rss&utm_campaign=learn-about-the-difference-between-var-let-and-const-keywords-in-javascript-and-when-to-use-them https://prodsens.live/2023/06/02/learn-about-the-difference-between-var-let-and-const-keywords-in-javascript-and-when-to-use-them/#respond Fri, 02 Jun 2023 10:25:15 +0000 https://prodsens.live/2023/06/02/learn-about-the-difference-between-var-let-and-const-keywords-in-javascript-and-when-to-use-them/ learn-about-the-difference-between-var,-let,-and-const-keywords-in-javascript-and-when-to-use-them.

var, let, and const: What’s the Difference in JavaScript? JavaScript is a dynamic and flexible language that allows…

The post Learn about the difference between var, let, and const keywords in JavaScript and when to use them. appeared first on ProdSens.live.

]]>
learn-about-the-difference-between-var,-let,-and-const-keywords-in-javascript-and-when-to-use-them.

var, let, and const: What’s the Difference in JavaScript?

JavaScript is a dynamic and flexible language that allows you to declare variables in different ways. You can use var, let, or const keywords to declare variables in JavaScript, but what’s the difference between them and when should you use them?

In this article, you will learn about the difference between var, let, and const keywords in JavaScript and some of their advantages and disadvantages.

What is a variable?

A variable is a container for storing information. You can use a variable to store a value, such as a number, a string, a boolean, an object, or a function. You can also use a variable to refer to a value that may change over time.

To declare a variable in JavaScript, you need to use a keyword followed by a name for the variable. For example:

var x = 10; // Declare a variable using var
let y = 20; // Declare a variable using let
const z = 30; // Declare a variable using const

The name of the variable must follow some rules:

• It must begin with a letter, or $, or _.

• It cannot contain spaces or punctuation marks (except $ and _).

• It cannot be a reserved word in JavaScript, such as var, let, const, if, for, etc.

• It is case sensitive, meaning that x and X are different variables.

What is the difference between var, let, and const?

The main difference between var, let, and const is how they affect the scope and hoisting of the variables.

Scope
The scope of a variable is the part of the code where the variable can be accessed or used. In JavaScript, there are two types of scopes: global scope and local scope.

• Global scope: A variable declared in the global scope can be accessed from anywhere in the code. A variable declared outside any function or block is in the global scope.

• Local scope: A variable declared in the local scope can only be accessed within the function or block where it is declared. A variable declared inside a function or block is in the local scope.

The scope of a variable declared with var is either global or function-based. This means that if you declare a variable with var inside a function, it can only be accessed within that function. However, if you declare a variable with var inside a block (such as an if statement or a for loop), it can be accessed outside that block as well.

Image description

For example:

function foo() {
var x = 10; // Declare x with var inside foo function
if (true) {
var y = 20; // Declare y with var inside if block
console.log(x); // 10 (x is accessible inside if block)
console.log(y); // 20 (y is accessible inside if block)
}
console.log(x); // 10 (x is accessible outside if block)
console.log(y); // 20 (y is accessible outside if block)
}

foo();

console.log(x); // ReferenceError: x is not defined (x is not accessible outside foo function)
console.log(y); // ReferenceError: y is not defined (y is not accessible outside foo function)

The scope of a variable declared with let or const is block-based. This means that if you declare a variable with let or const inside any block (such as a function, an if statement, or a for loop), it can only be accessed within that block.

For example:

function foo() {
let x = 10; // Declare x with let inside foo function
const z = 30; // Declare z with const inside foo function
if (true) {
let y = 20; // Declare y with let inside if block
console.log(x); // 10 (x is accessible inside if block)
console.log(y); // 20 (y is accessible inside if block)
console.log(z); // 30 (z is accessible inside if block)
}
console.log(x); // 10 (x is accessible outside if block)
console.log(y); // ReferenceError: y is not defined (y is not accessible outside if block)
console.log(z); // 30 (z is accessible outside if block)
}

foo();

console.log(x); // ReferenceError: x is not defined (x is not accessible outside foo function)
console.log(y); // ReferenceError: y is not defined (y is not accessible outside foo function)
console.log(z); // ReferenceError: z is not defined (z is not accessible outside foo function)

Using block-based scope can prevent accidental leaks and conflicts of variables with the same name in different blocks.

Hoisting
Hoisting is a mechanism in JavaScript that moves the declarations of variables to the top of their scope before any code is executed. This means that you can use a variable before it is declared, but its initial value will be undefined.

Hoisting applies differently to variables declared with var, let, and const.

Variables declared with var are hoisted to the top of their scope, either global or function-based. This means that you can use them before they are declared, but their initial value will be undefined.

For example:

console.log(x); // undefined (x is hoisted but not initialized)
var x = 10;
console.log(x); // 10

Variables declared with let or const are also hoisted to the top of their scope, but they are not initialized until they are declared. This means that you cannot use them before they are declared, and you will get a reference error.

For example:

console.log(x); // ReferenceError: Cannot access 'x' before initialization (x is hoisted but not initialized)
let x = 10;
console.log(x); // 10

console.log(y); // ReferenceError: Cannot access 'y' before initialization (y is hoisted but not initialized)
const y = 20;
console.log(y); // 20

This behavior creates a temporal dead zone between the hoisting and the initialization of the variables declared with let or const. This can prevent errors and enforce good coding practices.

When to use var, let, and const?
As you have seen, there are some advantages and disadvantages of using var, let, and const to declare variables in JavaScript. So when should you use them?

The general recommendation is to avoid using var unless you have a specific reason to do so. Using var can cause confusion and errors due to its function-based scope and hoisting behavior.

Instead, you should use let or const to declare variables with block-based scope and temporal dead zone. This can prevent accidental leaks and conflicts of variables with different blocks.

The main difference between let and const is that let allows you to change the value of a variable after it is declared, while const does not. You should use const when you want to declare a constant value that will not change, such as:

• A primitive value like a number or a string.

• A reference to an object or an array that will always point to the same object or array.

• A function expression or an arrow function.

You should use let when you want to declare a variable that may change over time, such as:

• A counter or an iterator in a loop.

• A temporary value in an algorithm.

• A conditionally assigned value in an if-else statement.

Here are some examples of using let and const:

// Use const for primitive values that will not change
const PI = 3.14;
const NAME = "John";

// Use const for references to objects or arrays that will always point to the same object or array
const person = {name: "John", age: 25};
const numbers = [1, 2, 3];

// Use const for function expressions or arrow functions
const add = function(a,b) {
return a + b;
};

const multiply = (a,b) => {
return a * b;
};

// Use let for counters or iterators in loops
for (let i = 0
i < 10; i++) {
console.log(i); // 0, 1, 2, ..., 9
}

// Use let for temporary values in algorithms
let a = 10;
let b = 20;
let temp = a; // Use temp to swap the values of a and b
a = b;
b = temp;

// Use let for conditionally assigned values in if-else statements
let greeting;
if (hour < 12) {
greeting = "Good morning";
} else {
greeting = "Good afternoon";
}

console.log(greeting); // Depends on the value of hour

Conclusion

In this article, you learned about the difference between var, let, and const keywords in JavaScript and when to use them. You learned that:

var declares a variable with function scope or global scope, and it is hoisted to the top of its scope with an initial value of undefined.

let and const declare variables with block scope, and they are hoisted to the top of their scope but not initialized until they are declared.

• You should avoid using var unless you have a specific reason to do so, and use let or const instead.

• You should use const when you want to declare a constant value that will not change, and use let when you want to declare a variable that may change over time.

I hope this article helps you understand the difference between var, let, and const in JavaScript. If you have any questions or feedback, please leave a comment below. Thanks for reading!blush

The post Learn about the difference between var, let, and const keywords in JavaScript and when to use them. appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/06/02/learn-about-the-difference-between-var-let-and-const-keywords-in-javascript-and-when-to-use-them/feed/ 0
Brand new spaCy Turkish models https://prodsens.live/2023/05/30/brand-new-spacy-turkish-models/?utm_source=rss&utm_medium=rss&utm_campaign=brand-new-spacy-turkish-models https://prodsens.live/2023/05/30/brand-new-spacy-turkish-models/#respond Tue, 30 May 2023 17:24:17 +0000 https://prodsens.live/2023/05/30/brand-new-spacy-turkish-models/ brand-new-spacy-turkish-models

Brand new spaCy Turkish models are trained, packaged and waiting for to be used on your datasets. Let’s…

The post Brand new spaCy Turkish models appeared first on ProdSens.live.

]]>
brand-new-spacy-turkish-models

Brand new spaCy Turkish models are trained, packaged and waiting for to be used on your datasets. Let’s see them in action!

Despite being a widely spoken language across Asia and Europe with over 80M speakers, Turkish hasn’t enjoyed quite as many linguistics resources. Finding a state-of-art pretrained model hasn’t been easy at all and the synthetic nature of Turkish poses many challenges for the ones who are interested in preparing pretrained models for the community. Fortunately, my winter campaign “NLP with Duygu” comes with many resources including pretrained spaCy language models!

spaCy Turkish models: Signed, sealed, delivered and all yours.

In this article, we’ll get to know the packages; first we’ll have a look at the development process by reviewing features of Turkish and how to embed these features into the development process. Then we can enjoy the packages by playing with the output and observe how morphosyntactic features of Turkish is reflected to the package outputs. We get started with the packages themselves:

The packages

Turkish spaCy models come in three flavors: tr_core_web_md , tr_core_web_lg and tr_core_web_trf . tr_core_web_lg is a CNN-based large sized model, which offers good accuracy and works at a decent speed. tr_core_web_md has the same architecture but the vectors are one size smaller (we’ll come to that). tr_core_web_trf is a Transformer based pipeline. It offers great accuracy and if you have good computing resources (even better some GPUs), this should be the weapon of your choice.

All pipelines contain a tokenizer, trainable lemmatizer, POS tagger, dependency parser, morphologizer and NER components. All models are available for download on their Hugging Face repo [1].

Pipeline components

We can start discovering the new packages by looking at the pipeline components. First let’s pip the transformer based model:

pip install https://huggingface.co/turkish-nlp-suite/tr_core_news_trf/resolve/main/tr_core_news_trf-any-py3-none-any.whl

pipe_names method will show us the available pipeline components:

>>> import spacy
>>> nlp = spacy.load("tr_core_news_trf")
>>> nlp.pipe_names

['transformer',
'tagger',
'morphologizer',
'trainable_lemmatizer',
'parser',
'ner']

The other two models have the same components except the transformer -they have tok2vec instead.

After examining the pipe components, we’re ready to run some sentences through our pipeline 😊. Let’s start easy with a short example sentence:

>>> sentence = "Ben de Ankara'ya gittim."
>>> doc = nlp(sentence)

>>> for token in doc:
print(token.text, token.pos_, token.dep_, token.lemma_, token.morph)

Ben PRON nsubj ben Case=Nom|Number=Sing|Person=1
de CCONJ advmod:emph de
Ankara'ya PROPN obl Ankara Case=Dat|Number=Sing|Person=3
gittim VERB ROOT git Aspect=Perf|Evident=Fh|Number=Sing|Person=1|Polarity=Pos|Tense=Past
. PUNCT punct .

We can see the results of each component 1-by-1. The second column show POS tags, generated by tagger component. The sentence contains a pronoun, a conjunction, a proper noun, and a verb. The third column shows the dependency labels, this roughly reads as the subject of the verb, adverb of the verb, oblique object of the verb, and the verb itself. The fourth and fifth columns are related to morphology, token.lemma_ method exhibits token’s lemma and token.morph offers full morphological analysis of the token, including all inflectional suffix types and more information (more onto morphology will come in another post). If you want to learn more about Turkish morphology and syntax, I’ll be writing a post on each. You can also visit my playlist, “All About Turkish Linguistics” [3]. We’re having only a peek here in this article – Turkish sentence structure and word forms takes a little bit effort to grasp fully 😄

As a result the dependency tree of this sentence looks like:

Syntactic parse of the example sentence. Generated by displaCy Jupyter.

How about the NER component? NER tags the only entity of the sentence as GPE , a place type entity:

Entities of the example sentence. Generated by displaCy Jupyter.

spaCy Turkish models are trained on Turkish Wiki NER Dataset, which has 19 tags. This is a general purpose NER dataset, hence tagset includes common entity types such as person, place, organization names, as well as numeric entity types. Full tagset can be found under the dataset’s Github and Hugging Face pages [4].

So far so good, how about more syntactically complicated sentences? Surely our models can tackle them too, check out this parse of the following example sentence which includes an adjectival clause and several entities:

>>> sentence = "Ankara Esenboğa Havaalanı'ndan ayrılan uçak 1 saat gecikmeyle saat 17:00 civarı İstanbul'a indi."
>>> doc = nlp(sentence)

>>>for token in doc:
print(token.text, token.pos_, token.dep_, token.lemma_, token.morph)

Ankara PROPN obl Ankara Case=Nom|Number=Sing|Person=3
Esenboğa PROPN flat Esenboğa Case=Nom|Number=Sing|Person=3
Havaalanı'ndan NOUN flat Havaalan Case=Abl|Number=Sing|Number[psor]=Sing|Person=3|Person[psor]=3
ayrılan VERB acl ayrıl Polarity=Pos|Tense=Pres|VerbForm=Part
uçak NOUN nsubj uçak Case=Nom|Number=Sing|Person=3
1 NUM nummod 1 NumType=Card
saat NOUN obl saat Case=Nom|Number=Sing|Person=3
gecikmeyle NOUN obl gecikme Case=Ins|Number=Sing|Person=3
saat NOUN obl saat Case=Nom|Number=Sing|Person=3
17:00 NUM obl 17:00 NumType=Card
civarı ADJ obl civar Case=Nom|Number=Sing|Number[psor]=Sing|Person=3|Person[psor]=3
İstanbul'a PROPN obl İstanbul Case=Dat|Number=Sing|Person=3
indi VERB ROOT in Aspect=Perf|Evident=Fh|Number=Sing|Person=3|Polarity=Pos|Tense=Past
. PUNCT punct .

Notice the participle form ayrılan that forms the clause “Ankara Esenboğa Havaalanı’ndan ayrılan” to modify the noun “uçak”. This clause looks like the following in the sentence’s parse tree:

Dependency parse of the adjectival clause. The participle form “ayrılan” forms the adjectival clause, then the clause modifies the noun “uçak”. Generated by displaCy Jupyter.

How about entities? This sentence includes four entities of three different types: two times, one famous building and one city:

All entities of the example sentence.

Both parse trees and entity annotation look beautiful and handy, however beauty comes with some effort always. When it comes to processing, Turkish has its very own challenges.

Challenges with processing Turkish

In my experience, the first challenge of Turkish is finding a good treebank for training the parser, tagger, and morphologizer components. For our spaCy mission, I used Turkish BOUN Treebank [5]. This is a great treebank with a commercially permissive license.

The second challenge comes from the Turkish language itself, Turkish has a quite complex and reproductive morphology. We already saw some word form examples above, in a more detailed look we can notice the “long” morphology strings:

gittim VERB ROOT git Aspect=Perf|Evident=Fh|Number=Sing|Person=1|Polarity=Pos|Tense=Past7
Ankara'ya PROPN obl Ankara Case=Dat|Number=Sing|Person=3
Havaalanı'ndan NOUN flat Havaalan Case=Abl|Number=Sing|Number[psor]=Sing|Person=3|Person[psor]=3

Quality and the quantity of the treebank is crucial here, such morphological features are difficult to learn for even most powerful NNs. During the training, one needs to show enough examples of verbal forms, verbal suffixes as well as nominal forms and nominal suffixes. That adds up to a quite many training instances for Turkish 😄. Syntax goes hand-in-hand with morphology (just as in the adjectival clause example), putting it together morphosyntax is the main challenge of Turkish.

Subword representations, Floret vectors and Transformers

As we see above, an arbitrary number of suffixes can be added to a Turkish root. As a result, Turkish word forms are composed of many morphemes and can be quite long strings. In order to vectorize Turkish text correctly, one certainly needs subword strategies.

Transformers type tokenizers started a revolution by decomposing words into several part of words to represent even the rarest of the language, hence leaving no space for OOVs at all. Part-of-word type vocabs are quite beneficial for Turkish too, as you can guess words enjoy being decomposed into smaller parts (strategies for decomposing the word forms will come in another article). As we already remarked, tr_core_web_trf is a Transformer based model hence having a WordPiece type vocabulary.

tr_core_web_lg and tr_core_web_md are packaged with static vectors, obviously we needed vector types that support morphemes of Turkish. Here Floret vectors come to rescue. Floret is an extended version of fastText that uses Bloom embeddings to create compact vector tables with both word and subword information. Turkish morphemes enjoy subword representations quite a bit, hence quite proper for our new packages. Our Floret vector can be individually downloaded from their Hugging Face repos too [1]. Before picking the correct parameters, we experimented with subword length parameters.

Putting it altogether & the training process

Putting it all together, we packaged Floret vectors, downloaded a Turkish Transformer model from Hugging Face, prepared the NER dataset and the treebank. Finally all we had to do was to write these plain yaml lines to start the training:

workflows:
all:
- preprocess_ud
- train_tagger
- evaluate_tagger
- preprocess_ner
- train_ner
- evaluate_ner
- assemble
- package

All scripts can be find under spaCy Turkish Github repo.

Training was done on Google Cloud. Thanks to generous support of the GDE program 😊. All models were trained on a c2-standard-16 type instance. If you want to do the training together, you can watch my video tutorial “How to train spaCy models” here. Please be aware that my instance is called duygu1 😄 😄 (there’s a duygu2 too, it’s a TPU VM).

Dear readers, this was our peek to the brand new spaCy Turkish models. This work is a part of my Fall-Winter 2023 campaign “Turkish NLP with Duygu” and generously supported by Google Developer Experts program.

If you want to learn more about Turkish NLP, you can visit my campaign webpage or even better my Youtube channel “NLP with Duygu”. It’s always great to meet you for Turkish NLP, for more of content please stay tuned and happy meanwhile 🎉🎉🎉

References

  1. Turkish NLP Suite Hugging Face: https://huggingface.co/turkish-nlp-suite
  2. Turkish NLP Suite Github: https://github.com/turkish-nlp-suite
  3. All About Turkish Linguistics playlist: https://www.youtube.com/watch?v=ZiArCDOuNVo&list=PLJTHlIwB8Vcqltlhbmsc12Srthv73OeOF
  4. Turkish Wiki NER Dataset
    Github: https://github.com/turkish-nlp-suite/Turkish-Wiki-NER-Dataset
    Huggingface: https://huggingface.co/datasets/turkish-nlp-suite/turkish-wikiNER
  5. Turkish BOUN Treebank: https://github.com/UniversalDependencies/UD_Turkish-BOUN


Brand new spaCy Turkish models was originally published in Google Developer Experts on Medium, where people are continuing the conversation by highlighting and responding to this story.

The post Brand new spaCy Turkish models appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/05/30/brand-new-spacy-turkish-models/feed/ 0
LinkedIn Company Pages: The Ultimate Guide [+ 12 Best Practices] https://prodsens.live/2023/04/13/linkedin-company-pages-the-ultimate-guide-12-best-practices/?utm_source=rss&utm_medium=rss&utm_campaign=linkedin-company-pages-the-ultimate-guide-12-best-practices https://prodsens.live/2023/04/13/linkedin-company-pages-the-ultimate-guide-12-best-practices/#respond Thu, 13 Apr 2023 12:03:40 +0000 https://prodsens.live/2023/04/13/linkedin-company-pages-the-ultimate-guide-12-best-practices/ linkedin-company-pages:-the-ultimate-guide-[+-12-best-practices]

LinkedIn Pages allow users to discover, follow, and find new roles at their favorite businesses. But they’re not…

The post LinkedIn Company Pages: The Ultimate Guide [+ 12 Best Practices] appeared first on ProdSens.live.

]]>
linkedin-company-pages:-the-ultimate-guide-[+-12-best-practices]

LinkedIn Pages allow users to discover, follow, and find new roles at their favorite businesses. But they’re not just useful for job seekers and professionals. If you own a business, organization, or other institution, you can use LinkedIn Company Pages to connect with your audience and strengthen your brand image.

A lot happens on LinkedIn. People post updates, professionals seek new jobs, salespeople pitch prospective customers, and LinkedIn members of all kinds connect, chat, and build relationships. With more than 800 million members, this level of activity comes as no surprise.

Free Guide: How to Use LinkedIn for Business, Marketing, and Networking  [Download Now]

LinkedIn Company Pages provide a unique way for your organization to stand out from the noise — important noise, but noisy nonetheless. We developed this guide to help you master your LinkedIn Company Page.

LinkedIn Company Pages were developed to give your company a home base and reach your audience on the network.

If you haven’t built a LinkedIn Page for your business yet, you’re missing out on new connections, followers, employees, and customers.For an in-depth guide on why creating a LinkedIn company page is essential for your business and how to get started, check out our video.

What to Post on a LinkedIn Company Page

Creating a LinkedIn presence for your company expands your brand trust and awareness. Here are a few ideas for what to post on your LinkedIn page to maximize your ROI.

1. Share company updates and news.

LinkedIn, like any other social network, features a content stream on which people share and discuss important articles and updates. Your Page is a perfect place to post your company updates and news for customers, employees, investors, and fans to review and share.

2. Post open jobs and connect with potential employees.

LinkedIn is a professional social network, meaning users benefit from work and career-related updates, connections, and interactions. LinkedIn members are primed to discover and discuss job opportunities, including the ones at your company. If you have any open roles, LinkedIn is the perfect place to share them.

In fact, LinkedIn provides Career Pages — a space separate from your Company Page that’s dedicated to open jobs, recruiting, and employer branding.

3. Build a community.

Every social network boasts its own ability to foster a sense of community, and LinkedIn is no exception.

Your LinkedIn Company Page is a place to build a community of LinkedIn members who are interested in your business, updates, and jobs. Here, they can connect and collaborate on their shared interest in your company. Post interesting questions, behind-the-scenes information, and unique updates to engage your audience and build camaraderie on your Page.

4. Grow and keep your brand’s image consistent on social media.

If you’re active on other social networks, having a presence on LinkedIn can help you grow your audience elsewhere. Most social networks allow you to link to and from your LinkedIn page to boost recognition and increase your number of followers.

Additionally, some of your audience may only be active on LinkedIn, so creating a Page would give you a chance to connect with new potential customers and employees.

5. Improve your discoverability on search engines.

LinkedIn Company Pages rank on search engine results pages (SERPs) like any other website or social network. Creating a Page gives your company another opportunity to be discovered by those searching for your products, services, or brand.

LinkedIn Company Pages vs. LinkedIn Groups

Another popular feature on LinkedIn is LinkedIn Groups, where like-minded people digitally gather to discuss common topics, industries, or (in some cases) companies. Many users get these two features confused.

LinkedIn Company Pages are the equivalent to your “website” on LinkedIn; you create it on behalf of your company, and it belongs to you (as a business owner and/or marketer). You’re responsible for updating your Page and posting new content and updates. Other LinkedIn members can follow your Page and engage with your content.

On the other hand, LinkedIn Groups are collaborative networks that can be created and engaged with by any LinkedIn member. Some groups are private while Open Groups can be read or joined by anyone.

Now, a company can create a LinkedIn Group for certain internal teams or subgroups, but LinkedIn Groups can’t necessarily replace LinkedIn Company Pages.

How to Create a Company Page on LinkedIn

Whether you already have a LinkedIn account or are new to the platform, creating a LinkedIn Company Page is easy. Follow these steps to get started.

1. Navigate to the LinkedIn Pages home page or to LinkedIn.com.

how to create a company page on LinkedIn: LinkedIn Pages home pageLinkedIn has a public-facing site where you can start the process for creating your own Page. Click the blue button that says “Create your Page.” Alternatively, hover over the LinkedIn Pages option in the top menu and click “Create a LinkedIn Page”.

how to create a company page on LinkedIn: top menu

If you’re not already signed in, you’ll be prompted to sign in. Be sure to do so with the account where you’d like to manage the page. But if you happen to sign in to the wrong account, don’t worry; you can add more admins after you set up your page. We’ll cover how you can do that later.

Starting from LinkedIn.com

If you’d prefer to start from your LinkedIn feed, navigate to LinkedIn.com.

Once you reach your feed, tap the “Work” button in the navigation bar.

Click “Create a Company Page +” at the very bottom.

how to create a company page on LinkedIn: work button on LinkedIn feed2. Select the type of Page you’d like to create.

how to create a company page on LinkedIn: choosing the type of pageAfter clicking “Create a Company Page”, you’ll be taken to a page where you can decide what you’re creating. You have three options:

  • Company: A good fit for small-to-enterprise businesses, as well as non-profits, government agencies, and other non-educational organizations.
  • Showcase page: A “sub-page” that’s connected to an existing LinkedIn Page. Not recommended if you’re setting up your first Company Page.
  • Educational institution: A good fit for schools and universities.

If you’re a business owner or employee, choose “Company.”

3. Input your business name, LinkedIn public URL, and website.

how to create a company page on LinkedIn: add basic informationNow comes the fun part: Actually creating the page. LinkedIn guides you through this process, and it prompts you to first fill out the basics.

  • Name: Enter your entire company name to improve discoverability and searchability.
  • LinkedIn public URL: As you fill out your Name, LinkedIn will automatically input your URL to match. Ideally, your URL will be your company name; this keeps your online identities consistent. For example, HubSpot’s LinkedIn Page URL is www.linkedin.com/company/hubspot. If your company name isn’t available, choose a URL that’s similar and still identifiable, such as one of your social media handles and/or a shortened version of your brand name.
  • Website: Enter your company’s website. Although not required, this information is critical as it connects LinkedIn followers to your company website.

4. Add your industry, company size, and company type.

how to create a company page on LinkedIn: add industryLinkedIn requires additional details for you to build your page. These are essential to improve searchability and helps you build your brand image in your specific industry.

  • Industry: Start typing in your industry and choose one from the drop-down menu. If you can’t find it, continue searching until you find a generally good fit. This information helps LinkedIn categorize your company for Page visitors.
  • Company size: Choose your company size from the ranges provided. The ranges start from 0-1 and go up to 10,000+.
  • Company type: Choose your company type from the options provided: Public company, self-employed, government agency, non-profit, sole proprietorship, privately held, and partnership. If you’re not sure, reach out to your company stakeholders.

5. Add your final profile details, such as your logo and tagline.

how to create a company page on LinkedIn:  add final detailsWhile these fields are optional, they can help you save time later. You’ll have less work to do in your LinkedIn Page Admin area.

  • Logo: Upload a high-quality logo that matches the logo on your other social media accounts. This is important so new followers can recognize your brand and Page. It must be 300 x 300px.
  • Tagline: In 120 characters, briefly describe what your company does. Consider using the same tagline from your other social media accounts. You can change this information later.

6. Preview the result and click “Create Page.”

how to create a company page on LinkedIn: preview resultOn the right-hand side, you’ll see a preview of the details you’ve provided. Take a look to ensure everything looks correct.

When you’re finished, check the checkbox at the bottom confirming you’re an authorized representative and click “Create Page.”

how to create a company page on LinkedIn: authorization

7. Complete your LinkedIn Page in the Admin dashboard.

how to create a company page on LinkedIn: complete page in dashboardThe final step will show you the Admin View of your LinkedIn Company Page. This is essentially the behind-the-scenes dashboard from which you can make changes to your Page.

If you’re building your Page from scratch, you’ll see that LinkedIn provides a helpful checklist of actions to complete. These tasks will also unlock new features such as Content Suggestions and Invite to Follow that can help grow your Page.

Let’s walk through the important tasks to complete in this step.

  • Description: Add an About Us section that describes your company. It should be longer than your tagline. This is the place to include relevant keywords and phrases that can help people discover your Page on LinkedIn and through search engines. This section can be up to 2,000 words. LinkedIn also allows you to create taglines and descriptions in multiple languages.
  • Location: Add at least one location for your company. You can add multiple locations and name each one. Consider at least adding your headquarters or central company location.
  • Cover photo: Add a cover photo that will engage and entice visitors to check out your Page. Many brands upload another orientation of their logo or their latest marketing or advertising campaign graphics. This photo must be 1,128 x 191px.
  • Hashtags: Hashtags provide a unique way to connect with followers and engage with posts. Add up to three hashtags that are related to your company, industry, and audience. They will be added as Community Hashtags to your Page.

You can also add a company phone number, the year your company was founded, and any LinkedIn Groups you want to show on your Page.

Voila! Your LinkedIn Company Page is now created and ready to share. Continue poking around your Page to complete all fields and features. The following section of LinkedIn Page best practices will help you use your Page to connect and grow.

How to Manage Your Company Page on LinkedIn

Once you create your LinkedIn Company Page, your work is done … right? Nope. Honestly, creating the Page is the easiest part. Managing and posting on the page is what takes more time, work, and creativity.

As we’ll talk about below, the first thing to do is determine your Page admin. This person will be responsible for creating (or delegating) the content posted on your Page.

Work with your team to plan much of your LinkedIn content upfront. Gather ideas from your other social media accounts, or chat with your leadership, product, and HR teams to get ideas for company, product, and job updates to share.

Encourage your coworkers to create LinkedIn accounts of their own, as their engagement and participation can help drive traffic to your Page.

Lastly, keep an eye on the LinkedIn Company Page analytics. See who’s visiting and engaging with your Page and what kind of content they prefer. Over time, this will help you determine where to best spend your creative energy.

LinkedIn Company Page Admin

Who is your LinkedIn Company Page admin? Answer this question before moving further in this article. You need at least one, although we’ll discuss in the section below how (and why) to add additional Page admins.

LinkedIn offers a variety of admin roles, and your Page should have at least one of each to avoid losing access to your Page. Moreover, this admin (or team of admins) are the ultimate managers of all content posted on your Page. They should ensure all content is on brand and consistent with your other social networks and website content.

Let’s talk about some more best practices for LinkedIn Company Pages.

To make the most out of your LinkedIn presence, it’s essential to follow best practices for LinkedIn Pages. Follow these tips and techniques to maximize the impact of your efforts.

1. Complete all Page details with in-depth information about your company.

linkedin company page best practices: completed LinkedIn pageA fully completed LinkedIn Company Page will help you engage users more effectively and earn more follows and shares. Take the time to fill out every Page detail, even those that aren’t required.

Each LinkedIn Company Page has a series of tabs. These include:

  • Home: The Home tab includes a snapshot of all the other tabs in your LinkedIn Page. It provides a short version of your “About” page, lists 2-3 of your recent posts, includes “People highlights” for each individual Page visitor, and more.
  • About: The About tab gives you the opportunity to explain what you do and why you do it in more detail. You’ve likely already filled out most of this info, such as your website and industry, but consider adding your specialties and other locations as well.
  • Products: Some companies will benefit from listing products on their LinkedIn page. It’s especially useful if your product can also double as a skill that people can add to their LinkedIn profile (such as Microsoft Excel, for instance). Only certain types of companies can add products to their Page.

linkedin company page best practices: add products

  • Posts: This is the section of your Page where your updates are published, equivalent to an Instagram or Facebook feed. It includes text posts, images, videos, articles, documents, and ads.
  • Jobs: The Jobs tab only apples to you once you’ve posted jobs on LinkedIn. Posting a job is completely free and essential if you’d like to use your LinkedIn Page to attract top talent.
  • Events: Like the Jobs tab, this will only appear after you’ve added an event to LinkedIn. You don’t necessarily need to add events during the Page setup process, but you can consider doing so to strengthen your company brand and reach more prospects.
  • Videos: This tab includes a feed of your most recent videos.

Your LinkedIn Page also includes a “People” tab, which lists all of your current employees. If you purchase Career Pages for your LinkedIn Page, you’ll also get a “Life” tab, where you can provide more detail on the employee experience at your company and even feature content made by your employees.

LinkedIn Page best practices: adobe life page example

Image Source

The more details you provide about your company, the easier it will be for people (a.k.a. potential customers) to discover and connect with you. It will also serve to educate those who are interested in working for or investing in your company.

2. Add important Page admins.

Maintaining a LinkedIn Company Page can be a lot of work, especially if your team is already manning multiple social networks and accounts. Once you create your Page, don’t forget to add more Page admins to give other people permissions.

To add new Page admins, click “Admin tools” in the top right corner of your Company Page, then click “Manage admins” under Settings.

LinkedIn Page best practices: add admins

The page will allow you to manage all your Page administrators. As you can see, there are several types of admins you can add to your Page:

  • Super admins have access to all permissions.
  • Content admins can edit the Page’s content and publish posts.
  • Curators can see content suggestions and create recommended content.
  • Analysts can access the Page’s performance analytics and export data.

LinkedIn explains them in detail here.

To add an admin, simply click the “+ Add admin” button in the admin management page.

LinkedIn Page best practices: admin management pageIn the pop-up, type in the person’s name, choose their admin role, and click “Save.”

LinkedIn Page best practices: add page admin with permissions

3. Keep your images up-to-date.

Your Page logo and cover photo are very important; they visually introduce and engage anyone who visits your Page. Keep these images up-to-date with your latest branding and marketing materials.

Not only is this critical for presenting a unified social presence, but it ensures your LinkedIn company page also matches your website, blog, and other digital marketing materials. There’s nothing worse than visiting a LinkedIn Page and not knowing whether it’s the brand you were looking for. You can avoid that pain point for your LinkedIn visitors by keeping everything up-to-date.

You should also update your imagery regularly because of marketing campaigns, upcoming holidays, or current events. For instance, many companies release a new, rainbow-colored version of their logos in honor of Pride Month.

Updating your employer branding can make you look more current and engaged. As a result, you’ll boost brand awareness and help new customers, employees, and fans discover your brand on LinkedIn.

4. Share engaging content with your followers at least once a week.

Like any social network, you can’t expect to simply create your account and be finished. Building your LinkedIn Page is only half the battle; you must also consistently post content to successfully engage, inform, and market to your audience.

Download this free ebook to access templates, guides, and infographics on how to use LinkedIn for business, marketing, and networking.

Image Hackathon – Square (25)

Consider posting updates to your products and services, job openings, trends or news that involve your brand, and behind-the-scenes content featuring employee life, product development, or other unique content.

If you feel intimidated by having to post often, you can use a tool such as HubSpot’s social media management tool within Marketing Hub to streamline the process. Alternatively, you can download a free social media content planning template to jumpstart your posting schedule.

The Social Media Content Calendar Template Every Marketer Needs [Free Template]-4-3

Download Your Free Social Media Content Calendar Template

If you post regularly, you’re 6X more likely to convert customers than if you don’t. So be sure to nurture your followers with targeted content that helps them solve for their pain points.

5. Use Content Suggestions to share relevant content.

LinkedIn also provides a handy Content Suggestions tool to help you discover topics and content your audience is already engaging with on the network.

Tap “Content” in the top menu of your Page, and update the filters as they apply to your audience.

LinkedIn Page best practices: content suggestions

Immediately, you’ll see a content stream based on your chosen topic and audience parameters. You can edit the filters further in the left menu, and you can add or take away content topics along the top. This tool shows you the engagement rates of popular or trending content and makes it easy to share new updates with your audience.

6. Engage with your audience.

Don’t forget to engage with your audience, too. Like, comment on, and share things posted by your followers and connections. This will remind them there are humans behind your brand’s LinkedIn Company Page.

The good news about this is that you can and should use your brand voice to engage with others. There’s no need to be overly formal and stiff — the purpose of engaging is to show your brand’s more human side.

Engaging with your audience is also essential so that viewers don’t feel like a robot is behind your Page. Since LinkedIn is a more professional platform with more “distance” (i.e, businesses don’t often post selfies or personal memos), it’s critical to close that distance by liking, commenting, and responding to your own posts and other users’ posts.

Now, you don’t want to be as informal as you might be on, say, Instagram, but you should always feel free to showcase your brand’s voice and personality.

7. Post interesting, eye-catching visuals.

Text-only content is unlikely to engage all members of your LinkedIn Page. Be sure that at least 50% of your posts feature an engaging visual, whether an infographic, illustrated statistic, or quote graphic. Even a GIF or meme can be a fun addition to a text-heavy feed.

LinkedIn Page best practices: use interesting visuals

Also, consider adding short videos. Even if these videos repeat your text-based posts, they’ll engage with your more visual audience and keep folks engaged on your Page.

According to HubSpot Research, short-form video will continue to see explosive growth, even outside of TikTok. Because of TikTok’s popularity, more users are expecting similar content across other social media platforms, including LinkedIn. You can take advantage of this trend by posting short videos on your Page.

HubSpot Research has also found that video has the highest ROI of any media format. Even if you only post a short, informational clip, its payoff can be incredibly valuable, and you don’t need expensive gear. Simply use your phone and an online video editing tool.

8. Customize your call-to-action.

On your LinkedIn Company Page, under your logo and next to the Follow + button, you’ll find a call-to-action (CTA). This CTA is an essential element that will allow you to draw in more leads and get more clicks. Plus, someone who visits your website is more likely to click the Follow button.

It’s a great way to engage visitors from the get-go without them needing to scroll.

LinkedIn Page best practices: customize cta

While you can use a CTA that says “Visit website,” LinkedIn allows you to customize this CTA to better engage your followers and audience. To do this, click “Edit page” on your admin view.

A pop-up box will come up. Under Header, click “Buttons.”

Make sure the “Custom button” option is turned on.

LinkedIn Page best practices: creating a custom buttonChoose a button name from the drop-down menu and enter a URL. Use this setting to direct followers to your website, landing pages, event registrations, and more.

9. Involve your employees.

Your employees are some of your best brand advocates. This is especially true on LinkedIn, where employees have an average of 10x more first-degree connections than a company has followers.

Involving your employees will also humanize your brand, a growing trend in marketing that’s slated to continue growing. According to HubSpot Research, 89% of brands will continue investing in content that humanizes them and reflects their values, showing its high ROI. One way to effectively reflect your values is to engage and involve your employees on your LinkedIn Page.

As you develop your Page, encourage your employees to follow and engage with it. Also, ask each employee to list your company as an employer, as this will link their profile to your Page and vice versa. This is helpful when growing a new Page audience of customers and potential employees.

10. Post content from (or mention) partners and other companies.

LinkedIn Page best practices: comarketing posts

If you partner with other companies, such as for co-marketing campaigns, feature them on your Page often. Not only does this engage other companies and leaders, but it also promotes your content to your partner’s audiences.

Partner campaigns can also humanize your brand and expose you to those who may not have heard of you before. It builds brand awareness and makes you look more engaged, which is essential for a successful LinkedIn Page.

For every post that you share about your company, share one focused on another company, your employees, or even your customers. Case study interviews are also great opportunities, as well as webinars co-hosted with another brand.

11. Post new job openings on LinkedIn.

Adding job openings to your LinkedIn Page can make you look more engaged and attract more followers. While a job candidate may not be a sales prospect, they’re a hiring prospect, and new hires can and do make excellent word-of-mouth advocates. They can talk about you with other colleagues who could then follow you, and so forth.

The good news about posting jobs on LinkedIn is that they don’t require a lot of work. For one, if the job is already live in your hiring portal, then you can simply copy and paste it over onto LinkedIn and publish it for free. It will remain live for 21 days before you have to pay to extend it.

For two, shorter job postings perform better than longer job postings. In fact, LinkedIn reports that 150 or less words are more effective than longer postings. So even if you don’t have a job posting yet, you can simply whip one up and let LinkedIn do the rest.

12. Use LinkedIn Ads.

Once you have a LinkedIn Page, the natural extension is running LinkedIn Ads. Not only will you reach more people and attract more followers, you’ll increase your general presence on LinkedIn.

LinkedIn Ads are a smart choice because many prospects are not yet ready to buy. In fact, LinkedIn reports that most are not. By using LinkedIn Ads, you can slowly nurture passive buyers who aren’t yet ready to make a purchase.

In addition, you can use both organic and paid campaigns to increase your ROI. You have a potential to see 61% higher conversions and lower the cost per conversion by 12% by having both a LinkedIn Page and by running LinkedIn ads.

One type of LinkedIn Ad you can use are Document ads. These ads show guides, tip sheets, ebooks, case studies, and infographics to an audience that’s ideally hungry for this information. They then click through to your landing page, and voila — there you have a new lead.

Create Your LinkedIn Company Page Today

Most customers trust social media over advertising — including social media for brands and companies. Your LinkedIn Company Page contributes to this statistic, and, in turn, helps bolster your brand awareness, trust, and social activity. Use this guide to develop your LinkedIn Company Page and start engaging with new customers, employees, investors, and followers.

Editor’s note: This post was originally published in August 2017 and has been updated for comprehensiveness.

New Call-to-action

The post LinkedIn Company Pages: The Ultimate Guide [+ 12 Best Practices] appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/04/13/linkedin-company-pages-the-ultimate-guide-12-best-practices/feed/ 0
Confessions from a Golfer Programmer https://prodsens.live/2023/04/05/confessions-from-a-golfer-programmer/?utm_source=rss&utm_medium=rss&utm_campaign=confessions-from-a-golfer-programmer https://prodsens.live/2023/04/05/confessions-from-a-golfer-programmer/#comments Wed, 05 Apr 2023 16:03:02 +0000 https://prodsens.live/2023/04/05/confessions-from-a-golfer-programmer/ confessions-from-a-golfer-programmer

I love code. Not all code, just beautiful code. One of my favorite activities is to refactor –…

The post Confessions from a Golfer Programmer appeared first on ProdSens.live.

]]>
confessions-from-a-golfer-programmer

I love code. Not all code, just beautiful code.

One of my favorite activities is to refactor – transmuting a program that works into another that does exactly the same thing, but better: Making it run faster, changing it so that it’s shorter or more idiomatic, whatever that means; removing some nasty duplication, etc.
It makes me happy in the inside to see commits that have more removals than additions, which is probably the opposite of what the product manager likes to see.

This is not a good quality to have, however. It’s easy for me to get engrossed in the beauty of my own – or someone else’s – code, and not get anything done.

“Look!” I conceitedly exclaimed. “I’ve reduced the size of the function to one third its size”
“Nice, have you added the feature already? we really need it” My coworker inquired
“On it…” Realizing that I spent half an hour and it’s still unstarted.

I come from javascript, where every time you try to do something minimally declarative your javascript engine dies a bit on the inside, and the garbage collector wishes you very bad things.

Let’s say that our backend has a function that requests IDs. These IDs can be empty (""), and we want to ignore those. It gets the users from a dictionary in memory, and then returns the ones that it has found that are validated.

function getValidatedUsers(userIDs: string[] ): Users[];

There are two ways to achieve this.

The imperative way:

function getUsers(userIDs: string[]): Users[] {
    const ret = [];
    for i in userIDs {
        if (i === "") continue;
        const user = UsersDictionary[i];
        if (user !== undefined && user.isValidated()) {
            ret.push(user);
        }
    } 
}

The declarative way:

function getUsers(userIDs: string[]): Users[] {
    return userIDs
        .filter(x => x !== "")
        .map(x => UsersDictionary[x])
        .filter(x => x !== undefined)
        .filter(x => x.isValidated());
}

// Which could even be written more 
// concisely with arrow function syntax.

To me the declarative way more beautiful and clear, the steps look simple and ordered…

…But you would be a fool to use it.

The engine copies the array 4 times which involves a heap allocation, a memory copy and later on a garbage collection pause that is guaranteed to happen at the worst possible time, all of the time. Not to mention the closures generated too. You won’t see me writting javascript that looks like that in code that needs to be even minimally performant, especially not in node, which is single threaded and your pretty little declarative function is slowing down the rest of the server.

I love Rust (I promise this is not another blog of Rust propaganda), which probably doesn’t come as a surprise given that I’m your stereotypical nerd. Rust is great, but it’s also my greatest demise.

My first contact with the expresiveness of Rust blew me away. You can use the declarative way, you can use beautiful declarative code, all without it slowing anything down (it even has the potential to get optimized into being faster!).

Rust is famous for its error handling. It does not support exceptions, instead opting for returning the errors to the caller. The first time I heard of it I thought that it was a step backwards, a return to C and its error code returning. But I was wrong, rust has exceptional tools for working with errors.

Here’s an example from selenium-manager, maintained by the selenium project and a contribution I made

This calls three functions that can fail: set_timeout, set_proxy and resolve_driver

If any of them fails the program exits with a return code.

match selenium_manager.set_timeout(cli.timeout) {
    Ok(_) => {}
    Err(err) => {
        selenium_manager.get_logger().error(err);
        flush_and_exit(DATAERR, selenium_manager.get_logger());
    }
}
match selenium_manager.set_proxy(cli.proxy()) {
    Ok(_) => {}
    Err(err) => {
        selenium_manager.get_logger().error(err);
        flush_and_exit(DATAERR, selenium_manager.get_logger());
    }
}

match selenium_manager.resolve_driver() {
    Ok(driver_path) => {
        selenium_manager
            .get_logger()
            .info(driver_path.display().to_string());
        flush_and_exit(0, selenium_manager.get_logger());
    }
    Err(err) => {
        selenium_manager.get_logger().error(err);
        flush_and_exit(DATAERR, selenium_manager.get_logger());
    }
};

Image description

This is where my golfer self comes in, I want to make this code as concise as I can.

First, let’s use if let Err, which could translate to javascript’s if (my_fn() instanceof Error) and extract the error to a function

let err_out = |e| {
    selenium_manager.get_logger().error(e);
    flush_and_exit(DATAERR, selenium_manager.get_logger());
};
if let Err(err) = selenium_manager.set_timeout(cli.timeout) {
    err_out(err)
}
if let Err(err) = selenium_manager.set_proxy(cli.proxy) {
    err_out(err)
}

match selenium_manager.resolve_driver() {
    Ok(path) => {
        selenium_manager
            .get_logger()
            .info(path)
        flush_and_exit(0, selenium_manager.get_logger());
    }
    Err(err) => {
        err_out(err)
    }
};

But Rust has so much more to offer. Notice that there’s a happy path (continue) and a gutter, where all of the errors go.

Image description

This is a common pattern, and Rust has really nice tools for working with these in a declarative way. We can use all of the expressiveness of rust to golf this down

selenium_manager
    .set_timeout(cli.timeout)
    .and_then(|_| selenium_manager.set_proxy(cli.proxy))
    .and_then(|_| selenium_manager.resolve_driver()
    .and_then(|path| { // If all of them succeed
        let log = selenium_manager.get_logger();
        log.info(path);
        flush_and_exit(OK, &log);
    })
    .unwrap_or_else(|err| { // If any of them fail
        let log = selenium_manager.get_logger();
        log.error(err);
        flush_and_exit(DATAERR, &log);
    });

This is reminiscent of the code we saw earlier in javascript, this time with errors, which in my eyes makes all of it much easier to read and understand, and most importantly: More beautiful. The only metric that matters.

All of these changes are cool and all, but they provide no value. The end user doesn’t care, the compiler doesn’t care either (they’re equivalent), but I care. I’m in for the aesthetics, but don’t tell my boss.

When I have to make functional changes they break the perfect aesthetic, but given the time to refactor it will become something even more beautiful than before, complexity that has been tamed into a coherent piece of machinery.

With no time given to making it look beautiful it will become an ugly mess, but an ugly mess that works. There’s value in that.

One time when I read the code of a junior coworker of mine, I physically shivered, horrified at some of the things I saw, and I felt an urge to fix it (this is one example of such):

public isDebug(): boolean {
    if (window.localStorage.getItem("debug") == "true") {
        return true
    }
    else {
        return false
    }
}

I’m not kidding, that’s real code. I emotionally had the need to rewrite it to

public isDebug(): boolean {
    return localStorage.getItem("debug") === "true";
}

I doesn’t make me happy that they save it to localStorage, that’s part of a bigger bodge that I don’t even want to look at.

But that was a part of the code that didn’t affect me in any way, I just tumbled with it and couldn’t look away.
It might not be pretty but their code worked, and at the end of the day that’s what matters. I have so much to learn from them 🙂

That was it, I hope you liked my first post.
Remember when I said I wasn’t going to make Rust propaganda? I kind of lied a bit there 🙂

The post Confessions from a Golfer Programmer appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/04/05/confessions-from-a-golfer-programmer/feed/ 1
Comprehensive comparison of Web Apps, PWAs, SPAs, Hybrid Apps, and Native Apps https://prodsens.live/2023/03/22/comprehensive-comparison-of-web-apps-pwas-spas-hybrid-apps-and-native-apps/?utm_source=rss&utm_medium=rss&utm_campaign=comprehensive-comparison-of-web-apps-pwas-spas-hybrid-apps-and-native-apps https://prodsens.live/2023/03/22/comprehensive-comparison-of-web-apps-pwas-spas-hybrid-apps-and-native-apps/#respond Wed, 22 Mar 2023 05:03:19 +0000 https://prodsens.live/2023/03/22/comprehensive-comparison-of-web-apps-pwas-spas-hybrid-apps-and-native-apps/ comprehensive-comparison-of-web-apps,-pwas,-spas,-hybrid-apps,-and-native-apps

What are these terms and what do they mean? In the world of software development, there are many…

The post Comprehensive comparison of Web Apps, PWAs, SPAs, Hybrid Apps, and Native Apps appeared first on ProdSens.live.

]]>
comprehensive-comparison-of-web-apps,-pwas,-spas,-hybrid-apps,-and-native-apps

What are these terms and what do they mean? In the world of software development, there are many different terms that describe different types of applications. Some of the most commonly used terms include Web App, PWA, SPA, Hybrid App, and Native App. Each of these terms has a specific meaning and purpose, and understanding the differences between them can be important when deciding which type of application is best suited for a particular project.

Web Application (Web App)

A web app is an application that runs in a web browser, usually accessed through a URL. They are built using web technologies such as HTML, CSS, and JavaScript and can be accessed on any device with a web browser and an internet connection. Web apps are easy to develop and maintain and are generally cheaper to build than other types of applications. However, they may not be as fast or feature-rich as native apps, and they may not be able to access all of the device’s hardware and software capabilities.

Pros

  • Web apps are accessible on any device with a web browser and an internet connection, making them very convenient for users.
  • They are usually cheaper to develop and maintain than other types of applications, making them a good option for businesses on a budget.
  • They are easy to update and deploy, as changes can be made to the web server and don’t require users to download anything.

Cons

  • Web apps may not be as fast or feature-rich as native apps, as they rely on the capabilities of the web browser.
  • They may not be able to access all of the device’s hardware and software capabilities, such as the camera or GPS.
  • They require an internet connection to function, which may be a disadvantage in areas with poor connectivity.

Progressive Web App (PWAs)

A PWA, or Progressive Web App, is a web app that has been designed to look and feel like a native app. PWAs use modern web technologies to provide a fast and responsive user experience, even when offline. They can be installed on a user’s device, just like a native app, and can be accessed from the home screen. PWAs are becoming increasingly popular as they combine the best of both worlds – the accessibility and low cost of web apps with the functionality and speed of native apps.

Pros

  • PWAs provide a fast and responsive user experience, even when offline.
  • They can be installed on a user’s device and accessed from the home screen, just like a native app.
  • They are usually cheaper to develop than native apps, as they can be built using web technologies.

Cons

  • PWAs may not be able to access all of the device’s hardware and software capabilities, depending on the browser and operating system.
  • They may not be as feature-rich as native apps, as they rely on the capabilities of the web browser.
  • They may not be as well-known or trusted by users as native apps.

Single Page Application (SPAs)

A SPA, or Single Page Application, is a web app that loads a single HTML page and dynamically updates the content as the user interacts with the app. SPAs are fast and responsive and provide a seamless user experience. They are usually built using a JavaScript framework such as React or Angular and are often used for complex, data-intensive applications.

Pros

  • SPAs are fast and responsive and provide a seamless user experience.
  • They are often used for complex, data-intensive applications.
  • They can be built using a variety of JavaScript frameworks, which can make development faster and easier.

Cons

  • SPAs may not be as SEO-friendly as traditional web applications, as they rely heavily on JavaScript to render content.
  • They may not be as well-suited for content-heavy websites or applications.
  • They may not be as accessible to users with disabilities, as they rely heavily on JavaScript for interactivity.

Hybrid App

A hybrid app is an application that is built using web technologies but is packaged and deployed as a native app. Hybrid apps are built using frameworks such as React Native or Ionic and are designed to look and feel like native apps. They can access the device’s hardware and software capabilities, such as the camera or GPS, and can be distributed through app stores. Hybrid apps are a good option for developers who want to build a cross-platform app but don’t want to learn multiple programming languages.

Pros

  • Hybrid apps can be built using web technologies, which can make development faster and easier.
  • They can be deployed as native apps and access the device’s hardware and software capabilities, such as the camera or GPS.
  • They can be distributed through app stores, which can make them more discoverable to users.

Cons

  • Hybrid apps may not provide the same level of performance as native apps, as they rely on web technologies to render content.
  • They may not be able to access all of the device’s hardware and software capabilities, depending on the framework and operating system.
  • They may require additional development and testing to ensure that they work correctly on multiple platforms.

Native App

A native app is an application that is built specifically for a particular operating system, such as iOS or Android. Native apps are built using the programming languages and tools provided by the operating system, such as Swift for iOS or Java for Android. Native apps are fast and responsive and can access all of the device’s hardware and software capabilities. However, they are expensive and time-consuming to develop and maintain and may require separate versions for different operating systems.

Pros

  • Native apps provide the best performance and access to hardware and software capabilities.
  • They can be developed to look and feel like other native apps on the device, which can make them more familiar and trusted by users.
  • They can be distributed through app stores, which can make them more discoverable to users.

Cons

  • Native apps are generally more expensive and time-consuming to develop and maintain than other types of applications.
  • They may require separate versions for different operating systems, which can increase development and maintenance costs.
  • They may require additional development and testing to ensure that they work correctly on multiple devices and platforms.

Comparison

When comparing these different types of applications, it’s important to consider the specific needs of the project, as well as the budget and resources available for development and maintenance.

Web App

  • Web apps are a good choice for projects that require a simple and accessible solution, such as a basic business website or an online store. They are often the most cost-effective option, as they can be developed using standard web technologies and don’t require separate versions for different platforms. However, they may not be as fast or feature-rich as other types of applications, and they require an internet connection to function.
  • Web apps are generally the most cost-effective option, as they can be developed using standard web technologies and don’t require separate versions for different platforms. They also tend to have shorter development times than other types of applications, as they don’t require as much testing and optimization for different devices and operating systems.

Progressive Web App

  • PWAs are a good choice for projects that require a fast and responsive user experience, even when offline. They can be built using web technologies and offer many of the advantages of native apps, such as installation on the home screen and access to hardware and software capabilities. However, they may not be as well-known or trusted by users, and they may not be able to access all of the device’s capabilities, depending on the browser and operating system.
  • PWAs can also be cost-effective, as they can be built using web technologies and offer many of the advantages of native apps without the need for separate versions. However, they may require additional development time to ensure compatibility across different browsers and operating systems.

Single Page Application

  • SPAs are a good choice for projects that require a complex and data-intensive application, such as a dashboard or analytics platform. They offer a fast and seamless user experience and can be built using a variety of JavaScript frameworks. However, they may not be as SEO-friendly as traditional web applications, and they may not be as well-suited for content-heavy websites or applications.
  • SPAs can be more expensive to develop, as they require specialized JavaScript frameworks and may require additional optimization for performance and SEO. However, they can also offer a more seamless and responsive user experience, which may be worth the additional cost and development time.

Hybrid App

  • Hybrid apps are a good choice for projects that require a balance between the flexibility of web technologies and the performance and access to hardware and software capabilities of native apps. They can be built using web technologies and deployed as native apps, and they can be distributed through app stores. However, they may not provide the same level of performance as native apps and may require additional development and testing to ensure compatibility across multiple platforms.
  • Hybrid apps can be a good balance between cost and performance, as they can be built using web technologies and deployed as native apps. However, they may require additional development and testing time to ensure compatibility across multiple platforms.

Native App

  • Native apps are a good choice for projects that require the best performance and access to hardware and software capabilities, such as a game or a social media platform. They offer a familiar and trusted user experience and can be distributed through app stores. However, they are generally the most expensive and time-consuming option, and they may require separate versions for different operating systems.
  • Native apps are generally the most expensive and time-consuming option, as they require separate versions for different operating systems and may require specialized programming languages and development tools. However, they can offer the best performance and access to hardware and software capabilities, which may be necessary for certain types of applications.

Conclusion

Each of these types of applications has its own strengths and weaknesses. Web apps are easy to develop and maintain but may not be as fast or feature-rich as native apps. PWAs combine the best of both worlds and provide a fast and responsive user experience. SPAs are fast and responsive and are often used for complex, data-intensive applications. Hybrid apps are a good option for cross-platform development, while native apps provide the best performance and access to hardware and software capabilities.

Overall, the cost and development time for each type of application can vary depending on the specific requirements of the project. It’s important to carefully consider the trade-offs between cost, development time, and performance when choosing the best type of application for your needs.

Ultimately, the choice between these different types of applications will depend on the specific requirements of the project and the target audience.

At Stack Legend, we deliver IT solutions that work in enterprise environments with security in mind. Contact us to find out more about how we can help you choose the right technology and make your deployment go smoothly.

Stack Legend – We build the digital future.

https://stacklegend.com/

The post Comprehensive comparison of Web Apps, PWAs, SPAs, Hybrid Apps, and Native Apps appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/03/22/comprehensive-comparison-of-web-apps-pwas-spas-hybrid-apps-and-native-apps/feed/ 0
PM Illustrated – The Fun Site to Support Your PMP® Exam Studies https://prodsens.live/2023/03/07/pm-illustrated-the-fun-site-to-support-your-pmp-exam-studies/?utm_source=rss&utm_medium=rss&utm_campaign=pm-illustrated-the-fun-site-to-support-your-pmp-exam-studies https://prodsens.live/2023/03/07/pm-illustrated-the-fun-site-to-support-your-pmp-exam-studies/#respond Tue, 07 Mar 2023 15:02:48 +0000 https://prodsens.live/2023/03/07/pm-illustrated-the-fun-site-to-support-your-pmp-exam-studies/ pm-illustrated-–-the-fun-site-to-support-your-pmp-exam-studies

This is a guest post by Mike Griffiths. “Fun” and “PMP Exam” are rarely used in the same…

The post PM Illustrated – The Fun Site to Support Your PMP® Exam Studies appeared first on ProdSens.live.

]]>
pm-illustrated-–-the-fun-site-to-support-your-pmp-exam-studies

This is a guest post by Mike Griffiths.

Group of elephants working together

“Fun” and “PMP Exam” are rarely used in the same sentence. Too often, training materials are text-based, process-focused, and dry.

However, fun is a serious business in adult learning; it boosts retention and cuts study time. We recall facts about our favorite hobbies and sports teams much easier than boring information because our brains prioritize fun experiences for recall. This is why great trainers who can make a topic enjoyable are so valuable.

Visual learning

A brain filled up with orange colour

The other secret weapon in slashing our study time is Visual Learning. Research into visual thinking by David Hyerle, reports that 90% of the information entering the brain is visual. 40% of all nerve fibers connected to the brain are connected to the retina, and a full 20% of the entire cerebral cortex is dedicated to vision – so let’s use it.

Using a combination of cartoons, images, mind maps, and explanations, we can engage our brain’s right and left hemispheres to build stronger comprehension and better recall.

Tests show most people only remember 10% of what they heard three days ago. Add an image to the message, and this figure jumps to 65%.

Two brains, one filled up with 65% retention compared to 10% in the other brain as a result of looking at pictures

But why animal cartoons?

Because they are cute, funny, and memorable. The memorable part is valuable for exam preparation. Images that are surprising for the context, such as using animals to show project management topics, are “stickier” in our brains.

In the book “Made to Stick“, authors Chip and Dan Heath explain we remember things that are simple, unexpected, and emotional.

Animal cartoons about project management do all three.

Zebra with a group of horses

(Here, we see the herd welcoming zebra, who is a bit different, but it is all good.)

Our brains are lazy and filter out the ordinary or familiar. Recall vacations; the first few days are often memorable because everything is new and different. Then the last few days seem to pass quickly in a blur. Our brain skips the familiar stuff, presumably saving space for valuable fresh information.

To help us study for exams more effectively, we can trick our brains into marking everything as new, unusual, and needing to be stored away by associating it with the unfamiliar. 

Snakes crossing a river as a team

(Be the bridge to success for others)

The good news is you will find recall much easier. The bad news is you might try and thank a snake instead of avoiding it.

Chock full of games for PMP skill testing

Test your application and recall of critical topics through a wide variety of fun games. There are word games (crosswords, word search), sorting games (process steps, hierarchies), and quiz show games.

There are also badges to earn and collect to track your progress, with points and optional leaderboards if you want to gamify your studies.

  • See the big picture – Navigate the scope of the PMP Exam via three different roadmaps
  • Chart your own adventure – travel through the topics in any order you choose
  • Gamification – Track your progress by earning digital badges with voluntary leaderboards
  • Self Assessment – Check your understanding at the end of each module with quiz questions

Here’s the link: PM Illustrated – A Visual Learner’s Guide to Project Management – while it works on mobile, it works best on desktop devices.

Managing projects is anything but dull; studying how to do it should not be dull, either.


PM Illustrated book cover

PM Illustrated is also available in book format

Buy it as a hardback, paperback or get the Kindle version on Amazon.

This article first appeared at Rebel’s Guide to Project Management

The post PM Illustrated – The Fun Site to Support Your PMP® Exam Studies appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/03/07/pm-illustrated-the-fun-site-to-support-your-pmp-exam-studies/feed/ 0