Friday, January 17, 2025

Pushed First Code Commits of Frontend Work Done with Opal Ruby + Glimmer DSL for Web to My Job's Rails Web App Repo

I'm happy to report that I officially pushed the first Opal Ruby + Glimmer DSL for Web code commits to my job's Rails repo in the Admin UI last week. It is just amazing how Glimmer components written in Ruby to replace React components are way simpler and smaller! It's not even close! My productivity definitely feels double at least while producing about half the code. This is so exciting! It reminds me of the early fun days of discovering Ruby, but on the Frontend! There is so much potential and so many possibilities. It is super exciting to discover new patterns and best practices. Ruby creates so much programmer happiness compared to JavaScript! I literally volunteered extra time after work last week to refactor/fine-tune some Frontend components in Opal Ruby because it is SO MUCH FUN!!!! React's JavaScript code looks like ugly over-engineered over-complicated dinosaur code nonsense by comparison, it feels like writing Glimmer Ruby code is like waking up from a bad spell. I literally was so stupid to use React or any JS tech in the past 10 years when Opal Ruby was available (by the way, it has won a Fukuoka Ruby 2023 award). I would have never overcome my stupidity if I acted like I'm too important or too insecure to admit stupidity or if I lied to myself about it just because "an important person" at "a large rich important corp" said "React.js is good" without questioning it with my own brain, which is why I'm admitting it now. Using Ruby in the Frontend feels like that's the way things should have been 10 years ago if Rails was more creative and didn't bail out on us, Rubyists, by adding Webpacker temporarily for a number of releases instead of adding Opal Ruby as a default. Thankfully, Glimmer DSL for Web comes to the rescue for Frontend Development in Rails web applications. I am literally operating on a whole other level with it over everyone in the Rails community who are using JavaScript right now!

By the way, as far as how I convinced my bosses to use Opal Ruby + Glimmer DSL for Web at work, I did the following:

  • During off-work-hours (one weekend, mostly in one day), I built a work app POC (Proof Of Concept) of an Opal Ruby + Glimmer DSL for Web SPA (Single Page Application) by rewriting a sophisticated React page component that had a lot of interaction going on. I proved to myself first that Ruby code is so much simpler and better than JavaScript code.
  • As a Senior Software Engineer, I scheduled a short 15-minute demo with my teammates and the CTO to demonstrate a new better way of developing Frontends for our Rails web application that could cut down 12 months of Frontend Development work a year into 6 months. That huge difference in productivity got their attention. I prepared well for the demo, including anticipating questions for the Q&A period. When I did the demo, I made sure to show the Frontend code improvements using Ruby right away and to keep the demo short, like no more than 15 minutes. I had about 15 more minutes of Q&A afterwards because everyone was so excited to ask questions that we lengthened the meeting, and I made sure to provide good answers and not to cop out or naively fall in the trap of accepting negative narratives. I also provided a phased plan for how to implement Opal Ruby + Glimmer DSL for Web gradually in the codebase to manage risk in a Lean/Agile iterative incremental way by starting usage in the internal-facing Admin UI, and then 6 months later, using in the public UI in low-risk features, and 6 months after that, using in the public UI in high-risk features, and 6 months after that, rewriting all React JavaScript code in Glimmer Ruby (the actual phased plan might end up having a shorter timeline for transitions than that, but I had to provide the least risky plan first).
  • I scheduled another demo with the Director of Engineering after all my coworkers and the CTO told me they definitely thought Opal Ruby + Glimmer DSL for Web were interesting technologies. He asked me to prepare for him a comparison between the performance of Glimmer DSL for Web vs React. So, I used the POC that I built as a benchmark. It was to my huge delight that it ran ~33% faster in Glimmer Ruby than the React JavaScript version. After I gave the demo (including a performance sub-demo), the Director of Engineering was very impressed and told me he was OK with me integrating Opal Ruby + Glimmer DSL for Web in the week between the holidays and the start of the new year's work when employees get back from their planned vacations. That was last week.

By the way, my work app is not a vanilla Rails app as we are using Webpack using JS bundling for Rails, so I was able to surmount the challenge of integrating Opal with Webpack and finish the integration in about 1 day only. The deployed app loads pages instantly in our cloud Staging environment whether the page assets are JS files generated by Opal or Webpack, which is amazing! Ruby performance in the Frontend is absolutely good for our Rails web app even in a sophisticated SPA webpage.

Glimmer DSL for Web (open-source Ruby-in-the-Browser Web Frontend Framework) GitHub repo:

https://github.com/AndyObtiva/glimmer-dsl-web


Tuesday, January 07, 2025

Glimmer DSL for Web Now Officially Supports Rails 7.1 & 7.2

