Thursday, May 30, 2019

Mueller speaks... and reveals a "small" problem with the rule of law in the U.S.


Mueller says he could not charge Trump as Congress weighs impeachment

"Mueller said Justice Department policy prevented him from bringing charges against a sitting president or filing sealed charges, telling reporters it was 'not an option we would consider.'"

So this means the U.S. President can't be charged for crimes discovered during his or her term, even if he or she gets impeached. Wow. So much for the rule of law.

Yes, impeachment remains an effective tool for removing someone from elected office once that person is deemed to be unfit for that office. Yet it is not part of the criminal justice system. It is a political tool, for a political purpose. A person who has been deemed to have committed a crime should have to go through the criminal justice system; no one should be above the law. By saying that the political system is the only way to act against a sitting U.S. President who may have broken the law is akin to saying that the U.S. President is above the criminal justice system; the only way he or she can ever be made to answer under the criminal justice system is to impeach, and then indict. Impeachment itself does not carry the same consequences as indictment; a U.S. President that has been impeached does not end up in prison.

So there was evidence that Trump broke the law, but the criminal justice system does not apply to him while he is in office. Charges cannot be filed and sealed too, which effectively means the findings of this same investigation will not results in charges against him even if he gets impeached. The only way to bring him to justice is to impeach him, and then conduct another investigation to indict him. Hopefully, the evidence found in Mueller's investigation can be used as supporting evidence in that subsequent investigation, if it ever happens.

The U.S. has always tried to sell itself as the shining example of a country adhering to the rule of law. Right now, it just looks more and more like a banana republic.

Sunday, May 26, 2019

Is pounding on Huawei the way to go?

The US has blacklisted Huawei, leading to a series of US-based companies coming out to sever ties with Huawei citing "compliance with the US government's policy." But is this really a good move? As more and more companies join in this "ban Huawei" move, it will only isolate Huawei (and China, since the prediction is that this will eventually spread to more and more Chinese companies), and force Huawei (and other Chinese companies) to come up with competing products and standards since they can no longer use existing US ones.

The outcome? Three distinct possibilities.

1. New Chinese standards and alternatives fail to take off, eventually forcing them out of the global market. Everyone remembers Trump as the person who helped save US supremacy.

2. Competing Chinese products and standards manage to prove themselves as viable alternatives, splitting the market and bringing about a new "Cold War".

3. Competing Chinese products and standards prove to be much better alternatives, causing consumers to switch away from US ones. Trump will forever be remembered as the idiot who helped accelerate US decline.

Which will it be? Only time will tell. But we must remember that there are already Chinese alternatives out there, so Chinese companies are not starting from scratch. It now remains to be seen how fast Chinese companies will strike back.

Saturday, May 25, 2019

Setting up OpenVPN on a Softbank router

This is really more a "note to self" to remind myself how I got everything working.

For months, I have been trying, on and off, to get OpenVPN to work on a Orange Pi Lite which I had lying around. For months, I had not been able to get port forwarding to work on my setup. The main problem seemed to be the Softbank E-WMTA2.3 router that Softbank provided. No matter how I tried, it just would not allow the packets to come through to my OpenVPN server.

First, a note: I have Internet WAN connection via my Softbank E-WMTA2.3 router, which is connected to a ASUS WiFi router that serves as my internal LAN. All devices are connected to the ASUS router. Only the ASUS router is directly connected to the Softbank E-WMTA2.3 router.

I first tried to set up port forwarding on the E-WMTA2.3 router to forward OpenVPN port to the ASUS router, and on the ASUS router, port forward that to my OpenVPN server. But it didn't work no matter how I tried to tweak the settings on my E-WMTA2.3 router.

Then I came across this post (Japanese only) on how to get it working.

Basically, it is to set up PPPoE passthrough on the E-WMTA2.3 router, and then use the ASUS router to connect via PPPoE to the Internet. For that, you will need your PPPoE username and password provided by Softbank. The username should end in "@sbb.ne.jp" or something like that. The password is just a string of random numbers and characters given by Softbank, unless you have changed it subsequently.

