Wednesday, April 24, 2019

Reuse: 16 ways to find elements in Chrome browser

I totally forgot that jquery could be used in the Chome console panel until I saw a mentor do this during a demo.

Here's a blog on quick tips to find elements in Chrome browser.
https://www.telerik.com/blogs/16-ways-to-search-find-and-edit-with-chrome-devtools

Review: Ebay vs Amazon on dominating e-commerce

This is an old article, but worth a read considering the mega competition in e-commerce. It's almost year 2020 and it's insightful to see how two e-commerce giants compare: Ebay vs Amazon.

However, there are other international e-commerce companies on the rise. Even Amazon pulled out of China recently due to its competition in the Chinese market like Alibaba and JD.com. In the world of business, everyone knows China's economy is still on the rise and becoming a major competitor to the American economy.


Read Articles


  1. https://www.webretailer.com/lean-commerce/ebay-vs-amazon/#/
  2. https://pandaily.com/amazon-quits-china-market-another-u-s-e-commerce-giant-failing-in-china/

Reference

Review: Facial Recognition by Airlines via Government Data

I'm sparked with many thoughts from reading this article. I would have been shocked like, the passenger in the article, if asked for my face to confirm my seat to on-board the flight. From a technological perspective, does it resolve the seating conflicts that sometimes still occur due to the facial recognition technology (i.e. two faces can't have the same seat)? From an ethical perspective, what other data is known about me with the airline and how else is the airline using it?

As I think more about it, what laws are in place to protect my rights as an American citizen upon my re-entry into the country (via Custom and Borders Protection).

Furthermore, is the government making money using my personal data? What are the security protocols for passing my private, personal data across government organizations? Will people start lying about their identity because of this data exposure without individual's consent?

The author makes some powerful points here that should be heavily considered. We need to apply the same questions to all organizations storing our personal data, and not just Facebook. Especially, the government. And, Congress needs to upgrade their process in getting things done for the people. The people can no longer tolerate Congress's slowness and ineffective methods used to protect the people of America.

Read Article

https://www.zdnet.com/article/facial-recognition-creeps-up-on-a-jetblue-passenger-and-she-hates-it/



Lastly, I'm thankful for JetBlue being responsive and transparent in answering MacKenzie's questions. This is the kind of customer service and trust that people need from private companies.

Monday, April 22, 2019

Review: Pyodide (Python in the Browser)

Although I'm not experienced in Python (at this point), I continue to keep watch on the advances the Python community is making. Like staff data engineer Mike Droettboom says, "a standard Python interpreter that runs entirely in the browser" will dramatically improve the game of data computation on the web.

Read Article

https://venturebeat.com/2019/04/16/mozilla-details-pyodide-a-project-that-aims-to-bring-python-to-web-browsers/

In-Depth Article by Mozilla

https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/

Other like-tools

Existing projects trying to address the current data engineering problems with the browser:

  1. Transcrypt
  2. Brython
  3. Skulpt
  4. PyPyJs

Wednesday, April 17, 2019

Refresh: Not a Number (NaN)

Today I answered the question from Enki on NaN (i.e. not a number). I failed (along with 40% of other developers).


My failure could be due to my lack of experience using NaN. Nonetheless, here's the explanation by Enki.


Wow, I never knew that there was an IEEE 754 standard corresponding to the NaN value. So naturally, I had to learn more because the simple explanation from w3schools was insufficient and I never ran into a case where I had to examine NaN === NaN or even NaN == NaN. Since I already knew what the comparison operator (equal type, equal value), I thought it could apply the same understanding as with the null object and undefined constant (see JavaScript data types).



But, I didn't see any quick examples from w3schools (my main online reference for quick understandings on standard web languages). Before I start digging, I refreshed my understanding from the quick lesson JavaScript's Numbers and now notice this new reference to the IEEE 754 standard. I definitely don't remember seeing that there, but could just be me.


