Prelude

This is a twin post of – I guess –a good onethat I wrote a long time ago: I was justsurfing the blogthinking about all I would like to do, and I came to my old thoughts. I was curious, you know? so I read it, and read it once again, I reflected a bit on it – and I found itinspiringin a sense: even better, I would say I found myselfsurprisedto agree with myself of almost 1 year and a half ago, in most of the things I wrote. For me, it was an important moment because it has been like a kind ofretrospective. This is the reason I wanted to give this newlifestyle-kind-of postjust the same title as his father. Like:I’m still learning. Or even better:I’m still learning – Revenge of the Fallenbut I wanna warn you, once again – this is a deeply full-of-truth-and-complaints post – ok no, just kidding. This is more kind of a story, in five Chapters.

jobs

Chapter I – About companies

In the last year, I still fought against the processes. But this time, let’s analyze the things from a mathematical perspective – because today if you don’t speak about data and models, nobody hears you. Let’s give the theoretical machine learning definition of a modern AI company: a modern AI company is a WUG – a.k.a. an Weighted Undirected Graph – that links at least three different families of nodes – Employees, Processes and Projects – in a chain of skills, troubles, goals, beers, prizes, achievements, careers, promotions, pizza, parties, lies and God only knows what else, with the overall goal to solve (or introduce) dependencies, investigate (or ignore) consequences but, by the end of the day, feed the so hungry desire to “change something” – also referred to as “bring something in production”. Unfortunately, before going ahead we need to provide a formal definition of a WUG – sorry, a Company. Thus…

Formally, we define a Company as a pair:

where:

  1. is the set whose elements are called vertices or nodes, that can be of three kind, with:

     – refers to Projects with cardinality the budget of the year;

     – refers to Processes with cardinality the cost of Service Now;

     – refers to Employees with cardinality the headcount allowed by HR;

  1. is the set of two-sets (set with two distinct elements) of vertices, whose elements are called edges, that link together the nodes (Employees, Processes and Projects). Even if there’s no formal demonstration, some studies suggest the cardinality of is strongly influenced by the cardinality of , the budget, the headcount, andGod only knows what else;

Furthermore, our Company is a WUG and in aWeighted Grapha number, the weight, is assigned to each edge. For the moment, it’s sufficient for you to have in mind that such weights, in graph theory, might represent for example costs, lengths or capacities, depending on the problem at hand. Also, we canignorethe formalization of the three different kinds of nodes, but not completely, because I will get back on it later. There’s a name for structures that arealmost like thisand it’s funny because are calledForests. Confused? No worries, it’s because you’re still not a good Employee 👀

The Good Employee, a story about how you can explain companies with graph theory 1

Chapter II – About employees

Ok, so in a digital Forest like the one just described, you cannot move with weapons to defend yourself against pumas – or whatever else lives inside a real forest with the desire of eating you and your backpack full of energy bars. Instead, the good Employee inside the WUG. Sorry, the Forest. Sorry again, in the Company, uses his ability and applies the Prim’s algorithm. Now, before going ahead, it could be useful to remind some concepts about graph exploration.

The Prim’s algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. The fact is,the good Employeeis really good in this kind of exploration, even if (s)he sucked in the exam of Algorithm and Data Structure. What does exactlyfinding the minimum spanning treemean? The following is the best explanation I can provide – I hope it will be clear, if it’s not please don’t blame me, I’m a bad Employee.

Finding the minimum spanning tree means finding a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized.

Clear? If I didn’t lose you already, you should now ask yourself “What the hell these weights refer to now?!”

For the sake of truth, I mentioned the weights before, without explicitly saying these were the weights. I will list them with names and values. Imagine the weights as fixed distinct discrete values – with names, because it’s easier to reasoning over names than values. I chose to put the values in the range [-50, +50] with a step of 10 because it’s my article and I do what I want. To be also compliant, I would avoid giving value to some of the weights: it’s up to every good Employee to look into his/her heart and put the value for them. There’s also a Positive Value column: basically, it’s built by shifting the Real Value column in the positive range [0, +100]. This is only because many of the algorithms that operate over graphs need positive weights: I keep it also the negative ones for small reasoning after the table.

IdWeights Enum NamesReal ValuePositive Value
01SkillsNaNNaN
02Troubles+30+80
03Goals-20+30
04Beers-30+20
05Prizes-500
06Achievements-30+20
07CareersNanNan
08PromotionsNanNan
09Responsibilities+30+80
10Pizza-15+35
11Parties-25+25
12Meetings+10+60
13LiesNanNan
14God only knows what elseNanNan

Of course, you can add as many weights as you want. The first thing to note, if you consider the Real Value column, is that we want to minimize the overall cost ofspanning the projects, and this explains the positive values – something like troubles need to be avoided because who wants troubles?! – and of course prizes, goals, achievements are the things every good Employee would like to gain/reach/obtain, and this explains the negative values. Responsibility? Who wants them? It’s better having pizza, parties, and meetings – ok on the last wait, it depends. Got it? 😉 Back to the algorithm, we defined what the Prim’s algorithm does, but we didn’t explain how it works. Well, let’s see the algorithm.