Steps (not a detailed walkthrough, more a concept guide):
1. Set up WiFi on the ASUS router. Enable it.
2. Disable WiFi on E-WMTA2.3 router, since the ASUS router will be used.
3. Enable PPPoE passthrough on E-WMTA2.3 router.
4. Set up PPPoE on the ASUS router using the username and password given by Softbank.
5. Set up static IP address for OpenVPN server so that it gets assigned a fixed IP all the time internally. Else port forwarding may get lost.
6. Set up port forwarding to port forward OpenVPN port to the OpenVPN server on the server's static IP.
7. Note down your public IP address. This should be shown in the ASUS router's settings page.
8. Install OpenVPN on the server (in my case, Orange Pi Lite). Use the public IP noted down in Step 7.
(Alternatively, you can use a DDNS service to point a domain name to this address. In my case, I have a domain name registered with enom, so I use their settings page to point a certain hostname to this address instead. There are methods to update enom or DDNS services with current public IP address, Google should provide some answers.)
9. Generate the OVPN files, copy them to the computers you want to use OpenVPN clients on, install the client software and import the OVPN files. This should allow your client computer to connect to the OpenVPN server.

I believe this should work for other services requiring port forwarding, like cloud servers at home. Next would be to try setting up my own NextCloud server. 😉

Tidbits:
Updating DDNS with an ESP32
HOW TO: Enom dynamic DNS updating
Enom Dynamic DNS Update Script
Easy installation script for OpenVPN
OpenVPN on a Asus router

Saturday, May 18, 2019

Update 5 on ESP32-based 3D printer control board

Update on the burning MOSFET situation.

After getting advice from all over the place, it seems that the MOSFET from Aliexpress is most likely the culprit, and not the schematic. So I got myself the same IRLS3034 MOSFET from Mouser. See how different they look. The one from Aliexpress is on the left, the one from Mouser on the right.

After soldering together a new board with whatever I could salvage from the burnt one, I finally found time today to hook it up for a test. The picture shows the board running with both heat bed and hot end being heated (see the two red LEDs).

And good news! The IRLS3034 MOSFET from Mouser did not burn! So it was Aliexpress component at fault after all. I managed to heat the heat bed up to 70 degC. While the area around the MOSFET did get hot, nothing burnt. I threw in a heat sink just to be safe, since without the heat sink, temperatures were reaching 110 degC. Still, with the heat sink, the area around the 20A fuse was getting to around 110 degC. I don't know, maybe the heat is being generated by the fuse.

I am just happy that the heating circuit is working.
Lesson: Some components can be bought from Aliexpress. But for critical parts (high current stuff, or when very precise values are needed), go for a distributor like Mouser and Digikey.

Next would be to find out why the motors are not working... could be because I blew the stepper drivers, but I can't be sure. I will have to find time to work this out.

Note: Issue fixed (see comment). Pre-launch version now available here. Some information on this has been updated here.

Tuesday, May 14, 2019

Clash of giants

Trump to meet Xi after defiant China slaps U.S. with new tariffs

Quick update to the previous post about the trade war between China and the US.

It is unlikely that China will back down from this fight. Not now, not in this situation. Not without losing face, which is something that matters in China (and to Trump). Trump has made the situation one where no one can back down without losing face.

And therein lies the problem.

Both countries are economic giants, and both have the ability to weather a long-draw trade war. The winner to come away from this war, however, is the one who can better control domestic sentiments, and secure alternate markets. Given China's political system, controlling domestic sentiments is probably easier for China. But in terms of securing alternate markets, the US actually has better potential, given its long history of trade within the current international trade system.

The problem for the US, though, is that under Trump, it is not fully exploiting that potential. Instead, it seems to be walking away from it, even undermining it, by economically targeting countries other than China. The US ends up fighting trade issues on multiple fronts, when it should be focusing on a single opponent: China.