Integers have an accuracy up to 15 digits - got it. Now, JS Numbers are always 64-bit double data types - got it. Reading further on this page, definitely don't remember an "Infinity" and I rarely remember the HexDecimal. Needless to say, refreshed my understanding of NaN.




Finally, refreshed my understanding with using the equality operator on objects. Unless comparing standard JavaScript data types (implicitly via var declaration), the object type doesn't matter because whenever two defined objects are compared the result is always false.

Mozilla provides further explanation with comparing NaN and its usage.



Okay, that's cool, but where did Enki get there explanation saying that all NaN will never have the same value?

I don't know and it would help if Enki did provide this online reference.

ICYMI like me, NaN is not just used in JavaScript. Surprise, that's right! So, double check your programming language if it has NaN (and Infinity).

Happy Coding!


Programming Languages using NaN (Brief List)



References






Review: Great Developers are Raised

"By building mentoring capacity at work, you can hire newcomers, broken toys, impostors and turn them into the loyal, high-quality workforce." - Eduards Sizovs

I wish this was only a tech workforce issue, but it's an issue for every industry unfortunately. And, it goes back to how the education and workforce was built long before the computer revolution.

Anyhow, this Latvian author does an excellent job on summarizing so many thoughts of developers in the tech industry worldwide especially those who reject the tech culture of living at work and programming their life away.

Read Article

https://sizovs.net/2019/04/10/the-best-developers-are-raised-not-hired/


Tuesday, April 16, 2019

Review: Mickey D's purchase of DynamicYield

"An important part is to figure how to leverage the “personalization” part of a personalization engine." - Fatema Patrawala of PacktHub

As a fast food customer, I have noticed the struggles of the fast food restaurants to keep up with the increasing pace of customer demands meanwhile managing with less workers (due to many reasons especially around the minimum wage given and the labor demand of serving food to "hangry" people). With mobile apps like UberEats (where people can order food from a list of restaurants), InstaCart (where people can order groceries), and LevelUp (where people can order food for quick pickup), the way people order food and groceries is changing significantly. The food industry that reacts to this demand where people want to leverage technology for faster service and personalization will continue to stay in business. Those that don't keep up with the demand, well, they will eventually shutdown or hopefully become acquired.

 This article highlights some great points about the change coming to the fast food industry and McDonald's most recent acquisition to adapt to customer demands.

Read Article

https://hub.packtpub.com/why-did-mcdonalds-acqui-hire-300-million-machine-learning-startup-dynamic-yield/


The sooner these fast food chains leverage technology into their businesses to personalize food services to the demands of society, the better. As for the employees - well, it's sort of like what happened to factory workers. Not to sound insensitive, they will need to learn how to make the technology, learn to manage the technology, or think about another occupation.

Enjoy your Happy Meal!

Friday, April 12, 2019

Refresh: (java) final vs immutable

I took this Enki quiz, which I appreciate, and failed. Apparently, I am forgetting simple understandings. Good thing I'm taking these quizzes. Anyhow, here it is:
https://app.enkipro.com/#/public/quiz/5c5b9ca3c50c2917a3d21407/java-final/5ab0dff2552ef519f22d0fe0



What is the difference between using 'final' modifier on an object (or variable) versus using an 'immutable' object (like String)?

In my simple understanding, using 'final' prevents anyone from changing the variable's reference (or address). On a 'final' object, can change the object's values (per attribute via methods) and can NOT change the object's reference (i.e. new <object_type>). When using 'final' on an attribute (of an object), essentially makes the attribute a constant and its value is immutable.

For in-depth explanation, see the answer on GeeksForGeeks:
https://www.geeksforgeeks.org/final-vs-immutability-java/

Wednesday, April 10, 2019

Review: Facebook's Aroma ML for Code Recommendation

I actually don't need to say much here except you should also read this article.
https://ai.facebook.com/blog/aroma-ml-for-code-recommendation/

