What do I Learn – Polyglot Programming – Week 2

This week I’m going to have the opportunity of taking off my comfort zone and try new things and gain new abilities. I will try to make a code challenge in a new language for me (Kotlin). 

Also, I will continue developing my social skills as a developer and figured out my personal goals for my future career as an engineer. 

Building a safe space for everyone 

As software developers, we are doomed to work in teams, no one can be alone in their own cave and be successful. 

That’s why we should be aware of the environment that we provide to our team, we are different people with different beliefs, lives, and perspectives. Helping to make a safe space on the team helps every member to be themselves without any preoccupation. 

Also, when someone needs some emotional support, we need to be careful with what we say and know the difference between empathy and sympathy. 

Empathy is the ability to take the perspective of another person, staying out of judgment. Empathy is feeling with people. Sympathy on the other hand minimizes the problems of the other, you should be very careful and never respond to a personal problem with a phrase that starts with “Well, at least…”. 

We as humans make groups in order to survive and we often think that the “others” are the enemy. We put people in label boxes that define the expectations that we have with others. 

This is a powerful weapon because stereotypes are prophetic. 

We need to start to treat others as they are, humans, no matters what they like, look, or believe. Is not about like, is about respect and trust 

Genius people don’t exist 

No person wants to appear stupid in front of others, it’s just human nature. We think and we want to be like the famous programmers that know everything and never make mistakes. 

But the truth is that none of those things exist and even that mentality takes us away from our real purpose: learn and become better. 

We don’t have to be afraid of failure or try to hide our mistakes. We need to learn about them, be iterative persons, this not only makes us better and better learners it also shows our progress and improvement. Don’t fall into the trap of the ego. 

Software development is experimentation, and experiments can fail. 

Also, we need to share with others our projects, we cannot just work alone in a cave, waiting for the moment to have a brilliant program that changes the world. We need to take perspectives from other people, criticism is not evil, we need to be influenced by other minds and be open to change. 

Before you leave this article and go to GitHub and share your open-source project, you should be aware of the timing for sharing your code with the world. 

Not too early, people can mess up with the bases, take a different direction that you have in mind, and end with an undesired different program, but not too late, what’s the point to work in something that is almost done? 

The phases of experience  

We have modern computers, modern programming languages, but bugs are still the same because there is a thing that hasn’t changed: humans. 

We all want to improve, companies want that their employees improve, but before that, you need to first know yourself and know which state of knowing you’re in because base on that you will have different necessities to improve. 

  • Don’t try to race sheeps. 
  • Don’t try to herd race horses. 

1.- Novice: 

Need short-term goals and success. 

2.- Advanced beginner: 

Starts trying tasks on their own, but cannot do everything and sometimes need help. 

3.- Competent 

Troubleshoot problems on their own, focused on more long-term goals, and seek out expert user advice. 

4.- Proficient 

Want to understand the larger conceptual framework and ask why to everything. 

5.- Expert 

Are a primary source of knowledge and information, have curiosity for new things, and work primarily from intuition, not reason. 

Most people get stuck on level 2, here are some recommendations for continuing forward: 

  • Experience makes us valuable. 
  • Have a plan. 
  • Diversify: this is like an investment, invert on learn popular languages (safe investment) and also learn something new that not much people know about (high risk/return investment). 
  • Practice regularly. 
  • Look for value. 

Agile methodologies 

Agile methodologies are characterized by doing little increments or iterations, make little cycles in a short period of time. The main objective of this is to have a quick response to change. 

Nevertheless, we need to be careful when we use it, agile means learn from the mistakes, be better and change things, but most people working with things like scrum tend to make a routine where nothing changes. 

Agile is not a loop. 

An agile mindset 

There is only one way to reach your objectives and is effort. Some people things that successful people only have talent and that’s why they have success and effort is for people that “don’t have it”. 

It’s easy to change from an effort mentality to a fixed mentality and vice-versa, but only the effort mindset can help us to improve. 

Since the fixed mindset wants to be in a comfort zone, where are no stranger things, new challenges, or risks. 

We also need to be careful with making only positive feedback, it can cause someone (or ourselves) to get into a fixed mindset, people that think that they are already perfect won’t take any further risk in order to avoid ruin that reputation.  