China, on the other hand, is trying to secure alternate markets through its Belt and Road Initiative. Unlike the US, which tends to tie economic aid with political ideals, China is selling a new model: economic assistance as an economic transaction, to be collected upon at a later date. Like a bank lending money to companies; the bank is only looking for monetary profits. This appeals to countries which do not subscribe to the ideals held by the US. If this approach bears fruit, China could potentially open up many more alternate markets to help it survive this trade war.

At the end of the day, the Chinese are long-term strategic thinkers. If they do choose to take up this trade war, it is because their projections have shown that China is likely to win it. And that is the scary part: what happens to the US, and the rest of the current international system, when China wins this trade war?

Monday, May 13, 2019

Both side losses in a trade war

China expected to retaliate over Trump tariff hike, economic adviser says

The Art of War teaches one to win without fighting. And I think that was the Chinese strategy. To avoid direct conflict with the US for as long as possible while China grows in strength, until such time when any conflict will inevitably be a Chinese victory, and thereby deterring the US from conflict because it would be a hopeless fight.

Trump probably threw a big spanner at that Chinese strategy with the trade war.

The question, though, is whether the US is sufficiently better than the Chinese in its economy to be able to convince the Chinese that the conflict is hopeless, right now, for the Chinese. That China would be better off bowing down to the US for the time being, and continue to suffer US dominance.

If not, China will have to fight. And in any fight, both side loses. Until the day one of them emerge the winner, both sides will be losing. Even when one side emerges the victor, it will be some time before the victor can recoup the losses from the fight.

Will China fight? Most probably.
Who will win? I would say both sides stand about an equal chance of winning, given their current economic situations.

Is there an alternative? Probably. The US could have taken other, less prominent measures to undermine Chinese progress. But I guess Trump needed the theatrics to help him in domestic politics. It is a gamble, because in any fight, luck plays a part too, and he can lose. And if he loses, he will always be remembered as the US President that lost the trade war to China.

Wednesday, May 08, 2019

People you can work with, or people who can do the work

As a leader, there are times when one can choose his or her team. The question, then, is: do you choose people you can work with, or people who can do the work?

Obviously, the best is to choose people who you can work with and who can do the work. But that may not be necessarily the case in the real world; we all have our own personalities, likes and dislikes, and abilities.

This is actually a very tough question for me. Having been in the navy for many years, the question has never been about choosing a team; in the navy, that is a luxury. With the limited people, you work with what you have, the people you are assigned. Whether you can work with them or not, whether they can do the work or not, the work must be done. The important thing is to work with people to get the work done.

Choosing someone who you can work with makes it easier for you. But not necessarily better for getting the work done. Still, good interpersonal relationships in a team does help to improve team effectiveness and efficiency.

Choosing someone who can do the work is obviously good for getting things done. However, you will probably need to put in quite some effort if you really cannot get along with that person. Effort is then required on your part in order for things to run effectively and efficiently.

So which is it?

I really don't know, and I don't think there is one correct answer. It really depends on the people and the task at hand. What is more important, of course, is to get things done. We just need to make our own judgment calls each time we are faced with this question.

Wednesday, May 01, 2019

What is a Skywalker?

I shared my views about what "The Rise of Skywalker" may mean. After watching this video, which has a largely similar idea, I think I have a clearer idea what "Skywalker" may mean.

I think it is widely known that the Star Wars series by George Lucas is very much about Anakin Skywalker. As Darth Vader in the original series, his path to Darth Vader as Anakin Skywalker in the prequels, and his legacy as carried on by his grandson, Kylo Ren, in the new sequels. A family of strong Force users.

But then comes in Rey, who has not been directly connected to Luke or Leia, yet is a Force user, and a strong one at that. And somehow, she is going to be connected to this "rise" of Skywalker.

Maybe, like Anakin, Rey was born from the Force. Episode 8, The Last Jedi, had scenes of young Force users too.

Maybe, just maybe, Skywalker is not a family, but rather, a term used to refer to those born from the Force, starting with Anakin, but subsequently Rey and others.

Which means that while the "Skywalker" family related by blood to Anakin Skywalker (Luke and Leia, and Kylo Ren) is a narrow branch, there is a wider "Skywalker" family comprising all those born from the Force, of which Rey may be one.