The Good Employee, a story about how you can explain companies with graph theory 2

Chapter III – About the algorithm

The Prim’s algorithm works by building this tree one vertex at a time, from an arbitrary starting vertex, at each step adding the cheapest possible connection from the tree to another vertex. It’s really good actually because it’s

  • greedy, because it evaluates each time the best local solutions without questioning the previous choices;
  • exact, because it provides a precise solution for each instance of the problem without making rounding or inaccuracies of any other nature;
  • optimal, because it’s used by the good Employee. Just kidding, it’s because it presents the best solution (or, one of them if they are more than one);

Anyway, the algorithm follows this steps:

  1. Start with a Company;
  2. Choose an Employee node;
  3. Choose the shortest edge from this Employee and add it;
  4. Choose the nearest vertex not yet in the solution;
  5. Choose the nearest edge not yet in the solution, if there are multiple choices, choose one at random;
  6. Repeat until you have the minimum spanning tree;

If you remember, in the beginning, I said: “We have three different kinds of nodes: forget about this for the moment”. Ok, now going back to this assumption, what we gonna do is actuallychange the Prim’s algorithm, in particular, the behavior of step 5, to enables priorities and be moreCompany-compliant. Thus, we wanna have a procedure that collects as much as possibleProjectnodes, without touching a lot ofEmployeenodes, and always trying to avoid as manyProcessesnodes as it can – but ATTENTION PLEASE!!! thisdeeply dependson the kind of interpretation you wanna give to the weights, theEmployeenodes andGod only knows what else. In the good Company, it seems that collecting the rightProjectnodes give more direct benefits than deal with the wrongEmployeenodes, by passing through trickyProcessesnodes: what a coincidence 🤔

Let’s write the procedure to implement the Extended Prim algorithm – the good Employee variant.

minimum_spanning_tree=empty_set;
visited_nodes={1};

# go ahead until the all the node are visited
while(visited_nodes!=minimum_spanning_tree)

   # create the arch
   letnew_arch(u, v)=the lowest cost edge | 
        u ∈ visited_node and
        v ∈ minimum_spanning_tree - visited_node
       # this is the change introduced.
        with priority given to u by following the order
       [Project, Employee, Process];

   # add it to the minimum_spanning_tree
    minimum_spanning_tree=minimum_spanning_tree ∪{(u, v)};

   # mark the node as visited
    visited_node=visited_node ∪{v}

Back to the structure, now that the Company is formalized, the vertices are defined, the links between them are weighted, and the algorithm is presented, I think we can make an example and hopefully we will start the light at the end of this crazy tunnel. Let’s draw a Company .

The Good Employee, a story about how you can explain companies with graph theory 3

Ok, to keep things simple, since we have a Company , let’sisolatesome entities as shown in picture below. We choose an Employee node: let’s take the Employee n.3 (Emp_3). (S)he knows that work on Project B (Pj_B) could change his/her career in better (weight_ID: 07 Careers. It’s…how much? -30 (+20)? Or +30 (+70)? I think it depends on Employee n.3’s life priorities) but (s)he has to accept (s)he will need to go through the Process n.2 (Pr_2), that will cause a lot of troubles (weight_ID: 02 Troubles). (S)He also knows thatcollaborationwith Employee 1 (Emp_1) will require a lot of meetings (weight_ID: 12 Meetings) andGod only knows what elsewill happen if (s)he will go for the Project A (Pj_A) (weight_ID: 14 God only knows what else) instead of Project B (Pj_B). Since each good Employee populate his/her Company with weights the overall idea should be clear.

The Good Employee, a story about how you can explain companies with graph theory 4

Chapter IV – About the Employee n.15

Now let’s create an agnostic example and put some random weights: I also put some integer labels to all the nodes… because I’m not a good Employee and I need help in executing the Prim’s Algorithm. This time, let’s play the role ofEmployee n.15: (s)he has to find thisminimum spanning treeinside this piece of Company to make things work.

The Good Employee, a story about how you can explain companies with graph theory 5

Let’s follow the Prim steps one by one using the labels we put and this magic library calledthe Good Employeeon Github. I used it with the following.wug(Weighted Undirected Graph) file I prepared to get the correctminimum spanning tree. So fuck you,Employee n.15🤟

1 3 20
1 6 35
3 2 20
2 4 30
2 7 60
4 7 20
4 6 1
6 5 15
6 9 15
6 10 20
9 10 55
7 9 10
7 8 80
10 11 60

Ok so, let’s analyze the goodness of theEmployee n.15step by step.