Perfection is an unrealistic goal 

Learning and being better is not just trying hard all day and night. Working 16 hours a day is only to give you stress and headaches. 

As an IT, your energy, focus, and cognitive thinking are critical, so it’s important that you focus on a specific problem or task and not switch from a primary task to a secondary task. 

After, you need to take a break, remember as in the last post, thinking is not just concentrating, your brain needs a break to enter on the defuse mode. 

Organizational manipulation 

Companies are made of people; you need to know how to navigate them. 

There is a model of the ideal companies where people can question things, are communicative, takes risks and everyone acts like an adult. 

Unfortunately, in a minor or major way, companies don’t fit in this style. Maybe you cannot change an entire company on your own, but you can make little manipulations to make things happened: 

  • Ask for forgiveness, not permission. 
  • Fight choose. 
  • Sneak ideas in. 
  • Don’t destroy, replace. 
  • Work promotion ladder. 
  • Manage upward perception. 
  • Use favors economy. 
  • Find influence. 
  • Don’t mess with administrative! 

The best programing language 

Besides the obvious answer that there is no perfect programming language, there are several aspects of every language and project that you should have in mind at the moment of choosing one. 

  • Productivity – How fast can prototype. 
  • Performance. 
  • Reliability – How predictable is the language. 
  • Portability – Where you are going to deploy your application. 
  • Community – People you can ask if you have a problem. 
  • What do you already know. 

Performance matters

Often as developers, more as web developers, we don’t pay the proper attention to the mobile performance of our services. The mobile is the present, web mobile should be optimized for mobile devices. 

Those are 3 pillars of the performance: 

  • Network: Optimize critical path. 
  • Render: Reduce the number of paints. 
  • Compute: Reduce JS execution time.  

Critical path: The assets, size, and time to solve and paint the first pixel. 

Number of paints: Be careful dealing with the DOM, if it’s updated, the device needs to repaint the entire page. 

The JavaScript code can provoke skip frames on the render if it is not optimized properly. 

Fortunately, there are some useful functions built on most web browsers that can give us metrics to know how good or bad a web page is optimized. 

Network: Network tag – Watch the number of requests and size of the page. 

Render: Timeline tag – Click the record button and reload the page. 

Compute: Profile tag – Collects the CPU data. 

Compressor head 

Now in our days, we deal with a big amount of information, besides our computers can handle those big chunks of information, for the final user and the mobile users are more convenient if we compress the size of the things. 

One of the easiest methods of compression is the Huffman Tree, it is based on what is the probability of having a symbol on a string and assigns the more used symbols with fewer amount of bits. 


Huffman Code | Brilliant Math & Science Wiki
Hoffman Tree

However, the most used algorithm to compress data is the family of LZ77 and LZ78. 

Instead of compressing every symbol alone like the Huffman Tree, LZ77 makes groups of symbols, it searches for patrons on the string of symbols and makes a token for each group. 

A Comparative Study Of Text Compression Algorithms

Some programs that use those algorithms are: 

LZSS: WinRar. 

LZMA: 7zip. 

And finally, is the Markov Chain compression, which is a mathematical system that focuses on transitions from one state to another. 

This is characterized as memory-less, such the state depends on the current state and not that of the sequence of events. 

Each state is a final symbol, assign bit codes to the transition between the states, some states can be implicit. 

Cadena de Márkov - Wikipedia, la enciclopedia libre

Everything is a remix

Many may think that the great geniuses and inventors created everything from nothing, but the reality is that all new creations need something to be based on. Creation requires influence.
It is since we are learning something, nobody starts original, we learn by copying, copy is build our knowledge and understanding.
The 3 pillars of create new things are: copy, transform and combine.

Code Jam in a new language 

As part of this week’s challenge, I had to do a google code challenge using a programming language that was totally unknown to me. 

As part of this week’s challenge, I had to do a google code challenge using a programming language that was totally unknown to me. I select Kotlin for this exercise, besides all the syntax and general functionality of the language, I learn that all programmers have a logic menu of what we can do and program. 

For example, I don’t do this code challenge fast as if I selected something I already knew, but I know how to program the solution at an algorithm level. 


Leave a Reply

Your email address will not be published. Required fields are marked *