And the "rise of Skywalker" may be referring to the rise of those born from the Force. A new era. For good and for bad. Much like how the death of the God Emperor in Dune led to the Scattering and a new diversity in human civilization, maybe the passing of Luke has led to a new era of new Force users, born from the Force, that brings diversity to the Force-wielding galaxy.

What do you think?

Thursday, April 25, 2019

A year since Inuka's passing

It has been a year since Inuka, the first polar bear to be born in the tropics, passed away (or rather, was put to sleep). And with his passing, the Singapore zoo will no longer have a polar bear.

His passing brought up a lot of emotions in me. Not because I am a polar bear lover. But because of the significance of the polar bear enclosure to me.

You see, my father was involved in building the polar bear enclosure at the Singapore zoo. Specifically, the landscaping part. Going to the zoo with him (via the side entrance) when I was young was part of my school holiday routine. He went as part of work; I went under the reason of "helping him". Of course, I wasn't of much help, but it allowed me to roam the zoo for free.

More importantly, it allowed me to spend time with my father, seeing him at work, learning important life and leadership lessons from him.

Those times with him, those lessons from him, they are all the more precious because he passed away when I was 20.

And so, every time I pass by the polar bear enclosure (and the komodo dragon one too), I would remember the times with him, driving around Singapore as he visited various work sites to check on the progress of work, buy and bring lunch to his workers, and took over their work while they ate. He never gave any formal lectures on leadership to me, never talked about his work much, but I learnt from observing him. The importance of being present, seeing things with one's eyes, caring for the people in the team, and persevering through hard work. As a preteen and teenager, I was attending excellent leadership lessons for free.

Those lessons have served me well over the years, especially when I was in key leadership positions.

My son saw tears welling up in my eyes last year, when we walked through the empty polar bear enclosure at the zoo. I tried to explain to him the reason for those tears, but he might have been a bit too young to understand.

I only hope he will grow up learning as much from me as I had from my father.

Sunday, April 21, 2019

Learning from AI


Paper: Visualizing memorization in RNNs

It is interesting to see how AI learns. What is especially interesting to me from this video and paper is the possibility of humans learning from machines. For example, in this example, the different AI implementations are trying to understand a piece of text, and we can see its "attention span" as it tries to understand a letter (and word). My thought: can this eventually be used to help us learn better in our own physical, human world? Can an AI technique be used to teach humans how to better read a sentence to grasp a better understanding of that sentence and its context? If so, it is an interesting example of how AI can help us to improve human skills, thereby contributing toward bettering human intelligence.

Thursday, April 18, 2019

Update 4 on ESP32-based 3D printer control board

Good and bad news.

Good news: I got v1.0 of MRR ESPA (the basic 3D printer control board based on the ESP32) all soldered up. Motors with A4988 drivers working. Endstops working. Hotend was able to heat up to 240 degC and maintain it without any significant rise in the temperature of the MOSFET.

Bad news: The heat bed MOSFET smoked (almost started a fire) when I was testing it. Tried room temperature to 40 degC, and saw smoke when it started to heat up to 35 degC. Temperature on the heatsink attached to the MOSFET was reaching 120 degC. Shut off, then I tried gradual heating. Slowly went from room temperature to 35, then step up in steps of 2 to 3 degC. Eventually reached 50 degC. When going to 52 degC, there was a bit of smoke which soon stopped when temperature reached target. Then I tried 55 degC. That was when it started to smoke real bad. Like, things were melting, there was sizzling sound, and lots of smoke. Quickly shut off the mains.


You can see the black stuff that came from the MOSFET. Smoke was coming out, and when the smoke cleared, I saw that this black stuff had oozed out from the MOSFET.


This is the reverse side. The same blackish stuff was on the reverse side too, I removed it before taking the photo, though you can see some residue.