Fascinating and useful!

I definitely have my days where I find myself digging through too many StackOverflow (or other Developer Forum sites) to find great coding answers to my problems. Thank you, Facebook!

Friday, April 5, 2019

Customizing My Own Path To Success

Most recently, I blogged about the top universities in the world for graduating in computer science.

I also posted my thoughts about education and its impact on the economies in the world where learning fundamentals of technology is essential today.

As I continue to ponder over these ideas and practices created by others on a similar to journey to upgrade how our society educates and prepares the next generation for the future of opportunities, I'm starting to significantly consider other approaches (or pathways) to learn and drive my career. In addition, I'm planning to sketch out the course (or courses) that my kids should pursue as they find their place in this fast-evolving world.

For example, if I see that my kid's gifts and passion line up with becoming an innovator, then would it be best to pursue this course?
  1. Quickly learn the basics of math, reading, writing, science, arts, and typing (keyboarding).
  2. Leverage online learning like Khan Academy.
  3. Skips grades when possible to learn the next fundamentals in pursuit of obtaining the HS graduate degree.
  4. Meanwhile, provide tech exposure to tech conferences, open source project contributions, hackathons, etc.
  5. Next, enroll in a bootcamp like Bloc to specialize skillsets in programming while creating meaningful projects in free time.
  6. Then, enroll in an entrepreneurship program like Drake University which sounds like it includes sponsorship by investors.
  7. All throughout, keeping up via collaboration with trusted friends and trusted online resources (or even an online tool like Declara).
There are many other examples I could give, but the point is thinking critically and strategically about driving our lives to positively make the world a better place - and feel great about it.

Reality Check: This is a privilege thinking. However, many can achieve this place of "privilege thinking" but it may come with a HUGE sacrifice like how many immigrants come to America for opportunity uncertain of what will actually happen once they get here. Again, apply critical thinking, strategize, and be ready to adapt. Good luck!

#lifewithpurpose

References

Listen to the stories of such young, bright, hungry minds.

Resolve: Killing Zombie Processes created by Selenium

Problem

Here's my problem.

I'm working with Selenium 2.53 (an old version, I know) and Firefox 52.8. The Gecko (driver) version is whichever works with FF 52.8. Anyhow, I create a my test script, run the test script, and see the command invokes the call to run the test. However, my browser does not open. My terminal just sits at this command running the test. Eventually, my command ends and the test failed to run. I'm running this in a secure environment on a separate machine and can't copy/paste a screenshot here.

However, here's what the error looks like - if you're lucky enough to get one.

Results :
Tests in error:
my.test.script.TestPageAUT.enterMaxChars...
    Run 1:  .... >> WebDriver Unable to bind to locking port 70...


Solution

Here's my solution.

I knew from experience that a system process opened by the driver via Java is hanging. Since I'm running this on Linux, I had to make sure I used the right Linux commands to find the processes that are running (active). Throughout my research, I learned that Linux actually has processes that are zombies (not quite dead, but not live either) which are marked with "<defunct>" next to the process.