Glimmer DSL for Web (Ruby-in-the-Browser Web Frontend Framework) version 0.6.4 has been released! It now officially supports Rails 7.1 & 7.2 (Rails 8 support is planned for the future).

GitHub: https://github.com/AndyObtiva/glimmer-dsl-web

RubyGem: https://rubygems.org/gems/glimmer-dsl-web/versions/0.6.4


Happy Glimmering!

Friday, December 27, 2024

How To Spot Covert Discrimination in the Ruby Community

Covert discrimination is often hard to spot because it happens as personal microdiscrimination against one person or few people only without them belonging to a common minority group. As such, the people discriminated against are not protected by any minority group anti-discrimination measures, and are often abused without the abuse being detectable by outsiders because the abusing discriminators treat outsiders without discrimination, so they become none the wiser about the microdiscrimination happening against the one individual or few that are discriminated against.

That is why I wrote a guide on how to spot covert discrimination in the Ruby Community and beyond. It will be a live document that is always updated whenever new forms of covert discrimination are discovered. It is written from my experience working at both Canadian and US Software Development companies.

Forms of Covert Discrimination:

1. Treating The Majority Well: in order for covert discrimination to remain covert, it has to seem like the discriminators are very good well adjusted people who treat "everyone" with love and non-discrimination. So sometimes, discriminators will treat everyone very well except one or a few individuals in their team, company, or community, which are subtly treated in a very unloving, mean, and non-equality-conscious way. How easy is it to spot discrimination when 99%+ of people are not discriminated against? Not easy at all. In fact, this is a scheme that some discriminators at unethical companies use to basically milk one person out like the Golden Goose for the benefit of everyone else without returning the favor back to them, and every time that person is replaced, a new person plays the role of the "Golden Goose". 

2. Culture Fit: some companies do not see all people as equal human beings that could only be distinguished based on their merit (i.e. work performance and ethics). So, if they hire someone that they later find out they do not like by their non-equality-minded discriminatory biased inner standards, they chalk it up to a "bad culture fit" and fire that person, citing "culture fit" being the issue despite the fired person being very friendly, pleasant, and team-oriented while performing impeccably. Do not fall for this trap of covert discrimination. Companies have no right discriminating against anyone, and they could only fire someone if they did not perform well at their job or interacted in a bad way with others. If they fire someone for "culture fit" reasons despite the fired person not having done anything wrong, that is 100% covert discrimination masked as "culture fit". The only culture fit that matters is if the hired person has the right qualifications for the job or not, including how ethical and team oriented they are. Anything is else, like "not liking someone" for non-professional reasons despite them not having done anything wrong, is a lazy lame excuse to justify discrimination. Such companies sometimes practice this sort of discrimination because they were offering preferential treatment to employees that were not as qualified as the person who recently joined the company, and that person unintentionally made them look bad just by performing very well, so instead of requiring humility from the other employees in order for them to stop being envious and learn from the new hire, they end up punishing the new hire unfairly to go back into masking their preferential treatment for the older unqualified employees that the company discriminators grew to "like" for unprofessional reasons. 

3. Hidden Prejudice: some discriminators will discriminate against someone because they have hidden prejudices against them that they sometimes are unaware of. They see someone, and based on their look, that someone does not look like "an important person" to them. Even after they get to know that person and their job qualifications and past accomplishments, they still do not change their mind about seeing that person as "unimportant". That is because they do not treat everyone as equal and some people are just "unimportant" no matter what, due to internalized discrimination against their type of person. To them, it does not matter if that person has very good university degrees, has 10+ years of experience, has presented at important software conferences, has created and maintained very sophisticated open-source projects, etc... That person will forever be "unimportant" to the discriminators who have hidden prejudices against certain people just based on their looks or other petty reasons. This is a very bad form of covert discrimination because it is so covert sometimes even the discriminators are unaware of it. 

4. Emotional Dishonesty: some discriminators like to keep a "positive" facade at all times because they think it sells better to their clients instead of sharing the actual truth, so they train everyone at their company to be emotionally dishonest. To them, the impression of "positivity" that you put on your face is more important than how good your work is truthfully. The problem at such environments is when anything negative happens, it becomes a big elephant in the room that nobody could talk about, and remains there for months or years without ever getting handled. So, when a new hire joins such a company and discovers an extreme waste in productivity caused by one or several of those "big elephants" for so many years that everyone got used to them, as soon as they mention the negative truth, they are seen as "the enemy" and fired. Again, that is a form of covert discrimination because those new hires did not do anything wrong. They only pointed out what is wrong. They just pointed out the truth. And, yet they got punished for it. Another form of emotional dishonesty is combined with hidden prejudice. For example, a new hire joins a company because they met the company job qualifications, but afterwards, discriminators at the company realize they hate that person, and yet they "smile" every time they see them and they act as if "they're doing great". If that person does a bad job by mistake (everyone makes mistakes), the discriminators continue "smiling" and pretending "everything is fine", which puts the new hires at ease for artificial reasons instead of actually receiving normal work feedback that helps them improve their work performance. One day, the discriminators use that lack of improvement in new hires as justification to fire them, but only because they hated them since day one and were not willing to offer them the same feedback they offered other hires that they "liked" for emotional bias reasons unrelated to work. Again, that is a form of covert discrimination.