The heat bed is 180W, running on 12V, so the current draw (theoretically) is 15A. Resistance as measured from terminal + to terminal - for the heat bed was 0.9 ohms, which sounds about right. The MOSFET (IRLS3034) is driven by a voltage divider that drives the gate at 4.8V. Based on specs, the IRLS3034 should have Rds of 2.0 mOhms at 4.5V. So simple calculation says the MOSFET is dissipating 15x15x0.002 which is 0.45W. At temperature rise of 40degC/W, the MOSFET should only be rising like 18degC. I mean, even given other factors, the temperature rise should not be more than 50degC, right? But I was getting a temp rise of 100degC and more. I can't really figure out why.

If anyone has any idea, I would be open to hearing them.

Note: Issue fixed. Pre-launch version now available here. Some information on this has been updated here.

Sunday, April 14, 2019

What "The Rise of Skywalker" may mean...

Star Wars: The Rise of Skywalker


Wow.

But what does it mean? There has been a lot of speculation.

So here, I add my own take.

The Star Wars movies made by George Lucas has been about Anakin Skywalker. Anakin Skywalker as Darth Vader in the original movies, then Anakin's story about how he came to be Darth Vader in the prequels.

And in the new movies, Episodes 7 and 8, Anakin's legacy through his children (Luke and Leia) in shaping the galaxy after the destruction of Death Star II and the collapse of the Empire.

The way I see it, the entire series, from Episode 1 till 9, is about Anakin Skywalker.

Who is Anakin Skywalker? Anakin Skywalker is the Chosen One. The one who will bring balance to the force.

And Kylo Ren has said that he will finish what Anakin has started. Which implies that Kylo will bring balance to the force. Or, he could be the one to put an end to Palpatine, a final end that Anakin started but did not accomplish (if Palpatine returns).

With the amount of things that George Lucas borrowed from Frank Herbert's Dune in the original movies, it would not be surprising that Episode 9 will continue to borrow some concepts from Dune. When Luke's voice said, "A thousand generations live within you," it reminded me about the Other Memory of the Bene Gesserit.

If that is so, there is nothing stopping Episode 9 from borrowing other concepts from Dune. Such as the warning against a central body (in the figure of Paul Atreides, and then the God Emperor Leto II) governing over all of humanity.

Could this mean that Anakin Skywalker, and the Skywalker line, is the force that seeks to prevent any one side, whether good or bad, from controlling the galaxy?

The rise of Skywalker, the balancing force. Could this be the meaning behind the movie title?

Saturday, April 13, 2019

夜深难入眠

夜里独唱琵琶行
歌声未出泪先流
感慨万分不能停
泣梦九泉再重逢
转眼三年光阴逝
枯松独立泰山峰

--------------------------------------------
夜深星空难入眠
辗转反复心不静
意生字出句自成
只恨知音已无人

--------------------------------------------
穿山越岭孰不言
穿山越岭又曾见
赴汤蹈火入耳熟
赴汤蹈火又几人

--------------------------------------------
杜康不酿酒
羲之不提笔
太白不吟诗
孔明不谋计
志高技深无知音
青竹无名枉一生
玄德不顾孔明芦
卧龙再能无用处
 
--------------------------------------------
(Update 15 October 2022: A modification of the above)
杜康酿酒羲之书
太白吟诗孔明计
志高技深无知音
青竹无名枉一生
玄德不顾孔明芦
卧龙再能无用处

Tuesday, April 09, 2019

Determining what AI will replace

Real or artificial? Tech titans declare AI ethics concerns

I think we really need to sit down for a proper conversation on what we want to develop AI for. What is it that we want to replace with machines, and what is it that human beings will continue to do?

History has shown that if something is possible, human endeavor will eventually make it happen. Human beings can now fly, dive underwater, and go faster on land than any other land animal. We are now able to communicate across vast distances in real time. We can interact with people without having to be physically at the same location.

Still, human have been the ones at the center of these actions. Humans decide where to fly to, where to go diving, and where to travel on land. We decide on who we want to interact to, and what we want to talk about. But AI is slowly changing that. And if we do not come to a decision soon, AI will only make more and more decisions for us.

And the danger of that? If we make less and less decisions, our brains will grow stupid from lack of use.

Of course, this is not a danger if we can reuse that freed up brain power for something else. So the question is twofold.