Once I found out the process ID (PID) of the zombie process, then I just needed to kill the parent process of the zombie (because I can't kill the zombie - which I think is weird). It would be nice to just kill the zombie and automatically the parents of the zombie also die. Anyhow, in this particular case I had to kill the most super parent of the zombie in order to completely make sure the zombie process for my selenium script is dead. Selenium runs via Java by triggering the gecko driver which controls a FF process. So, to kill the zombie FF process, need to kill the Java process controlling the zombie FF process which might have a grandparent Java process.

Double check the process is dead by showing the list of active processes and seeing that there is no zombie process in the list.


Steps/Commands

Here's how I did it.

Important Note: A "kill" command has no effect on a zombie process.

List all zombie processes (ID).
$ ps aux | grep -w Z

Find the parent PID.
$ ps -o ppid <defunct_PID>         

Kill the parent
$ kill -9 <parent_PID_of_defunct_PID>


Other Useful Commands

List all running processes.
$ ps

List the running processes with Firefox.
$ ps -A | grep firefox

For more details, list with these parameters.
$ ps aux | grep firefox

Find the parent process ID.
$ ps -o ppid= -p <defunct_PID>

You can try this (kill all firefox PIDs), but this didn't work for me.
$ kill $(pgrep firefox)


Reference


Thursday, April 4, 2019

Review: Evolving Role of the Modern Developer

Read Article: Evolving Role of the Modern Developer

In this article, I have come to realize that my initialize thoughts on the direction of a development between the role of a developer and a QA engineer (or tester or whatever you call the person who verifies your code works as expected) is actually correct. I was confused and thought that perhaps the role of a tester evolved into just software engineer in test (SET) because of the positions that the tech giants were creating. In addition, because I see the evolution of AI testing.

But, on the spectrum of the SDLC the roles are becoming more integrated and in some respects these roles are merging into one. This doesn't mean the SDLC is going way. How a product or service is built will still need the basic engineering principles and cycles applied. However, who plays which role while creating or updating the product via SDLC will become more versatile and need a greater understanding of the customer's expectations of the product (and not just a function or feature). And, since no single developer can remember everything about a product, developers will need to know how to kindly work well with others.

Monday, April 1, 2019

Top Universities - Computer Science (2019)

After watching/listening to Bill Gates answer questions from MIT Technology Review, I had to look up the world's top universities in Computer Science. After all, our world today is more globally integrated than ever. I believe it's no longer smart to only know about the top schools in one's country. If you're going to make sure that you and your family are positioned well for life, then you need to know how your career passion stacks up in the world (and not just in your own country).

As a big advocate for quality education and quality access to all, it's important to also know which countries take their public education more serious than others and to know who's implementing similar ideal policies in hope of not only providing the best educational opportunities, but also the best economic opportunities.

Without further rambling, here's the list I'm reading.


Most top universities are in the United States of America (USA). However, this year's top five universities only has two in the USA. Two are in the United Kingdom (UK) and one in Switzerland.


Other top universities outside of the USA include Singapore, Canada (Toronto), and China. The biggest surprise to me on this list is Tsinghua University (China). There's a lot to say about the increasing economy and, now, education quality that China is producing in becoming a world leader on the same level of the USA and UK.


Another surprise to me is NOT seeing a university out of Japan listed in the top 20. Germany has one university listed at rank 26 (Technical University of Munich), a Hong Kong university at rank 27, and another Singapore university 29. France has one at rank 38 (Paris Sciences et Lettres - PSL) and Japan has one at rank 40.

Years ago when I was in undergraduate school (1999), almost all of the top universities for computer science were in the USA. This is not the case anymore today.

Let's take a look at another media company ranking the world's top universities in computer science.

This is a strong difference in rankings for the top universities in the world in computer science. From US News, only two universities are in the USA and one is in Saudi Arabia. Saudi Arabia? I'm skeptical about these results (powered by Clarivate Analytics InCites) especially since Stanford is not listed among the top ten rankings here.

Taking another review from Business Insider, the top ten rankings are more aligned with World University Rankings with having most top universities in computer science located in the USA and UK. Within its top ten, listed is one university from Switzerland and one from Singapore.

In conclusion, my initial thoughts still stand. Most top universities for computer science are still located in the USA, followed by the UK and Canada. However, many other countries are rising and the competition is ever growing among countries fighting for economic leadership. Overall, the biggest surprises are the speed of China's growing education system (along with its economy) and the lack or absence of India in the rankings among the best (considering how many Indians are competing in the USA job market for software positions). If I could rewind my age and choose my compsci program, then I would go to one of Switzerland's (like ETH Zurich) because of the additional cultural cross-over learnings and its ease of travel access.

References


Recommendations


Also, check out this Ted Talk.