5. Double Standards: having double standards is common in non-covert forms of discrimination too, but it is a lot more subtle in covert discrimination. It can also be a form of indirect discrimination via preferential treatment for some people over others. For example, some employees are allowed to be loud and inappropriate at meetings and be late at delivering their work even though it is a general standard that all employees must be respectful at meetings and must deliver their work on time. For example, a company would allow someone to be mean to and unsupportive of their colleagues, but if any of the colleagues tried to defend themselves against that mean behavior, they are labelled as "the enemy of teamwork" while all the wrongdoings of the initial perpetrators who started the real wrongdoing against their teammates are ignored. Another example of this is a company that claims to have policies against discrimination, but they practice Ageism openly in their hiring practices without ever treating it as a form of discrimination. In fact, many companies (but not all) that claim to be "against discrimination" often do so with double-standards that mask covert discrimination. After all, if a company advertises itself as "against discrimination" that would make everyone believe at face value that there is no discrimination going on there when in fact there might be some very bad forms of covert discrimination going on at such companies (though not all of them).

6. Fake Love: in order to keep a facade of love for everyone, including people that are discriminated against, discriminators would provide the people discriminated against with a false exaggerated form of "love" that belittles them with baby-talk as if they are helpless little children that could not succeed with anything on their own. I am not talking about offering sincere help to someone who asked for it. I am talking about forcing "help" just to make someone look bad no matter how many times that person proved themselves with past good performance and how many times they tried to say they 'don't need any help' because they did not truly need it. And, that is while discriminators treating everyone else normally as mature empowered adults who do not need their help unless it is asked for. This is another form of covert discrimination.

7. Unavailability & Lack of Interaction: some discriminators will make themselves available to most everyone except one person or a few people in their team, company, or community, with which they will feign lack of availability or will be extra lazy towards respectfully providing them with availability, often as a result of personal prejudices and biases against the people discriminated against. If the problem is brought up to the discriminators, they will avoid discussing the problem and pretend "everything is fine" and they are just "busy as usual". Again, that is a form of covert discrimination as those discriminators do not treat everyone that way.

8. Lack of Sympathy: some discriminators will treat some people as if they do not have human feelings like all other human beings. They will be very cold and distant towards them while putting on a pleasant face to everyone else. The people discriminated against never did anything wrong, so this is a form of covert discrimination against them.

9. Not Owning Up To Error: discriminators will often continue their discrimination even after it is pointed out to them because they do not like owning up to their error like mature adults, yet instead, they like to offer lame excuses like children. Obviously, no good work ever got done with lame excuses, but still they insist on offering lame excuses instead of addressing covert discrimination.

Now, let us wrap up by providing a legend of terms used in this article.

  • Covert Discrimination: discrimination that is done covertly to escape detection
  • Microdiscrimination: discrimination that is done to one person or a few people only, often not sharing any commonality in a minority group that could offer them protection
  • Personal Discrimination: discrimination that is done to one person only. This is often the most difficult kind of discrimination to detect because there are no other people that could report the same experience as the one person being treated with discrimination.
As mentioned before, this is a live document, so it will be updated whenever new information about the topic is uncovered.

Expect covert discrimination numbers 7, 8, and 9 to be practiced by discriminators who read this article. 

Please share this document with everyone to spread awareness of the problem of covert discrimination, especially if you have experienced any form of covert discrimination yourself. 

Thursday, December 26, 2024

Wednesday, December 25, 2024

Glimmer Hangman (RubyConf 2024 Hack Day App)

During the RubyConf 2024 Hack Day Event for Glimmer DSL for LibUI, which was associated with the RubyConf 2024 workshop "How To Build Basic Desktop Applications in Ruby", I started the implementation of Hangman, the word game, in Ruby as a GUI desktop app. Well, I am happy to announce that I finally worked on it again yesterday and completed it, releasing version 1.0.0! And, it's implemented with some of the most amazing Ruby code! Just install the `glimmer_hangman` Ruby gem and run the command `hangman` and you'll have the game running on your machine instantly!

Project GitHub:

https://github.com/AndyObtiva/glimmer_hangman

Ruby Gem:

https://rubygems.org/gems/glimmer_hangman

I am including the project README and code below.