1. What aspects of our lives are we willing to replace with machines, such that it frees us up from things that we do not (or cannot) do for us to focus on things that we should be really focusing on?
2. What are the things that we should be focusing on?

Looking at these two questions, I think we can say that machine vision is a good case for AI. It can help those who cannot see. It enhances our ability to see minute details so that we do not miss out on them. But at the same time, there is the downside: current machine vision is pre-trained before deployment, which means it will recognize a finite set of objects. Which means any reliance on such technology will "narrow" our perspective to that finite set, i.e. our attention gets drawn to things that the computer knows, making us more likely to miss other details that we might have otherwise caught if we did not rely on machine vision.

Let's look at machine transcription (aka speech-to-text synthesis). This definitely helps those who cannot hear. And for others, it frees up people from a mundane task so that we can use those people (resources) for other tasks. But is there a downside? So far, I can't think of any, but who knows?

Autonomous driving is another use case which has been undergoing heavy development. And a lot of attention in terms of ethics. Its controversy is: who is responsible should a self-driving car kill or injure someone? There is debate on this, and I hope people will take up this debate more actively, because with the current rate of development, self-driving cars are on the horizon. Let's sort the ethical questions before we are forced to face the reality of it.

And finally, my biggest fear: uncurbed, we will one day develop machines that are so intelligent, they no longer need human beings for their further development. They can develop themselves into even better and better versions able to do more and more things. Will we then find ourselves as second-class citizens of our own societies?

Tuesday, April 02, 2019

Do fifth-generation fighters require exceptional maneuverability?

The F-35's New OODA Loop

It is quite interesting that this article brought up COL John Boyd, the father of the OODA loop. It is interesting because COL Boyd was involved in designing the F-15 and F-16, and maneuverability was one of the main issues that he addressed. At a time when decision-makers were saying that missiles will end the era of dogfighting with guns, COL Boyd showed that fighters will still need be have high maneuverability in order to achieve their missions.

The question, then, is whether this still holds true?

"If superior performance is not required to win the next war, what is? What characteristics will allow a fifth-generation fighter pilot to execute the OODA loop at a faster tempo than his enemy in a combat scenario he is likely to encounter? The answer, in a word, is information."

Yes, the OODA loop places heavy emphasis on information, because information is crucial for the orientation process of the loop. But the entire process is not sequential; everything is interacting with each other, and a fighter's maneuverability affects the orientation, decision-making, and action processes too.

"While maneuverability allowed a fourth-generation fighter pilot to operate the OODA loop at a faster tempo than his enemy in a dogfight, this is not the primary conflict a fifth-generation fighter is designed around. Today’s designers optimized the F-35 to execute a coordinated OODA loop between a flight of F-35s performing an air-to-air or air-to-ground engagement with today’s weapons and tactics, not a 1970s one-on-one dogfight."

So while today's fighters may not need to be as maneuverable because maneuverability is being designed into missiles instead, we need to ask the question: can the enemy outmaneuver our missiles? Because if the enemy can do so, it can close the distance to our fighters, and we will still end up in a dogfight. And we will end up in a dogfight against an enemy that is designed for dogfights using a fighter that is not. Who will win?

That same question came up in COL Boyd's mind back in the 60s and 70s, when MiGs came up against F-4s, designed to fight with missiles, in the Vietnam War.

COL Boyd's emphasis on maneuverability is about winning under all circumstances. The execution of the OODA loop must be faster than the enemy's under all circumstances. That was why he came up with the E-M charts to show the performance of various aircraft, to illustrate where their advantages and disadvantages are. That was why he sought to emphasize the design of maneuverability into fighter design.

While information is key to winning battles, maneuverability is an equally important aspect that must not be neglected. As long as human beings are the ones fighting wars, we need to be able to gather information faster than our enemies, orient ourselves faster, decide faster, and be able to act faster.

Under all circumstances.

Should we hedge our bets and emphasize superior information, superior decision-making, and superior maneuverability all at once? Or do we place a gamble that superior information is all we need?