StepTheEmployee n.15’s mindTheminimum spanning tree’s choices
1At the very beginning, theEmployee n.15has no choice: (s)he has to complete theProcess 1to join the rest of the network in the Company. Only by chance, this process is not one of the worst, and it will cost ton.15a good +20, that isnot bad– if (s)he doens’t collect even three stars in the upper right corner of the screen.The Good Employee, a story about how you can explain companies with graph theory 6
2To gain the chance on working onProject A, then.15needs toask for helptoEmployee n.1, even if (s)he will cost him/her a favor. Beside that, (s)he already has a +40 but no other paths could be taken :/The Good Employee, a story about how you can explain companies with graph theory 7
3At this point, then.15can finally go straight and conquer theProject A. This costs him/her so much less than follow theProcess n.2, that is based on Service Now and doesn’t bring anything good because – remember the lesson – if you wait for things happening inside Service Now, you will be stucked FOREVER. Even at the same cost, (s)he would have preferred Projects in any case, because they are more valuable than Processes – remember we are running the Extended Prim we introduced before.The Good Employee, a story about how you can explain companies with graph theory 8
4Unfortunately,Project Ais a complete mess. Nobody knows anything, nobody has ownership of things and nothing is working since the beginning of time. Butn.15is really good and (s)he knows it doesn’t cost a lotworking withEmployee n.13: in fact,n.13is an intern and (s)he’s given for free. In any case, for the same cost ofEmployee n.13(s)he would have preferred even paying a contractor just not to go through theProcess n.2.The Good Employee, a story about how you can explain companies with graph theory 9
5To respect mandatory company policies, the internn.13has to follow theProcess n.3that is long, useless, and time-consuming. What a shame: (s)he will really like to join the Company ?The Good Employee, a story about how you can explain companies with graph theory 10
6The fact is, working withEmployee n.13has some side effects: in fact, sincen.13has nothing to lose, (s)he prefers going for a coolProject Beven only to finally start being paid for his/her services.n.15accepts thatn.13is working 30% of his/her time inProject Bbecause – the hell –itwas given for free XDThe Good Employee, a story about how you can explain companies with graph theory 11
7…10And so on until the last node is visited. With overall cost of 271.The Good Employee, a story about how you can explain companies with graph theory 12

Chapter V – About the minimum spanning tree

We spoke a lot about the minimum spanning tree, but it’s actually the only entity I didn’t explain inside the Company . If you didn’t get it, I already defined even this one… remember the definition of the modern AI company, that is a WUG – a.k.a. an Weighted Undirected Graph – that links at least three different families of nodes – Employees, Processes and Projects – in a chain of skills, troubles, [..] and God only knows what else, with the overall goal to solve (or introduce) dependencies, investigate (or ignore) consequences but, by the end of the day, feed the so hungry desire to “change something” – also referred to as “bring something in production”. The latter is exactly the meaning of the minimum spanning tree: the “let’s work on something”, that drives every good Employee in the hard path of solving or introducing dependencies (like SAP), investigating by ignoring consequences (it works, don’t touch it) but, by the end of the day, being able to say “I brought some changes” – that is translated in(S)He brought something in production.

And in a moment, somehow, I understood how every employee finds her/himself in this network of entities, and has to deal with all of them in a sense, better, (s)he has to take a realdirection, buildingthe spanning tree, that it’sminimum, and this is… well, bad. I have this feeling every good Employee of every good Company is not so a good Employee by acting like this: yes, some of them applyDjistrka(the original one, be careful) to go straight to the point, but by the end of the day they just wanna execute, avoid, survive, conquer, always by respecting the majority of the beliefs, but first always having someone or something else taking care of their shit. I think a Company should act by taking into consideration thisgood Employees’ attitude. Because, the result is that nobody is able to deal with a world that is changing to fast, but is super good in graph exploration. Moreover, there is always someone who knows more than someone else, on this, on the other, who is more suitable than someone else.

This state of confusion leads to the fear of hiring people who are not expert in something, that is not able to solve company’s actual problem: that problem arose yesterday, come out months before, without nobody looking in the right direction, because theminimum_spanning_treerules them all. Year after year. Again, maybe I am a dreamer, but I think it’s more interesting having someone with some interests and put him/her in the condition of learning how to solve problems in his/her field of competencies, instead of having people teaching or delegating all the time. Someone with the will of change (her)himself, instead of someone only able toexplore the graphand yes, by the way, once again, this basically concerns how the people are chosen.

Ok, recruiters, you could be or not part of The company, but you are of course part of A company, I guess. Listen to me: it’s not a matter of what a candidate can do, what he has done or he’s actually doing: the employee should be evaluated more on how much they can learn and how fast they are in doing it than on how much they know and how much they can already do. Even my professor of Maths was not able to resolve the problems – at least, not so fast as its students – that he proposed to us after so many years of teaching. He has an incredible background, plenty of logic, theorems, fundamentals, etc. But he’s not a machine: people forget things. The point is: how much fast are you in re-learning something? This what you should look for: evaluate people to hire – but also, and mostly (I guess)already inthe company – to find out if they are still interested in learning, in what they do for the company, and eventually why, if they are not anymore. The willingness to learn should be the ONLY choosing driver because the knowledge is ephemeral, the curiosity is not.

The Good Employee, a story about how you can explain companies with graph theory 13

Epilogue

What can I say to conclude: in the age of flexibility, immutability, scalability, veganability, accountability, and everything else you can find in a job-post that doesn’t coincide with the name of a Pokemon I can only wish you “Good exploration, explorers!”. Unfortunately, I always hated graph theory and the exploration of data structures of any kind.

Bye bye

Read More

LEAVE A REPLY

Please enter your comment!
Please enter your name here