Merry Christmas!

Project README:

Project Code:

app/glimmer_hangman/model/game.rb

app/glimmer_hangman/view/hangman.rb

app/glimmer_hangman/view/hangman_scene.rb

app/glimmer_hangman/view/hangman_guess.rb

app/glimmer_hangman/view/hangman_guessed_letters.rb


Friday, December 20, 2024

Software Engineering Soft Skills: How To Receive Feedback

When a good Software Developer is called out on an actual mistake or subpar performance, they immediately say "Thank you for your feedback!", they own up to their error by apologizing, they do some introspection to understand how they failed and empathetically become aware of the impact their mistake/subpar-performance had on their customers and team, they genuinely ask for help if needed to understand how they could do better, and they resolve to improve.

When a bad Software Developer is called out on an actual mistake or subpar performance, they immediately get angry and defensive while seeing feedback providers as the "enemy", they avoid owning up to their error by making lame excuses and lying about the situation, they express apathy towards understanding how they failed, selfish lack of empathy, and lack of interest in becoming aware of the impact of their mistake/subpar-performance on their customers and team, they think they are above the need for help, and they do not put any effort into improving.

Remember that giving people honest unfiltered feedback after they made a mistake is the nicest most loving thing one could do for them as it helps them become aware of whether they need to improve or they are on the right track. Feedback has the positive intention of helping someone improve regardless of whether it is negative or not. When people discourage honest feedback or want filtering of it (like adding an emotionally insincere "positive" tone), they end up stagnating in mediocrity and never improving because they never get the full impact of their mistakes on their customers and team. 

I never trust anyone who doesn't immediately say the equivalent of "thank you" and shows genuine concern when receiving feedback, whether harsh or not. In fact, that is the biggest difference maker between top performers and average performers is that top performers will accept any sincere feedback no matter how harsh it might be, so they end up improving many times over average performers. That is also the difference between how mature adults and children handle feedback. Children cannot accept any feedback, which is why parents 'baby-talk' them. On the other hand, mature adults can accept the truth in any way, shape, or tone. If someone needs 'baby-talk' privilege, they are not qualified adult hires in the first place.

In summary, everyone makes mistakes; nobody is perfect. And, the nicest most loving thing to do when people make mistakes is to provide them with honest unfiltered feedback to help them improve. But, the difference between good Software Developers and bad Software Developers is that good ones own up to their errors and correct them whereas bad ones do not own up to their errors and never correct them.

Thursday, December 19, 2024

Video for RubyConf 2024 Workshop "How To Build Basic Desktop Applications in Ruby"

The video for my RubyConf 2024 Workshop "How To Build Basic Desktop Applications in Ruby" has been released:

https://www.youtube.com/watch?v=TTSqRdTVtDY

This video is not only useful to Ruby Developers who want to learn how to build basic desktop applications in Ruby with the Fukuoka Ruby 2022 Award Winning Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library), but also to Rails Developers who want to build Rails productivity tools as Ruby gems (e.g. the rails-gui gem offers a user-friendly fast GUI for rails routes), leverage all the awesomeness of Glimmer in the Frontend of Rails applications 🤯 (in the workshop, I mention a new Glimmer DSL for Web that has all the features of Glimmer desktop gems tailored for Rails Frontend Development), and improve their skills in Object Oriented Programming, Software Architecture, and Software Design in general, like how to apply MVC (Model-View-Controller) & MVP (Model-View-Presenter) correctly to improve productivity and maintainability, instead of doing things the Rails MVC way, which is not completely correct. 

Here are some interesting requests I received from attendees at RubyConf 2024:

  • Write a book about how to build GUI Desktop Applications with Ruby (I actually started writing such a book about 4 years ago, but then got pulled into building Glimmer DSL for LibUI and winning a Fukuoka Ruby 2022 Special Award for it; the book is still a great idea! I will keep it in mind.)
  • Build a code editor that supports live GUI updates (I blogged more details about this topic here: https://andymaleh.blogspot.com/2024/12/the-dcr-kids-programming-language.html)
  • Build a Glimmer DSL for DragonRuby to simplify Game Development with a Ruby DSL

Also, during the follow-up RubyConf 2024 Hack Day Event, we got to build Hangman and a Hockey joke AI app.

Happy learning!

Here is the GitHub repository with the workshop code exercises and test solutions:

https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby/tree/rubyconf2024

Here are the workshop presentation slides:

https://docs.google.com/presentation/d/e/2PACX-1vSAaFLYeyolSy2Qe2tW0djv78tA-m120i4DJyaJ4qAHoWpv5Xppn_-yIpg4_IAGntetZkRDkkuT2zXN/pub?start=false&loop=false&delayms=60000&slide=id.g140fe579a5a_0_0